generated-configure.sh revision 2340:5f6920274c48
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_HOTSPOT
876HOTSPOT_DIST
877BUILD_OUTPUT
878JDK_TOPDIR
879NASHORN_TOPDIR
880HOTSPOT_TOPDIR
881JAXWS_TOPDIR
882JAXP_TOPDIR
883CORBA_TOPDIR
884LANGTOOLS_TOPDIR
885EXTERNAL_BUILDJDK
886BUILD_JDK
887CREATE_BUILDJDK
888JLINK
889JMOD
890BOOT_JDK_BITS
891JAVAC_FLAGS
892BOOT_JDK_MODULAR
893BOOT_JDK_SOURCETARGET
894JARSIGNER
895JAR
896JAVAH
897JAVAC
898JAVA
899BOOT_JDK
900JAVA_CHECK
901JAVAC_CHECK
902VERSION_IS_GA
903VERSION_SHORT
904VERSION_STRING
905VERSION_NUMBER_FOUR_POSITIONS
906VERSION_NUMBER
907VERSION_OPT
908VERSION_BUILD
909VERSION_PRE
910VERSION_PATCH
911VERSION_SECURITY
912VERSION_MINOR
913VERSION_MAJOR
914MACOSX_BUNDLE_ID_BASE
915MACOSX_BUNDLE_NAME_BASE
916HOTSPOT_VM_DISTRO
917COMPANY_NAME
918JDK_RC_PLATFORM_NAME
919PRODUCT_SUFFIX
920PRODUCT_NAME
921LAUNCHER_NAME
922JLINK_KEEP_PACKAGED_MODULES
923COPYRIGHT_YEAR
924COMPRESS_JARS
925INCLUDE_SA
926UNLIMITED_CRYPTO
927CACERTS_FILE
928ENABLE_HEADLESS_ONLY
929DEFAULT_MAKE_TARGET
930OS_VERSION_MICRO
931OS_VERSION_MINOR
932OS_VERSION_MAJOR
933PKG_CONFIG
934BASH_ARGS
935SETFILE
936CODESIGN
937XATTR
938DSYMUTIL
939IS_GNU_TIME
940PATCH
941DTRACE
942TIME
943STAT
944HG
945READELF
946OTOOL
947LDD
948ZIPEXE
949UNZIP
950TAR_SUPPORTS_TRANSFORM
951TAR_INCLUDE_PARAM
952TAR_CREATE_EXTRA_PARAM
953TAR_TYPE
954FIND_DELETE
955OUTPUT_SYNC
956OUTPUT_SYNC_SUPPORTED
957CHECK_TOOLSDIR_MAKE
958CHECK_TOOLSDIR_GMAKE
959CHECK_MAKE
960CHECK_GMAKE
961MAKE
962PKGHANDLER
963CONFIGURESUPPORT_OUTPUTDIR
964OUTPUT_ROOT
965CONF_NAME
966SPEC
967SDKROOT
968XCODEBUILD
969VALID_JVM_VARIANTS
970JVM_VARIANTS
971DEBUG_LEVEL
972HOTSPOT_DEBUG_LEVEL
973JDK_VARIANT
974USERNAME
975CANONICAL_TOPDIR
976ORIGINAL_TOPDIR
977TOPDIR
978PATH_SEP
979ZERO_ARCHDEF
980HOTSPOT_BUILD_CPU_DEFINE
981HOTSPOT_BUILD_CPU_ARCH
982HOTSPOT_BUILD_CPU
983HOTSPOT_BUILD_OS_TYPE
984HOTSPOT_BUILD_OS
985OPENJDK_BUILD_BUNDLE_PLATFORM
986OPENJDK_BUILD_CPU_BUNDLE
987OPENJDK_BUILD_OS_BUNDLE
988OPENJDK_BUILD_OS_EXPORT_DIR
989OPENJDK_BUILD_CPU_JLI_CFLAGS
990OPENJDK_BUILD_CPU_OSARCH
991OPENJDK_BUILD_CPU_ISADIR
992OPENJDK_BUILD_CPU_LIBDIR
993OPENJDK_BUILD_CPU_LEGACY_LIB
994OPENJDK_BUILD_CPU_LEGACY
995HOTSPOT_TARGET_CPU_DEFINE
996HOTSPOT_TARGET_CPU_ARCH
997HOTSPOT_TARGET_CPU
998HOTSPOT_TARGET_OS_TYPE
999HOTSPOT_TARGET_OS
1000DEFINE_CROSS_COMPILE_ARCH
1001LP64
1002OPENJDK_TARGET_BUNDLE_PLATFORM
1003OPENJDK_TARGET_CPU_BUNDLE
1004OPENJDK_TARGET_OS_BUNDLE
1005OPENJDK_TARGET_OS_EXPORT_DIR
1006OPENJDK_TARGET_CPU_JLI_CFLAGS
1007OPENJDK_TARGET_CPU_OSARCH
1008OPENJDK_TARGET_CPU_ISADIR
1009OPENJDK_TARGET_CPU_LIBDIR
1010OPENJDK_TARGET_CPU_LEGACY_LIB
1011OPENJDK_TARGET_CPU_LEGACY
1012REQUIRED_OS_VERSION
1013REQUIRED_OS_NAME
1014COMPILE_TYPE
1015OPENJDK_TARGET_CPU_ENDIAN
1016OPENJDK_TARGET_CPU_BITS
1017OPENJDK_TARGET_CPU_ARCH
1018OPENJDK_TARGET_CPU
1019OPENJDK_TARGET_OS_ENV
1020OPENJDK_TARGET_OS_TYPE
1021OPENJDK_TARGET_OS
1022OPENJDK_BUILD_CPU_ENDIAN
1023OPENJDK_BUILD_CPU_BITS
1024OPENJDK_BUILD_CPU_ARCH
1025OPENJDK_BUILD_CPU
1026OPENJDK_BUILD_OS_ENV
1027OPENJDK_BUILD_OS_TYPE
1028OPENJDK_BUILD_OS
1029OPENJDK_BUILD_AUTOCONF_NAME
1030OPENJDK_TARGET_AUTOCONF_NAME
1031target_os
1032target_vendor
1033target_cpu
1034target
1035host_os
1036host_vendor
1037host_cpu
1038host
1039build_os
1040build_vendor
1041build_cpu
1042build
1043NICE
1044CPIO
1045DF
1046READLINK
1047CYGPATH
1048SED
1049FGREP
1050EGREP
1051GREP
1052AWK
1053XARGS
1054WHICH
1055WC
1056UNIQ
1057UNAME
1058TR
1059TOUCH
1060TEE
1061TAR
1062TAIL
1063SORT
1064SH
1065RMDIR
1066RM
1067PRINTF
1068NAWK
1069MV
1070MKTEMP
1071MKDIR
1072LS
1073LN
1074GZIP
1075GUNZIP
1076HEAD
1077FIND
1078FILE
1079EXPR
1080ECHO
1081DIRNAME
1082DIFF
1083DATE
1084CUT
1085CP
1086COMM
1087CMP
1088CHMOD
1089CAT
1090BASH
1091BASENAME
1092DATE_WHEN_CONFIGURED
1093ORIGINAL_PATH
1094CONFIGURE_COMMAND_LINE
1095target_alias
1096host_alias
1097build_alias
1098LIBS
1099ECHO_T
1100ECHO_N
1101ECHO_C
1102DEFS
1103mandir
1104localedir
1105libdir
1106psdir
1107pdfdir
1108dvidir
1109htmldir
1110infodir
1111docdir
1112oldincludedir
1113includedir
1114localstatedir
1115sharedstatedir
1116sysconfdir
1117datadir
1118datarootdir
1119libexecdir
1120sbindir
1121bindir
1122program_transform_name
1123prefix
1124exec_prefix
1125PACKAGE_URL
1126PACKAGE_BUGREPORT
1127PACKAGE_STRING
1128PACKAGE_VERSION
1129PACKAGE_TARNAME
1130PACKAGE_NAME
1131PATH_SEPARATOR
1132SHELL'
1133ac_subst_files=''
1134ac_user_opts='
1135enable_option_checking
1136with_target_bits
1137enable_openjdk_only
1138with_custom_make_dir
1139with_jdk_variant
1140enable_debug
1141with_debug_level
1142with_jvm_variants
1143with_devkit
1144with_sys_root
1145with_sysroot
1146with_tools_dir
1147with_toolchain_path
1148with_extra_path
1149with_sdk_name
1150with_conf_name
1151with_output_sync
1152with_default_make_target
1153enable_headless_only
1154with_cacerts_file
1155enable_unlimited_crypto
1156with_copyright_year
1157enable_keep_packaged_modules
1158with_milestone
1159with_update_version
1160with_user_release_suffix
1161with_build_number
1162with_version_string
1163with_version_pre
1164with_version_opt
1165with_version_build
1166with_version_major
1167with_version_minor
1168with_version_security
1169with_version_patch
1170with_boot_jdk
1171with_build_jdk
1172with_add_source_root
1173with_override_source_root
1174with_adds_and_overrides
1175with_override_langtools
1176with_override_corba
1177with_override_jaxp
1178with_override_jaxws
1179with_override_hotspot
1180with_override_nashorn
1181with_override_jdk
1182with_import_hotspot
1183with_import_modules
1184enable_static_build
1185with_toolchain_type
1186with_extra_cflags
1187with_extra_cxxflags
1188with_extra_ldflags
1189with_toolchain_version
1190with_build_devkit
1191with_jtreg
1192enable_warnings_as_errors
1193with_native_debug_symbols
1194enable_debug_symbols
1195enable_zip_debug_info
1196enable_native_coverage
1197enable_dtrace
1198with_jvm_features
1199with_jvm_interpreter
1200enable_hotspot_gtest
1201with_stdc__lib
1202with_msvcr_dll
1203with_msvcp_dll
1204with_x
1205with_cups
1206with_cups_include
1207with_freetype
1208with_freetype_include
1209with_freetype_lib
1210with_freetype_src
1211enable_freetype_bundling
1212with_alsa
1213with_alsa_include
1214with_alsa_lib
1215with_libffi
1216with_libffi_include
1217with_libffi_lib
1218with_libjpeg
1219with_giflib
1220with_libpng
1221with_zlib
1222with_lcms
1223with_dxsdk
1224with_dxsdk_lib
1225with_dxsdk_include
1226enable_jtreg_failure_handler
1227enable_generate_classlist
1228with_num_cores
1229with_memory_size
1230with_jobs
1231with_test_jobs
1232with_boot_jdk_jvmargs
1233with_sjavac_server_java
1234enable_sjavac
1235enable_javac_server
1236enable_icecc
1237enable_precompiled_headers
1238enable_ccache
1239with_ccache_dir
1240'
1241      ac_precious_vars='build_alias
1242host_alias
1243target_alias
1244BASENAME
1245BASH
1246CAT
1247CHMOD
1248CMP
1249COMM
1250CP
1251CUT
1252DATE
1253DIFF
1254DIRNAME
1255ECHO
1256EXPR
1257FILE
1258FIND
1259HEAD
1260GUNZIP
1261GZIP
1262LN
1263LS
1264MKDIR
1265MKTEMP
1266MV
1267NAWK
1268PRINTF
1269RM
1270RMDIR
1271SH
1272SORT
1273TAIL
1274TAR
1275TEE
1276TOUCH
1277TR
1278UNAME
1279UNIQ
1280WC
1281WHICH
1282XARGS
1283AWK
1284GREP
1285EGREP
1286FGREP
1287SED
1288CYGPATH
1289READLINK
1290DF
1291CPIO
1292NICE
1293MAKE
1294UNZIP
1295ZIPEXE
1296LDD
1297OTOOL
1298READELF
1299HG
1300STAT
1301TIME
1302DTRACE
1303PATCH
1304DSYMUTIL
1305XATTR
1306CODESIGN
1307SETFILE
1308PKG_CONFIG
1309JAVA
1310JAVAC
1311JAVAH
1312JAR
1313JARSIGNER
1314CC
1315CFLAGS
1316LDFLAGS
1317LIBS
1318CPPFLAGS
1319CXX
1320CXXFLAGS
1321CCC
1322CPP
1323CXXCPP
1324AS
1325AR
1326LIPO
1327STRIP
1328NM
1329GNM
1330OBJCOPY
1331OBJDUMP
1332BUILD_CC
1333BUILD_CXX
1334BUILD_NM
1335BUILD_AR
1336BUILD_OBJCOPY
1337BUILD_STRIP
1338JTREGEXE
1339XMKMF
1340FREETYPE_CFLAGS
1341FREETYPE_LIBS
1342ALSA_CFLAGS
1343ALSA_LIBS
1344LIBFFI_CFLAGS
1345LIBFFI_LIBS
1346PNG_CFLAGS
1347PNG_LIBS
1348LCMS_CFLAGS
1349LCMS_LIBS
1350ICECC_CMD
1351ICECC_CREATE_ENV
1352ICECC_WRAPPER
1353CCACHE'
1354
1355
1356# Initialize some variables set by options.
1357ac_init_help=
1358ac_init_version=false
1359ac_unrecognized_opts=
1360ac_unrecognized_sep=
1361# The variables have the same names as the options, with
1362# dashes changed to underlines.
1363cache_file=/dev/null
1364exec_prefix=NONE
1365no_create=
1366no_recursion=
1367prefix=NONE
1368program_prefix=NONE
1369program_suffix=NONE
1370program_transform_name=s,x,x,
1371silent=
1372site=
1373srcdir=
1374verbose=
1375x_includes=NONE
1376x_libraries=NONE
1377
1378# Installation directory options.
1379# These are left unexpanded so users can "make install exec_prefix=/foo"
1380# and all the variables that are supposed to be based on exec_prefix
1381# by default will actually change.
1382# Use braces instead of parens because sh, perl, etc. also accept them.
1383# (The list follows the same order as the GNU Coding Standards.)
1384bindir='${exec_prefix}/bin'
1385sbindir='${exec_prefix}/sbin'
1386libexecdir='${exec_prefix}/libexec'
1387datarootdir='${prefix}/share'
1388datadir='${datarootdir}'
1389sysconfdir='${prefix}/etc'
1390sharedstatedir='${prefix}/com'
1391localstatedir='${prefix}/var'
1392includedir='${prefix}/include'
1393oldincludedir='/usr/include'
1394docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1395infodir='${datarootdir}/info'
1396htmldir='${docdir}'
1397dvidir='${docdir}'
1398pdfdir='${docdir}'
1399psdir='${docdir}'
1400libdir='${exec_prefix}/lib'
1401localedir='${datarootdir}/locale'
1402mandir='${datarootdir}/man'
1403
1404ac_prev=
1405ac_dashdash=
1406for ac_option
1407do
1408  # If the previous option needs an argument, assign it.
1409  if test -n "$ac_prev"; then
1410    eval $ac_prev=\$ac_option
1411    ac_prev=
1412    continue
1413  fi
1414
1415  case $ac_option in
1416  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1417  *=)   ac_optarg= ;;
1418  *)    ac_optarg=yes ;;
1419  esac
1420
1421  # Accept the important Cygnus configure options, so we can diagnose typos.
1422
1423  case $ac_dashdash$ac_option in
1424  --)
1425    ac_dashdash=yes ;;
1426
1427  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1428    ac_prev=bindir ;;
1429  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1430    bindir=$ac_optarg ;;
1431
1432  -build | --build | --buil | --bui | --bu)
1433    ac_prev=build_alias ;;
1434  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1435    build_alias=$ac_optarg ;;
1436
1437  -cache-file | --cache-file | --cache-fil | --cache-fi \
1438  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1439    ac_prev=cache_file ;;
1440  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1441  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1442    cache_file=$ac_optarg ;;
1443
1444  --config-cache | -C)
1445    cache_file=config.cache ;;
1446
1447  -datadir | --datadir | --datadi | --datad)
1448    ac_prev=datadir ;;
1449  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1450    datadir=$ac_optarg ;;
1451
1452  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1453  | --dataroo | --dataro | --datar)
1454    ac_prev=datarootdir ;;
1455  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1456  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1457    datarootdir=$ac_optarg ;;
1458
1459  -disable-* | --disable-*)
1460    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1461    # Reject names that are not valid shell variable names.
1462    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1463      as_fn_error $? "invalid feature name: $ac_useropt"
1464    ac_useropt_orig=$ac_useropt
1465    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1466    case $ac_user_opts in
1467      *"
1468"enable_$ac_useropt"
1469"*) ;;
1470      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1471	 ac_unrecognized_sep=', ';;
1472    esac
1473    eval enable_$ac_useropt=no ;;
1474
1475  -docdir | --docdir | --docdi | --doc | --do)
1476    ac_prev=docdir ;;
1477  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1478    docdir=$ac_optarg ;;
1479
1480  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1481    ac_prev=dvidir ;;
1482  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1483    dvidir=$ac_optarg ;;
1484
1485  -enable-* | --enable-*)
1486    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1487    # Reject names that are not valid shell variable names.
1488    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1489      as_fn_error $? "invalid feature name: $ac_useropt"
1490    ac_useropt_orig=$ac_useropt
1491    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1492    case $ac_user_opts in
1493      *"
1494"enable_$ac_useropt"
1495"*) ;;
1496      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1497	 ac_unrecognized_sep=', ';;
1498    esac
1499    eval enable_$ac_useropt=\$ac_optarg ;;
1500
1501  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1502  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1503  | --exec | --exe | --ex)
1504    ac_prev=exec_prefix ;;
1505  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1506  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1507  | --exec=* | --exe=* | --ex=*)
1508    exec_prefix=$ac_optarg ;;
1509
1510  -gas | --gas | --ga | --g)
1511    # Obsolete; use --with-gas.
1512    with_gas=yes ;;
1513
1514  -help | --help | --hel | --he | -h)
1515    ac_init_help=long ;;
1516  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1517    ac_init_help=recursive ;;
1518  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1519    ac_init_help=short ;;
1520
1521  -host | --host | --hos | --ho)
1522    ac_prev=host_alias ;;
1523  -host=* | --host=* | --hos=* | --ho=*)
1524    host_alias=$ac_optarg ;;
1525
1526  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1527    ac_prev=htmldir ;;
1528  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1529  | --ht=*)
1530    htmldir=$ac_optarg ;;
1531
1532  -includedir | --includedir | --includedi | --included | --include \
1533  | --includ | --inclu | --incl | --inc)
1534    ac_prev=includedir ;;
1535  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1536  | --includ=* | --inclu=* | --incl=* | --inc=*)
1537    includedir=$ac_optarg ;;
1538
1539  -infodir | --infodir | --infodi | --infod | --info | --inf)
1540    ac_prev=infodir ;;
1541  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1542    infodir=$ac_optarg ;;
1543
1544  -libdir | --libdir | --libdi | --libd)
1545    ac_prev=libdir ;;
1546  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1547    libdir=$ac_optarg ;;
1548
1549  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1550  | --libexe | --libex | --libe)
1551    ac_prev=libexecdir ;;
1552  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1553  | --libexe=* | --libex=* | --libe=*)
1554    libexecdir=$ac_optarg ;;
1555
1556  -localedir | --localedir | --localedi | --localed | --locale)
1557    ac_prev=localedir ;;
1558  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1559    localedir=$ac_optarg ;;
1560
1561  -localstatedir | --localstatedir | --localstatedi | --localstated \
1562  | --localstate | --localstat | --localsta | --localst | --locals)
1563    ac_prev=localstatedir ;;
1564  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1565  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1566    localstatedir=$ac_optarg ;;
1567
1568  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1569    ac_prev=mandir ;;
1570  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1571    mandir=$ac_optarg ;;
1572
1573  -nfp | --nfp | --nf)
1574    # Obsolete; use --without-fp.
1575    with_fp=no ;;
1576
1577  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1578  | --no-cr | --no-c | -n)
1579    no_create=yes ;;
1580
1581  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1582  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1583    no_recursion=yes ;;
1584
1585  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1586  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1587  | --oldin | --oldi | --old | --ol | --o)
1588    ac_prev=oldincludedir ;;
1589  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1590  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1591  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1592    oldincludedir=$ac_optarg ;;
1593
1594  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1595    ac_prev=prefix ;;
1596  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1597    prefix=$ac_optarg ;;
1598
1599  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1600  | --program-pre | --program-pr | --program-p)
1601    ac_prev=program_prefix ;;
1602  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1603  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1604    program_prefix=$ac_optarg ;;
1605
1606  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1607  | --program-suf | --program-su | --program-s)
1608    ac_prev=program_suffix ;;
1609  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1610  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1611    program_suffix=$ac_optarg ;;
1612
1613  -program-transform-name | --program-transform-name \
1614  | --program-transform-nam | --program-transform-na \
1615  | --program-transform-n | --program-transform- \
1616  | --program-transform | --program-transfor \
1617  | --program-transfo | --program-transf \
1618  | --program-trans | --program-tran \
1619  | --progr-tra | --program-tr | --program-t)
1620    ac_prev=program_transform_name ;;
1621  -program-transform-name=* | --program-transform-name=* \
1622  | --program-transform-nam=* | --program-transform-na=* \
1623  | --program-transform-n=* | --program-transform-=* \
1624  | --program-transform=* | --program-transfor=* \
1625  | --program-transfo=* | --program-transf=* \
1626  | --program-trans=* | --program-tran=* \
1627  | --progr-tra=* | --program-tr=* | --program-t=*)
1628    program_transform_name=$ac_optarg ;;
1629
1630  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1631    ac_prev=pdfdir ;;
1632  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1633    pdfdir=$ac_optarg ;;
1634
1635  -psdir | --psdir | --psdi | --psd | --ps)
1636    ac_prev=psdir ;;
1637  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1638    psdir=$ac_optarg ;;
1639
1640  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1641  | -silent | --silent | --silen | --sile | --sil)
1642    silent=yes ;;
1643
1644  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1645    ac_prev=sbindir ;;
1646  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1647  | --sbi=* | --sb=*)
1648    sbindir=$ac_optarg ;;
1649
1650  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1651  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1652  | --sharedst | --shareds | --shared | --share | --shar \
1653  | --sha | --sh)
1654    ac_prev=sharedstatedir ;;
1655  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1656  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1657  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1658  | --sha=* | --sh=*)
1659    sharedstatedir=$ac_optarg ;;
1660
1661  -site | --site | --sit)
1662    ac_prev=site ;;
1663  -site=* | --site=* | --sit=*)
1664    site=$ac_optarg ;;
1665
1666  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1667    ac_prev=srcdir ;;
1668  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1669    srcdir=$ac_optarg ;;
1670
1671  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1672  | --syscon | --sysco | --sysc | --sys | --sy)
1673    ac_prev=sysconfdir ;;
1674  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1675  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1676    sysconfdir=$ac_optarg ;;
1677
1678  -target | --target | --targe | --targ | --tar | --ta | --t)
1679    ac_prev=target_alias ;;
1680  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1681    target_alias=$ac_optarg ;;
1682
1683  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1684    verbose=yes ;;
1685
1686  -version | --version | --versio | --versi | --vers | -V)
1687    ac_init_version=: ;;
1688
1689  -with-* | --with-*)
1690    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1691    # Reject names that are not valid shell variable names.
1692    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1693      as_fn_error $? "invalid package name: $ac_useropt"
1694    ac_useropt_orig=$ac_useropt
1695    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1696    case $ac_user_opts in
1697      *"
1698"with_$ac_useropt"
1699"*) ;;
1700      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1701	 ac_unrecognized_sep=', ';;
1702    esac
1703    eval with_$ac_useropt=\$ac_optarg ;;
1704
1705  -without-* | --without-*)
1706    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1707    # Reject names that are not valid shell variable names.
1708    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1709      as_fn_error $? "invalid package name: $ac_useropt"
1710    ac_useropt_orig=$ac_useropt
1711    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1712    case $ac_user_opts in
1713      *"
1714"with_$ac_useropt"
1715"*) ;;
1716      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1717	 ac_unrecognized_sep=', ';;
1718    esac
1719    eval with_$ac_useropt=no ;;
1720
1721  --x)
1722    # Obsolete; use --with-x.
1723    with_x=yes ;;
1724
1725  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1726  | --x-incl | --x-inc | --x-in | --x-i)
1727    ac_prev=x_includes ;;
1728  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1729  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1730    x_includes=$ac_optarg ;;
1731
1732  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1733  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1734    ac_prev=x_libraries ;;
1735  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1736  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1737    x_libraries=$ac_optarg ;;
1738
1739  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1740Try \`$0 --help' for more information"
1741    ;;
1742
1743  *=*)
1744    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1745    # Reject names that are not valid shell variable names.
1746    case $ac_envvar in #(
1747      '' | [0-9]* | *[!_$as_cr_alnum]* )
1748      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1749    esac
1750    eval $ac_envvar=\$ac_optarg
1751    export $ac_envvar ;;
1752
1753  *)
1754    # FIXME: should be removed in autoconf 3.0.
1755    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1756    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1757      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1758    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1759    ;;
1760
1761  esac
1762done
1763
1764if test -n "$ac_prev"; then
1765  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1766  as_fn_error $? "missing argument to $ac_option"
1767fi
1768
1769if test -n "$ac_unrecognized_opts"; then
1770  case $enable_option_checking in
1771    no) ;;
1772    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1773    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1774  esac
1775fi
1776
1777# Check all directory arguments for consistency.
1778for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1779		datadir sysconfdir sharedstatedir localstatedir includedir \
1780		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1781		libdir localedir mandir
1782do
1783  eval ac_val=\$$ac_var
1784  # Remove trailing slashes.
1785  case $ac_val in
1786    */ )
1787      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1788      eval $ac_var=\$ac_val;;
1789  esac
1790  # Be sure to have absolute directory names.
1791  case $ac_val in
1792    [\\/$]* | ?:[\\/]* )  continue;;
1793    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1794  esac
1795  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1796done
1797
1798# There might be people who depend on the old broken behavior: `$host'
1799# used to hold the argument of --host etc.
1800# FIXME: To remove some day.
1801build=$build_alias
1802host=$host_alias
1803target=$target_alias
1804
1805# FIXME: To remove some day.
1806if test "x$host_alias" != x; then
1807  if test "x$build_alias" = x; then
1808    cross_compiling=maybe
1809  elif test "x$build_alias" != "x$host_alias"; then
1810    cross_compiling=yes
1811  fi
1812fi
1813
1814ac_tool_prefix=
1815test -n "$host_alias" && ac_tool_prefix=$host_alias-
1816
1817test "$silent" = yes && exec 6>/dev/null
1818
1819
1820ac_pwd=`pwd` && test -n "$ac_pwd" &&
1821ac_ls_di=`ls -di .` &&
1822ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1823  as_fn_error $? "working directory cannot be determined"
1824test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1825  as_fn_error $? "pwd does not report name of working directory"
1826
1827
1828# Find the source files, if location was not specified.
1829if test -z "$srcdir"; then
1830  ac_srcdir_defaulted=yes
1831  # Try the directory containing this script, then the parent directory.
1832  ac_confdir=`$as_dirname -- "$as_myself" ||
1833$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1834	 X"$as_myself" : 'X\(//\)[^/]' \| \
1835	 X"$as_myself" : 'X\(//\)$' \| \
1836	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1837$as_echo X"$as_myself" |
1838    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1839	    s//\1/
1840	    q
1841	  }
1842	  /^X\(\/\/\)[^/].*/{
1843	    s//\1/
1844	    q
1845	  }
1846	  /^X\(\/\/\)$/{
1847	    s//\1/
1848	    q
1849	  }
1850	  /^X\(\/\).*/{
1851	    s//\1/
1852	    q
1853	  }
1854	  s/.*/./; q'`
1855  srcdir=$ac_confdir
1856  if test ! -r "$srcdir/$ac_unique_file"; then
1857    srcdir=..
1858  fi
1859else
1860  ac_srcdir_defaulted=no
1861fi
1862if test ! -r "$srcdir/$ac_unique_file"; then
1863  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1864  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1865fi
1866ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1867ac_abs_confdir=`(
1868	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1869	pwd)`
1870# When building in place, set srcdir=.
1871if test "$ac_abs_confdir" = "$ac_pwd"; then
1872  srcdir=.
1873fi
1874# Remove unnecessary trailing slashes from srcdir.
1875# Double slashes in file names in object file debugging info
1876# mess up M-x gdb in Emacs.
1877case $srcdir in
1878*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1879esac
1880for ac_var in $ac_precious_vars; do
1881  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1882  eval ac_env_${ac_var}_value=\$${ac_var}
1883  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1884  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1885done
1886
1887#
1888# Report the --help message.
1889#
1890if test "$ac_init_help" = "long"; then
1891  # Omit some internal or obsolete options to make the list less imposing.
1892  # This message is too long to be a string in the A/UX 3.1 sh.
1893  cat <<_ACEOF
1894\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1895
1896Usage: $0 [OPTION]... [VAR=VALUE]...
1897
1898To assign environment variables (e.g., CC, CFLAGS...), specify them as
1899VAR=VALUE.  See below for descriptions of some of the useful variables.
1900
1901Defaults for the options are specified in brackets.
1902
1903Configuration:
1904  -h, --help              display this help and exit
1905      --help=short        display options specific to this package
1906      --help=recursive    display the short help of all the included packages
1907  -V, --version           display version information and exit
1908  -q, --quiet, --silent   do not print \`checking ...' messages
1909      --cache-file=FILE   cache test results in FILE [disabled]
1910  -C, --config-cache      alias for \`--cache-file=config.cache'
1911  -n, --no-create         do not create output files
1912      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1913
1914Installation directories:
1915  --prefix=PREFIX         install architecture-independent files in PREFIX
1916                          [$ac_default_prefix]
1917  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1918                          [PREFIX]
1919
1920By default, \`make install' will install all the files in
1921\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1922an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1923for instance \`--prefix=\$HOME'.
1924
1925For better control, use the options below.
1926
1927Fine tuning of the installation directories:
1928  --bindir=DIR            user executables [EPREFIX/bin]
1929  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1930  --libexecdir=DIR        program executables [EPREFIX/libexec]
1931  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1932  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1933  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1934  --libdir=DIR            object code libraries [EPREFIX/lib]
1935  --includedir=DIR        C header files [PREFIX/include]
1936  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1937  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1938  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1939  --infodir=DIR           info documentation [DATAROOTDIR/info]
1940  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1941  --mandir=DIR            man documentation [DATAROOTDIR/man]
1942  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1943  --htmldir=DIR           html documentation [DOCDIR]
1944  --dvidir=DIR            dvi documentation [DOCDIR]
1945  --pdfdir=DIR            pdf documentation [DOCDIR]
1946  --psdir=DIR             ps documentation [DOCDIR]
1947_ACEOF
1948
1949  cat <<\_ACEOF
1950
1951X features:
1952  --x-includes=DIR    X include files are in DIR
1953  --x-libraries=DIR   X library files are in DIR
1954
1955System types:
1956  --build=BUILD     configure for building on BUILD [guessed]
1957  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1958  --target=TARGET   configure for building compilers for TARGET [HOST]
1959_ACEOF
1960fi
1961
1962if test -n "$ac_init_help"; then
1963  case $ac_init_help in
1964     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1965   esac
1966  cat <<\_ACEOF
1967
1968Optional Features:
1969  --disable-option-checking  ignore unrecognized --enable/--with options
1970  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1971  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1972  --enable-openjdk-only   suppress building custom source even if present
1973                          [disabled]
1974  --enable-debug          set the debug level to fastdebug (shorthand for
1975                          --with-debug-level=fastdebug) [disabled]
1976  --enable-headless-only  only build headless (no GUI) support [disabled]
1977  --enable-unlimited-crypto
1978                          Enable unlimited crypto policy [disabled]
1979  --disable-keep-packaged-modules
1980                          Do not keep packaged modules in jdk image [enable]
1981  --enable-static-build   enable static library build [disabled]
1982  --disable-warnings-as-errors
1983                          do not consider native warnings to be an error
1984                          [enabled]
1985  --enable-debug-symbols  Deprecated. Option is kept for backwards
1986                          compatibility and is ignored
1987  --enable-zip-debug-info Deprecated. Option is kept for backwards
1988                          compatibility and is ignored
1989  --enable-native-coverage
1990                          enable native compilation with code coverage
1991                          data[disabled]
1992  --enable-dtrace[=yes/no/auto]
1993                          enable dtrace. Default is auto, where dtrace is
1994                          enabled if all dependencies are present.
1995  --disable-hotspot-gtest Disables building of the Hotspot unit tests
1996  --disable-freetype-bundling
1997                          disable bundling of the freetype library with the
1998                          build result [enabled on Windows or when using
1999                          --with-freetype, disabled otherwise]
2000  --enable-jtreg-failure-handler
2001                          forces build of the jtreg failure handler to be
2002                          enabled, missing dependencies become fatal errors.
2003                          Default is auto, where the failure handler is built
2004                          if all dependencies are present and otherwise just
2005                          disabled.
2006  --disable-generate-classlist
2007                          forces enabling or disabling of the generation of a
2008                          CDS classlist at build time. Default is to generate
2009                          it when either the server or client JVMs are built.
2010  --enable-sjavac         use sjavac to do fast incremental compiles
2011                          [disabled]
2012  --disable-javac-server  disable javac server [enabled]
2013  --enable-icecc          enable distribted compilation of native code using
2014                          icecc/icecream [disabled]
2015  --disable-precompiled-headers
2016                          disable using precompiled headers when compiling C++
2017                          [enabled]
2018  --enable-ccache         enable using ccache to speed up recompilations
2019                          [disabled]
2020
2021Optional Packages:
2022  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2023  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2024  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2025                          support it), e.g. --with-target-bits=32 [guessed]
2026  --with-custom-make-dir  Deprecated. Option is kept for backwards
2027                          compatibility and is ignored
2028  --with-jdk-variant      JDK variant to build (normal) [normal]
2029  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2030                          optimized) [release]
2031  --with-jvm-variants     JVM variants (separated by commas) to build
2032                          (server,client,minimal,core,zero,zeroshark,custom)
2033                          [server]
2034  --with-devkit           use this devkit for compilers, tools and resources
2035  --with-sys-root         alias for --with-sysroot for backwards compatability
2036  --with-sysroot          use this directory as sysroot
2037  --with-tools-dir        alias for --with-toolchain-path for backwards
2038                          compatibility
2039  --with-toolchain-path   prepend these directories when searching for
2040                          toolchain binaries (compilers etc)
2041  --with-extra-path       prepend these directories to the default path
2042  --with-sdk-name         use the platform SDK of the given name. [macosx]
2043  --with-conf-name        use this as the name of the configuration [generated
2044                          from important configuration options]
2045  --with-output-sync      set make output sync type if supported by make.
2046                          [recurse]
2047  --with-default-make-target
2048                          set the default make target [exploded-image]
2049  --with-cacerts-file     specify alternative cacerts file
2050  --with-copyright-year   Set copyright year value for build [current year]
2051  --with-milestone        Deprecated. Option is kept for backwards
2052                          compatibility and is ignored
2053  --with-update-version   Deprecated. Option is kept for backwards
2054                          compatibility and is ignored
2055  --with-user-release-suffix
2056                          Deprecated. Option is kept for backwards
2057                          compatibility and is ignored
2058  --with-build-number     Deprecated. Option is kept for backwards
2059                          compatibility and is ignored
2060  --with-version-string   Set version string [calculated]
2061  --with-version-pre      Set the base part of the version 'PRE' field
2062                          (pre-release identifier) ['internal']
2063  --with-version-opt      Set version 'OPT' field (build metadata)
2064                          [<timestamp>.<user>.<dirname>]
2065  --with-version-build    Set version 'BUILD' field (build number) [not
2066                          specified]
2067  --with-version-major    Set version 'MAJOR' field (first number) [current
2068                          source value]
2069  --with-version-minor    Set version 'MINOR' field (second number) [current
2070                          source value]
2071  --with-version-security Set version 'SECURITY' field (third number) [current
2072                          source value]
2073  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2074                          specified]
2075  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2076  --with-build-jdk        path to JDK of same version as is being built[the
2077                          newly built JDK]
2078  --with-add-source-root  Deprecated. Option is kept for backwards
2079                          compatibility and is ignored
2080  --with-override-source-root
2081                          Deprecated. Option is kept for backwards
2082                          compatibility and is ignored
2083  --with-adds-and-overrides
2084                          Deprecated. Option is kept for backwards
2085                          compatibility and is ignored
2086  --with-override-langtools
2087                          Deprecated. Option is kept for backwards
2088                          compatibility and is ignored
2089  --with-override-corba   Deprecated. Option is kept for backwards
2090                          compatibility and is ignored
2091  --with-override-jaxp    Deprecated. Option is kept for backwards
2092                          compatibility and is ignored
2093  --with-override-jaxws   Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-override-hotspot Deprecated. Option is kept for backwards
2096                          compatibility and is ignored
2097  --with-override-nashorn Deprecated. Option is kept for backwards
2098                          compatibility and is ignored
2099  --with-override-jdk     Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-import-hotspot   import hotspot binaries from this jdk image or
2102                          hotspot build dist dir instead of building from
2103                          source
2104  --with-import-modules   import a set of prebuilt modules either as a zip
2105                          file or an exploded directory
2106  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2107                          to show possible values [platform dependent]
2108  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2109  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2110  --with-extra-ldflags    extra flags to be used when linking jdk
2111  --with-toolchain-version
2112                          the version of the toolchain to look for, use
2113                          '--help' to show possible values [platform
2114                          dependent]
2115  --with-build-devkit     Devkit to use for the build platform toolchain
2116  --with-jtreg            Regression Test Harness [probed]
2117  --with-native-debug-symbols
2118                          set the native debug symbol configuration (none,
2119                          internal, external, zipped) [varying]
2120  --with-jvm-features     additional JVM features to enable (separated by
2121                          comma), use '--help' to show possible values [none]
2122  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2123                          compatibility and is ignored
2124  --with-stdc++lib=<static>,<dynamic>,<default>
2125                          force linking of the C++ runtime on Linux to either
2126                          static or dynamic, default is static with dynamic as
2127                          fallback
2128  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2129                          (Windows only) [probed]
2130  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2131                          (Windows only) [probed]
2132  --with-x                use the X Window System
2133  --with-cups             specify prefix directory for the cups package
2134                          (expecting the headers under PATH/include)
2135  --with-cups-include     specify directory for the cups include files
2136  --with-freetype         specify prefix directory for the freetype package
2137                          (expecting the libraries under PATH/lib and the
2138                          headers under PATH/include)
2139  --with-freetype-include specify directory for the freetype include files
2140  --with-freetype-lib     specify directory for the freetype library
2141  --with-freetype-src     specify directory with freetype sources to
2142                          automatically build the library (experimental,
2143                          Windows-only)
2144  --with-alsa             specify prefix directory for the alsa package
2145                          (expecting the libraries under PATH/lib and the
2146                          headers under PATH/include)
2147  --with-alsa-include     specify directory for the alsa include files
2148  --with-alsa-lib         specify directory for the alsa library
2149  --with-libffi           specify prefix directory for the libffi package
2150                          (expecting the libraries under PATH/lib and the
2151                          headers under PATH/include)
2152  --with-libffi-include   specify directory for the libffi include files
2153  --with-libffi-lib       specify directory for the libffi library
2154  --with-libjpeg          use libjpeg from build system or OpenJDK source
2155                          (system, bundled) [bundled]
2156  --with-giflib           use giflib from build system or OpenJDK source
2157                          (system, bundled) [bundled]
2158  --with-libpng           use libpng from build system or OpenJDK source
2159                          (system, bundled) [bundled]
2160  --with-zlib             use zlib from build system or OpenJDK source
2161                          (system, bundled) [bundled]
2162  --with-lcms             use lcms2 from build system or OpenJDK source
2163                          (system, bundled) [bundled]
2164  --with-dxsdk            Deprecated. Option is kept for backwards
2165                          compatibility and is ignored
2166  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2167                          compatibility and is ignored
2168  --with-dxsdk-include    Deprecated. Option is kept for backwards
2169                          compatibility and is ignored
2170  --with-num-cores        number of cores in the build system, e.g.
2171                          --with-num-cores=8 [probed]
2172  --with-memory-size      memory (in MB) available in the build system, e.g.
2173                          --with-memory-size=1024 [probed]
2174  --with-jobs             number of parallel jobs to let make run [calculated
2175                          based on cores and memory]
2176  --with-test-jobs        number of parallel tests jobs to run [based on build
2177                          jobs]
2178  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2179                          invocations of boot JDK, overriding the default
2180                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2181                          -enableassertions"
2182  --with-sjavac-server-java
2183                          use this java binary for running the sjavac
2184                          background server [Boot JDK java]
2185  --with-ccache-dir       where to store ccache files [~/.ccache]
2186
2187Some influential environment variables:
2188  BASENAME    Override default value for BASENAME
2189  BASH        Override default value for BASH
2190  CAT         Override default value for CAT
2191  CHMOD       Override default value for CHMOD
2192  CMP         Override default value for CMP
2193  COMM        Override default value for COMM
2194  CP          Override default value for CP
2195  CUT         Override default value for CUT
2196  DATE        Override default value for DATE
2197  DIFF        Override default value for DIFF
2198  DIRNAME     Override default value for DIRNAME
2199  ECHO        Override default value for ECHO
2200  EXPR        Override default value for EXPR
2201  FILE        Override default value for FILE
2202  FIND        Override default value for FIND
2203  HEAD        Override default value for HEAD
2204  GUNZIP      Override default value for GUNZIP
2205  GZIP        Override default value for GZIP
2206  LN          Override default value for LN
2207  LS          Override default value for LS
2208  MKDIR       Override default value for MKDIR
2209  MKTEMP      Override default value for MKTEMP
2210  MV          Override default value for MV
2211  NAWK        Override default value for NAWK
2212  PRINTF      Override default value for PRINTF
2213  RM          Override default value for RM
2214  RMDIR       Override default value for RMDIR
2215  SH          Override default value for SH
2216  SORT        Override default value for SORT
2217  TAIL        Override default value for TAIL
2218  TAR         Override default value for TAR
2219  TEE         Override default value for TEE
2220  TOUCH       Override default value for TOUCH
2221  TR          Override default value for TR
2222  UNAME       Override default value for UNAME
2223  UNIQ        Override default value for UNIQ
2224  WC          Override default value for WC
2225  WHICH       Override default value for WHICH
2226  XARGS       Override default value for XARGS
2227  AWK         Override default value for AWK
2228  GREP        Override default value for GREP
2229  EGREP       Override default value for EGREP
2230  FGREP       Override default value for FGREP
2231  SED         Override default value for SED
2232  CYGPATH     Override default value for CYGPATH
2233  READLINK    Override default value for READLINK
2234  DF          Override default value for DF
2235  CPIO        Override default value for CPIO
2236  NICE        Override default value for NICE
2237  MAKE        Override default value for MAKE
2238  UNZIP       Override default value for UNZIP
2239  ZIPEXE      Override default value for ZIPEXE
2240  LDD         Override default value for LDD
2241  OTOOL       Override default value for OTOOL
2242  READELF     Override default value for READELF
2243  HG          Override default value for HG
2244  STAT        Override default value for STAT
2245  TIME        Override default value for TIME
2246  DTRACE      Override default value for DTRACE
2247  PATCH       Override default value for PATCH
2248  DSYMUTIL    Override default value for DSYMUTIL
2249  XATTR       Override default value for XATTR
2250  CODESIGN    Override default value for CODESIGN
2251  SETFILE     Override default value for SETFILE
2252  PKG_CONFIG  path to pkg-config utility
2253  JAVA        Override default value for JAVA
2254  JAVAC       Override default value for JAVAC
2255  JAVAH       Override default value for JAVAH
2256  JAR         Override default value for JAR
2257  JARSIGNER   Override default value for JARSIGNER
2258  CC          C compiler command
2259  CFLAGS      C compiler flags
2260  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2261              nonstandard directory <lib dir>
2262  LIBS        libraries to pass to the linker, e.g. -l<library>
2263  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2264              you have headers in a nonstandard directory <include dir>
2265  CXX         C++ compiler command
2266  CXXFLAGS    C++ compiler flags
2267  CPP         C preprocessor
2268  CXXCPP      C++ preprocessor
2269  AS          Override default value for AS
2270  AR          Override default value for AR
2271  LIPO        Override default value for LIPO
2272  STRIP       Override default value for STRIP
2273  NM          Override default value for NM
2274  GNM         Override default value for GNM
2275  OBJCOPY     Override default value for OBJCOPY
2276  OBJDUMP     Override default value for OBJDUMP
2277  BUILD_CC    Override default value for BUILD_CC
2278  BUILD_CXX   Override default value for BUILD_CXX
2279  BUILD_NM    Override default value for BUILD_NM
2280  BUILD_AR    Override default value for BUILD_AR
2281  BUILD_OBJCOPY
2282              Override default value for BUILD_OBJCOPY
2283  BUILD_STRIP Override default value for BUILD_STRIP
2284  JTREGEXE    Override default value for JTREGEXE
2285  XMKMF       Path to xmkmf, Makefile generator for X Window System
2286  FREETYPE_CFLAGS
2287              C compiler flags for FREETYPE, overriding pkg-config
2288  FREETYPE_LIBS
2289              linker flags for FREETYPE, overriding pkg-config
2290  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2291  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2292  LIBFFI_CFLAGS
2293              C compiler flags for LIBFFI, overriding pkg-config
2294  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2295  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2296  PNG_LIBS    linker flags for PNG, overriding pkg-config
2297  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2298  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2299  ICECC_CMD   Override default value for ICECC_CMD
2300  ICECC_CREATE_ENV
2301              Override default value for ICECC_CREATE_ENV
2302  ICECC_WRAPPER
2303              Override default value for ICECC_WRAPPER
2304  CCACHE      Override default value for CCACHE
2305
2306Use these variables to override the choices made by `configure' or to help
2307it to find libraries and programs with nonstandard names/locations.
2308
2309Report bugs to <build-dev@openjdk.java.net>.
2310OpenJDK home page: <http://openjdk.java.net>.
2311_ACEOF
2312ac_status=$?
2313fi
2314
2315if test "$ac_init_help" = "recursive"; then
2316  # If there are subdirs, report their specific --help.
2317  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2318    test -d "$ac_dir" ||
2319      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2320      continue
2321    ac_builddir=.
2322
2323case "$ac_dir" in
2324.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2325*)
2326  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2327  # A ".." for each directory in $ac_dir_suffix.
2328  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2329  case $ac_top_builddir_sub in
2330  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2331  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2332  esac ;;
2333esac
2334ac_abs_top_builddir=$ac_pwd
2335ac_abs_builddir=$ac_pwd$ac_dir_suffix
2336# for backward compatibility:
2337ac_top_builddir=$ac_top_build_prefix
2338
2339case $srcdir in
2340  .)  # We are building in place.
2341    ac_srcdir=.
2342    ac_top_srcdir=$ac_top_builddir_sub
2343    ac_abs_top_srcdir=$ac_pwd ;;
2344  [\\/]* | ?:[\\/]* )  # Absolute name.
2345    ac_srcdir=$srcdir$ac_dir_suffix;
2346    ac_top_srcdir=$srcdir
2347    ac_abs_top_srcdir=$srcdir ;;
2348  *) # Relative name.
2349    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2350    ac_top_srcdir=$ac_top_build_prefix$srcdir
2351    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2352esac
2353ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2354
2355    cd "$ac_dir" || { ac_status=$?; continue; }
2356    # Check for guested configure.
2357    if test -f "$ac_srcdir/configure.gnu"; then
2358      echo &&
2359      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2360    elif test -f "$ac_srcdir/configure"; then
2361      echo &&
2362      $SHELL "$ac_srcdir/configure" --help=recursive
2363    else
2364      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2365    fi || ac_status=$?
2366    cd "$ac_pwd" || { ac_status=$?; break; }
2367  done
2368fi
2369
2370test -n "$ac_init_help" && exit $ac_status
2371if $ac_init_version; then
2372  cat <<\_ACEOF
2373OpenJDK configure jdk9
2374generated by GNU Autoconf 2.69
2375
2376Copyright (C) 2012 Free Software Foundation, Inc.
2377This configure script is free software; the Free Software Foundation
2378gives unlimited permission to copy, distribute and modify it.
2379_ACEOF
2380  exit
2381fi
2382
2383## ------------------------ ##
2384## Autoconf initialization. ##
2385## ------------------------ ##
2386
2387# ac_fn_c_try_compile LINENO
2388# --------------------------
2389# Try to compile conftest.$ac_ext, and return whether this succeeded.
2390ac_fn_c_try_compile ()
2391{
2392  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2393  rm -f conftest.$ac_objext
2394  if { { ac_try="$ac_compile"
2395case "(($ac_try" in
2396  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2397  *) ac_try_echo=$ac_try;;
2398esac
2399eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2400$as_echo "$ac_try_echo"; } >&5
2401  (eval "$ac_compile") 2>conftest.err
2402  ac_status=$?
2403  if test -s conftest.err; then
2404    grep -v '^ *+' conftest.err >conftest.er1
2405    cat conftest.er1 >&5
2406    mv -f conftest.er1 conftest.err
2407  fi
2408  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2409  test $ac_status = 0; } && {
2410	 test -z "$ac_c_werror_flag" ||
2411	 test ! -s conftest.err
2412       } && test -s conftest.$ac_objext; then :
2413  ac_retval=0
2414else
2415  $as_echo "$as_me: failed program was:" >&5
2416sed 's/^/| /' conftest.$ac_ext >&5
2417
2418	ac_retval=1
2419fi
2420  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2421  as_fn_set_status $ac_retval
2422
2423} # ac_fn_c_try_compile
2424
2425# ac_fn_cxx_try_compile LINENO
2426# ----------------------------
2427# Try to compile conftest.$ac_ext, and return whether this succeeded.
2428ac_fn_cxx_try_compile ()
2429{
2430  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2431  rm -f conftest.$ac_objext
2432  if { { ac_try="$ac_compile"
2433case "(($ac_try" in
2434  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2435  *) ac_try_echo=$ac_try;;
2436esac
2437eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2438$as_echo "$ac_try_echo"; } >&5
2439  (eval "$ac_compile") 2>conftest.err
2440  ac_status=$?
2441  if test -s conftest.err; then
2442    grep -v '^ *+' conftest.err >conftest.er1
2443    cat conftest.er1 >&5
2444    mv -f conftest.er1 conftest.err
2445  fi
2446  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2447  test $ac_status = 0; } && {
2448	 test -z "$ac_cxx_werror_flag" ||
2449	 test ! -s conftest.err
2450       } && test -s conftest.$ac_objext; then :
2451  ac_retval=0
2452else
2453  $as_echo "$as_me: failed program was:" >&5
2454sed 's/^/| /' conftest.$ac_ext >&5
2455
2456	ac_retval=1
2457fi
2458  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2459  as_fn_set_status $ac_retval
2460
2461} # ac_fn_cxx_try_compile
2462
2463# ac_fn_c_try_cpp LINENO
2464# ----------------------
2465# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2466ac_fn_c_try_cpp ()
2467{
2468  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2469  if { { ac_try="$ac_cpp conftest.$ac_ext"
2470case "(($ac_try" in
2471  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2472  *) ac_try_echo=$ac_try;;
2473esac
2474eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2475$as_echo "$ac_try_echo"; } >&5
2476  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2477  ac_status=$?
2478  if test -s conftest.err; then
2479    grep -v '^ *+' conftest.err >conftest.er1
2480    cat conftest.er1 >&5
2481    mv -f conftest.er1 conftest.err
2482  fi
2483  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2484  test $ac_status = 0; } > conftest.i && {
2485	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2486	 test ! -s conftest.err
2487       }; then :
2488  ac_retval=0
2489else
2490  $as_echo "$as_me: failed program was:" >&5
2491sed 's/^/| /' conftest.$ac_ext >&5
2492
2493    ac_retval=1
2494fi
2495  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2496  as_fn_set_status $ac_retval
2497
2498} # ac_fn_c_try_cpp
2499
2500# ac_fn_cxx_try_cpp LINENO
2501# ------------------------
2502# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2503ac_fn_cxx_try_cpp ()
2504{
2505  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2506  if { { ac_try="$ac_cpp conftest.$ac_ext"
2507case "(($ac_try" in
2508  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2509  *) ac_try_echo=$ac_try;;
2510esac
2511eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2512$as_echo "$ac_try_echo"; } >&5
2513  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2514  ac_status=$?
2515  if test -s conftest.err; then
2516    grep -v '^ *+' conftest.err >conftest.er1
2517    cat conftest.er1 >&5
2518    mv -f conftest.er1 conftest.err
2519  fi
2520  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2521  test $ac_status = 0; } > conftest.i && {
2522	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2523	 test ! -s conftest.err
2524       }; then :
2525  ac_retval=0
2526else
2527  $as_echo "$as_me: failed program was:" >&5
2528sed 's/^/| /' conftest.$ac_ext >&5
2529
2530    ac_retval=1
2531fi
2532  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2533  as_fn_set_status $ac_retval
2534
2535} # ac_fn_cxx_try_cpp
2536
2537# ac_fn_c_try_link LINENO
2538# -----------------------
2539# Try to link conftest.$ac_ext, and return whether this succeeded.
2540ac_fn_c_try_link ()
2541{
2542  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2543  rm -f conftest.$ac_objext conftest$ac_exeext
2544  if { { ac_try="$ac_link"
2545case "(($ac_try" in
2546  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2547  *) ac_try_echo=$ac_try;;
2548esac
2549eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2550$as_echo "$ac_try_echo"; } >&5
2551  (eval "$ac_link") 2>conftest.err
2552  ac_status=$?
2553  if test -s conftest.err; then
2554    grep -v '^ *+' conftest.err >conftest.er1
2555    cat conftest.er1 >&5
2556    mv -f conftest.er1 conftest.err
2557  fi
2558  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2559  test $ac_status = 0; } && {
2560	 test -z "$ac_c_werror_flag" ||
2561	 test ! -s conftest.err
2562       } && test -s conftest$ac_exeext && {
2563	 test "$cross_compiling" = yes ||
2564	 test -x conftest$ac_exeext
2565       }; then :
2566  ac_retval=0
2567else
2568  $as_echo "$as_me: failed program was:" >&5
2569sed 's/^/| /' conftest.$ac_ext >&5
2570
2571	ac_retval=1
2572fi
2573  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2574  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2575  # interfere with the next link command; also delete a directory that is
2576  # left behind by Apple's compiler.  We do this before executing the actions.
2577  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2578  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2579  as_fn_set_status $ac_retval
2580
2581} # ac_fn_c_try_link
2582
2583# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2584# ---------------------------------------------------------
2585# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2586# the include files in INCLUDES and setting the cache variable VAR
2587# accordingly.
2588ac_fn_cxx_check_header_mongrel ()
2589{
2590  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2591  if eval \${$3+:} false; then :
2592  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2593$as_echo_n "checking for $2... " >&6; }
2594if eval \${$3+:} false; then :
2595  $as_echo_n "(cached) " >&6
2596fi
2597eval ac_res=\$$3
2598	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2599$as_echo "$ac_res" >&6; }
2600else
2601  # Is the header compilable?
2602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2603$as_echo_n "checking $2 usability... " >&6; }
2604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2605/* end confdefs.h.  */
2606$4
2607#include <$2>
2608_ACEOF
2609if ac_fn_cxx_try_compile "$LINENO"; then :
2610  ac_header_compiler=yes
2611else
2612  ac_header_compiler=no
2613fi
2614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2616$as_echo "$ac_header_compiler" >&6; }
2617
2618# Is the header present?
2619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2620$as_echo_n "checking $2 presence... " >&6; }
2621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2622/* end confdefs.h.  */
2623#include <$2>
2624_ACEOF
2625if ac_fn_cxx_try_cpp "$LINENO"; then :
2626  ac_header_preproc=yes
2627else
2628  ac_header_preproc=no
2629fi
2630rm -f conftest.err conftest.i conftest.$ac_ext
2631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2632$as_echo "$ac_header_preproc" >&6; }
2633
2634# So?  What about this header?
2635case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2636  yes:no: )
2637    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2638$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2639    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2640$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2641    ;;
2642  no:yes:* )
2643    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2644$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2645    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2646$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2647    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2648$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2649    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2650$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2651    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2652$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2653( $as_echo "## ----------------------------------------- ##
2654## Report this to build-dev@openjdk.java.net ##
2655## ----------------------------------------- ##"
2656     ) | sed "s/^/$as_me: WARNING:     /" >&2
2657    ;;
2658esac
2659  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2660$as_echo_n "checking for $2... " >&6; }
2661if eval \${$3+:} false; then :
2662  $as_echo_n "(cached) " >&6
2663else
2664  eval "$3=\$ac_header_compiler"
2665fi
2666eval ac_res=\$$3
2667	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2668$as_echo "$ac_res" >&6; }
2669fi
2670  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2671
2672} # ac_fn_cxx_check_header_mongrel
2673
2674# ac_fn_cxx_try_run LINENO
2675# ------------------------
2676# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2677# that executables *can* be run.
2678ac_fn_cxx_try_run ()
2679{
2680  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2681  if { { ac_try="$ac_link"
2682case "(($ac_try" in
2683  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2684  *) ac_try_echo=$ac_try;;
2685esac
2686eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2687$as_echo "$ac_try_echo"; } >&5
2688  (eval "$ac_link") 2>&5
2689  ac_status=$?
2690  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2691  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2692  { { case "(($ac_try" in
2693  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2694  *) ac_try_echo=$ac_try;;
2695esac
2696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2697$as_echo "$ac_try_echo"; } >&5
2698  (eval "$ac_try") 2>&5
2699  ac_status=$?
2700  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2701  test $ac_status = 0; }; }; then :
2702  ac_retval=0
2703else
2704  $as_echo "$as_me: program exited with status $ac_status" >&5
2705       $as_echo "$as_me: failed program was:" >&5
2706sed 's/^/| /' conftest.$ac_ext >&5
2707
2708       ac_retval=$ac_status
2709fi
2710  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2711  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2712  as_fn_set_status $ac_retval
2713
2714} # ac_fn_cxx_try_run
2715
2716# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2717# ---------------------------------------------------------
2718# Tests whether HEADER exists and can be compiled using the include files in
2719# INCLUDES, setting the cache variable VAR accordingly.
2720ac_fn_cxx_check_header_compile ()
2721{
2722  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2723  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2724$as_echo_n "checking for $2... " >&6; }
2725if eval \${$3+:} false; then :
2726  $as_echo_n "(cached) " >&6
2727else
2728  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2729/* end confdefs.h.  */
2730$4
2731#include <$2>
2732_ACEOF
2733if ac_fn_cxx_try_compile "$LINENO"; then :
2734  eval "$3=yes"
2735else
2736  eval "$3=no"
2737fi
2738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2739fi
2740eval ac_res=\$$3
2741	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2742$as_echo "$ac_res" >&6; }
2743  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2744
2745} # ac_fn_cxx_check_header_compile
2746
2747# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2748# ----------------------------------------------
2749# Tries to find the compile-time value of EXPR in a program that includes
2750# INCLUDES, setting VAR accordingly. Returns whether the value could be
2751# computed
2752ac_fn_cxx_compute_int ()
2753{
2754  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2755  if test "$cross_compiling" = yes; then
2756    # Depending upon the size, compute the lo and hi bounds.
2757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2758/* end confdefs.h.  */
2759$4
2760int
2761main ()
2762{
2763static int test_array [1 - 2 * !(($2) >= 0)];
2764test_array [0] = 0;
2765return test_array [0];
2766
2767  ;
2768  return 0;
2769}
2770_ACEOF
2771if ac_fn_cxx_try_compile "$LINENO"; then :
2772  ac_lo=0 ac_mid=0
2773  while :; do
2774    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2775/* end confdefs.h.  */
2776$4
2777int
2778main ()
2779{
2780static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2781test_array [0] = 0;
2782return test_array [0];
2783
2784  ;
2785  return 0;
2786}
2787_ACEOF
2788if ac_fn_cxx_try_compile "$LINENO"; then :
2789  ac_hi=$ac_mid; break
2790else
2791  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2792			if test $ac_lo -le $ac_mid; then
2793			  ac_lo= ac_hi=
2794			  break
2795			fi
2796			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2797fi
2798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2799  done
2800else
2801  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2802/* end confdefs.h.  */
2803$4
2804int
2805main ()
2806{
2807static int test_array [1 - 2 * !(($2) < 0)];
2808test_array [0] = 0;
2809return test_array [0];
2810
2811  ;
2812  return 0;
2813}
2814_ACEOF
2815if ac_fn_cxx_try_compile "$LINENO"; then :
2816  ac_hi=-1 ac_mid=-1
2817  while :; do
2818    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2819/* end confdefs.h.  */
2820$4
2821int
2822main ()
2823{
2824static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2825test_array [0] = 0;
2826return test_array [0];
2827
2828  ;
2829  return 0;
2830}
2831_ACEOF
2832if ac_fn_cxx_try_compile "$LINENO"; then :
2833  ac_lo=$ac_mid; break
2834else
2835  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2836			if test $ac_mid -le $ac_hi; then
2837			  ac_lo= ac_hi=
2838			  break
2839			fi
2840			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2841fi
2842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2843  done
2844else
2845  ac_lo= ac_hi=
2846fi
2847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2848fi
2849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2850# Binary search between lo and hi bounds.
2851while test "x$ac_lo" != "x$ac_hi"; do
2852  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2853  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2854/* end confdefs.h.  */
2855$4
2856int
2857main ()
2858{
2859static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2860test_array [0] = 0;
2861return test_array [0];
2862
2863  ;
2864  return 0;
2865}
2866_ACEOF
2867if ac_fn_cxx_try_compile "$LINENO"; then :
2868  ac_hi=$ac_mid
2869else
2870  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2871fi
2872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2873done
2874case $ac_lo in #((
2875?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2876'') ac_retval=1 ;;
2877esac
2878  else
2879    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2880/* end confdefs.h.  */
2881$4
2882static long int longval () { return $2; }
2883static unsigned long int ulongval () { return $2; }
2884#include <stdio.h>
2885#include <stdlib.h>
2886int
2887main ()
2888{
2889
2890  FILE *f = fopen ("conftest.val", "w");
2891  if (! f)
2892    return 1;
2893  if (($2) < 0)
2894    {
2895      long int i = longval ();
2896      if (i != ($2))
2897	return 1;
2898      fprintf (f, "%ld", i);
2899    }
2900  else
2901    {
2902      unsigned long int i = ulongval ();
2903      if (i != ($2))
2904	return 1;
2905      fprintf (f, "%lu", i);
2906    }
2907  /* Do not output a trailing newline, as this causes \r\n confusion
2908     on some platforms.  */
2909  return ferror (f) || fclose (f) != 0;
2910
2911  ;
2912  return 0;
2913}
2914_ACEOF
2915if ac_fn_cxx_try_run "$LINENO"; then :
2916  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2917else
2918  ac_retval=1
2919fi
2920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2921  conftest.$ac_objext conftest.beam conftest.$ac_ext
2922rm -f conftest.val
2923
2924  fi
2925  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2926  as_fn_set_status $ac_retval
2927
2928} # ac_fn_cxx_compute_int
2929
2930# ac_fn_cxx_try_link LINENO
2931# -------------------------
2932# Try to link conftest.$ac_ext, and return whether this succeeded.
2933ac_fn_cxx_try_link ()
2934{
2935  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2936  rm -f conftest.$ac_objext conftest$ac_exeext
2937  if { { ac_try="$ac_link"
2938case "(($ac_try" in
2939  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2940  *) ac_try_echo=$ac_try;;
2941esac
2942eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2943$as_echo "$ac_try_echo"; } >&5
2944  (eval "$ac_link") 2>conftest.err
2945  ac_status=$?
2946  if test -s conftest.err; then
2947    grep -v '^ *+' conftest.err >conftest.er1
2948    cat conftest.er1 >&5
2949    mv -f conftest.er1 conftest.err
2950  fi
2951  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2952  test $ac_status = 0; } && {
2953	 test -z "$ac_cxx_werror_flag" ||
2954	 test ! -s conftest.err
2955       } && test -s conftest$ac_exeext && {
2956	 test "$cross_compiling" = yes ||
2957	 test -x conftest$ac_exeext
2958       }; then :
2959  ac_retval=0
2960else
2961  $as_echo "$as_me: failed program was:" >&5
2962sed 's/^/| /' conftest.$ac_ext >&5
2963
2964	ac_retval=1
2965fi
2966  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2967  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2968  # interfere with the next link command; also delete a directory that is
2969  # left behind by Apple's compiler.  We do this before executing the actions.
2970  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2971  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2972  as_fn_set_status $ac_retval
2973
2974} # ac_fn_cxx_try_link
2975
2976# ac_fn_cxx_check_func LINENO FUNC VAR
2977# ------------------------------------
2978# Tests whether FUNC exists, setting the cache variable VAR accordingly
2979ac_fn_cxx_check_func ()
2980{
2981  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2982  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2983$as_echo_n "checking for $2... " >&6; }
2984if eval \${$3+:} false; then :
2985  $as_echo_n "(cached) " >&6
2986else
2987  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2988/* end confdefs.h.  */
2989/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2990   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2991#define $2 innocuous_$2
2992
2993/* System header to define __stub macros and hopefully few prototypes,
2994    which can conflict with char $2 (); below.
2995    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2996    <limits.h> exists even on freestanding compilers.  */
2997
2998#ifdef __STDC__
2999# include <limits.h>
3000#else
3001# include <assert.h>
3002#endif
3003
3004#undef $2
3005
3006/* Override any GCC internal prototype to avoid an error.
3007   Use char because int might match the return type of a GCC
3008   builtin and then its argument prototype would still apply.  */
3009#ifdef __cplusplus
3010extern "C"
3011#endif
3012char $2 ();
3013/* The GNU C library defines this for functions which it implements
3014    to always fail with ENOSYS.  Some functions are actually named
3015    something starting with __ and the normal name is an alias.  */
3016#if defined __stub_$2 || defined __stub___$2
3017choke me
3018#endif
3019
3020int
3021main ()
3022{
3023return $2 ();
3024  ;
3025  return 0;
3026}
3027_ACEOF
3028if ac_fn_cxx_try_link "$LINENO"; then :
3029  eval "$3=yes"
3030else
3031  eval "$3=no"
3032fi
3033rm -f core conftest.err conftest.$ac_objext \
3034    conftest$ac_exeext conftest.$ac_ext
3035fi
3036eval ac_res=\$$3
3037	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3038$as_echo "$ac_res" >&6; }
3039  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3040
3041} # ac_fn_cxx_check_func
3042
3043# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3044# -------------------------------------------------------
3045# Tests whether HEADER exists and can be compiled using the include files in
3046# INCLUDES, setting the cache variable VAR accordingly.
3047ac_fn_c_check_header_compile ()
3048{
3049  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3050  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3051$as_echo_n "checking for $2... " >&6; }
3052if eval \${$3+:} false; then :
3053  $as_echo_n "(cached) " >&6
3054else
3055  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3056/* end confdefs.h.  */
3057$4
3058#include <$2>
3059_ACEOF
3060if ac_fn_c_try_compile "$LINENO"; then :
3061  eval "$3=yes"
3062else
3063  eval "$3=no"
3064fi
3065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3066fi
3067eval ac_res=\$$3
3068	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3069$as_echo "$ac_res" >&6; }
3070  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3071
3072} # ac_fn_c_check_header_compile
3073cat >config.log <<_ACEOF
3074This file contains any messages produced by compilers while
3075running configure, to aid debugging if configure makes a mistake.
3076
3077It was created by OpenJDK $as_me jdk9, which was
3078generated by GNU Autoconf 2.69.  Invocation command line was
3079
3080  $ $0 $@
3081
3082_ACEOF
3083exec 5>>config.log
3084{
3085cat <<_ASUNAME
3086## --------- ##
3087## Platform. ##
3088## --------- ##
3089
3090hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3091uname -m = `(uname -m) 2>/dev/null || echo unknown`
3092uname -r = `(uname -r) 2>/dev/null || echo unknown`
3093uname -s = `(uname -s) 2>/dev/null || echo unknown`
3094uname -v = `(uname -v) 2>/dev/null || echo unknown`
3095
3096/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3097/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3098
3099/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3100/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3101/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3102/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3103/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3104/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3105/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3106
3107_ASUNAME
3108
3109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3110for as_dir in $PATH
3111do
3112  IFS=$as_save_IFS
3113  test -z "$as_dir" && as_dir=.
3114    $as_echo "PATH: $as_dir"
3115  done
3116IFS=$as_save_IFS
3117
3118} >&5
3119
3120cat >&5 <<_ACEOF
3121
3122
3123## ----------- ##
3124## Core tests. ##
3125## ----------- ##
3126
3127_ACEOF
3128
3129
3130# Keep a trace of the command line.
3131# Strip out --no-create and --no-recursion so they do not pile up.
3132# Strip out --silent because we don't want to record it for future runs.
3133# Also quote any args containing shell meta-characters.
3134# Make two passes to allow for proper duplicate-argument suppression.
3135ac_configure_args=
3136ac_configure_args0=
3137ac_configure_args1=
3138ac_must_keep_next=false
3139for ac_pass in 1 2
3140do
3141  for ac_arg
3142  do
3143    case $ac_arg in
3144    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3145    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3146    | -silent | --silent | --silen | --sile | --sil)
3147      continue ;;
3148    *\'*)
3149      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3150    esac
3151    case $ac_pass in
3152    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3153    2)
3154      as_fn_append ac_configure_args1 " '$ac_arg'"
3155      if test $ac_must_keep_next = true; then
3156	ac_must_keep_next=false # Got value, back to normal.
3157      else
3158	case $ac_arg in
3159	  *=* | --config-cache | -C | -disable-* | --disable-* \
3160	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3161	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3162	  | -with-* | --with-* | -without-* | --without-* | --x)
3163	    case "$ac_configure_args0 " in
3164	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3165	    esac
3166	    ;;
3167	  -* ) ac_must_keep_next=true ;;
3168	esac
3169      fi
3170      as_fn_append ac_configure_args " '$ac_arg'"
3171      ;;
3172    esac
3173  done
3174done
3175{ ac_configure_args0=; unset ac_configure_args0;}
3176{ ac_configure_args1=; unset ac_configure_args1;}
3177
3178# When interrupted or exit'd, cleanup temporary files, and complete
3179# config.log.  We remove comments because anyway the quotes in there
3180# would cause problems or look ugly.
3181# WARNING: Use '\'' to represent an apostrophe within the trap.
3182# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3183trap 'exit_status=$?
3184  # Save into config.log some information that might help in debugging.
3185  {
3186    echo
3187
3188    $as_echo "## ---------------- ##
3189## Cache variables. ##
3190## ---------------- ##"
3191    echo
3192    # The following way of writing the cache mishandles newlines in values,
3193(
3194  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3195    eval ac_val=\$$ac_var
3196    case $ac_val in #(
3197    *${as_nl}*)
3198      case $ac_var in #(
3199      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3200$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3201      esac
3202      case $ac_var in #(
3203      _ | IFS | as_nl) ;; #(
3204      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3205      *) { eval $ac_var=; unset $ac_var;} ;;
3206      esac ;;
3207    esac
3208  done
3209  (set) 2>&1 |
3210    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3211    *${as_nl}ac_space=\ *)
3212      sed -n \
3213	"s/'\''/'\''\\\\'\'''\''/g;
3214	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3215      ;; #(
3216    *)
3217      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3218      ;;
3219    esac |
3220    sort
3221)
3222    echo
3223
3224    $as_echo "## ----------------- ##
3225## Output variables. ##
3226## ----------------- ##"
3227    echo
3228    for ac_var in $ac_subst_vars
3229    do
3230      eval ac_val=\$$ac_var
3231      case $ac_val in
3232      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3233      esac
3234      $as_echo "$ac_var='\''$ac_val'\''"
3235    done | sort
3236    echo
3237
3238    if test -n "$ac_subst_files"; then
3239      $as_echo "## ------------------- ##
3240## File substitutions. ##
3241## ------------------- ##"
3242      echo
3243      for ac_var in $ac_subst_files
3244      do
3245	eval ac_val=\$$ac_var
3246	case $ac_val in
3247	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3248	esac
3249	$as_echo "$ac_var='\''$ac_val'\''"
3250      done | sort
3251      echo
3252    fi
3253
3254    if test -s confdefs.h; then
3255      $as_echo "## ----------- ##
3256## confdefs.h. ##
3257## ----------- ##"
3258      echo
3259      cat confdefs.h
3260      echo
3261    fi
3262    test "$ac_signal" != 0 &&
3263      $as_echo "$as_me: caught signal $ac_signal"
3264    $as_echo "$as_me: exit $exit_status"
3265  } >&5
3266  rm -f core *.core core.conftest.* &&
3267    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3268    exit $exit_status
3269' 0
3270for ac_signal in 1 2 13 15; do
3271  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3272done
3273ac_signal=0
3274
3275# confdefs.h avoids OS command line length limits that DEFS can exceed.
3276rm -f -r conftest* confdefs.h
3277
3278$as_echo "/* confdefs.h */" > confdefs.h
3279
3280# Predefined preprocessor variables.
3281
3282cat >>confdefs.h <<_ACEOF
3283#define PACKAGE_NAME "$PACKAGE_NAME"
3284_ACEOF
3285
3286cat >>confdefs.h <<_ACEOF
3287#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3288_ACEOF
3289
3290cat >>confdefs.h <<_ACEOF
3291#define PACKAGE_VERSION "$PACKAGE_VERSION"
3292_ACEOF
3293
3294cat >>confdefs.h <<_ACEOF
3295#define PACKAGE_STRING "$PACKAGE_STRING"
3296_ACEOF
3297
3298cat >>confdefs.h <<_ACEOF
3299#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3300_ACEOF
3301
3302cat >>confdefs.h <<_ACEOF
3303#define PACKAGE_URL "$PACKAGE_URL"
3304_ACEOF
3305
3306
3307# Let the site file select an alternate cache file if it wants to.
3308# Prefer an explicitly selected file to automatically selected ones.
3309ac_site_file1=NONE
3310ac_site_file2=NONE
3311if test -n "$CONFIG_SITE"; then
3312  # We do not want a PATH search for config.site.
3313  case $CONFIG_SITE in #((
3314    -*)  ac_site_file1=./$CONFIG_SITE;;
3315    */*) ac_site_file1=$CONFIG_SITE;;
3316    *)   ac_site_file1=./$CONFIG_SITE;;
3317  esac
3318elif test "x$prefix" != xNONE; then
3319  ac_site_file1=$prefix/share/config.site
3320  ac_site_file2=$prefix/etc/config.site
3321else
3322  ac_site_file1=$ac_default_prefix/share/config.site
3323  ac_site_file2=$ac_default_prefix/etc/config.site
3324fi
3325for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3326do
3327  test "x$ac_site_file" = xNONE && continue
3328  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3329    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3330$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3331    sed 's/^/| /' "$ac_site_file" >&5
3332    . "$ac_site_file" \
3333      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3334$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3335as_fn_error $? "failed to load site script $ac_site_file
3336See \`config.log' for more details" "$LINENO" 5; }
3337  fi
3338done
3339
3340if test -r "$cache_file"; then
3341  # Some versions of bash will fail to source /dev/null (special files
3342  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3343  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3344    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3345$as_echo "$as_me: loading cache $cache_file" >&6;}
3346    case $cache_file in
3347      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3348      *)                      . "./$cache_file";;
3349    esac
3350  fi
3351else
3352  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3353$as_echo "$as_me: creating cache $cache_file" >&6;}
3354  >$cache_file
3355fi
3356
3357# Check that the precious variables saved in the cache have kept the same
3358# value.
3359ac_cache_corrupted=false
3360for ac_var in $ac_precious_vars; do
3361  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3362  eval ac_new_set=\$ac_env_${ac_var}_set
3363  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3364  eval ac_new_val=\$ac_env_${ac_var}_value
3365  case $ac_old_set,$ac_new_set in
3366    set,)
3367      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3368$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3369      ac_cache_corrupted=: ;;
3370    ,set)
3371      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3372$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3373      ac_cache_corrupted=: ;;
3374    ,);;
3375    *)
3376      if test "x$ac_old_val" != "x$ac_new_val"; then
3377	# differences in whitespace do not lead to failure.
3378	ac_old_val_w=`echo x $ac_old_val`
3379	ac_new_val_w=`echo x $ac_new_val`
3380	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3381	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3382$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3383	  ac_cache_corrupted=:
3384	else
3385	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3386$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3387	  eval $ac_var=\$ac_old_val
3388	fi
3389	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3390$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3391	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3392$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3393      fi;;
3394  esac
3395  # Pass precious variables to config.status.
3396  if test "$ac_new_set" = set; then
3397    case $ac_new_val in
3398    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3399    *) ac_arg=$ac_var=$ac_new_val ;;
3400    esac
3401    case " $ac_configure_args " in
3402      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3403      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3404    esac
3405  fi
3406done
3407if $ac_cache_corrupted; then
3408  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3409$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3410  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3411$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3412  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3413fi
3414## -------------------- ##
3415## Main body of script. ##
3416## -------------------- ##
3417
3418ac_ext=c
3419ac_cpp='$CPP $CPPFLAGS'
3420ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3421ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3422ac_compiler_gnu=$ac_cv_c_compiler_gnu
3423
3424
3425
3426ac_aux_dir=
3427for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3428  if test -f "$ac_dir/install-sh"; then
3429    ac_aux_dir=$ac_dir
3430    ac_install_sh="$ac_aux_dir/install-sh -c"
3431    break
3432  elif test -f "$ac_dir/install.sh"; then
3433    ac_aux_dir=$ac_dir
3434    ac_install_sh="$ac_aux_dir/install.sh -c"
3435    break
3436  elif test -f "$ac_dir/shtool"; then
3437    ac_aux_dir=$ac_dir
3438    ac_install_sh="$ac_aux_dir/shtool install -c"
3439    break
3440  fi
3441done
3442if test -z "$ac_aux_dir"; then
3443  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
3444fi
3445
3446# These three variables are undocumented and unsupported,
3447# and are intended to be withdrawn in a future Autoconf release.
3448# They can cause serious problems if a builder's source tree is in a directory
3449# whose full name contains unusual characters.
3450ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3451ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3452ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3453
3454
3455# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3456
3457#
3458# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3459# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3460#
3461# This code is free software; you can redistribute it and/or modify it
3462# under the terms of the GNU General Public License version 2 only, as
3463# published by the Free Software Foundation.  Oracle designates this
3464# particular file as subject to the "Classpath" exception as provided
3465# by Oracle in the LICENSE file that accompanied this code.
3466#
3467# This code is distributed in the hope that it will be useful, but WITHOUT
3468# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3469# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3470# version 2 for more details (a copy is included in the LICENSE file that
3471# accompanied this code).
3472#
3473# You should have received a copy of the GNU General Public License version
3474# 2 along with this work; if not, write to the Free Software Foundation,
3475# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3476#
3477# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3478# or visit www.oracle.com if you need additional information or have any
3479# questions.
3480#
3481
3482#
3483# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3484#
3485# This program is free software; you can redistribute it and/or modify
3486# it under the terms of the GNU General Public License as published by
3487# the Free Software Foundation; either version 2 of the License, or
3488# (at your option) any later version.
3489#
3490# This program is distributed in the hope that it will be useful, but
3491# WITHOUT ANY WARRANTY; without even the implied warranty of
3492# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3493# General Public License for more details.
3494#
3495# You should have received a copy of the GNU General Public License
3496# along with this program; if not, write to the Free Software
3497# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3498#
3499# As a special exception to the GNU General Public License, if you
3500# distribute this file as part of a program that contains a
3501# configuration script generated by Autoconf, you may include it under
3502# the same distribution terms that you use for the rest of that program.
3503
3504# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3505# ----------------------------------
3506# PKG_PROG_PKG_CONFIG
3507
3508# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3509#
3510# Check to see whether a particular set of modules exists.  Similar
3511# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3512#
3513#
3514# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3515# this or PKG_CHECK_MODULES is called, or make sure to call
3516# PKG_CHECK_EXISTS manually
3517# --------------------------------------------------------------
3518
3519
3520
3521# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3522# ---------------------------------------------
3523# _PKG_CONFIG
3524
3525# _PKG_SHORT_ERRORS_SUPPORTED
3526# -----------------------------
3527# _PKG_SHORT_ERRORS_SUPPORTED
3528
3529
3530# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3531# [ACTION-IF-NOT-FOUND])
3532#
3533#
3534# Note that if there is a possibility the first call to
3535# PKG_CHECK_MODULES might not happen, you should be sure to include an
3536# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3537#
3538#
3539# --------------------------------------------------------------
3540# PKG_CHECK_MODULES
3541
3542
3543# Include these first...
3544#
3545# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3546# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3547#
3548# This code is free software; you can redistribute it and/or modify it
3549# under the terms of the GNU General Public License version 2 only, as
3550# published by the Free Software Foundation.  Oracle designates this
3551# particular file as subject to the "Classpath" exception as provided
3552# by Oracle in the LICENSE file that accompanied this code.
3553#
3554# This code is distributed in the hope that it will be useful, but WITHOUT
3555# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3556# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3557# version 2 for more details (a copy is included in the LICENSE file that
3558# accompanied this code).
3559#
3560# You should have received a copy of the GNU General Public License version
3561# 2 along with this work; if not, write to the Free Software Foundation,
3562# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3563#
3564# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3565# or visit www.oracle.com if you need additional information or have any
3566# questions.
3567#
3568
3569# Create a function/macro that takes a series of named arguments. The call is
3570# similar to AC_DEFUN, but the setup of the function looks like this:
3571# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3572# ... do something
3573#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3574# ])
3575# A star (*) in front of a named argument means that it is required and it's
3576# presence will be verified. To pass e.g. the first value as a normal indexed
3577# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3578# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3579# "ARG_FOO".
3580#
3581# The generated function can be called like this:
3582# MYFUNC(FOO: [foo-val],
3583#     BAR: [
3584#         $ECHO hello world
3585#     ])
3586# Note that the argument value must start on the same line as the argument name.
3587#
3588# Argument 1: Name of the function to define
3589# Argument 2: List of legal named arguments, with a * prefix for required arguments
3590# Argument 3: Argument array to treat as named, typically $@
3591# Argument 4: The main function body
3592
3593
3594# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3595# If so, then append $1 to $2 \
3596# Also set JVM_ARG_OK to true/false depending on outcome.
3597
3598
3599# Appends a string to a path variable, only adding the : when needed.
3600
3601
3602# Prepends a string to a path variable, only adding the : when needed.
3603
3604
3605# This will make sure the given variable points to a full and proper
3606# path. This means:
3607# 1) There will be no spaces in the path. On unix platforms,
3608#    spaces in the path will result in an error. On Windows,
3609#    the path will be rewritten using short-style to be space-free.
3610# 2) The path will be absolute, and it will be in unix-style (on
3611#     cygwin).
3612# $1: The name of the variable to fix
3613
3614
3615# This will make sure the given variable points to a executable
3616# with a full and proper path. This means:
3617# 1) There will be no spaces in the path. On unix platforms,
3618#    spaces in the path will result in an error. On Windows,
3619#    the path will be rewritten using short-style to be space-free.
3620# 2) The path will be absolute, and it will be in unix-style (on
3621#     cygwin).
3622# Any arguments given to the executable is preserved.
3623# If the input variable does not have a directory specification, then
3624# it need to be in the PATH.
3625# $1: The name of the variable to fix
3626
3627
3628
3629
3630# Register a --with argument but mark it as deprecated
3631# $1: The name of the with argument to deprecate, not including --with-
3632
3633
3634# Register a --enable argument but mark it as deprecated
3635# $1: The name of the with argument to deprecate, not including --enable-
3636# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3637# $3: Messages to user.
3638
3639
3640
3641
3642# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3643# $1: variable to check
3644
3645
3646# Check that there are no unprocessed overridden variables left.
3647# If so, they are an incorrect argument and we will exit with an error.
3648
3649
3650# Setup a tool for the given variable. If correctly specified by the user,
3651# use that value, otherwise search for the tool using the supplied code snippet.
3652# $1: variable to set
3653# $2: code snippet to call to look for the tool
3654# $3: code snippet to call if variable was used to find tool
3655
3656
3657# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3658# $1: variable to set
3659# $2: executable name (or list of names) to look for
3660# $3: [path]
3661
3662
3663# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3664# $1: variable to set
3665# $2: executable name (or list of names) to look for
3666
3667
3668# Like BASIC_PATH_PROGS but fails if no tool was found.
3669# $1: variable to set
3670# $2: executable name (or list of names) to look for
3671# $3: [path]
3672
3673
3674# Like BASIC_SETUP_TOOL but fails if no tool was found.
3675# $1: variable to set
3676# $2: autoconf macro to call to look for the special tool
3677
3678
3679# Setup the most fundamental tools that relies on not much else to set up,
3680# but is used by much of the early bootstrap code.
3681
3682
3683# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3684
3685
3686# Evaluates platform specific overrides for devkit variables.
3687# $1: Name of variable
3688
3689
3690
3691
3692
3693
3694#%%% Simple tools %%%
3695
3696# Check if we have found a usable version of make
3697# $1: the path to a potential make binary (or empty)
3698# $2: the description on how we found this
3699
3700
3701
3702
3703# Goes looking for a usable version of GNU make.
3704
3705
3706
3707
3708
3709
3710
3711
3712# Check if build directory is on local disk. If not possible to determine,
3713# we prefer to claim it's local.
3714# Argument 1: directory to test
3715# Argument 2: what to do if it is on local disk
3716# Argument 3: what to do otherwise (remote disk or failure)
3717
3718
3719# Check that source files have basic read permissions set. This might
3720# not be the case in cygwin in certain conditions.
3721
3722
3723
3724
3725# Check for support for specific options in bash
3726
3727
3728################################################################################
3729#
3730# Default make target
3731#
3732
3733
3734# Code to run after AC_OUTPUT
3735
3736
3737#
3738# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3739# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3740#
3741# This code is free software; you can redistribute it and/or modify it
3742# under the terms of the GNU General Public License version 2 only, as
3743# published by the Free Software Foundation.  Oracle designates this
3744# particular file as subject to the "Classpath" exception as provided
3745# by Oracle in the LICENSE file that accompanied this code.
3746#
3747# This code is distributed in the hope that it will be useful, but WITHOUT
3748# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3749# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3750# version 2 for more details (a copy is included in the LICENSE file that
3751# accompanied this code).
3752#
3753# You should have received a copy of the GNU General Public License version
3754# 2 along with this work; if not, write to the Free Software Foundation,
3755# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3756#
3757# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3758# or visit www.oracle.com if you need additional information or have any
3759# questions.
3760#
3761
3762
3763
3764
3765
3766# Helper function which possibly converts a path using DOS-style short mode.
3767# If so, the updated path is stored in $new_path.
3768# $1: The path to check
3769
3770
3771# Helper function which possibly converts a path using DOS-style short mode.
3772# If so, the updated path is stored in $new_path.
3773# $1: The path to check
3774
3775
3776# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3777# and could probably be heavily simplified. However, all changes in this
3778# area tend to need lot of testing in different scenarios, and in lack of
3779# proper unit testing, cleaning this up has not been deemed worth the effort
3780# at the moment.
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3791
3792
3793
3794
3795# ... then the rest
3796#
3797# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3798# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3799#
3800# This code is free software; you can redistribute it and/or modify it
3801# under the terms of the GNU General Public License version 2 only, as
3802# published by the Free Software Foundation.  Oracle designates this
3803# particular file as subject to the "Classpath" exception as provided
3804# by Oracle in the LICENSE file that accompanied this code.
3805#
3806# This code is distributed in the hope that it will be useful, but WITHOUT
3807# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3808# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3809# version 2 for more details (a copy is included in the LICENSE file that
3810# accompanied this code).
3811#
3812# You should have received a copy of the GNU General Public License version
3813# 2 along with this work; if not, write to the Free Software Foundation,
3814# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3815#
3816# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3817# or visit www.oracle.com if you need additional information or have any
3818# questions.
3819#
3820
3821########################################################################
3822# This file handles detection of the Boot JDK. The Boot JDK detection
3823# process has been developed as a response to solve a complex real-world
3824# problem. Initially, it was simple, but it has grown as platform after
3825# platform, idiosyncracy after idiosyncracy has been supported.
3826#
3827# The basic idea is this:
3828# 1) You need an acceptable *) JDK to use as a Boot JDK
3829# 2) There are several ways to locate a JDK, that are mostly platform
3830#    dependent **)
3831# 3) You can have multiple JDKs installed
3832# 4) If possible, configure should try to dig out an acceptable JDK
3833#    automatically, without having to resort to command-line options
3834#
3835# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3836#     javac) and not a JRE, etc.
3837#
3838# **) On Windows we typically use a well-known path.
3839#     On MacOSX we typically use the tool java_home.
3840#     On Linux we typically find javac in the $PATH, and then follow a
3841#     chain of symlinks that often ends up in a real JDK.
3842#
3843# This leads to the code where we check in different ways to locate a
3844# JDK, and if one is found, check if it is acceptable. If not, we print
3845# our reasons for rejecting it (useful when debugging non-working
3846# configure situations) and continue checking the next one.
3847########################################################################
3848
3849# Execute the check given as argument, and verify the result
3850# If the Boot JDK was previously found, do nothing
3851# $1 A command line (typically autoconf macro) to execute
3852
3853
3854# Test: Is bootjdk explicitely set by command line arguments?
3855
3856
3857# Test: Is $JAVA_HOME set?
3858
3859
3860# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3861
3862
3863# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3864# $1: Argument to the java_home binary (optional)
3865
3866
3867# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3868
3869
3870# Look for a jdk in the given path. If there are multiple, try to select the newest.
3871# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3872# $1 = Path to directory containing jdk installations.
3873# $2 = String to append to the found JDK directory to get the proper JDK home
3874
3875
3876# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3877# environmental variable as base for where to look.
3878# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3879
3880
3881# Test: Is there a JDK installed in default, well-known locations?
3882
3883
3884# Check that a command-line tool in the Boot JDK is correct
3885# $1 = name of variable to assign
3886# $2 = name of binary
3887
3888
3889###############################################################################
3890#
3891# We need a Boot JDK to bootstrap the build.
3892#
3893
3894
3895
3896
3897
3898# BUILD_JDK: the location of the latest JDK that can run
3899#   on the host system and supports the target class file version
3900#   generated in this JDK build.  This variable should only be
3901#   used after the launchers are built.
3902#
3903
3904# Execute the check given as argument, and verify the result.
3905# If the JDK was previously found, do nothing.
3906# $1 A command line (typically autoconf macro) to execute
3907
3908
3909# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3910# is different than the host system doing the build (e.g. cross-compilation),
3911# a special BUILD_JDK is built as part of the build process.  An external
3912# prebuilt BUILD_JDK can also be supplied.
3913
3914
3915#
3916# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3917# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3918#
3919# This code is free software; you can redistribute it and/or modify it
3920# under the terms of the GNU General Public License version 2 only, as
3921# published by the Free Software Foundation.  Oracle designates this
3922# particular file as subject to the "Classpath" exception as provided
3923# by Oracle in the LICENSE file that accompanied this code.
3924#
3925# This code is distributed in the hope that it will be useful, but WITHOUT
3926# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3927# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3928# version 2 for more details (a copy is included in the LICENSE file that
3929# accompanied this code).
3930#
3931# You should have received a copy of the GNU General Public License version
3932# 2 along with this work; if not, write to the Free Software Foundation,
3933# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3934#
3935# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3936# or visit www.oracle.com if you need additional information or have any
3937# questions.
3938#
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956################################################################################
3957#
3958# Runs icecc-create-env once and prints the error if it fails
3959#
3960# $1: arguments to icecc-create-env
3961# $2: log file
3962#
3963
3964
3965################################################################################
3966#
3967# Optionally enable distributed compilation of native code using icecc/icecream
3968#
3969
3970
3971
3972
3973
3974
3975
3976#
3977# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3978# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3979#
3980# This code is free software; you can redistribute it and/or modify it
3981# under the terms of the GNU General Public License version 2 only, as
3982# published by the Free Software Foundation.  Oracle designates this
3983# particular file as subject to the "Classpath" exception as provided
3984# by Oracle in the LICENSE file that accompanied this code.
3985#
3986# This code is distributed in the hope that it will be useful, but WITHOUT
3987# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3988# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3989# version 2 for more details (a copy is included in the LICENSE file that
3990# accompanied this code).
3991#
3992# You should have received a copy of the GNU General Public License version
3993# 2 along with this work; if not, write to the Free Software Foundation,
3994# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3995#
3996# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3997# or visit www.oracle.com if you need additional information or have any
3998# questions.
3999#
4000
4001# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4002# corresponding configure arguments instead
4003
4004
4005# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4006# that configure can use them while detecting compilers.
4007# TOOLCHAIN_TYPE is available here.
4008# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4009
4010
4011
4012
4013
4014
4015# Documentation on common flags used for solstudio in HIGHEST.
4016#
4017# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4018#          done with care, there are some assumptions below that need to
4019#          be understood about the use of pointers, and IEEE behavior.
4020#
4021# -fns: Use non-standard floating point mode (not IEEE 754)
4022# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4023# -fsingle: Use single precision floating point with 'float'
4024# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4025#   (Source with excessing pointer casting and data access with mixed
4026#    pointer types are not recommended)
4027# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4028#   (If you expect perfect errno behavior, do not use this)
4029# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4030# -xrestrict: Pointer parameters to functions do not overlap
4031#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4032#    If you pass in multiple pointers to the same data, do not use this)
4033# -xlibmil: Inline some library routines
4034#   (If you expect perfect errno behavior, do not use this)
4035# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4036#   (If you expect perfect errno behavior, do not use this)
4037#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4038
4039    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4040    # Bug?
4041    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4042    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4043    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4044    #fi
4045
4046
4047
4048
4049
4050
4051################################################################################
4052# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4053#      conditionals against.
4054# $2 - Optional prefix for each variable defined.
4055
4056
4057# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4058#                                  IF_FALSE: [RUN-IF-FALSE])
4059# ------------------------------------------------------------
4060# Check that the C compiler supports an argument
4061
4062
4063
4064
4065# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4066#                                    IF_FALSE: [RUN-IF-FALSE])
4067# ------------------------------------------------------------
4068# Check that the C++ compiler supports an argument
4069
4070
4071
4072
4073# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4074#                                IF_FALSE: [RUN-IF-FALSE])
4075# ------------------------------------------------------------
4076# Check that the C and C++ compilers support an argument
4077
4078
4079
4080
4081# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4082#                                   IF_FALSE: [RUN-IF-FALSE])
4083# ------------------------------------------------------------
4084# Check that the linker support an argument
4085
4086
4087
4088
4089
4090
4091# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4092# Arguments:
4093# $1 - Optional prefix for each variable defined.
4094
4095
4096#
4097# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4098# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4099#
4100# This code is free software; you can redistribute it and/or modify it
4101# under the terms of the GNU General Public License version 2 only, as
4102# published by the Free Software Foundation.  Oracle designates this
4103# particular file as subject to the "Classpath" exception as provided
4104# by Oracle in the LICENSE file that accompanied this code.
4105#
4106# This code is distributed in the hope that it will be useful, but WITHOUT
4107# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4108# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4109# version 2 for more details (a copy is included in the LICENSE file that
4110# accompanied this code).
4111#
4112# You should have received a copy of the GNU General Public License version
4113# 2 along with this work; if not, write to the Free Software Foundation,
4114# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4115#
4116# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4117# or visit www.oracle.com if you need additional information or have any
4118# questions.
4119#
4120
4121
4122
4123
4124
4125cygwin_help() {
4126  case $1 in
4127    unzip)
4128      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4129      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4130      ;;
4131    zip)
4132      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4133      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4134      ;;
4135    make)
4136      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4137      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4138      ;;
4139    freetype)
4140      HELP_MSG="
4141The freetype library can now be build during the configure process.
4142Download the freetype sources and unpack them into an arbitrary directory:
4143
4144wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4145tar -xzf freetype-2.5.3.tar.gz
4146
4147Then run configure with '--with-freetype-src=<freetype_src>'. This will
4148automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4149builds or into '<freetype_src>/lib32' for 32-bit builds.
4150Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4151and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4152
4153Alternatively you can unpack the sources like this to use the default directory:
4154
4155tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4156      ;;
4157  esac
4158}
4159
4160msys_help() {
4161  PKGHANDLER_COMMAND=""
4162}
4163
4164apt_help() {
4165  case $1 in
4166    reduced)
4167      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4168    devkit)
4169      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4170    openjdk)
4171      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4172    alsa)
4173      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4174    cups)
4175      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4176    freetype)
4177      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4178    ffi)
4179      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4180    x11)
4181      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4182    ccache)
4183      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4184    dtrace)
4185      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4186  esac
4187}
4188
4189yum_help() {
4190  case $1 in
4191    devkit)
4192      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4193    openjdk)
4194      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4195    alsa)
4196      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4197    cups)
4198      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4199    freetype)
4200      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4201    x11)
4202      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4203    ccache)
4204      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4205  esac
4206}
4207
4208port_help() {
4209  PKGHANDLER_COMMAND=""
4210}
4211
4212pkgutil_help() {
4213  PKGHANDLER_COMMAND=""
4214}
4215
4216pkgadd_help() {
4217  PKGHANDLER_COMMAND=""
4218}
4219
4220# This function will check if we're called from the "configure" wrapper while
4221# printing --help. If so, we will print out additional information that can
4222# only be extracted within the autoconf script, and then exit. This must be
4223# called at the very beginning in configure.ac.
4224
4225
4226
4227
4228
4229
4230#
4231# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4232# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4233#
4234# This code is free software; you can redistribute it and/or modify it
4235# under the terms of the GNU General Public License version 2 only, as
4236# published by the Free Software Foundation.  Oracle designates this
4237# particular file as subject to the "Classpath" exception as provided
4238# by Oracle in the LICENSE file that accompanied this code.
4239#
4240# This code is distributed in the hope that it will be useful, but WITHOUT
4241# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4242# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4243# version 2 for more details (a copy is included in the LICENSE file that
4244# accompanied this code).
4245#
4246# You should have received a copy of the GNU General Public License version
4247# 2 along with this work; if not, write to the Free Software Foundation,
4248# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4249#
4250# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4251# or visit www.oracle.com if you need additional information or have any
4252# questions.
4253#
4254
4255# All valid JVM features, regardless of platform
4256VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4257    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4258
4259# All valid JVM variants
4260VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4261
4262###############################################################################
4263# Check if the specified JVM variant should be built. To be used in shell if
4264# constructs, like this:
4265# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4266#
4267# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4268
4269# Definition kept in one line to allow inlining in if statements.
4270# Additional [] needed to keep m4 from mangling shell constructs.
4271
4272
4273###############################################################################
4274# Check if the specified JVM features are explicitly enabled. To be used in
4275# shell if constructs, like this:
4276# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4277#
4278# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4279
4280# Definition kept in one line to allow inlining in if statements.
4281# Additional [] needed to keep m4 from mangling shell constructs.
4282
4283
4284###############################################################################
4285# Check which variants of the JVM that we want to build. Available variants are:
4286#   server: normal interpreter, and a tiered C1/C2 compiler
4287#   client: normal interpreter, and C1 (no C2 compiler)
4288#   minimal: reduced form of client with optional features stripped out
4289#   core: normal interpreter only, no compiler
4290#   zero: C++ based interpreter only, no compiler
4291#   zeroshark: C++ based interpreter, and a llvm-based compiler
4292#   custom: baseline JVM with no default features
4293#
4294
4295
4296###############################################################################
4297# Check if dtrace should be enabled and has all prerequisites present.
4298#
4299
4300
4301###############################################################################
4302# Set up all JVM features for each JVM variant.
4303#
4304
4305
4306###############################################################################
4307# Validate JVM features once all setup is complete, including custom setup.
4308#
4309
4310
4311################################################################################
4312# Check if gtest should be built
4313#
4314
4315
4316#
4317# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4318# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4319#
4320# This code is free software; you can redistribute it and/or modify it
4321# under the terms of the GNU General Public License version 2 only, as
4322# published by the Free Software Foundation.  Oracle designates this
4323# particular file as subject to the "Classpath" exception as provided
4324# by Oracle in the LICENSE file that accompanied this code.
4325#
4326# This code is distributed in the hope that it will be useful, but WITHOUT
4327# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4328# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4329# version 2 for more details (a copy is included in the LICENSE file that
4330# accompanied this code).
4331#
4332# You should have received a copy of the GNU General Public License version
4333# 2 along with this work; if not, write to the Free Software Foundation,
4334# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4335#
4336# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4337# or visit www.oracle.com if you need additional information or have any
4338# questions.
4339#
4340
4341###############################################################################
4342# Check which variant of the JDK that we want to build.
4343# Currently we have:
4344#    normal:   standard edition
4345# but the custom make system may add other variants
4346#
4347# Effectively the JDK variant gives a name to a specific set of
4348# modules to compile into the JDK.
4349
4350
4351###############################################################################
4352# Set the debug level
4353#    release: no debug information, all optimizations, no asserts.
4354#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4355#    fastdebug: debug information (-g), all optimizations, all asserts
4356#    slowdebug: debug information (-g), no optimizations, all asserts
4357
4358
4359###############################################################################
4360#
4361# Should we build only OpenJDK even if closed sources are present?
4362#
4363
4364
4365
4366
4367###############################################################################
4368#
4369# Enable or disable the elliptic curve crypto implementation
4370#
4371
4372
4373
4374
4375################################################################################
4376#
4377# Gcov coverage data for hotspot
4378#
4379
4380
4381################################################################################
4382#
4383# Static build support.  When enabled will generate static
4384# libraries instead of shared libraries for all JDK libs.
4385#
4386
4387
4388################################################################################
4389#
4390# jlink options.
4391# We always keep packaged modules in JDK image.
4392#
4393
4394
4395################################################################################
4396#
4397# Check if building of the jtreg failure handler should be enabled.
4398#
4399
4400
4401################################################################################
4402#
4403# Enable or disable generation of the classlist at build time
4404#
4405
4406
4407#
4408# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4409# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4410#
4411# This code is free software; you can redistribute it and/or modify it
4412# under the terms of the GNU General Public License version 2 only, as
4413# published by the Free Software Foundation.  Oracle designates this
4414# particular file as subject to the "Classpath" exception as provided
4415# by Oracle in the LICENSE file that accompanied this code.
4416#
4417# This code is distributed in the hope that it will be useful, but WITHOUT
4418# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4419# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4420# version 2 for more details (a copy is included in the LICENSE file that
4421# accompanied this code).
4422#
4423# You should have received a copy of the GNU General Public License version
4424# 2 along with this work; if not, write to the Free Software Foundation,
4425# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4426#
4427# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4428# or visit www.oracle.com if you need additional information or have any
4429# questions.
4430#
4431
4432###############################################################################
4433#
4434# Setup version numbers
4435#
4436
4437# Verify that a given string represents a valid version number, and assign it
4438# to a variable.
4439
4440# Argument 1: the variable to assign to
4441# Argument 2: the value given by the user
4442
4443
4444
4445
4446#
4447# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4448# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4449#
4450# This code is free software; you can redistribute it and/or modify it
4451# under the terms of the GNU General Public License version 2 only, as
4452# published by the Free Software Foundation.  Oracle designates this
4453# particular file as subject to the "Classpath" exception as provided
4454# by Oracle in the LICENSE file that accompanied this code.
4455#
4456# This code is distributed in the hope that it will be useful, but WITHOUT
4457# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4458# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4459# version 2 for more details (a copy is included in the LICENSE file that
4460# accompanied this code).
4461#
4462# You should have received a copy of the GNU General Public License version
4463# 2 along with this work; if not, write to the Free Software Foundation,
4464# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4465#
4466# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4467# or visit www.oracle.com if you need additional information or have any
4468# questions.
4469#
4470
4471# Major library component reside in separate files.
4472#
4473# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4474# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4475#
4476# This code is free software; you can redistribute it and/or modify it
4477# under the terms of the GNU General Public License version 2 only, as
4478# published by the Free Software Foundation.  Oracle designates this
4479# particular file as subject to the "Classpath" exception as provided
4480# by Oracle in the LICENSE file that accompanied this code.
4481#
4482# This code is distributed in the hope that it will be useful, but WITHOUT
4483# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4484# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4485# version 2 for more details (a copy is included in the LICENSE file that
4486# accompanied this code).
4487#
4488# You should have received a copy of the GNU General Public License version
4489# 2 along with this work; if not, write to the Free Software Foundation,
4490# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4491#
4492# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4493# or visit www.oracle.com if you need additional information or have any
4494# questions.
4495#
4496
4497################################################################################
4498# Setup alsa (Advanced Linux Sound Architecture)
4499################################################################################
4500
4501
4502#
4503# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4504# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4505#
4506# This code is free software; you can redistribute it and/or modify it
4507# under the terms of the GNU General Public License version 2 only, as
4508# published by the Free Software Foundation.  Oracle designates this
4509# particular file as subject to the "Classpath" exception as provided
4510# by Oracle in the LICENSE file that accompanied this code.
4511#
4512# This code is distributed in the hope that it will be useful, but WITHOUT
4513# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4514# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4515# version 2 for more details (a copy is included in the LICENSE file that
4516# accompanied this code).
4517#
4518# You should have received a copy of the GNU General Public License version
4519# 2 along with this work; if not, write to the Free Software Foundation,
4520# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4521#
4522# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4523# or visit www.oracle.com if you need additional information or have any
4524# questions.
4525#
4526
4527################################################################################
4528# Setup bundled libraries.
4529#
4530# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4531# OpenJDK repository. Default is to use these libraries as bundled, but they
4532# might be replaced by en external version by the user.
4533################################################################################
4534
4535
4536################################################################################
4537# Setup libjpeg
4538################################################################################
4539
4540
4541################################################################################
4542# Setup giflib
4543################################################################################
4544
4545
4546################################################################################
4547# Setup libpng
4548################################################################################
4549
4550
4551################################################################################
4552# Setup zlib
4553################################################################################
4554
4555
4556################################################################################
4557# Setup lcms (Little CMS)
4558################################################################################
4559
4560
4561#
4562# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4563# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4564#
4565# This code is free software; you can redistribute it and/or modify it
4566# under the terms of the GNU General Public License version 2 only, as
4567# published by the Free Software Foundation.  Oracle designates this
4568# particular file as subject to the "Classpath" exception as provided
4569# by Oracle in the LICENSE file that accompanied this code.
4570#
4571# This code is distributed in the hope that it will be useful, but WITHOUT
4572# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4573# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4574# version 2 for more details (a copy is included in the LICENSE file that
4575# accompanied this code).
4576#
4577# You should have received a copy of the GNU General Public License version
4578# 2 along with this work; if not, write to the Free Software Foundation,
4579# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4580#
4581# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4582# or visit www.oracle.com if you need additional information or have any
4583# questions.
4584#
4585
4586################################################################################
4587# Setup cups (Common Unix Printing System)
4588################################################################################
4589
4590
4591#
4592# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4593# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4594#
4595# This code is free software; you can redistribute it and/or modify it
4596# under the terms of the GNU General Public License version 2 only, as
4597# published by the Free Software Foundation.  Oracle designates this
4598# particular file as subject to the "Classpath" exception as provided
4599# by Oracle in the LICENSE file that accompanied this code.
4600#
4601# This code is distributed in the hope that it will be useful, but WITHOUT
4602# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4603# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4604# version 2 for more details (a copy is included in the LICENSE file that
4605# accompanied this code).
4606#
4607# You should have received a copy of the GNU General Public License version
4608# 2 along with this work; if not, write to the Free Software Foundation,
4609# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4610#
4611# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4612# or visit www.oracle.com if you need additional information or have any
4613# questions.
4614#
4615
4616################################################################################
4617# Setup libffi (Foreign Function Interface)
4618################################################################################
4619
4620
4621#
4622# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4623# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4624#
4625# This code is free software; you can redistribute it and/or modify it
4626# under the terms of the GNU General Public License version 2 only, as
4627# published by the Free Software Foundation.  Oracle designates this
4628# particular file as subject to the "Classpath" exception as provided
4629# by Oracle in the LICENSE file that accompanied this code.
4630#
4631# This code is distributed in the hope that it will be useful, but WITHOUT
4632# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4633# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4634# version 2 for more details (a copy is included in the LICENSE file that
4635# accompanied this code).
4636#
4637# You should have received a copy of the GNU General Public License version
4638# 2 along with this work; if not, write to the Free Software Foundation,
4639# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4640#
4641# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4642# or visit www.oracle.com if you need additional information or have any
4643# questions.
4644#
4645
4646################################################################################
4647# Build the freetype lib from source
4648################################################################################
4649
4650
4651################################################################################
4652# Check if a potential freeype library match is correct and usable
4653################################################################################
4654
4655
4656################################################################################
4657# Setup freetype (The FreeType2 font rendering library)
4658################################################################################
4659
4660
4661#
4662# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4663# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4664#
4665# This code is free software; you can redistribute it and/or modify it
4666# under the terms of the GNU General Public License version 2 only, as
4667# published by the Free Software Foundation.  Oracle designates this
4668# particular file as subject to the "Classpath" exception as provided
4669# by Oracle in the LICENSE file that accompanied this code.
4670#
4671# This code is distributed in the hope that it will be useful, but WITHOUT
4672# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4673# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4674# version 2 for more details (a copy is included in the LICENSE file that
4675# accompanied this code).
4676#
4677# You should have received a copy of the GNU General Public License version
4678# 2 along with this work; if not, write to the Free Software Foundation,
4679# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4680#
4681# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4682# or visit www.oracle.com if you need additional information or have any
4683# questions.
4684#
4685
4686################################################################################
4687# Setup the standard C/C++ runtime libraries.
4688#
4689# Most importantly, determine if stdc++ should be linked statically or
4690# dynamically.
4691################################################################################
4692
4693
4694#
4695# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4696# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4697#
4698# This code is free software; you can redistribute it and/or modify it
4699# under the terms of the GNU General Public License version 2 only, as
4700# published by the Free Software Foundation.  Oracle designates this
4701# particular file as subject to the "Classpath" exception as provided
4702# by Oracle in the LICENSE file that accompanied this code.
4703#
4704# This code is distributed in the hope that it will be useful, but WITHOUT
4705# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4706# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4707# version 2 for more details (a copy is included in the LICENSE file that
4708# accompanied this code).
4709#
4710# You should have received a copy of the GNU General Public License version
4711# 2 along with this work; if not, write to the Free Software Foundation,
4712# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4713#
4714# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4715# or visit www.oracle.com if you need additional information or have any
4716# questions.
4717#
4718
4719################################################################################
4720# Setup X11 Windows system
4721################################################################################
4722
4723
4724
4725################################################################################
4726# Determine which libraries are needed for this configuration
4727################################################################################
4728
4729
4730################################################################################
4731# Parse library options, and setup needed libraries
4732################################################################################
4733
4734
4735################################################################################
4736# Setup llvm (Low-Level VM)
4737################################################################################
4738
4739
4740################################################################################
4741# Setup various libraries, typically small system libraries
4742################################################################################
4743
4744
4745################################################################################
4746# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4747# redistribute it in the test image.
4748################################################################################
4749
4750
4751
4752#
4753# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4754# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4755#
4756# This code is free software; you can redistribute it and/or modify it
4757# under the terms of the GNU General Public License version 2 only, as
4758# published by the Free Software Foundation.  Oracle designates this
4759# particular file as subject to the "Classpath" exception as provided
4760# by Oracle in the LICENSE file that accompanied this code.
4761#
4762# This code is distributed in the hope that it will be useful, but WITHOUT
4763# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4764# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4765# version 2 for more details (a copy is included in the LICENSE file that
4766# accompanied this code).
4767#
4768# You should have received a copy of the GNU General Public License version
4769# 2 along with this work; if not, write to the Free Software Foundation,
4770# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4771#
4772# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4773# or visit www.oracle.com if you need additional information or have any
4774# questions.
4775#
4776
4777# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4778# Converts autoconf style CPU name to OpenJDK style, into
4779# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4780
4781
4782# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4783# Converts autoconf style OS name to OpenJDK style, into
4784# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4785
4786
4787# Expects $host_os $host_cpu $build_os and $build_cpu
4788# and $with_target_bits to have been setup!
4789#
4790# Translate the standard triplet(quadruplet) definition
4791# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4792# OPENJDK_BUILD_OS, etc.
4793
4794
4795# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4796# accordingly. Must be done after setting up build and target system, but before
4797# doing anything else with these values.
4798
4799
4800# Setup the legacy variables, for controlling the old makefiles.
4801#
4802
4803
4804# $1 - Either TARGET or BUILD to setup the variables for.
4805
4806
4807
4808
4809#%%% Build and target systems %%%
4810
4811
4812
4813
4814# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4815# Add -mX to various FLAGS variables.
4816
4817
4818
4819
4820
4821
4822#
4823# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4824# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4825#
4826# This code is free software; you can redistribute it and/or modify it
4827# under the terms of the GNU General Public License version 2 only, as
4828# published by the Free Software Foundation.  Oracle designates this
4829# particular file as subject to the "Classpath" exception as provided
4830# by Oracle in the LICENSE file that accompanied this code.
4831#
4832# This code is distributed in the hope that it will be useful, but WITHOUT
4833# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4834# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4835# version 2 for more details (a copy is included in the LICENSE file that
4836# accompanied this code).
4837#
4838# You should have received a copy of the GNU General Public License version
4839# 2 along with this work; if not, write to the Free Software Foundation,
4840# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4841#
4842# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4843# or visit www.oracle.com if you need additional information or have any
4844# questions.
4845#
4846
4847
4848
4849
4850
4851
4852
4853################################################################################
4854# Define a mechanism for importing extra prebuilt modules
4855#
4856
4857
4858
4859#
4860# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4861# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4862#
4863# This code is free software; you can redistribute it and/or modify it
4864# under the terms of the GNU General Public License version 2 only, as
4865# published by the Free Software Foundation.  Oracle designates this
4866# particular file as subject to the "Classpath" exception as provided
4867# by Oracle in the LICENSE file that accompanied this code.
4868#
4869# This code is distributed in the hope that it will be useful, but WITHOUT
4870# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4871# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4872# version 2 for more details (a copy is included in the LICENSE file that
4873# accompanied this code).
4874#
4875# You should have received a copy of the GNU General Public License version
4876# 2 along with this work; if not, write to the Free Software Foundation,
4877# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4878#
4879# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4880# or visit www.oracle.com if you need additional information or have any
4881# questions.
4882#
4883
4884########################################################################
4885# This file is responsible for detecting, verifying and setting up the
4886# toolchain, i.e. the compiler, linker and related utilities. It will setup
4887# proper paths to the binaries, but it will not setup any flags.
4888#
4889# The binaries used is determined by the toolchain type, which is the family of
4890# compilers and related tools that are used.
4891########################################################################
4892
4893
4894# All valid toolchains, regardless of platform (used by help.m4)
4895VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4896
4897# These toolchains are valid on different platforms
4898VALID_TOOLCHAINS_linux="gcc clang"
4899VALID_TOOLCHAINS_solaris="solstudio"
4900VALID_TOOLCHAINS_macosx="gcc clang"
4901VALID_TOOLCHAINS_aix="xlc"
4902VALID_TOOLCHAINS_windows="microsoft"
4903
4904# Toolchain descriptions
4905TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4906TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4907TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4908TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4909TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4910
4911# Minimum supported versions, empty means unspecified
4912TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4913TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4914TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4915TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4916TOOLCHAIN_MINIMUM_VERSION_xlc=""
4917
4918# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4919# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4920# $1 - optional variable prefix for compiler and version variables (BUILD_)
4921# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4922
4923
4924# Check if the configured compiler (C and C++) is of a specific version or
4925# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4926#
4927# Arguments:
4928#   VERSION:   The version string to check against the found version
4929#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4930#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4931#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4932
4933
4934
4935
4936# Setup a number of variables describing how native output files are
4937# named on this platform/toolchain.
4938
4939
4940# Determine which toolchain type to use, and make sure it is valid for this
4941# platform. Setup various information about the selected toolchain.
4942
4943
4944# Before we start detecting the toolchain executables, we might need some
4945# special setup, e.g. additional paths etc.
4946
4947
4948# Restore path, etc
4949
4950
4951# Check if a compiler is of the toolchain type we expect, and save the version
4952# information from it. If the compiler does not match the expected type,
4953# this function will abort using AC_MSG_ERROR. If it matches, the version will
4954# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4955# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4956#
4957# $1 = compiler to test (CC or CXX)
4958# $2 = human readable name of compiler (C or C++)
4959
4960
4961# Try to locate the given C or C++ compiler in the path, or otherwise.
4962#
4963# $1 = compiler to test (CC or CXX)
4964# $2 = human readable name of compiler (C or C++)
4965# $3 = list of compiler names to search for
4966
4967
4968# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4969# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4970# archiver (AR). Verify that the compilers are correct according to the
4971# toolchain type.
4972
4973
4974# Setup additional tools that is considered a part of the toolchain, but not the
4975# core part. Many of these are highly platform-specific and do not exist,
4976# and/or are not needed on all platforms.
4977
4978
4979# Setup the build tools (i.e, the compiler and linker used to build programs
4980# that should be run on the build platform, not the target platform, as a build
4981# helper). Since the non-cross-compile case uses the normal, target compilers
4982# for this, we can only do this after these have been setup.
4983
4984
4985# Setup legacy variables that are still needed as alternative ways to refer to
4986# parts of the toolchain.
4987
4988
4989# Do some additional checks on the detected tools.
4990
4991
4992# Setup the JTReg Regression Test Harness.
4993
4994
4995#
4996# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4997# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4998#
4999# This code is free software; you can redistribute it and/or modify it
5000# under the terms of the GNU General Public License version 2 only, as
5001# published by the Free Software Foundation.  Oracle designates this
5002# particular file as subject to the "Classpath" exception as provided
5003# by Oracle in the LICENSE file that accompanied this code.
5004#
5005# This code is distributed in the hope that it will be useful, but WITHOUT
5006# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5007# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5008# version 2 for more details (a copy is included in the LICENSE file that
5009# accompanied this code).
5010#
5011# You should have received a copy of the GNU General Public License version
5012# 2 along with this work; if not, write to the Free Software Foundation,
5013# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5014#
5015# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5016# or visit www.oracle.com if you need additional information or have any
5017# questions.
5018#
5019
5020################################################################################
5021# The order of these defines the priority by which we try to find them.
5022VALID_VS_VERSIONS="2013 2012 2010"
5023
5024VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5025VS_VERSION_INTERNAL_2010=100
5026VS_MSVCR_2010=msvcr100.dll
5027# We don't use msvcp on Visual Studio 2010
5028#VS_MSVCP_2010=msvcp100.dll
5029VS_ENVVAR_2010="VS100COMNTOOLS"
5030VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5031VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5032VS_VS_PLATFORM_NAME_2010="v100"
5033VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5034
5035VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5036VS_VERSION_INTERNAL_2012=110
5037VS_MSVCR_2012=msvcr110.dll
5038VS_MSVCP_2012=msvcp110.dll
5039VS_ENVVAR_2012="VS110COMNTOOLS"
5040VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5041VS_SDK_INSTALLDIR_2012=
5042VS_VS_PLATFORM_NAME_2012="v110"
5043VS_SDK_PLATFORM_NAME_2012=
5044
5045VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5046VS_VERSION_INTERNAL_2013=120
5047VS_MSVCR_2013=msvcr120.dll
5048VS_MSVCP_2013=msvcp120.dll
5049VS_ENVVAR_2013="VS120COMNTOOLS"
5050VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5051VS_SDK_INSTALLDIR_2013=
5052VS_VS_PLATFORM_NAME_2013="v120"
5053VS_SDK_PLATFORM_NAME_2013=
5054
5055################################################################################
5056
5057
5058
5059################################################################################
5060
5061
5062
5063################################################################################
5064# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5065# build environment and assigns it to VS_ENV_CMD
5066
5067
5068################################################################################
5069
5070
5071
5072################################################################################
5073# Check if the VS env variables were setup prior to running configure.
5074# If not, then find vcvarsall.bat and run it automatically, and integrate
5075# the set env variables into the spec file.
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090# This line needs to be here, verbatim, after all includes and the dummy hook
5091# definitions. It is replaced with custom functionality when building
5092# custom sources.
5093#CUSTOM_AUTOCONF_INCLUDE
5094
5095# Do not change or remove the following line, it is needed for consistency checks:
5096DATE_WHEN_GENERATED=1479997904
5097
5098###############################################################################
5099#
5100# Initialization / Boot-strapping
5101#
5102# The bootstrapping process needs to solve the "chicken or the egg" problem,
5103# thus it jumps back and forth, each time gaining something needed later on.
5104#
5105###############################################################################
5106
5107# If we are requested to print additional help, do that and then exit.
5108# This must be the very first call.
5109
5110  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5111
5112    # Print available toolchains
5113    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5114    $PRINTF "Which are valid to use depends on the build platform.\n"
5115    for toolchain in $VALID_TOOLCHAINS_all; do
5116      # Use indirect variable referencing
5117      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5118      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5119      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5120    done
5121    $PRINTF "\n"
5122
5123    # Print available jvm features
5124    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5125    $PRINTF "Which are valid to use depends on the target platform.\n  "
5126    $PRINTF "%s " $VALID_JVM_FEATURES
5127    $PRINTF "\n"
5128
5129    # And now exit directly
5130    exit 0
5131  fi
5132
5133
5134# Basic initialization that must happen first of all in the normal process.
5135
5136  # Save the original command line. This is passed to us by the wrapper configure script.
5137
5138  # Save the path variable before it gets changed
5139  ORIGINAL_PATH="$PATH"
5140
5141  DATE_WHEN_CONFIGURED=`LANG=C date`
5142
5143  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5144$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5145  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5146$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5147
5148
5149  # Start with tools that do not need have cross compilation support
5150  # and can be expected to be found in the default PATH. These tools are
5151  # used by configure.
5152
5153  # First are all the simple required tools.
5154
5155
5156
5157  # Publish this variable in the help.
5158
5159
5160  if [ -z "${BASENAME+x}" ]; then
5161    # The variable is not set by user, try to locate tool using the code snippet
5162    for ac_prog in basename
5163do
5164  # Extract the first word of "$ac_prog", so it can be a program name with args.
5165set dummy $ac_prog; ac_word=$2
5166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5167$as_echo_n "checking for $ac_word... " >&6; }
5168if ${ac_cv_path_BASENAME+:} false; then :
5169  $as_echo_n "(cached) " >&6
5170else
5171  case $BASENAME in
5172  [\\/]* | ?:[\\/]*)
5173  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5174  ;;
5175  *)
5176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5177for as_dir in $PATH
5178do
5179  IFS=$as_save_IFS
5180  test -z "$as_dir" && as_dir=.
5181    for ac_exec_ext in '' $ac_executable_extensions; do
5182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5183    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5185    break 2
5186  fi
5187done
5188  done
5189IFS=$as_save_IFS
5190
5191  ;;
5192esac
5193fi
5194BASENAME=$ac_cv_path_BASENAME
5195if test -n "$BASENAME"; then
5196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5197$as_echo "$BASENAME" >&6; }
5198else
5199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5200$as_echo "no" >&6; }
5201fi
5202
5203
5204  test -n "$BASENAME" && break
5205done
5206
5207  else
5208    # The variable is set, but is it from the command line or the environment?
5209
5210    # Try to remove the string !BASENAME! from our list.
5211    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5212    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5213      # If it failed, the variable was not from the command line. Ignore it,
5214      # but warn the user (except for BASH, which is always set by the calling BASH).
5215      if test "xBASENAME" != xBASH; then
5216        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5217$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5218      fi
5219      # Try to locate tool using the code snippet
5220      for ac_prog in basename
5221do
5222  # Extract the first word of "$ac_prog", so it can be a program name with args.
5223set dummy $ac_prog; ac_word=$2
5224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5225$as_echo_n "checking for $ac_word... " >&6; }
5226if ${ac_cv_path_BASENAME+:} false; then :
5227  $as_echo_n "(cached) " >&6
5228else
5229  case $BASENAME in
5230  [\\/]* | ?:[\\/]*)
5231  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5232  ;;
5233  *)
5234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5235for as_dir in $PATH
5236do
5237  IFS=$as_save_IFS
5238  test -z "$as_dir" && as_dir=.
5239    for ac_exec_ext in '' $ac_executable_extensions; do
5240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5241    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5243    break 2
5244  fi
5245done
5246  done
5247IFS=$as_save_IFS
5248
5249  ;;
5250esac
5251fi
5252BASENAME=$ac_cv_path_BASENAME
5253if test -n "$BASENAME"; then
5254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5255$as_echo "$BASENAME" >&6; }
5256else
5257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5258$as_echo "no" >&6; }
5259fi
5260
5261
5262  test -n "$BASENAME" && break
5263done
5264
5265    else
5266      # If it succeeded, then it was overridden by the user. We will use it
5267      # for the tool.
5268
5269      # First remove it from the list of overridden variables, so we can test
5270      # for unknown variables in the end.
5271      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5272
5273      # Check if we try to supply an empty value
5274      if test "x$BASENAME" = x; then
5275        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5276$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5277        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5278$as_echo_n "checking for BASENAME... " >&6; }
5279        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5280$as_echo "disabled" >&6; }
5281      else
5282        # Check if the provided tool contains a complete path.
5283        tool_specified="$BASENAME"
5284        tool_basename="${tool_specified##*/}"
5285        if test "x$tool_basename" = "x$tool_specified"; then
5286          # A command without a complete path is provided, search $PATH.
5287          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5288$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5289          # Extract the first word of "$tool_basename", so it can be a program name with args.
5290set dummy $tool_basename; ac_word=$2
5291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5292$as_echo_n "checking for $ac_word... " >&6; }
5293if ${ac_cv_path_BASENAME+:} false; then :
5294  $as_echo_n "(cached) " >&6
5295else
5296  case $BASENAME in
5297  [\\/]* | ?:[\\/]*)
5298  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5299  ;;
5300  *)
5301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5302for as_dir in $PATH
5303do
5304  IFS=$as_save_IFS
5305  test -z "$as_dir" && as_dir=.
5306    for ac_exec_ext in '' $ac_executable_extensions; do
5307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5308    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5310    break 2
5311  fi
5312done
5313  done
5314IFS=$as_save_IFS
5315
5316  ;;
5317esac
5318fi
5319BASENAME=$ac_cv_path_BASENAME
5320if test -n "$BASENAME"; then
5321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5322$as_echo "$BASENAME" >&6; }
5323else
5324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5325$as_echo "no" >&6; }
5326fi
5327
5328
5329          if test "x$BASENAME" = x; then
5330            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5331          fi
5332        else
5333          # Otherwise we believe it is a complete path. Use it as it is.
5334          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5335$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5336          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5337$as_echo_n "checking for BASENAME... " >&6; }
5338          if test ! -x "$tool_specified"; then
5339            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5340$as_echo "not found" >&6; }
5341            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5342          fi
5343          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5344$as_echo "$tool_specified" >&6; }
5345        fi
5346      fi
5347    fi
5348
5349  fi
5350
5351
5352
5353  if test "x$BASENAME" = x; then
5354    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5355  fi
5356
5357
5358
5359
5360
5361  # Publish this variable in the help.
5362
5363
5364  if [ -z "${BASH+x}" ]; then
5365    # The variable is not set by user, try to locate tool using the code snippet
5366    for ac_prog in bash
5367do
5368  # Extract the first word of "$ac_prog", so it can be a program name with args.
5369set dummy $ac_prog; ac_word=$2
5370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5371$as_echo_n "checking for $ac_word... " >&6; }
5372if ${ac_cv_path_BASH+:} false; then :
5373  $as_echo_n "(cached) " >&6
5374else
5375  case $BASH in
5376  [\\/]* | ?:[\\/]*)
5377  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5378  ;;
5379  *)
5380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5381for as_dir in $PATH
5382do
5383  IFS=$as_save_IFS
5384  test -z "$as_dir" && as_dir=.
5385    for ac_exec_ext in '' $ac_executable_extensions; do
5386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5387    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5389    break 2
5390  fi
5391done
5392  done
5393IFS=$as_save_IFS
5394
5395  ;;
5396esac
5397fi
5398BASH=$ac_cv_path_BASH
5399if test -n "$BASH"; then
5400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5401$as_echo "$BASH" >&6; }
5402else
5403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5404$as_echo "no" >&6; }
5405fi
5406
5407
5408  test -n "$BASH" && break
5409done
5410
5411  else
5412    # The variable is set, but is it from the command line or the environment?
5413
5414    # Try to remove the string !BASH! from our list.
5415    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5416    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5417      # If it failed, the variable was not from the command line. Ignore it,
5418      # but warn the user (except for BASH, which is always set by the calling BASH).
5419      if test "xBASH" != xBASH; then
5420        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5421$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5422      fi
5423      # Try to locate tool using the code snippet
5424      for ac_prog in bash
5425do
5426  # Extract the first word of "$ac_prog", so it can be a program name with args.
5427set dummy $ac_prog; ac_word=$2
5428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5429$as_echo_n "checking for $ac_word... " >&6; }
5430if ${ac_cv_path_BASH+:} false; then :
5431  $as_echo_n "(cached) " >&6
5432else
5433  case $BASH in
5434  [\\/]* | ?:[\\/]*)
5435  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5436  ;;
5437  *)
5438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5439for as_dir in $PATH
5440do
5441  IFS=$as_save_IFS
5442  test -z "$as_dir" && as_dir=.
5443    for ac_exec_ext in '' $ac_executable_extensions; do
5444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5445    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5447    break 2
5448  fi
5449done
5450  done
5451IFS=$as_save_IFS
5452
5453  ;;
5454esac
5455fi
5456BASH=$ac_cv_path_BASH
5457if test -n "$BASH"; then
5458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5459$as_echo "$BASH" >&6; }
5460else
5461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5462$as_echo "no" >&6; }
5463fi
5464
5465
5466  test -n "$BASH" && break
5467done
5468
5469    else
5470      # If it succeeded, then it was overridden by the user. We will use it
5471      # for the tool.
5472
5473      # First remove it from the list of overridden variables, so we can test
5474      # for unknown variables in the end.
5475      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5476
5477      # Check if we try to supply an empty value
5478      if test "x$BASH" = x; then
5479        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5480$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5481        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5482$as_echo_n "checking for BASH... " >&6; }
5483        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5484$as_echo "disabled" >&6; }
5485      else
5486        # Check if the provided tool contains a complete path.
5487        tool_specified="$BASH"
5488        tool_basename="${tool_specified##*/}"
5489        if test "x$tool_basename" = "x$tool_specified"; then
5490          # A command without a complete path is provided, search $PATH.
5491          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5492$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5493          # Extract the first word of "$tool_basename", so it can be a program name with args.
5494set dummy $tool_basename; ac_word=$2
5495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5496$as_echo_n "checking for $ac_word... " >&6; }
5497if ${ac_cv_path_BASH+:} false; then :
5498  $as_echo_n "(cached) " >&6
5499else
5500  case $BASH in
5501  [\\/]* | ?:[\\/]*)
5502  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5503  ;;
5504  *)
5505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5506for as_dir in $PATH
5507do
5508  IFS=$as_save_IFS
5509  test -z "$as_dir" && as_dir=.
5510    for ac_exec_ext in '' $ac_executable_extensions; do
5511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5512    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5514    break 2
5515  fi
5516done
5517  done
5518IFS=$as_save_IFS
5519
5520  ;;
5521esac
5522fi
5523BASH=$ac_cv_path_BASH
5524if test -n "$BASH"; then
5525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5526$as_echo "$BASH" >&6; }
5527else
5528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5529$as_echo "no" >&6; }
5530fi
5531
5532
5533          if test "x$BASH" = x; then
5534            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5535          fi
5536        else
5537          # Otherwise we believe it is a complete path. Use it as it is.
5538          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5539$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5540          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5541$as_echo_n "checking for BASH... " >&6; }
5542          if test ! -x "$tool_specified"; then
5543            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5544$as_echo "not found" >&6; }
5545            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5546          fi
5547          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5548$as_echo "$tool_specified" >&6; }
5549        fi
5550      fi
5551    fi
5552
5553  fi
5554
5555
5556
5557  if test "x$BASH" = x; then
5558    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5559  fi
5560
5561
5562
5563
5564
5565  # Publish this variable in the help.
5566
5567
5568  if [ -z "${CAT+x}" ]; then
5569    # The variable is not set by user, try to locate tool using the code snippet
5570    for ac_prog in cat
5571do
5572  # Extract the first word of "$ac_prog", so it can be a program name with args.
5573set dummy $ac_prog; ac_word=$2
5574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5575$as_echo_n "checking for $ac_word... " >&6; }
5576if ${ac_cv_path_CAT+:} false; then :
5577  $as_echo_n "(cached) " >&6
5578else
5579  case $CAT in
5580  [\\/]* | ?:[\\/]*)
5581  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5582  ;;
5583  *)
5584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5585for as_dir in $PATH
5586do
5587  IFS=$as_save_IFS
5588  test -z "$as_dir" && as_dir=.
5589    for ac_exec_ext in '' $ac_executable_extensions; do
5590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5591    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5593    break 2
5594  fi
5595done
5596  done
5597IFS=$as_save_IFS
5598
5599  ;;
5600esac
5601fi
5602CAT=$ac_cv_path_CAT
5603if test -n "$CAT"; then
5604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5605$as_echo "$CAT" >&6; }
5606else
5607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5608$as_echo "no" >&6; }
5609fi
5610
5611
5612  test -n "$CAT" && break
5613done
5614
5615  else
5616    # The variable is set, but is it from the command line or the environment?
5617
5618    # Try to remove the string !CAT! from our list.
5619    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5620    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5621      # If it failed, the variable was not from the command line. Ignore it,
5622      # but warn the user (except for BASH, which is always set by the calling BASH).
5623      if test "xCAT" != xBASH; then
5624        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5625$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5626      fi
5627      # Try to locate tool using the code snippet
5628      for ac_prog in cat
5629do
5630  # Extract the first word of "$ac_prog", so it can be a program name with args.
5631set dummy $ac_prog; ac_word=$2
5632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5633$as_echo_n "checking for $ac_word... " >&6; }
5634if ${ac_cv_path_CAT+:} false; then :
5635  $as_echo_n "(cached) " >&6
5636else
5637  case $CAT in
5638  [\\/]* | ?:[\\/]*)
5639  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5640  ;;
5641  *)
5642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5643for as_dir in $PATH
5644do
5645  IFS=$as_save_IFS
5646  test -z "$as_dir" && as_dir=.
5647    for ac_exec_ext in '' $ac_executable_extensions; do
5648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5649    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5651    break 2
5652  fi
5653done
5654  done
5655IFS=$as_save_IFS
5656
5657  ;;
5658esac
5659fi
5660CAT=$ac_cv_path_CAT
5661if test -n "$CAT"; then
5662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5663$as_echo "$CAT" >&6; }
5664else
5665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5666$as_echo "no" >&6; }
5667fi
5668
5669
5670  test -n "$CAT" && break
5671done
5672
5673    else
5674      # If it succeeded, then it was overridden by the user. We will use it
5675      # for the tool.
5676
5677      # First remove it from the list of overridden variables, so we can test
5678      # for unknown variables in the end.
5679      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5680
5681      # Check if we try to supply an empty value
5682      if test "x$CAT" = x; then
5683        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5684$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5685        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5686$as_echo_n "checking for CAT... " >&6; }
5687        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5688$as_echo "disabled" >&6; }
5689      else
5690        # Check if the provided tool contains a complete path.
5691        tool_specified="$CAT"
5692        tool_basename="${tool_specified##*/}"
5693        if test "x$tool_basename" = "x$tool_specified"; then
5694          # A command without a complete path is provided, search $PATH.
5695          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5696$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5697          # Extract the first word of "$tool_basename", so it can be a program name with args.
5698set dummy $tool_basename; ac_word=$2
5699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5700$as_echo_n "checking for $ac_word... " >&6; }
5701if ${ac_cv_path_CAT+:} false; then :
5702  $as_echo_n "(cached) " >&6
5703else
5704  case $CAT in
5705  [\\/]* | ?:[\\/]*)
5706  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5707  ;;
5708  *)
5709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5710for as_dir in $PATH
5711do
5712  IFS=$as_save_IFS
5713  test -z "$as_dir" && as_dir=.
5714    for ac_exec_ext in '' $ac_executable_extensions; do
5715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5716    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5718    break 2
5719  fi
5720done
5721  done
5722IFS=$as_save_IFS
5723
5724  ;;
5725esac
5726fi
5727CAT=$ac_cv_path_CAT
5728if test -n "$CAT"; then
5729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5730$as_echo "$CAT" >&6; }
5731else
5732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5733$as_echo "no" >&6; }
5734fi
5735
5736
5737          if test "x$CAT" = x; then
5738            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5739          fi
5740        else
5741          # Otherwise we believe it is a complete path. Use it as it is.
5742          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5743$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5744          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5745$as_echo_n "checking for CAT... " >&6; }
5746          if test ! -x "$tool_specified"; then
5747            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5748$as_echo "not found" >&6; }
5749            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5750          fi
5751          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5752$as_echo "$tool_specified" >&6; }
5753        fi
5754      fi
5755    fi
5756
5757  fi
5758
5759
5760
5761  if test "x$CAT" = x; then
5762    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5763  fi
5764
5765
5766
5767
5768
5769  # Publish this variable in the help.
5770
5771
5772  if [ -z "${CHMOD+x}" ]; then
5773    # The variable is not set by user, try to locate tool using the code snippet
5774    for ac_prog in chmod
5775do
5776  # Extract the first word of "$ac_prog", so it can be a program name with args.
5777set dummy $ac_prog; ac_word=$2
5778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5779$as_echo_n "checking for $ac_word... " >&6; }
5780if ${ac_cv_path_CHMOD+:} false; then :
5781  $as_echo_n "(cached) " >&6
5782else
5783  case $CHMOD in
5784  [\\/]* | ?:[\\/]*)
5785  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5786  ;;
5787  *)
5788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5789for as_dir in $PATH
5790do
5791  IFS=$as_save_IFS
5792  test -z "$as_dir" && as_dir=.
5793    for ac_exec_ext in '' $ac_executable_extensions; do
5794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5795    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5797    break 2
5798  fi
5799done
5800  done
5801IFS=$as_save_IFS
5802
5803  ;;
5804esac
5805fi
5806CHMOD=$ac_cv_path_CHMOD
5807if test -n "$CHMOD"; then
5808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5809$as_echo "$CHMOD" >&6; }
5810else
5811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5812$as_echo "no" >&6; }
5813fi
5814
5815
5816  test -n "$CHMOD" && break
5817done
5818
5819  else
5820    # The variable is set, but is it from the command line or the environment?
5821
5822    # Try to remove the string !CHMOD! from our list.
5823    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5824    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5825      # If it failed, the variable was not from the command line. Ignore it,
5826      # but warn the user (except for BASH, which is always set by the calling BASH).
5827      if test "xCHMOD" != xBASH; then
5828        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5829$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5830      fi
5831      # Try to locate tool using the code snippet
5832      for ac_prog in chmod
5833do
5834  # Extract the first word of "$ac_prog", so it can be a program name with args.
5835set dummy $ac_prog; ac_word=$2
5836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5837$as_echo_n "checking for $ac_word... " >&6; }
5838if ${ac_cv_path_CHMOD+:} false; then :
5839  $as_echo_n "(cached) " >&6
5840else
5841  case $CHMOD in
5842  [\\/]* | ?:[\\/]*)
5843  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5844  ;;
5845  *)
5846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5847for as_dir in $PATH
5848do
5849  IFS=$as_save_IFS
5850  test -z "$as_dir" && as_dir=.
5851    for ac_exec_ext in '' $ac_executable_extensions; do
5852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5853    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5855    break 2
5856  fi
5857done
5858  done
5859IFS=$as_save_IFS
5860
5861  ;;
5862esac
5863fi
5864CHMOD=$ac_cv_path_CHMOD
5865if test -n "$CHMOD"; then
5866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5867$as_echo "$CHMOD" >&6; }
5868else
5869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5870$as_echo "no" >&6; }
5871fi
5872
5873
5874  test -n "$CHMOD" && break
5875done
5876
5877    else
5878      # If it succeeded, then it was overridden by the user. We will use it
5879      # for the tool.
5880
5881      # First remove it from the list of overridden variables, so we can test
5882      # for unknown variables in the end.
5883      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5884
5885      # Check if we try to supply an empty value
5886      if test "x$CHMOD" = x; then
5887        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5888$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5889        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5890$as_echo_n "checking for CHMOD... " >&6; }
5891        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5892$as_echo "disabled" >&6; }
5893      else
5894        # Check if the provided tool contains a complete path.
5895        tool_specified="$CHMOD"
5896        tool_basename="${tool_specified##*/}"
5897        if test "x$tool_basename" = "x$tool_specified"; then
5898          # A command without a complete path is provided, search $PATH.
5899          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5900$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5901          # Extract the first word of "$tool_basename", so it can be a program name with args.
5902set dummy $tool_basename; ac_word=$2
5903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5904$as_echo_n "checking for $ac_word... " >&6; }
5905if ${ac_cv_path_CHMOD+:} false; then :
5906  $as_echo_n "(cached) " >&6
5907else
5908  case $CHMOD in
5909  [\\/]* | ?:[\\/]*)
5910  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5911  ;;
5912  *)
5913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5914for as_dir in $PATH
5915do
5916  IFS=$as_save_IFS
5917  test -z "$as_dir" && as_dir=.
5918    for ac_exec_ext in '' $ac_executable_extensions; do
5919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5920    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5922    break 2
5923  fi
5924done
5925  done
5926IFS=$as_save_IFS
5927
5928  ;;
5929esac
5930fi
5931CHMOD=$ac_cv_path_CHMOD
5932if test -n "$CHMOD"; then
5933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5934$as_echo "$CHMOD" >&6; }
5935else
5936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5937$as_echo "no" >&6; }
5938fi
5939
5940
5941          if test "x$CHMOD" = x; then
5942            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5943          fi
5944        else
5945          # Otherwise we believe it is a complete path. Use it as it is.
5946          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5947$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5948          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5949$as_echo_n "checking for CHMOD... " >&6; }
5950          if test ! -x "$tool_specified"; then
5951            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5952$as_echo "not found" >&6; }
5953            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5954          fi
5955          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5956$as_echo "$tool_specified" >&6; }
5957        fi
5958      fi
5959    fi
5960
5961  fi
5962
5963
5964
5965  if test "x$CHMOD" = x; then
5966    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5967  fi
5968
5969
5970
5971
5972
5973  # Publish this variable in the help.
5974
5975
5976  if [ -z "${CMP+x}" ]; then
5977    # The variable is not set by user, try to locate tool using the code snippet
5978    for ac_prog in cmp
5979do
5980  # Extract the first word of "$ac_prog", so it can be a program name with args.
5981set dummy $ac_prog; ac_word=$2
5982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5983$as_echo_n "checking for $ac_word... " >&6; }
5984if ${ac_cv_path_CMP+:} false; then :
5985  $as_echo_n "(cached) " >&6
5986else
5987  case $CMP in
5988  [\\/]* | ?:[\\/]*)
5989  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5990  ;;
5991  *)
5992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5993for as_dir in $PATH
5994do
5995  IFS=$as_save_IFS
5996  test -z "$as_dir" && as_dir=.
5997    for ac_exec_ext in '' $ac_executable_extensions; do
5998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5999    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6001    break 2
6002  fi
6003done
6004  done
6005IFS=$as_save_IFS
6006
6007  ;;
6008esac
6009fi
6010CMP=$ac_cv_path_CMP
6011if test -n "$CMP"; then
6012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6013$as_echo "$CMP" >&6; }
6014else
6015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6016$as_echo "no" >&6; }
6017fi
6018
6019
6020  test -n "$CMP" && break
6021done
6022
6023  else
6024    # The variable is set, but is it from the command line or the environment?
6025
6026    # Try to remove the string !CMP! from our list.
6027    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6028    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6029      # If it failed, the variable was not from the command line. Ignore it,
6030      # but warn the user (except for BASH, which is always set by the calling BASH).
6031      if test "xCMP" != xBASH; then
6032        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6033$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6034      fi
6035      # Try to locate tool using the code snippet
6036      for ac_prog in cmp
6037do
6038  # Extract the first word of "$ac_prog", so it can be a program name with args.
6039set dummy $ac_prog; ac_word=$2
6040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6041$as_echo_n "checking for $ac_word... " >&6; }
6042if ${ac_cv_path_CMP+:} false; then :
6043  $as_echo_n "(cached) " >&6
6044else
6045  case $CMP in
6046  [\\/]* | ?:[\\/]*)
6047  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6048  ;;
6049  *)
6050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6051for as_dir in $PATH
6052do
6053  IFS=$as_save_IFS
6054  test -z "$as_dir" && as_dir=.
6055    for ac_exec_ext in '' $ac_executable_extensions; do
6056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6057    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6059    break 2
6060  fi
6061done
6062  done
6063IFS=$as_save_IFS
6064
6065  ;;
6066esac
6067fi
6068CMP=$ac_cv_path_CMP
6069if test -n "$CMP"; then
6070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6071$as_echo "$CMP" >&6; }
6072else
6073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6074$as_echo "no" >&6; }
6075fi
6076
6077
6078  test -n "$CMP" && break
6079done
6080
6081    else
6082      # If it succeeded, then it was overridden by the user. We will use it
6083      # for the tool.
6084
6085      # First remove it from the list of overridden variables, so we can test
6086      # for unknown variables in the end.
6087      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6088
6089      # Check if we try to supply an empty value
6090      if test "x$CMP" = x; then
6091        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6092$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6093        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6094$as_echo_n "checking for CMP... " >&6; }
6095        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6096$as_echo "disabled" >&6; }
6097      else
6098        # Check if the provided tool contains a complete path.
6099        tool_specified="$CMP"
6100        tool_basename="${tool_specified##*/}"
6101        if test "x$tool_basename" = "x$tool_specified"; then
6102          # A command without a complete path is provided, search $PATH.
6103          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6104$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6105          # Extract the first word of "$tool_basename", so it can be a program name with args.
6106set dummy $tool_basename; ac_word=$2
6107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6108$as_echo_n "checking for $ac_word... " >&6; }
6109if ${ac_cv_path_CMP+:} false; then :
6110  $as_echo_n "(cached) " >&6
6111else
6112  case $CMP in
6113  [\\/]* | ?:[\\/]*)
6114  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6115  ;;
6116  *)
6117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6118for as_dir in $PATH
6119do
6120  IFS=$as_save_IFS
6121  test -z "$as_dir" && as_dir=.
6122    for ac_exec_ext in '' $ac_executable_extensions; do
6123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6124    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6126    break 2
6127  fi
6128done
6129  done
6130IFS=$as_save_IFS
6131
6132  ;;
6133esac
6134fi
6135CMP=$ac_cv_path_CMP
6136if test -n "$CMP"; then
6137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6138$as_echo "$CMP" >&6; }
6139else
6140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6141$as_echo "no" >&6; }
6142fi
6143
6144
6145          if test "x$CMP" = x; then
6146            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6147          fi
6148        else
6149          # Otherwise we believe it is a complete path. Use it as it is.
6150          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6151$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6152          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6153$as_echo_n "checking for CMP... " >&6; }
6154          if test ! -x "$tool_specified"; then
6155            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6156$as_echo "not found" >&6; }
6157            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6158          fi
6159          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6160$as_echo "$tool_specified" >&6; }
6161        fi
6162      fi
6163    fi
6164
6165  fi
6166
6167
6168
6169  if test "x$CMP" = x; then
6170    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6171  fi
6172
6173
6174
6175
6176
6177  # Publish this variable in the help.
6178
6179
6180  if [ -z "${COMM+x}" ]; then
6181    # The variable is not set by user, try to locate tool using the code snippet
6182    for ac_prog in comm
6183do
6184  # Extract the first word of "$ac_prog", so it can be a program name with args.
6185set dummy $ac_prog; ac_word=$2
6186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6187$as_echo_n "checking for $ac_word... " >&6; }
6188if ${ac_cv_path_COMM+:} false; then :
6189  $as_echo_n "(cached) " >&6
6190else
6191  case $COMM in
6192  [\\/]* | ?:[\\/]*)
6193  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6194  ;;
6195  *)
6196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6197for as_dir in $PATH
6198do
6199  IFS=$as_save_IFS
6200  test -z "$as_dir" && as_dir=.
6201    for ac_exec_ext in '' $ac_executable_extensions; do
6202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6203    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6205    break 2
6206  fi
6207done
6208  done
6209IFS=$as_save_IFS
6210
6211  ;;
6212esac
6213fi
6214COMM=$ac_cv_path_COMM
6215if test -n "$COMM"; then
6216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6217$as_echo "$COMM" >&6; }
6218else
6219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6220$as_echo "no" >&6; }
6221fi
6222
6223
6224  test -n "$COMM" && break
6225done
6226
6227  else
6228    # The variable is set, but is it from the command line or the environment?
6229
6230    # Try to remove the string !COMM! from our list.
6231    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6232    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6233      # If it failed, the variable was not from the command line. Ignore it,
6234      # but warn the user (except for BASH, which is always set by the calling BASH).
6235      if test "xCOMM" != xBASH; then
6236        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6237$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6238      fi
6239      # Try to locate tool using the code snippet
6240      for ac_prog in comm
6241do
6242  # Extract the first word of "$ac_prog", so it can be a program name with args.
6243set dummy $ac_prog; ac_word=$2
6244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6245$as_echo_n "checking for $ac_word... " >&6; }
6246if ${ac_cv_path_COMM+:} false; then :
6247  $as_echo_n "(cached) " >&6
6248else
6249  case $COMM in
6250  [\\/]* | ?:[\\/]*)
6251  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6252  ;;
6253  *)
6254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6255for as_dir in $PATH
6256do
6257  IFS=$as_save_IFS
6258  test -z "$as_dir" && as_dir=.
6259    for ac_exec_ext in '' $ac_executable_extensions; do
6260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6261    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6263    break 2
6264  fi
6265done
6266  done
6267IFS=$as_save_IFS
6268
6269  ;;
6270esac
6271fi
6272COMM=$ac_cv_path_COMM
6273if test -n "$COMM"; then
6274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6275$as_echo "$COMM" >&6; }
6276else
6277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6278$as_echo "no" >&6; }
6279fi
6280
6281
6282  test -n "$COMM" && break
6283done
6284
6285    else
6286      # If it succeeded, then it was overridden by the user. We will use it
6287      # for the tool.
6288
6289      # First remove it from the list of overridden variables, so we can test
6290      # for unknown variables in the end.
6291      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6292
6293      # Check if we try to supply an empty value
6294      if test "x$COMM" = x; then
6295        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6296$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6298$as_echo_n "checking for COMM... " >&6; }
6299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6300$as_echo "disabled" >&6; }
6301      else
6302        # Check if the provided tool contains a complete path.
6303        tool_specified="$COMM"
6304        tool_basename="${tool_specified##*/}"
6305        if test "x$tool_basename" = "x$tool_specified"; then
6306          # A command without a complete path is provided, search $PATH.
6307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6308$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6309          # Extract the first word of "$tool_basename", so it can be a program name with args.
6310set dummy $tool_basename; ac_word=$2
6311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6312$as_echo_n "checking for $ac_word... " >&6; }
6313if ${ac_cv_path_COMM+:} false; then :
6314  $as_echo_n "(cached) " >&6
6315else
6316  case $COMM in
6317  [\\/]* | ?:[\\/]*)
6318  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6319  ;;
6320  *)
6321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6322for as_dir in $PATH
6323do
6324  IFS=$as_save_IFS
6325  test -z "$as_dir" && as_dir=.
6326    for ac_exec_ext in '' $ac_executable_extensions; do
6327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6328    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6330    break 2
6331  fi
6332done
6333  done
6334IFS=$as_save_IFS
6335
6336  ;;
6337esac
6338fi
6339COMM=$ac_cv_path_COMM
6340if test -n "$COMM"; then
6341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6342$as_echo "$COMM" >&6; }
6343else
6344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6345$as_echo "no" >&6; }
6346fi
6347
6348
6349          if test "x$COMM" = x; then
6350            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6351          fi
6352        else
6353          # Otherwise we believe it is a complete path. Use it as it is.
6354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6355$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6356          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6357$as_echo_n "checking for COMM... " >&6; }
6358          if test ! -x "$tool_specified"; then
6359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6360$as_echo "not found" >&6; }
6361            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6362          fi
6363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6364$as_echo "$tool_specified" >&6; }
6365        fi
6366      fi
6367    fi
6368
6369  fi
6370
6371
6372
6373  if test "x$COMM" = x; then
6374    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6375  fi
6376
6377
6378
6379
6380
6381  # Publish this variable in the help.
6382
6383
6384  if [ -z "${CP+x}" ]; then
6385    # The variable is not set by user, try to locate tool using the code snippet
6386    for ac_prog in cp
6387do
6388  # Extract the first word of "$ac_prog", so it can be a program name with args.
6389set dummy $ac_prog; ac_word=$2
6390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6391$as_echo_n "checking for $ac_word... " >&6; }
6392if ${ac_cv_path_CP+:} false; then :
6393  $as_echo_n "(cached) " >&6
6394else
6395  case $CP in
6396  [\\/]* | ?:[\\/]*)
6397  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6398  ;;
6399  *)
6400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6401for as_dir in $PATH
6402do
6403  IFS=$as_save_IFS
6404  test -z "$as_dir" && as_dir=.
6405    for ac_exec_ext in '' $ac_executable_extensions; do
6406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6407    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6409    break 2
6410  fi
6411done
6412  done
6413IFS=$as_save_IFS
6414
6415  ;;
6416esac
6417fi
6418CP=$ac_cv_path_CP
6419if test -n "$CP"; then
6420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6421$as_echo "$CP" >&6; }
6422else
6423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6424$as_echo "no" >&6; }
6425fi
6426
6427
6428  test -n "$CP" && break
6429done
6430
6431  else
6432    # The variable is set, but is it from the command line or the environment?
6433
6434    # Try to remove the string !CP! from our list.
6435    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6436    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6437      # If it failed, the variable was not from the command line. Ignore it,
6438      # but warn the user (except for BASH, which is always set by the calling BASH).
6439      if test "xCP" != xBASH; then
6440        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6441$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6442      fi
6443      # Try to locate tool using the code snippet
6444      for ac_prog in cp
6445do
6446  # Extract the first word of "$ac_prog", so it can be a program name with args.
6447set dummy $ac_prog; ac_word=$2
6448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6449$as_echo_n "checking for $ac_word... " >&6; }
6450if ${ac_cv_path_CP+:} false; then :
6451  $as_echo_n "(cached) " >&6
6452else
6453  case $CP in
6454  [\\/]* | ?:[\\/]*)
6455  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6456  ;;
6457  *)
6458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6459for as_dir in $PATH
6460do
6461  IFS=$as_save_IFS
6462  test -z "$as_dir" && as_dir=.
6463    for ac_exec_ext in '' $ac_executable_extensions; do
6464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6465    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6467    break 2
6468  fi
6469done
6470  done
6471IFS=$as_save_IFS
6472
6473  ;;
6474esac
6475fi
6476CP=$ac_cv_path_CP
6477if test -n "$CP"; then
6478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6479$as_echo "$CP" >&6; }
6480else
6481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6482$as_echo "no" >&6; }
6483fi
6484
6485
6486  test -n "$CP" && break
6487done
6488
6489    else
6490      # If it succeeded, then it was overridden by the user. We will use it
6491      # for the tool.
6492
6493      # First remove it from the list of overridden variables, so we can test
6494      # for unknown variables in the end.
6495      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6496
6497      # Check if we try to supply an empty value
6498      if test "x$CP" = x; then
6499        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6500$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6501        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6502$as_echo_n "checking for CP... " >&6; }
6503        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6504$as_echo "disabled" >&6; }
6505      else
6506        # Check if the provided tool contains a complete path.
6507        tool_specified="$CP"
6508        tool_basename="${tool_specified##*/}"
6509        if test "x$tool_basename" = "x$tool_specified"; then
6510          # A command without a complete path is provided, search $PATH.
6511          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6512$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6513          # Extract the first word of "$tool_basename", so it can be a program name with args.
6514set dummy $tool_basename; ac_word=$2
6515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6516$as_echo_n "checking for $ac_word... " >&6; }
6517if ${ac_cv_path_CP+:} false; then :
6518  $as_echo_n "(cached) " >&6
6519else
6520  case $CP in
6521  [\\/]* | ?:[\\/]*)
6522  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6523  ;;
6524  *)
6525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6526for as_dir in $PATH
6527do
6528  IFS=$as_save_IFS
6529  test -z "$as_dir" && as_dir=.
6530    for ac_exec_ext in '' $ac_executable_extensions; do
6531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6532    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6534    break 2
6535  fi
6536done
6537  done
6538IFS=$as_save_IFS
6539
6540  ;;
6541esac
6542fi
6543CP=$ac_cv_path_CP
6544if test -n "$CP"; then
6545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6546$as_echo "$CP" >&6; }
6547else
6548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6549$as_echo "no" >&6; }
6550fi
6551
6552
6553          if test "x$CP" = x; then
6554            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6555          fi
6556        else
6557          # Otherwise we believe it is a complete path. Use it as it is.
6558          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6559$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6560          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6561$as_echo_n "checking for CP... " >&6; }
6562          if test ! -x "$tool_specified"; then
6563            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6564$as_echo "not found" >&6; }
6565            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6566          fi
6567          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6568$as_echo "$tool_specified" >&6; }
6569        fi
6570      fi
6571    fi
6572
6573  fi
6574
6575
6576
6577  if test "x$CP" = x; then
6578    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6579  fi
6580
6581
6582
6583
6584
6585  # Publish this variable in the help.
6586
6587
6588  if [ -z "${CUT+x}" ]; then
6589    # The variable is not set by user, try to locate tool using the code snippet
6590    for ac_prog in cut
6591do
6592  # Extract the first word of "$ac_prog", so it can be a program name with args.
6593set dummy $ac_prog; ac_word=$2
6594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6595$as_echo_n "checking for $ac_word... " >&6; }
6596if ${ac_cv_path_CUT+:} false; then :
6597  $as_echo_n "(cached) " >&6
6598else
6599  case $CUT in
6600  [\\/]* | ?:[\\/]*)
6601  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6602  ;;
6603  *)
6604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6605for as_dir in $PATH
6606do
6607  IFS=$as_save_IFS
6608  test -z "$as_dir" && as_dir=.
6609    for ac_exec_ext in '' $ac_executable_extensions; do
6610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6611    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6613    break 2
6614  fi
6615done
6616  done
6617IFS=$as_save_IFS
6618
6619  ;;
6620esac
6621fi
6622CUT=$ac_cv_path_CUT
6623if test -n "$CUT"; then
6624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6625$as_echo "$CUT" >&6; }
6626else
6627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6628$as_echo "no" >&6; }
6629fi
6630
6631
6632  test -n "$CUT" && break
6633done
6634
6635  else
6636    # The variable is set, but is it from the command line or the environment?
6637
6638    # Try to remove the string !CUT! from our list.
6639    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6640    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6641      # If it failed, the variable was not from the command line. Ignore it,
6642      # but warn the user (except for BASH, which is always set by the calling BASH).
6643      if test "xCUT" != xBASH; then
6644        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6645$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6646      fi
6647      # Try to locate tool using the code snippet
6648      for ac_prog in cut
6649do
6650  # Extract the first word of "$ac_prog", so it can be a program name with args.
6651set dummy $ac_prog; ac_word=$2
6652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6653$as_echo_n "checking for $ac_word... " >&6; }
6654if ${ac_cv_path_CUT+:} false; then :
6655  $as_echo_n "(cached) " >&6
6656else
6657  case $CUT in
6658  [\\/]* | ?:[\\/]*)
6659  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6660  ;;
6661  *)
6662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6663for as_dir in $PATH
6664do
6665  IFS=$as_save_IFS
6666  test -z "$as_dir" && as_dir=.
6667    for ac_exec_ext in '' $ac_executable_extensions; do
6668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6669    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6671    break 2
6672  fi
6673done
6674  done
6675IFS=$as_save_IFS
6676
6677  ;;
6678esac
6679fi
6680CUT=$ac_cv_path_CUT
6681if test -n "$CUT"; then
6682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6683$as_echo "$CUT" >&6; }
6684else
6685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6686$as_echo "no" >&6; }
6687fi
6688
6689
6690  test -n "$CUT" && break
6691done
6692
6693    else
6694      # If it succeeded, then it was overridden by the user. We will use it
6695      # for the tool.
6696
6697      # First remove it from the list of overridden variables, so we can test
6698      # for unknown variables in the end.
6699      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6700
6701      # Check if we try to supply an empty value
6702      if test "x$CUT" = x; then
6703        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6704$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6705        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6706$as_echo_n "checking for CUT... " >&6; }
6707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6708$as_echo "disabled" >&6; }
6709      else
6710        # Check if the provided tool contains a complete path.
6711        tool_specified="$CUT"
6712        tool_basename="${tool_specified##*/}"
6713        if test "x$tool_basename" = "x$tool_specified"; then
6714          # A command without a complete path is provided, search $PATH.
6715          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6716$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6717          # Extract the first word of "$tool_basename", so it can be a program name with args.
6718set dummy $tool_basename; ac_word=$2
6719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6720$as_echo_n "checking for $ac_word... " >&6; }
6721if ${ac_cv_path_CUT+:} false; then :
6722  $as_echo_n "(cached) " >&6
6723else
6724  case $CUT in
6725  [\\/]* | ?:[\\/]*)
6726  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6727  ;;
6728  *)
6729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6730for as_dir in $PATH
6731do
6732  IFS=$as_save_IFS
6733  test -z "$as_dir" && as_dir=.
6734    for ac_exec_ext in '' $ac_executable_extensions; do
6735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6736    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6738    break 2
6739  fi
6740done
6741  done
6742IFS=$as_save_IFS
6743
6744  ;;
6745esac
6746fi
6747CUT=$ac_cv_path_CUT
6748if test -n "$CUT"; then
6749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6750$as_echo "$CUT" >&6; }
6751else
6752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6753$as_echo "no" >&6; }
6754fi
6755
6756
6757          if test "x$CUT" = x; then
6758            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6759          fi
6760        else
6761          # Otherwise we believe it is a complete path. Use it as it is.
6762          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6763$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6764          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6765$as_echo_n "checking for CUT... " >&6; }
6766          if test ! -x "$tool_specified"; then
6767            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6768$as_echo "not found" >&6; }
6769            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6770          fi
6771          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6772$as_echo "$tool_specified" >&6; }
6773        fi
6774      fi
6775    fi
6776
6777  fi
6778
6779
6780
6781  if test "x$CUT" = x; then
6782    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6783  fi
6784
6785
6786
6787
6788
6789  # Publish this variable in the help.
6790
6791
6792  if [ -z "${DATE+x}" ]; then
6793    # The variable is not set by user, try to locate tool using the code snippet
6794    for ac_prog in date
6795do
6796  # Extract the first word of "$ac_prog", so it can be a program name with args.
6797set dummy $ac_prog; ac_word=$2
6798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6799$as_echo_n "checking for $ac_word... " >&6; }
6800if ${ac_cv_path_DATE+:} false; then :
6801  $as_echo_n "(cached) " >&6
6802else
6803  case $DATE in
6804  [\\/]* | ?:[\\/]*)
6805  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6806  ;;
6807  *)
6808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6809for as_dir in $PATH
6810do
6811  IFS=$as_save_IFS
6812  test -z "$as_dir" && as_dir=.
6813    for ac_exec_ext in '' $ac_executable_extensions; do
6814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6815    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6817    break 2
6818  fi
6819done
6820  done
6821IFS=$as_save_IFS
6822
6823  ;;
6824esac
6825fi
6826DATE=$ac_cv_path_DATE
6827if test -n "$DATE"; then
6828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6829$as_echo "$DATE" >&6; }
6830else
6831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6832$as_echo "no" >&6; }
6833fi
6834
6835
6836  test -n "$DATE" && break
6837done
6838
6839  else
6840    # The variable is set, but is it from the command line or the environment?
6841
6842    # Try to remove the string !DATE! from our list.
6843    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6844    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6845      # If it failed, the variable was not from the command line. Ignore it,
6846      # but warn the user (except for BASH, which is always set by the calling BASH).
6847      if test "xDATE" != xBASH; then
6848        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6849$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6850      fi
6851      # Try to locate tool using the code snippet
6852      for ac_prog in date
6853do
6854  # Extract the first word of "$ac_prog", so it can be a program name with args.
6855set dummy $ac_prog; ac_word=$2
6856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6857$as_echo_n "checking for $ac_word... " >&6; }
6858if ${ac_cv_path_DATE+:} false; then :
6859  $as_echo_n "(cached) " >&6
6860else
6861  case $DATE in
6862  [\\/]* | ?:[\\/]*)
6863  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6864  ;;
6865  *)
6866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6867for as_dir in $PATH
6868do
6869  IFS=$as_save_IFS
6870  test -z "$as_dir" && as_dir=.
6871    for ac_exec_ext in '' $ac_executable_extensions; do
6872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6873    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6875    break 2
6876  fi
6877done
6878  done
6879IFS=$as_save_IFS
6880
6881  ;;
6882esac
6883fi
6884DATE=$ac_cv_path_DATE
6885if test -n "$DATE"; then
6886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6887$as_echo "$DATE" >&6; }
6888else
6889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6890$as_echo "no" >&6; }
6891fi
6892
6893
6894  test -n "$DATE" && break
6895done
6896
6897    else
6898      # If it succeeded, then it was overridden by the user. We will use it
6899      # for the tool.
6900
6901      # First remove it from the list of overridden variables, so we can test
6902      # for unknown variables in the end.
6903      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6904
6905      # Check if we try to supply an empty value
6906      if test "x$DATE" = x; then
6907        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6908$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6909        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6910$as_echo_n "checking for DATE... " >&6; }
6911        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6912$as_echo "disabled" >&6; }
6913      else
6914        # Check if the provided tool contains a complete path.
6915        tool_specified="$DATE"
6916        tool_basename="${tool_specified##*/}"
6917        if test "x$tool_basename" = "x$tool_specified"; then
6918          # A command without a complete path is provided, search $PATH.
6919          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6920$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6921          # Extract the first word of "$tool_basename", so it can be a program name with args.
6922set dummy $tool_basename; ac_word=$2
6923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6924$as_echo_n "checking for $ac_word... " >&6; }
6925if ${ac_cv_path_DATE+:} false; then :
6926  $as_echo_n "(cached) " >&6
6927else
6928  case $DATE in
6929  [\\/]* | ?:[\\/]*)
6930  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6931  ;;
6932  *)
6933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6934for as_dir in $PATH
6935do
6936  IFS=$as_save_IFS
6937  test -z "$as_dir" && as_dir=.
6938    for ac_exec_ext in '' $ac_executable_extensions; do
6939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6940    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6942    break 2
6943  fi
6944done
6945  done
6946IFS=$as_save_IFS
6947
6948  ;;
6949esac
6950fi
6951DATE=$ac_cv_path_DATE
6952if test -n "$DATE"; then
6953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6954$as_echo "$DATE" >&6; }
6955else
6956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6957$as_echo "no" >&6; }
6958fi
6959
6960
6961          if test "x$DATE" = x; then
6962            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6963          fi
6964        else
6965          # Otherwise we believe it is a complete path. Use it as it is.
6966          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6967$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6968          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6969$as_echo_n "checking for DATE... " >&6; }
6970          if test ! -x "$tool_specified"; then
6971            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6972$as_echo "not found" >&6; }
6973            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6974          fi
6975          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6976$as_echo "$tool_specified" >&6; }
6977        fi
6978      fi
6979    fi
6980
6981  fi
6982
6983
6984
6985  if test "x$DATE" = x; then
6986    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6987  fi
6988
6989
6990
6991
6992
6993  # Publish this variable in the help.
6994
6995
6996  if [ -z "${DIFF+x}" ]; then
6997    # The variable is not set by user, try to locate tool using the code snippet
6998    for ac_prog in gdiff diff
6999do
7000  # Extract the first word of "$ac_prog", so it can be a program name with args.
7001set dummy $ac_prog; ac_word=$2
7002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7003$as_echo_n "checking for $ac_word... " >&6; }
7004if ${ac_cv_path_DIFF+:} false; then :
7005  $as_echo_n "(cached) " >&6
7006else
7007  case $DIFF in
7008  [\\/]* | ?:[\\/]*)
7009  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7010  ;;
7011  *)
7012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7013for as_dir in $PATH
7014do
7015  IFS=$as_save_IFS
7016  test -z "$as_dir" && as_dir=.
7017    for ac_exec_ext in '' $ac_executable_extensions; do
7018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7019    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7021    break 2
7022  fi
7023done
7024  done
7025IFS=$as_save_IFS
7026
7027  ;;
7028esac
7029fi
7030DIFF=$ac_cv_path_DIFF
7031if test -n "$DIFF"; then
7032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7033$as_echo "$DIFF" >&6; }
7034else
7035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7036$as_echo "no" >&6; }
7037fi
7038
7039
7040  test -n "$DIFF" && break
7041done
7042
7043  else
7044    # The variable is set, but is it from the command line or the environment?
7045
7046    # Try to remove the string !DIFF! from our list.
7047    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7048    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7049      # If it failed, the variable was not from the command line. Ignore it,
7050      # but warn the user (except for BASH, which is always set by the calling BASH).
7051      if test "xDIFF" != xBASH; then
7052        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7053$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7054      fi
7055      # Try to locate tool using the code snippet
7056      for ac_prog in gdiff diff
7057do
7058  # Extract the first word of "$ac_prog", so it can be a program name with args.
7059set dummy $ac_prog; ac_word=$2
7060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7061$as_echo_n "checking for $ac_word... " >&6; }
7062if ${ac_cv_path_DIFF+:} false; then :
7063  $as_echo_n "(cached) " >&6
7064else
7065  case $DIFF in
7066  [\\/]* | ?:[\\/]*)
7067  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7068  ;;
7069  *)
7070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7071for as_dir in $PATH
7072do
7073  IFS=$as_save_IFS
7074  test -z "$as_dir" && as_dir=.
7075    for ac_exec_ext in '' $ac_executable_extensions; do
7076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7077    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7079    break 2
7080  fi
7081done
7082  done
7083IFS=$as_save_IFS
7084
7085  ;;
7086esac
7087fi
7088DIFF=$ac_cv_path_DIFF
7089if test -n "$DIFF"; then
7090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7091$as_echo "$DIFF" >&6; }
7092else
7093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7094$as_echo "no" >&6; }
7095fi
7096
7097
7098  test -n "$DIFF" && break
7099done
7100
7101    else
7102      # If it succeeded, then it was overridden by the user. We will use it
7103      # for the tool.
7104
7105      # First remove it from the list of overridden variables, so we can test
7106      # for unknown variables in the end.
7107      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7108
7109      # Check if we try to supply an empty value
7110      if test "x$DIFF" = x; then
7111        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7112$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7113        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7114$as_echo_n "checking for DIFF... " >&6; }
7115        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7116$as_echo "disabled" >&6; }
7117      else
7118        # Check if the provided tool contains a complete path.
7119        tool_specified="$DIFF"
7120        tool_basename="${tool_specified##*/}"
7121        if test "x$tool_basename" = "x$tool_specified"; then
7122          # A command without a complete path is provided, search $PATH.
7123          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7124$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7125          # Extract the first word of "$tool_basename", so it can be a program name with args.
7126set dummy $tool_basename; ac_word=$2
7127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7128$as_echo_n "checking for $ac_word... " >&6; }
7129if ${ac_cv_path_DIFF+:} false; then :
7130  $as_echo_n "(cached) " >&6
7131else
7132  case $DIFF in
7133  [\\/]* | ?:[\\/]*)
7134  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7135  ;;
7136  *)
7137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7138for as_dir in $PATH
7139do
7140  IFS=$as_save_IFS
7141  test -z "$as_dir" && as_dir=.
7142    for ac_exec_ext in '' $ac_executable_extensions; do
7143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7144    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7146    break 2
7147  fi
7148done
7149  done
7150IFS=$as_save_IFS
7151
7152  ;;
7153esac
7154fi
7155DIFF=$ac_cv_path_DIFF
7156if test -n "$DIFF"; then
7157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7158$as_echo "$DIFF" >&6; }
7159else
7160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7161$as_echo "no" >&6; }
7162fi
7163
7164
7165          if test "x$DIFF" = x; then
7166            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7167          fi
7168        else
7169          # Otherwise we believe it is a complete path. Use it as it is.
7170          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7171$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7172          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7173$as_echo_n "checking for DIFF... " >&6; }
7174          if test ! -x "$tool_specified"; then
7175            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7176$as_echo "not found" >&6; }
7177            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7178          fi
7179          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7180$as_echo "$tool_specified" >&6; }
7181        fi
7182      fi
7183    fi
7184
7185  fi
7186
7187
7188
7189  if test "x$DIFF" = x; then
7190    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7191  fi
7192
7193
7194
7195
7196
7197  # Publish this variable in the help.
7198
7199
7200  if [ -z "${DIRNAME+x}" ]; then
7201    # The variable is not set by user, try to locate tool using the code snippet
7202    for ac_prog in dirname
7203do
7204  # Extract the first word of "$ac_prog", so it can be a program name with args.
7205set dummy $ac_prog; ac_word=$2
7206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7207$as_echo_n "checking for $ac_word... " >&6; }
7208if ${ac_cv_path_DIRNAME+:} false; then :
7209  $as_echo_n "(cached) " >&6
7210else
7211  case $DIRNAME in
7212  [\\/]* | ?:[\\/]*)
7213  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7214  ;;
7215  *)
7216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7217for as_dir in $PATH
7218do
7219  IFS=$as_save_IFS
7220  test -z "$as_dir" && as_dir=.
7221    for ac_exec_ext in '' $ac_executable_extensions; do
7222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7223    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7225    break 2
7226  fi
7227done
7228  done
7229IFS=$as_save_IFS
7230
7231  ;;
7232esac
7233fi
7234DIRNAME=$ac_cv_path_DIRNAME
7235if test -n "$DIRNAME"; then
7236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7237$as_echo "$DIRNAME" >&6; }
7238else
7239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7240$as_echo "no" >&6; }
7241fi
7242
7243
7244  test -n "$DIRNAME" && break
7245done
7246
7247  else
7248    # The variable is set, but is it from the command line or the environment?
7249
7250    # Try to remove the string !DIRNAME! from our list.
7251    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7252    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7253      # If it failed, the variable was not from the command line. Ignore it,
7254      # but warn the user (except for BASH, which is always set by the calling BASH).
7255      if test "xDIRNAME" != xBASH; then
7256        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7257$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7258      fi
7259      # Try to locate tool using the code snippet
7260      for ac_prog in dirname
7261do
7262  # Extract the first word of "$ac_prog", so it can be a program name with args.
7263set dummy $ac_prog; ac_word=$2
7264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7265$as_echo_n "checking for $ac_word... " >&6; }
7266if ${ac_cv_path_DIRNAME+:} false; then :
7267  $as_echo_n "(cached) " >&6
7268else
7269  case $DIRNAME in
7270  [\\/]* | ?:[\\/]*)
7271  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7272  ;;
7273  *)
7274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7275for as_dir in $PATH
7276do
7277  IFS=$as_save_IFS
7278  test -z "$as_dir" && as_dir=.
7279    for ac_exec_ext in '' $ac_executable_extensions; do
7280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7281    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7283    break 2
7284  fi
7285done
7286  done
7287IFS=$as_save_IFS
7288
7289  ;;
7290esac
7291fi
7292DIRNAME=$ac_cv_path_DIRNAME
7293if test -n "$DIRNAME"; then
7294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7295$as_echo "$DIRNAME" >&6; }
7296else
7297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7298$as_echo "no" >&6; }
7299fi
7300
7301
7302  test -n "$DIRNAME" && break
7303done
7304
7305    else
7306      # If it succeeded, then it was overridden by the user. We will use it
7307      # for the tool.
7308
7309      # First remove it from the list of overridden variables, so we can test
7310      # for unknown variables in the end.
7311      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7312
7313      # Check if we try to supply an empty value
7314      if test "x$DIRNAME" = x; then
7315        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7316$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7317        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7318$as_echo_n "checking for DIRNAME... " >&6; }
7319        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7320$as_echo "disabled" >&6; }
7321      else
7322        # Check if the provided tool contains a complete path.
7323        tool_specified="$DIRNAME"
7324        tool_basename="${tool_specified##*/}"
7325        if test "x$tool_basename" = "x$tool_specified"; then
7326          # A command without a complete path is provided, search $PATH.
7327          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7328$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7329          # Extract the first word of "$tool_basename", so it can be a program name with args.
7330set dummy $tool_basename; ac_word=$2
7331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7332$as_echo_n "checking for $ac_word... " >&6; }
7333if ${ac_cv_path_DIRNAME+:} false; then :
7334  $as_echo_n "(cached) " >&6
7335else
7336  case $DIRNAME in
7337  [\\/]* | ?:[\\/]*)
7338  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7339  ;;
7340  *)
7341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7342for as_dir in $PATH
7343do
7344  IFS=$as_save_IFS
7345  test -z "$as_dir" && as_dir=.
7346    for ac_exec_ext in '' $ac_executable_extensions; do
7347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7348    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7350    break 2
7351  fi
7352done
7353  done
7354IFS=$as_save_IFS
7355
7356  ;;
7357esac
7358fi
7359DIRNAME=$ac_cv_path_DIRNAME
7360if test -n "$DIRNAME"; then
7361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7362$as_echo "$DIRNAME" >&6; }
7363else
7364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7365$as_echo "no" >&6; }
7366fi
7367
7368
7369          if test "x$DIRNAME" = x; then
7370            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7371          fi
7372        else
7373          # Otherwise we believe it is a complete path. Use it as it is.
7374          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7375$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7376          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7377$as_echo_n "checking for DIRNAME... " >&6; }
7378          if test ! -x "$tool_specified"; then
7379            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7380$as_echo "not found" >&6; }
7381            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7382          fi
7383          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7384$as_echo "$tool_specified" >&6; }
7385        fi
7386      fi
7387    fi
7388
7389  fi
7390
7391
7392
7393  if test "x$DIRNAME" = x; then
7394    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7395  fi
7396
7397
7398
7399
7400
7401  # Publish this variable in the help.
7402
7403
7404  if [ -z "${ECHO+x}" ]; then
7405    # The variable is not set by user, try to locate tool using the code snippet
7406    for ac_prog in echo
7407do
7408  # Extract the first word of "$ac_prog", so it can be a program name with args.
7409set dummy $ac_prog; ac_word=$2
7410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7411$as_echo_n "checking for $ac_word... " >&6; }
7412if ${ac_cv_path_ECHO+:} false; then :
7413  $as_echo_n "(cached) " >&6
7414else
7415  case $ECHO in
7416  [\\/]* | ?:[\\/]*)
7417  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7418  ;;
7419  *)
7420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7421for as_dir in $PATH
7422do
7423  IFS=$as_save_IFS
7424  test -z "$as_dir" && as_dir=.
7425    for ac_exec_ext in '' $ac_executable_extensions; do
7426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7427    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7429    break 2
7430  fi
7431done
7432  done
7433IFS=$as_save_IFS
7434
7435  ;;
7436esac
7437fi
7438ECHO=$ac_cv_path_ECHO
7439if test -n "$ECHO"; then
7440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7441$as_echo "$ECHO" >&6; }
7442else
7443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7444$as_echo "no" >&6; }
7445fi
7446
7447
7448  test -n "$ECHO" && break
7449done
7450
7451  else
7452    # The variable is set, but is it from the command line or the environment?
7453
7454    # Try to remove the string !ECHO! from our list.
7455    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7456    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7457      # If it failed, the variable was not from the command line. Ignore it,
7458      # but warn the user (except for BASH, which is always set by the calling BASH).
7459      if test "xECHO" != xBASH; then
7460        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7461$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7462      fi
7463      # Try to locate tool using the code snippet
7464      for ac_prog in echo
7465do
7466  # Extract the first word of "$ac_prog", so it can be a program name with args.
7467set dummy $ac_prog; ac_word=$2
7468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7469$as_echo_n "checking for $ac_word... " >&6; }
7470if ${ac_cv_path_ECHO+:} false; then :
7471  $as_echo_n "(cached) " >&6
7472else
7473  case $ECHO in
7474  [\\/]* | ?:[\\/]*)
7475  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7476  ;;
7477  *)
7478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7479for as_dir in $PATH
7480do
7481  IFS=$as_save_IFS
7482  test -z "$as_dir" && as_dir=.
7483    for ac_exec_ext in '' $ac_executable_extensions; do
7484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7485    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7487    break 2
7488  fi
7489done
7490  done
7491IFS=$as_save_IFS
7492
7493  ;;
7494esac
7495fi
7496ECHO=$ac_cv_path_ECHO
7497if test -n "$ECHO"; then
7498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7499$as_echo "$ECHO" >&6; }
7500else
7501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7502$as_echo "no" >&6; }
7503fi
7504
7505
7506  test -n "$ECHO" && break
7507done
7508
7509    else
7510      # If it succeeded, then it was overridden by the user. We will use it
7511      # for the tool.
7512
7513      # First remove it from the list of overridden variables, so we can test
7514      # for unknown variables in the end.
7515      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7516
7517      # Check if we try to supply an empty value
7518      if test "x$ECHO" = x; then
7519        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7520$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7521        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7522$as_echo_n "checking for ECHO... " >&6; }
7523        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7524$as_echo "disabled" >&6; }
7525      else
7526        # Check if the provided tool contains a complete path.
7527        tool_specified="$ECHO"
7528        tool_basename="${tool_specified##*/}"
7529        if test "x$tool_basename" = "x$tool_specified"; then
7530          # A command without a complete path is provided, search $PATH.
7531          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7532$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7533          # Extract the first word of "$tool_basename", so it can be a program name with args.
7534set dummy $tool_basename; ac_word=$2
7535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7536$as_echo_n "checking for $ac_word... " >&6; }
7537if ${ac_cv_path_ECHO+:} false; then :
7538  $as_echo_n "(cached) " >&6
7539else
7540  case $ECHO in
7541  [\\/]* | ?:[\\/]*)
7542  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7543  ;;
7544  *)
7545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7546for as_dir in $PATH
7547do
7548  IFS=$as_save_IFS
7549  test -z "$as_dir" && as_dir=.
7550    for ac_exec_ext in '' $ac_executable_extensions; do
7551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7552    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7554    break 2
7555  fi
7556done
7557  done
7558IFS=$as_save_IFS
7559
7560  ;;
7561esac
7562fi
7563ECHO=$ac_cv_path_ECHO
7564if test -n "$ECHO"; then
7565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7566$as_echo "$ECHO" >&6; }
7567else
7568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7569$as_echo "no" >&6; }
7570fi
7571
7572
7573          if test "x$ECHO" = x; then
7574            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7575          fi
7576        else
7577          # Otherwise we believe it is a complete path. Use it as it is.
7578          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7579$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7580          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7581$as_echo_n "checking for ECHO... " >&6; }
7582          if test ! -x "$tool_specified"; then
7583            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7584$as_echo "not found" >&6; }
7585            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7586          fi
7587          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7588$as_echo "$tool_specified" >&6; }
7589        fi
7590      fi
7591    fi
7592
7593  fi
7594
7595
7596
7597  if test "x$ECHO" = x; then
7598    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7599  fi
7600
7601
7602
7603
7604
7605  # Publish this variable in the help.
7606
7607
7608  if [ -z "${EXPR+x}" ]; then
7609    # The variable is not set by user, try to locate tool using the code snippet
7610    for ac_prog in expr
7611do
7612  # Extract the first word of "$ac_prog", so it can be a program name with args.
7613set dummy $ac_prog; ac_word=$2
7614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7615$as_echo_n "checking for $ac_word... " >&6; }
7616if ${ac_cv_path_EXPR+:} false; then :
7617  $as_echo_n "(cached) " >&6
7618else
7619  case $EXPR in
7620  [\\/]* | ?:[\\/]*)
7621  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7622  ;;
7623  *)
7624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7625for as_dir in $PATH
7626do
7627  IFS=$as_save_IFS
7628  test -z "$as_dir" && as_dir=.
7629    for ac_exec_ext in '' $ac_executable_extensions; do
7630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7631    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7633    break 2
7634  fi
7635done
7636  done
7637IFS=$as_save_IFS
7638
7639  ;;
7640esac
7641fi
7642EXPR=$ac_cv_path_EXPR
7643if test -n "$EXPR"; then
7644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7645$as_echo "$EXPR" >&6; }
7646else
7647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7648$as_echo "no" >&6; }
7649fi
7650
7651
7652  test -n "$EXPR" && break
7653done
7654
7655  else
7656    # The variable is set, but is it from the command line or the environment?
7657
7658    # Try to remove the string !EXPR! from our list.
7659    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7660    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7661      # If it failed, the variable was not from the command line. Ignore it,
7662      # but warn the user (except for BASH, which is always set by the calling BASH).
7663      if test "xEXPR" != xBASH; then
7664        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7665$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7666      fi
7667      # Try to locate tool using the code snippet
7668      for ac_prog in expr
7669do
7670  # Extract the first word of "$ac_prog", so it can be a program name with args.
7671set dummy $ac_prog; ac_word=$2
7672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7673$as_echo_n "checking for $ac_word... " >&6; }
7674if ${ac_cv_path_EXPR+:} false; then :
7675  $as_echo_n "(cached) " >&6
7676else
7677  case $EXPR in
7678  [\\/]* | ?:[\\/]*)
7679  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7680  ;;
7681  *)
7682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7683for as_dir in $PATH
7684do
7685  IFS=$as_save_IFS
7686  test -z "$as_dir" && as_dir=.
7687    for ac_exec_ext in '' $ac_executable_extensions; do
7688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7689    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7691    break 2
7692  fi
7693done
7694  done
7695IFS=$as_save_IFS
7696
7697  ;;
7698esac
7699fi
7700EXPR=$ac_cv_path_EXPR
7701if test -n "$EXPR"; then
7702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7703$as_echo "$EXPR" >&6; }
7704else
7705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7706$as_echo "no" >&6; }
7707fi
7708
7709
7710  test -n "$EXPR" && break
7711done
7712
7713    else
7714      # If it succeeded, then it was overridden by the user. We will use it
7715      # for the tool.
7716
7717      # First remove it from the list of overridden variables, so we can test
7718      # for unknown variables in the end.
7719      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7720
7721      # Check if we try to supply an empty value
7722      if test "x$EXPR" = x; then
7723        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7724$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7725        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7726$as_echo_n "checking for EXPR... " >&6; }
7727        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7728$as_echo "disabled" >&6; }
7729      else
7730        # Check if the provided tool contains a complete path.
7731        tool_specified="$EXPR"
7732        tool_basename="${tool_specified##*/}"
7733        if test "x$tool_basename" = "x$tool_specified"; then
7734          # A command without a complete path is provided, search $PATH.
7735          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7736$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7737          # Extract the first word of "$tool_basename", so it can be a program name with args.
7738set dummy $tool_basename; ac_word=$2
7739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7740$as_echo_n "checking for $ac_word... " >&6; }
7741if ${ac_cv_path_EXPR+:} false; then :
7742  $as_echo_n "(cached) " >&6
7743else
7744  case $EXPR in
7745  [\\/]* | ?:[\\/]*)
7746  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7747  ;;
7748  *)
7749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7750for as_dir in $PATH
7751do
7752  IFS=$as_save_IFS
7753  test -z "$as_dir" && as_dir=.
7754    for ac_exec_ext in '' $ac_executable_extensions; do
7755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7756    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7758    break 2
7759  fi
7760done
7761  done
7762IFS=$as_save_IFS
7763
7764  ;;
7765esac
7766fi
7767EXPR=$ac_cv_path_EXPR
7768if test -n "$EXPR"; then
7769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7770$as_echo "$EXPR" >&6; }
7771else
7772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7773$as_echo "no" >&6; }
7774fi
7775
7776
7777          if test "x$EXPR" = x; then
7778            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7779          fi
7780        else
7781          # Otherwise we believe it is a complete path. Use it as it is.
7782          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7783$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7784          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7785$as_echo_n "checking for EXPR... " >&6; }
7786          if test ! -x "$tool_specified"; then
7787            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7788$as_echo "not found" >&6; }
7789            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7790          fi
7791          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7792$as_echo "$tool_specified" >&6; }
7793        fi
7794      fi
7795    fi
7796
7797  fi
7798
7799
7800
7801  if test "x$EXPR" = x; then
7802    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7803  fi
7804
7805
7806
7807
7808
7809  # Publish this variable in the help.
7810
7811
7812  if [ -z "${FILE+x}" ]; then
7813    # The variable is not set by user, try to locate tool using the code snippet
7814    for ac_prog in file
7815do
7816  # Extract the first word of "$ac_prog", so it can be a program name with args.
7817set dummy $ac_prog; ac_word=$2
7818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7819$as_echo_n "checking for $ac_word... " >&6; }
7820if ${ac_cv_path_FILE+:} false; then :
7821  $as_echo_n "(cached) " >&6
7822else
7823  case $FILE in
7824  [\\/]* | ?:[\\/]*)
7825  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7826  ;;
7827  *)
7828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7829for as_dir in $PATH
7830do
7831  IFS=$as_save_IFS
7832  test -z "$as_dir" && as_dir=.
7833    for ac_exec_ext in '' $ac_executable_extensions; do
7834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7835    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7837    break 2
7838  fi
7839done
7840  done
7841IFS=$as_save_IFS
7842
7843  ;;
7844esac
7845fi
7846FILE=$ac_cv_path_FILE
7847if test -n "$FILE"; then
7848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7849$as_echo "$FILE" >&6; }
7850else
7851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7852$as_echo "no" >&6; }
7853fi
7854
7855
7856  test -n "$FILE" && break
7857done
7858
7859  else
7860    # The variable is set, but is it from the command line or the environment?
7861
7862    # Try to remove the string !FILE! from our list.
7863    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7864    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7865      # If it failed, the variable was not from the command line. Ignore it,
7866      # but warn the user (except for BASH, which is always set by the calling BASH).
7867      if test "xFILE" != xBASH; then
7868        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7869$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7870      fi
7871      # Try to locate tool using the code snippet
7872      for ac_prog in file
7873do
7874  # Extract the first word of "$ac_prog", so it can be a program name with args.
7875set dummy $ac_prog; ac_word=$2
7876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7877$as_echo_n "checking for $ac_word... " >&6; }
7878if ${ac_cv_path_FILE+:} false; then :
7879  $as_echo_n "(cached) " >&6
7880else
7881  case $FILE in
7882  [\\/]* | ?:[\\/]*)
7883  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7884  ;;
7885  *)
7886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7887for as_dir in $PATH
7888do
7889  IFS=$as_save_IFS
7890  test -z "$as_dir" && as_dir=.
7891    for ac_exec_ext in '' $ac_executable_extensions; do
7892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7893    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7895    break 2
7896  fi
7897done
7898  done
7899IFS=$as_save_IFS
7900
7901  ;;
7902esac
7903fi
7904FILE=$ac_cv_path_FILE
7905if test -n "$FILE"; then
7906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7907$as_echo "$FILE" >&6; }
7908else
7909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7910$as_echo "no" >&6; }
7911fi
7912
7913
7914  test -n "$FILE" && break
7915done
7916
7917    else
7918      # If it succeeded, then it was overridden by the user. We will use it
7919      # for the tool.
7920
7921      # First remove it from the list of overridden variables, so we can test
7922      # for unknown variables in the end.
7923      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7924
7925      # Check if we try to supply an empty value
7926      if test "x$FILE" = x; then
7927        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7928$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7929        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7930$as_echo_n "checking for FILE... " >&6; }
7931        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7932$as_echo "disabled" >&6; }
7933      else
7934        # Check if the provided tool contains a complete path.
7935        tool_specified="$FILE"
7936        tool_basename="${tool_specified##*/}"
7937        if test "x$tool_basename" = "x$tool_specified"; then
7938          # A command without a complete path is provided, search $PATH.
7939          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7940$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7941          # Extract the first word of "$tool_basename", so it can be a program name with args.
7942set dummy $tool_basename; ac_word=$2
7943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7944$as_echo_n "checking for $ac_word... " >&6; }
7945if ${ac_cv_path_FILE+:} false; then :
7946  $as_echo_n "(cached) " >&6
7947else
7948  case $FILE in
7949  [\\/]* | ?:[\\/]*)
7950  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7951  ;;
7952  *)
7953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7954for as_dir in $PATH
7955do
7956  IFS=$as_save_IFS
7957  test -z "$as_dir" && as_dir=.
7958    for ac_exec_ext in '' $ac_executable_extensions; do
7959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7960    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7962    break 2
7963  fi
7964done
7965  done
7966IFS=$as_save_IFS
7967
7968  ;;
7969esac
7970fi
7971FILE=$ac_cv_path_FILE
7972if test -n "$FILE"; then
7973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7974$as_echo "$FILE" >&6; }
7975else
7976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7977$as_echo "no" >&6; }
7978fi
7979
7980
7981          if test "x$FILE" = x; then
7982            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7983          fi
7984        else
7985          # Otherwise we believe it is a complete path. Use it as it is.
7986          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7987$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7988          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7989$as_echo_n "checking for FILE... " >&6; }
7990          if test ! -x "$tool_specified"; then
7991            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7992$as_echo "not found" >&6; }
7993            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7994          fi
7995          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7996$as_echo "$tool_specified" >&6; }
7997        fi
7998      fi
7999    fi
8000
8001  fi
8002
8003
8004
8005  if test "x$FILE" = x; then
8006    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8007  fi
8008
8009
8010
8011
8012
8013  # Publish this variable in the help.
8014
8015
8016  if [ -z "${FIND+x}" ]; then
8017    # The variable is not set by user, try to locate tool using the code snippet
8018    for ac_prog in find
8019do
8020  # Extract the first word of "$ac_prog", so it can be a program name with args.
8021set dummy $ac_prog; ac_word=$2
8022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8023$as_echo_n "checking for $ac_word... " >&6; }
8024if ${ac_cv_path_FIND+:} false; then :
8025  $as_echo_n "(cached) " >&6
8026else
8027  case $FIND in
8028  [\\/]* | ?:[\\/]*)
8029  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8030  ;;
8031  *)
8032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8033for as_dir in $PATH
8034do
8035  IFS=$as_save_IFS
8036  test -z "$as_dir" && as_dir=.
8037    for ac_exec_ext in '' $ac_executable_extensions; do
8038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8039    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8041    break 2
8042  fi
8043done
8044  done
8045IFS=$as_save_IFS
8046
8047  ;;
8048esac
8049fi
8050FIND=$ac_cv_path_FIND
8051if test -n "$FIND"; then
8052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8053$as_echo "$FIND" >&6; }
8054else
8055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8056$as_echo "no" >&6; }
8057fi
8058
8059
8060  test -n "$FIND" && break
8061done
8062
8063  else
8064    # The variable is set, but is it from the command line or the environment?
8065
8066    # Try to remove the string !FIND! from our list.
8067    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8068    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8069      # If it failed, the variable was not from the command line. Ignore it,
8070      # but warn the user (except for BASH, which is always set by the calling BASH).
8071      if test "xFIND" != xBASH; then
8072        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8073$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8074      fi
8075      # Try to locate tool using the code snippet
8076      for ac_prog in find
8077do
8078  # Extract the first word of "$ac_prog", so it can be a program name with args.
8079set dummy $ac_prog; ac_word=$2
8080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8081$as_echo_n "checking for $ac_word... " >&6; }
8082if ${ac_cv_path_FIND+:} false; then :
8083  $as_echo_n "(cached) " >&6
8084else
8085  case $FIND in
8086  [\\/]* | ?:[\\/]*)
8087  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8088  ;;
8089  *)
8090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8091for as_dir in $PATH
8092do
8093  IFS=$as_save_IFS
8094  test -z "$as_dir" && as_dir=.
8095    for ac_exec_ext in '' $ac_executable_extensions; do
8096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8097    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8099    break 2
8100  fi
8101done
8102  done
8103IFS=$as_save_IFS
8104
8105  ;;
8106esac
8107fi
8108FIND=$ac_cv_path_FIND
8109if test -n "$FIND"; then
8110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8111$as_echo "$FIND" >&6; }
8112else
8113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8114$as_echo "no" >&6; }
8115fi
8116
8117
8118  test -n "$FIND" && break
8119done
8120
8121    else
8122      # If it succeeded, then it was overridden by the user. We will use it
8123      # for the tool.
8124
8125      # First remove it from the list of overridden variables, so we can test
8126      # for unknown variables in the end.
8127      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8128
8129      # Check if we try to supply an empty value
8130      if test "x$FIND" = x; then
8131        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8132$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8133        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8134$as_echo_n "checking for FIND... " >&6; }
8135        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8136$as_echo "disabled" >&6; }
8137      else
8138        # Check if the provided tool contains a complete path.
8139        tool_specified="$FIND"
8140        tool_basename="${tool_specified##*/}"
8141        if test "x$tool_basename" = "x$tool_specified"; then
8142          # A command without a complete path is provided, search $PATH.
8143          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8144$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8145          # Extract the first word of "$tool_basename", so it can be a program name with args.
8146set dummy $tool_basename; ac_word=$2
8147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8148$as_echo_n "checking for $ac_word... " >&6; }
8149if ${ac_cv_path_FIND+:} false; then :
8150  $as_echo_n "(cached) " >&6
8151else
8152  case $FIND in
8153  [\\/]* | ?:[\\/]*)
8154  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8155  ;;
8156  *)
8157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8158for as_dir in $PATH
8159do
8160  IFS=$as_save_IFS
8161  test -z "$as_dir" && as_dir=.
8162    for ac_exec_ext in '' $ac_executable_extensions; do
8163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8164    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8166    break 2
8167  fi
8168done
8169  done
8170IFS=$as_save_IFS
8171
8172  ;;
8173esac
8174fi
8175FIND=$ac_cv_path_FIND
8176if test -n "$FIND"; then
8177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8178$as_echo "$FIND" >&6; }
8179else
8180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8181$as_echo "no" >&6; }
8182fi
8183
8184
8185          if test "x$FIND" = x; then
8186            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8187          fi
8188        else
8189          # Otherwise we believe it is a complete path. Use it as it is.
8190          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8191$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8192          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8193$as_echo_n "checking for FIND... " >&6; }
8194          if test ! -x "$tool_specified"; then
8195            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8196$as_echo "not found" >&6; }
8197            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8198          fi
8199          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8200$as_echo "$tool_specified" >&6; }
8201        fi
8202      fi
8203    fi
8204
8205  fi
8206
8207
8208
8209  if test "x$FIND" = x; then
8210    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8211  fi
8212
8213
8214
8215
8216
8217  # Publish this variable in the help.
8218
8219
8220  if [ -z "${HEAD+x}" ]; then
8221    # The variable is not set by user, try to locate tool using the code snippet
8222    for ac_prog in head
8223do
8224  # Extract the first word of "$ac_prog", so it can be a program name with args.
8225set dummy $ac_prog; ac_word=$2
8226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8227$as_echo_n "checking for $ac_word... " >&6; }
8228if ${ac_cv_path_HEAD+:} false; then :
8229  $as_echo_n "(cached) " >&6
8230else
8231  case $HEAD in
8232  [\\/]* | ?:[\\/]*)
8233  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8234  ;;
8235  *)
8236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8237for as_dir in $PATH
8238do
8239  IFS=$as_save_IFS
8240  test -z "$as_dir" && as_dir=.
8241    for ac_exec_ext in '' $ac_executable_extensions; do
8242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8243    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8245    break 2
8246  fi
8247done
8248  done
8249IFS=$as_save_IFS
8250
8251  ;;
8252esac
8253fi
8254HEAD=$ac_cv_path_HEAD
8255if test -n "$HEAD"; then
8256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8257$as_echo "$HEAD" >&6; }
8258else
8259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8260$as_echo "no" >&6; }
8261fi
8262
8263
8264  test -n "$HEAD" && break
8265done
8266
8267  else
8268    # The variable is set, but is it from the command line or the environment?
8269
8270    # Try to remove the string !HEAD! from our list.
8271    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8272    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8273      # If it failed, the variable was not from the command line. Ignore it,
8274      # but warn the user (except for BASH, which is always set by the calling BASH).
8275      if test "xHEAD" != xBASH; then
8276        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8277$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8278      fi
8279      # Try to locate tool using the code snippet
8280      for ac_prog in head
8281do
8282  # Extract the first word of "$ac_prog", so it can be a program name with args.
8283set dummy $ac_prog; ac_word=$2
8284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8285$as_echo_n "checking for $ac_word... " >&6; }
8286if ${ac_cv_path_HEAD+:} false; then :
8287  $as_echo_n "(cached) " >&6
8288else
8289  case $HEAD in
8290  [\\/]* | ?:[\\/]*)
8291  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8292  ;;
8293  *)
8294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8295for as_dir in $PATH
8296do
8297  IFS=$as_save_IFS
8298  test -z "$as_dir" && as_dir=.
8299    for ac_exec_ext in '' $ac_executable_extensions; do
8300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8301    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8303    break 2
8304  fi
8305done
8306  done
8307IFS=$as_save_IFS
8308
8309  ;;
8310esac
8311fi
8312HEAD=$ac_cv_path_HEAD
8313if test -n "$HEAD"; then
8314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8315$as_echo "$HEAD" >&6; }
8316else
8317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8318$as_echo "no" >&6; }
8319fi
8320
8321
8322  test -n "$HEAD" && break
8323done
8324
8325    else
8326      # If it succeeded, then it was overridden by the user. We will use it
8327      # for the tool.
8328
8329      # First remove it from the list of overridden variables, so we can test
8330      # for unknown variables in the end.
8331      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8332
8333      # Check if we try to supply an empty value
8334      if test "x$HEAD" = x; then
8335        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8336$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8337        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8338$as_echo_n "checking for HEAD... " >&6; }
8339        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8340$as_echo "disabled" >&6; }
8341      else
8342        # Check if the provided tool contains a complete path.
8343        tool_specified="$HEAD"
8344        tool_basename="${tool_specified##*/}"
8345        if test "x$tool_basename" = "x$tool_specified"; then
8346          # A command without a complete path is provided, search $PATH.
8347          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8348$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8349          # Extract the first word of "$tool_basename", so it can be a program name with args.
8350set dummy $tool_basename; ac_word=$2
8351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8352$as_echo_n "checking for $ac_word... " >&6; }
8353if ${ac_cv_path_HEAD+:} false; then :
8354  $as_echo_n "(cached) " >&6
8355else
8356  case $HEAD in
8357  [\\/]* | ?:[\\/]*)
8358  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8359  ;;
8360  *)
8361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8362for as_dir in $PATH
8363do
8364  IFS=$as_save_IFS
8365  test -z "$as_dir" && as_dir=.
8366    for ac_exec_ext in '' $ac_executable_extensions; do
8367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8368    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8370    break 2
8371  fi
8372done
8373  done
8374IFS=$as_save_IFS
8375
8376  ;;
8377esac
8378fi
8379HEAD=$ac_cv_path_HEAD
8380if test -n "$HEAD"; then
8381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8382$as_echo "$HEAD" >&6; }
8383else
8384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8385$as_echo "no" >&6; }
8386fi
8387
8388
8389          if test "x$HEAD" = x; then
8390            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8391          fi
8392        else
8393          # Otherwise we believe it is a complete path. Use it as it is.
8394          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8395$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8396          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8397$as_echo_n "checking for HEAD... " >&6; }
8398          if test ! -x "$tool_specified"; then
8399            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8400$as_echo "not found" >&6; }
8401            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8402          fi
8403          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8404$as_echo "$tool_specified" >&6; }
8405        fi
8406      fi
8407    fi
8408
8409  fi
8410
8411
8412
8413  if test "x$HEAD" = x; then
8414    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8415  fi
8416
8417
8418
8419
8420
8421  # Publish this variable in the help.
8422
8423
8424  if [ -z "${GUNZIP+x}" ]; then
8425    # The variable is not set by user, try to locate tool using the code snippet
8426    for ac_prog in gunzip
8427do
8428  # Extract the first word of "$ac_prog", so it can be a program name with args.
8429set dummy $ac_prog; ac_word=$2
8430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8431$as_echo_n "checking for $ac_word... " >&6; }
8432if ${ac_cv_path_GUNZIP+:} false; then :
8433  $as_echo_n "(cached) " >&6
8434else
8435  case $GUNZIP in
8436  [\\/]* | ?:[\\/]*)
8437  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8438  ;;
8439  *)
8440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8441for as_dir in $PATH
8442do
8443  IFS=$as_save_IFS
8444  test -z "$as_dir" && as_dir=.
8445    for ac_exec_ext in '' $ac_executable_extensions; do
8446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8447    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8449    break 2
8450  fi
8451done
8452  done
8453IFS=$as_save_IFS
8454
8455  ;;
8456esac
8457fi
8458GUNZIP=$ac_cv_path_GUNZIP
8459if test -n "$GUNZIP"; then
8460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8461$as_echo "$GUNZIP" >&6; }
8462else
8463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8464$as_echo "no" >&6; }
8465fi
8466
8467
8468  test -n "$GUNZIP" && break
8469done
8470
8471  else
8472    # The variable is set, but is it from the command line or the environment?
8473
8474    # Try to remove the string !GUNZIP! from our list.
8475    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8476    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8477      # If it failed, the variable was not from the command line. Ignore it,
8478      # but warn the user (except for BASH, which is always set by the calling BASH).
8479      if test "xGUNZIP" != xBASH; then
8480        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8481$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8482      fi
8483      # Try to locate tool using the code snippet
8484      for ac_prog in gunzip
8485do
8486  # Extract the first word of "$ac_prog", so it can be a program name with args.
8487set dummy $ac_prog; ac_word=$2
8488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8489$as_echo_n "checking for $ac_word... " >&6; }
8490if ${ac_cv_path_GUNZIP+:} false; then :
8491  $as_echo_n "(cached) " >&6
8492else
8493  case $GUNZIP in
8494  [\\/]* | ?:[\\/]*)
8495  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8496  ;;
8497  *)
8498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8499for as_dir in $PATH
8500do
8501  IFS=$as_save_IFS
8502  test -z "$as_dir" && as_dir=.
8503    for ac_exec_ext in '' $ac_executable_extensions; do
8504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8505    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8507    break 2
8508  fi
8509done
8510  done
8511IFS=$as_save_IFS
8512
8513  ;;
8514esac
8515fi
8516GUNZIP=$ac_cv_path_GUNZIP
8517if test -n "$GUNZIP"; then
8518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8519$as_echo "$GUNZIP" >&6; }
8520else
8521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8522$as_echo "no" >&6; }
8523fi
8524
8525
8526  test -n "$GUNZIP" && break
8527done
8528
8529    else
8530      # If it succeeded, then it was overridden by the user. We will use it
8531      # for the tool.
8532
8533      # First remove it from the list of overridden variables, so we can test
8534      # for unknown variables in the end.
8535      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8536
8537      # Check if we try to supply an empty value
8538      if test "x$GUNZIP" = x; then
8539        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8540$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8541        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8542$as_echo_n "checking for GUNZIP... " >&6; }
8543        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8544$as_echo "disabled" >&6; }
8545      else
8546        # Check if the provided tool contains a complete path.
8547        tool_specified="$GUNZIP"
8548        tool_basename="${tool_specified##*/}"
8549        if test "x$tool_basename" = "x$tool_specified"; then
8550          # A command without a complete path is provided, search $PATH.
8551          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8552$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8553          # Extract the first word of "$tool_basename", so it can be a program name with args.
8554set dummy $tool_basename; ac_word=$2
8555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8556$as_echo_n "checking for $ac_word... " >&6; }
8557if ${ac_cv_path_GUNZIP+:} false; then :
8558  $as_echo_n "(cached) " >&6
8559else
8560  case $GUNZIP in
8561  [\\/]* | ?:[\\/]*)
8562  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8563  ;;
8564  *)
8565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8566for as_dir in $PATH
8567do
8568  IFS=$as_save_IFS
8569  test -z "$as_dir" && as_dir=.
8570    for ac_exec_ext in '' $ac_executable_extensions; do
8571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8572    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8574    break 2
8575  fi
8576done
8577  done
8578IFS=$as_save_IFS
8579
8580  ;;
8581esac
8582fi
8583GUNZIP=$ac_cv_path_GUNZIP
8584if test -n "$GUNZIP"; then
8585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8586$as_echo "$GUNZIP" >&6; }
8587else
8588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8589$as_echo "no" >&6; }
8590fi
8591
8592
8593          if test "x$GUNZIP" = x; then
8594            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8595          fi
8596        else
8597          # Otherwise we believe it is a complete path. Use it as it is.
8598          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8599$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8600          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8601$as_echo_n "checking for GUNZIP... " >&6; }
8602          if test ! -x "$tool_specified"; then
8603            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8604$as_echo "not found" >&6; }
8605            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8606          fi
8607          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8608$as_echo "$tool_specified" >&6; }
8609        fi
8610      fi
8611    fi
8612
8613  fi
8614
8615
8616
8617  if test "x$GUNZIP" = x; then
8618    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8619  fi
8620
8621
8622
8623
8624
8625  # Publish this variable in the help.
8626
8627
8628  if [ -z "${GZIP+x}" ]; then
8629    # The variable is not set by user, try to locate tool using the code snippet
8630    for ac_prog in pigz gzip
8631do
8632  # Extract the first word of "$ac_prog", so it can be a program name with args.
8633set dummy $ac_prog; ac_word=$2
8634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8635$as_echo_n "checking for $ac_word... " >&6; }
8636if ${ac_cv_path_GZIP+:} false; then :
8637  $as_echo_n "(cached) " >&6
8638else
8639  case $GZIP in
8640  [\\/]* | ?:[\\/]*)
8641  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8642  ;;
8643  *)
8644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8645for as_dir in $PATH
8646do
8647  IFS=$as_save_IFS
8648  test -z "$as_dir" && as_dir=.
8649    for ac_exec_ext in '' $ac_executable_extensions; do
8650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8651    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8653    break 2
8654  fi
8655done
8656  done
8657IFS=$as_save_IFS
8658
8659  ;;
8660esac
8661fi
8662GZIP=$ac_cv_path_GZIP
8663if test -n "$GZIP"; then
8664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8665$as_echo "$GZIP" >&6; }
8666else
8667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8668$as_echo "no" >&6; }
8669fi
8670
8671
8672  test -n "$GZIP" && break
8673done
8674
8675  else
8676    # The variable is set, but is it from the command line or the environment?
8677
8678    # Try to remove the string !GZIP! from our list.
8679    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8680    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8681      # If it failed, the variable was not from the command line. Ignore it,
8682      # but warn the user (except for BASH, which is always set by the calling BASH).
8683      if test "xGZIP" != xBASH; then
8684        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8685$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8686      fi
8687      # Try to locate tool using the code snippet
8688      for ac_prog in pigz gzip
8689do
8690  # Extract the first word of "$ac_prog", so it can be a program name with args.
8691set dummy $ac_prog; ac_word=$2
8692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8693$as_echo_n "checking for $ac_word... " >&6; }
8694if ${ac_cv_path_GZIP+:} false; then :
8695  $as_echo_n "(cached) " >&6
8696else
8697  case $GZIP in
8698  [\\/]* | ?:[\\/]*)
8699  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8700  ;;
8701  *)
8702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8703for as_dir in $PATH
8704do
8705  IFS=$as_save_IFS
8706  test -z "$as_dir" && as_dir=.
8707    for ac_exec_ext in '' $ac_executable_extensions; do
8708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8709    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8711    break 2
8712  fi
8713done
8714  done
8715IFS=$as_save_IFS
8716
8717  ;;
8718esac
8719fi
8720GZIP=$ac_cv_path_GZIP
8721if test -n "$GZIP"; then
8722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8723$as_echo "$GZIP" >&6; }
8724else
8725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8726$as_echo "no" >&6; }
8727fi
8728
8729
8730  test -n "$GZIP" && break
8731done
8732
8733    else
8734      # If it succeeded, then it was overridden by the user. We will use it
8735      # for the tool.
8736
8737      # First remove it from the list of overridden variables, so we can test
8738      # for unknown variables in the end.
8739      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8740
8741      # Check if we try to supply an empty value
8742      if test "x$GZIP" = x; then
8743        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8744$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8745        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8746$as_echo_n "checking for GZIP... " >&6; }
8747        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8748$as_echo "disabled" >&6; }
8749      else
8750        # Check if the provided tool contains a complete path.
8751        tool_specified="$GZIP"
8752        tool_basename="${tool_specified##*/}"
8753        if test "x$tool_basename" = "x$tool_specified"; then
8754          # A command without a complete path is provided, search $PATH.
8755          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8756$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8757          # Extract the first word of "$tool_basename", so it can be a program name with args.
8758set dummy $tool_basename; ac_word=$2
8759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8760$as_echo_n "checking for $ac_word... " >&6; }
8761if ${ac_cv_path_GZIP+:} false; then :
8762  $as_echo_n "(cached) " >&6
8763else
8764  case $GZIP in
8765  [\\/]* | ?:[\\/]*)
8766  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8767  ;;
8768  *)
8769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8770for as_dir in $PATH
8771do
8772  IFS=$as_save_IFS
8773  test -z "$as_dir" && as_dir=.
8774    for ac_exec_ext in '' $ac_executable_extensions; do
8775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8776    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8778    break 2
8779  fi
8780done
8781  done
8782IFS=$as_save_IFS
8783
8784  ;;
8785esac
8786fi
8787GZIP=$ac_cv_path_GZIP
8788if test -n "$GZIP"; then
8789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8790$as_echo "$GZIP" >&6; }
8791else
8792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8793$as_echo "no" >&6; }
8794fi
8795
8796
8797          if test "x$GZIP" = x; then
8798            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8799          fi
8800        else
8801          # Otherwise we believe it is a complete path. Use it as it is.
8802          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8803$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8804          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8805$as_echo_n "checking for GZIP... " >&6; }
8806          if test ! -x "$tool_specified"; then
8807            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8808$as_echo "not found" >&6; }
8809            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8810          fi
8811          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8812$as_echo "$tool_specified" >&6; }
8813        fi
8814      fi
8815    fi
8816
8817  fi
8818
8819
8820
8821  if test "x$GZIP" = x; then
8822    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8823  fi
8824
8825
8826
8827
8828
8829  # Publish this variable in the help.
8830
8831
8832  if [ -z "${LN+x}" ]; then
8833    # The variable is not set by user, try to locate tool using the code snippet
8834    for ac_prog in ln
8835do
8836  # Extract the first word of "$ac_prog", so it can be a program name with args.
8837set dummy $ac_prog; ac_word=$2
8838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8839$as_echo_n "checking for $ac_word... " >&6; }
8840if ${ac_cv_path_LN+:} false; then :
8841  $as_echo_n "(cached) " >&6
8842else
8843  case $LN in
8844  [\\/]* | ?:[\\/]*)
8845  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8846  ;;
8847  *)
8848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8849for as_dir in $PATH
8850do
8851  IFS=$as_save_IFS
8852  test -z "$as_dir" && as_dir=.
8853    for ac_exec_ext in '' $ac_executable_extensions; do
8854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8855    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8857    break 2
8858  fi
8859done
8860  done
8861IFS=$as_save_IFS
8862
8863  ;;
8864esac
8865fi
8866LN=$ac_cv_path_LN
8867if test -n "$LN"; then
8868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8869$as_echo "$LN" >&6; }
8870else
8871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8872$as_echo "no" >&6; }
8873fi
8874
8875
8876  test -n "$LN" && break
8877done
8878
8879  else
8880    # The variable is set, but is it from the command line or the environment?
8881
8882    # Try to remove the string !LN! from our list.
8883    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8884    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8885      # If it failed, the variable was not from the command line. Ignore it,
8886      # but warn the user (except for BASH, which is always set by the calling BASH).
8887      if test "xLN" != xBASH; then
8888        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8889$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8890      fi
8891      # Try to locate tool using the code snippet
8892      for ac_prog in ln
8893do
8894  # Extract the first word of "$ac_prog", so it can be a program name with args.
8895set dummy $ac_prog; ac_word=$2
8896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8897$as_echo_n "checking for $ac_word... " >&6; }
8898if ${ac_cv_path_LN+:} false; then :
8899  $as_echo_n "(cached) " >&6
8900else
8901  case $LN in
8902  [\\/]* | ?:[\\/]*)
8903  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8904  ;;
8905  *)
8906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8907for as_dir in $PATH
8908do
8909  IFS=$as_save_IFS
8910  test -z "$as_dir" && as_dir=.
8911    for ac_exec_ext in '' $ac_executable_extensions; do
8912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8913    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8915    break 2
8916  fi
8917done
8918  done
8919IFS=$as_save_IFS
8920
8921  ;;
8922esac
8923fi
8924LN=$ac_cv_path_LN
8925if test -n "$LN"; then
8926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8927$as_echo "$LN" >&6; }
8928else
8929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8930$as_echo "no" >&6; }
8931fi
8932
8933
8934  test -n "$LN" && break
8935done
8936
8937    else
8938      # If it succeeded, then it was overridden by the user. We will use it
8939      # for the tool.
8940
8941      # First remove it from the list of overridden variables, so we can test
8942      # for unknown variables in the end.
8943      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8944
8945      # Check if we try to supply an empty value
8946      if test "x$LN" = x; then
8947        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8948$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8949        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8950$as_echo_n "checking for LN... " >&6; }
8951        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8952$as_echo "disabled" >&6; }
8953      else
8954        # Check if the provided tool contains a complete path.
8955        tool_specified="$LN"
8956        tool_basename="${tool_specified##*/}"
8957        if test "x$tool_basename" = "x$tool_specified"; then
8958          # A command without a complete path is provided, search $PATH.
8959          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8960$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8961          # Extract the first word of "$tool_basename", so it can be a program name with args.
8962set dummy $tool_basename; ac_word=$2
8963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8964$as_echo_n "checking for $ac_word... " >&6; }
8965if ${ac_cv_path_LN+:} false; then :
8966  $as_echo_n "(cached) " >&6
8967else
8968  case $LN in
8969  [\\/]* | ?:[\\/]*)
8970  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8971  ;;
8972  *)
8973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8974for as_dir in $PATH
8975do
8976  IFS=$as_save_IFS
8977  test -z "$as_dir" && as_dir=.
8978    for ac_exec_ext in '' $ac_executable_extensions; do
8979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8980    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8982    break 2
8983  fi
8984done
8985  done
8986IFS=$as_save_IFS
8987
8988  ;;
8989esac
8990fi
8991LN=$ac_cv_path_LN
8992if test -n "$LN"; then
8993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8994$as_echo "$LN" >&6; }
8995else
8996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8997$as_echo "no" >&6; }
8998fi
8999
9000
9001          if test "x$LN" = x; then
9002            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9003          fi
9004        else
9005          # Otherwise we believe it is a complete path. Use it as it is.
9006          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9007$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9008          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9009$as_echo_n "checking for LN... " >&6; }
9010          if test ! -x "$tool_specified"; then
9011            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9012$as_echo "not found" >&6; }
9013            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9014          fi
9015          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9016$as_echo "$tool_specified" >&6; }
9017        fi
9018      fi
9019    fi
9020
9021  fi
9022
9023
9024
9025  if test "x$LN" = x; then
9026    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9027  fi
9028
9029
9030
9031
9032
9033  # Publish this variable in the help.
9034
9035
9036  if [ -z "${LS+x}" ]; then
9037    # The variable is not set by user, try to locate tool using the code snippet
9038    for ac_prog in ls
9039do
9040  # Extract the first word of "$ac_prog", so it can be a program name with args.
9041set dummy $ac_prog; ac_word=$2
9042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9043$as_echo_n "checking for $ac_word... " >&6; }
9044if ${ac_cv_path_LS+:} false; then :
9045  $as_echo_n "(cached) " >&6
9046else
9047  case $LS in
9048  [\\/]* | ?:[\\/]*)
9049  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9050  ;;
9051  *)
9052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9053for as_dir in $PATH
9054do
9055  IFS=$as_save_IFS
9056  test -z "$as_dir" && as_dir=.
9057    for ac_exec_ext in '' $ac_executable_extensions; do
9058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9059    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9061    break 2
9062  fi
9063done
9064  done
9065IFS=$as_save_IFS
9066
9067  ;;
9068esac
9069fi
9070LS=$ac_cv_path_LS
9071if test -n "$LS"; then
9072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9073$as_echo "$LS" >&6; }
9074else
9075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9076$as_echo "no" >&6; }
9077fi
9078
9079
9080  test -n "$LS" && break
9081done
9082
9083  else
9084    # The variable is set, but is it from the command line or the environment?
9085
9086    # Try to remove the string !LS! from our list.
9087    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9088    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9089      # If it failed, the variable was not from the command line. Ignore it,
9090      # but warn the user (except for BASH, which is always set by the calling BASH).
9091      if test "xLS" != xBASH; then
9092        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9093$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9094      fi
9095      # Try to locate tool using the code snippet
9096      for ac_prog in ls
9097do
9098  # Extract the first word of "$ac_prog", so it can be a program name with args.
9099set dummy $ac_prog; ac_word=$2
9100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9101$as_echo_n "checking for $ac_word... " >&6; }
9102if ${ac_cv_path_LS+:} false; then :
9103  $as_echo_n "(cached) " >&6
9104else
9105  case $LS in
9106  [\\/]* | ?:[\\/]*)
9107  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9108  ;;
9109  *)
9110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9111for as_dir in $PATH
9112do
9113  IFS=$as_save_IFS
9114  test -z "$as_dir" && as_dir=.
9115    for ac_exec_ext in '' $ac_executable_extensions; do
9116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9117    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9119    break 2
9120  fi
9121done
9122  done
9123IFS=$as_save_IFS
9124
9125  ;;
9126esac
9127fi
9128LS=$ac_cv_path_LS
9129if test -n "$LS"; then
9130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9131$as_echo "$LS" >&6; }
9132else
9133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9134$as_echo "no" >&6; }
9135fi
9136
9137
9138  test -n "$LS" && break
9139done
9140
9141    else
9142      # If it succeeded, then it was overridden by the user. We will use it
9143      # for the tool.
9144
9145      # First remove it from the list of overridden variables, so we can test
9146      # for unknown variables in the end.
9147      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9148
9149      # Check if we try to supply an empty value
9150      if test "x$LS" = x; then
9151        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9152$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9153        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9154$as_echo_n "checking for LS... " >&6; }
9155        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9156$as_echo "disabled" >&6; }
9157      else
9158        # Check if the provided tool contains a complete path.
9159        tool_specified="$LS"
9160        tool_basename="${tool_specified##*/}"
9161        if test "x$tool_basename" = "x$tool_specified"; then
9162          # A command without a complete path is provided, search $PATH.
9163          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9164$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9165          # Extract the first word of "$tool_basename", so it can be a program name with args.
9166set dummy $tool_basename; ac_word=$2
9167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9168$as_echo_n "checking for $ac_word... " >&6; }
9169if ${ac_cv_path_LS+:} false; then :
9170  $as_echo_n "(cached) " >&6
9171else
9172  case $LS in
9173  [\\/]* | ?:[\\/]*)
9174  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9175  ;;
9176  *)
9177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9178for as_dir in $PATH
9179do
9180  IFS=$as_save_IFS
9181  test -z "$as_dir" && as_dir=.
9182    for ac_exec_ext in '' $ac_executable_extensions; do
9183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9184    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9186    break 2
9187  fi
9188done
9189  done
9190IFS=$as_save_IFS
9191
9192  ;;
9193esac
9194fi
9195LS=$ac_cv_path_LS
9196if test -n "$LS"; then
9197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9198$as_echo "$LS" >&6; }
9199else
9200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9201$as_echo "no" >&6; }
9202fi
9203
9204
9205          if test "x$LS" = x; then
9206            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9207          fi
9208        else
9209          # Otherwise we believe it is a complete path. Use it as it is.
9210          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9211$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9212          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9213$as_echo_n "checking for LS... " >&6; }
9214          if test ! -x "$tool_specified"; then
9215            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9216$as_echo "not found" >&6; }
9217            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9218          fi
9219          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9220$as_echo "$tool_specified" >&6; }
9221        fi
9222      fi
9223    fi
9224
9225  fi
9226
9227
9228
9229  if test "x$LS" = x; then
9230    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9231  fi
9232
9233
9234
9235
9236
9237  # Publish this variable in the help.
9238
9239
9240  if [ -z "${MKDIR+x}" ]; then
9241    # The variable is not set by user, try to locate tool using the code snippet
9242    for ac_prog in mkdir
9243do
9244  # Extract the first word of "$ac_prog", so it can be a program name with args.
9245set dummy $ac_prog; ac_word=$2
9246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9247$as_echo_n "checking for $ac_word... " >&6; }
9248if ${ac_cv_path_MKDIR+:} false; then :
9249  $as_echo_n "(cached) " >&6
9250else
9251  case $MKDIR in
9252  [\\/]* | ?:[\\/]*)
9253  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9254  ;;
9255  *)
9256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9257for as_dir in $PATH
9258do
9259  IFS=$as_save_IFS
9260  test -z "$as_dir" && as_dir=.
9261    for ac_exec_ext in '' $ac_executable_extensions; do
9262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9263    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9265    break 2
9266  fi
9267done
9268  done
9269IFS=$as_save_IFS
9270
9271  ;;
9272esac
9273fi
9274MKDIR=$ac_cv_path_MKDIR
9275if test -n "$MKDIR"; then
9276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9277$as_echo "$MKDIR" >&6; }
9278else
9279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9280$as_echo "no" >&6; }
9281fi
9282
9283
9284  test -n "$MKDIR" && break
9285done
9286
9287  else
9288    # The variable is set, but is it from the command line or the environment?
9289
9290    # Try to remove the string !MKDIR! from our list.
9291    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9292    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9293      # If it failed, the variable was not from the command line. Ignore it,
9294      # but warn the user (except for BASH, which is always set by the calling BASH).
9295      if test "xMKDIR" != xBASH; then
9296        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9297$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9298      fi
9299      # Try to locate tool using the code snippet
9300      for ac_prog in mkdir
9301do
9302  # Extract the first word of "$ac_prog", so it can be a program name with args.
9303set dummy $ac_prog; ac_word=$2
9304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9305$as_echo_n "checking for $ac_word... " >&6; }
9306if ${ac_cv_path_MKDIR+:} false; then :
9307  $as_echo_n "(cached) " >&6
9308else
9309  case $MKDIR in
9310  [\\/]* | ?:[\\/]*)
9311  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9312  ;;
9313  *)
9314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9315for as_dir in $PATH
9316do
9317  IFS=$as_save_IFS
9318  test -z "$as_dir" && as_dir=.
9319    for ac_exec_ext in '' $ac_executable_extensions; do
9320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9321    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9323    break 2
9324  fi
9325done
9326  done
9327IFS=$as_save_IFS
9328
9329  ;;
9330esac
9331fi
9332MKDIR=$ac_cv_path_MKDIR
9333if test -n "$MKDIR"; then
9334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9335$as_echo "$MKDIR" >&6; }
9336else
9337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9338$as_echo "no" >&6; }
9339fi
9340
9341
9342  test -n "$MKDIR" && break
9343done
9344
9345    else
9346      # If it succeeded, then it was overridden by the user. We will use it
9347      # for the tool.
9348
9349      # First remove it from the list of overridden variables, so we can test
9350      # for unknown variables in the end.
9351      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9352
9353      # Check if we try to supply an empty value
9354      if test "x$MKDIR" = x; then
9355        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9356$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9357        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9358$as_echo_n "checking for MKDIR... " >&6; }
9359        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9360$as_echo "disabled" >&6; }
9361      else
9362        # Check if the provided tool contains a complete path.
9363        tool_specified="$MKDIR"
9364        tool_basename="${tool_specified##*/}"
9365        if test "x$tool_basename" = "x$tool_specified"; then
9366          # A command without a complete path is provided, search $PATH.
9367          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9368$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9369          # Extract the first word of "$tool_basename", so it can be a program name with args.
9370set dummy $tool_basename; ac_word=$2
9371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9372$as_echo_n "checking for $ac_word... " >&6; }
9373if ${ac_cv_path_MKDIR+:} false; then :
9374  $as_echo_n "(cached) " >&6
9375else
9376  case $MKDIR in
9377  [\\/]* | ?:[\\/]*)
9378  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9379  ;;
9380  *)
9381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9382for as_dir in $PATH
9383do
9384  IFS=$as_save_IFS
9385  test -z "$as_dir" && as_dir=.
9386    for ac_exec_ext in '' $ac_executable_extensions; do
9387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9388    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9390    break 2
9391  fi
9392done
9393  done
9394IFS=$as_save_IFS
9395
9396  ;;
9397esac
9398fi
9399MKDIR=$ac_cv_path_MKDIR
9400if test -n "$MKDIR"; then
9401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9402$as_echo "$MKDIR" >&6; }
9403else
9404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9405$as_echo "no" >&6; }
9406fi
9407
9408
9409          if test "x$MKDIR" = x; then
9410            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9411          fi
9412        else
9413          # Otherwise we believe it is a complete path. Use it as it is.
9414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9415$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9416          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9417$as_echo_n "checking for MKDIR... " >&6; }
9418          if test ! -x "$tool_specified"; then
9419            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9420$as_echo "not found" >&6; }
9421            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9422          fi
9423          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9424$as_echo "$tool_specified" >&6; }
9425        fi
9426      fi
9427    fi
9428
9429  fi
9430
9431
9432
9433  if test "x$MKDIR" = x; then
9434    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9435  fi
9436
9437
9438
9439
9440
9441  # Publish this variable in the help.
9442
9443
9444  if [ -z "${MKTEMP+x}" ]; then
9445    # The variable is not set by user, try to locate tool using the code snippet
9446    for ac_prog in mktemp
9447do
9448  # Extract the first word of "$ac_prog", so it can be a program name with args.
9449set dummy $ac_prog; ac_word=$2
9450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9451$as_echo_n "checking for $ac_word... " >&6; }
9452if ${ac_cv_path_MKTEMP+:} false; then :
9453  $as_echo_n "(cached) " >&6
9454else
9455  case $MKTEMP in
9456  [\\/]* | ?:[\\/]*)
9457  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9458  ;;
9459  *)
9460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9461for as_dir in $PATH
9462do
9463  IFS=$as_save_IFS
9464  test -z "$as_dir" && as_dir=.
9465    for ac_exec_ext in '' $ac_executable_extensions; do
9466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9467    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9469    break 2
9470  fi
9471done
9472  done
9473IFS=$as_save_IFS
9474
9475  ;;
9476esac
9477fi
9478MKTEMP=$ac_cv_path_MKTEMP
9479if test -n "$MKTEMP"; then
9480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9481$as_echo "$MKTEMP" >&6; }
9482else
9483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9484$as_echo "no" >&6; }
9485fi
9486
9487
9488  test -n "$MKTEMP" && break
9489done
9490
9491  else
9492    # The variable is set, but is it from the command line or the environment?
9493
9494    # Try to remove the string !MKTEMP! from our list.
9495    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9496    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9497      # If it failed, the variable was not from the command line. Ignore it,
9498      # but warn the user (except for BASH, which is always set by the calling BASH).
9499      if test "xMKTEMP" != xBASH; then
9500        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9501$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9502      fi
9503      # Try to locate tool using the code snippet
9504      for ac_prog in mktemp
9505do
9506  # Extract the first word of "$ac_prog", so it can be a program name with args.
9507set dummy $ac_prog; ac_word=$2
9508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9509$as_echo_n "checking for $ac_word... " >&6; }
9510if ${ac_cv_path_MKTEMP+:} false; then :
9511  $as_echo_n "(cached) " >&6
9512else
9513  case $MKTEMP in
9514  [\\/]* | ?:[\\/]*)
9515  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9516  ;;
9517  *)
9518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9519for as_dir in $PATH
9520do
9521  IFS=$as_save_IFS
9522  test -z "$as_dir" && as_dir=.
9523    for ac_exec_ext in '' $ac_executable_extensions; do
9524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9525    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9527    break 2
9528  fi
9529done
9530  done
9531IFS=$as_save_IFS
9532
9533  ;;
9534esac
9535fi
9536MKTEMP=$ac_cv_path_MKTEMP
9537if test -n "$MKTEMP"; then
9538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9539$as_echo "$MKTEMP" >&6; }
9540else
9541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9542$as_echo "no" >&6; }
9543fi
9544
9545
9546  test -n "$MKTEMP" && break
9547done
9548
9549    else
9550      # If it succeeded, then it was overridden by the user. We will use it
9551      # for the tool.
9552
9553      # First remove it from the list of overridden variables, so we can test
9554      # for unknown variables in the end.
9555      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9556
9557      # Check if we try to supply an empty value
9558      if test "x$MKTEMP" = x; then
9559        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9560$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9561        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9562$as_echo_n "checking for MKTEMP... " >&6; }
9563        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9564$as_echo "disabled" >&6; }
9565      else
9566        # Check if the provided tool contains a complete path.
9567        tool_specified="$MKTEMP"
9568        tool_basename="${tool_specified##*/}"
9569        if test "x$tool_basename" = "x$tool_specified"; then
9570          # A command without a complete path is provided, search $PATH.
9571          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9572$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9573          # Extract the first word of "$tool_basename", so it can be a program name with args.
9574set dummy $tool_basename; ac_word=$2
9575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9576$as_echo_n "checking for $ac_word... " >&6; }
9577if ${ac_cv_path_MKTEMP+:} false; then :
9578  $as_echo_n "(cached) " >&6
9579else
9580  case $MKTEMP in
9581  [\\/]* | ?:[\\/]*)
9582  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9583  ;;
9584  *)
9585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9586for as_dir in $PATH
9587do
9588  IFS=$as_save_IFS
9589  test -z "$as_dir" && as_dir=.
9590    for ac_exec_ext in '' $ac_executable_extensions; do
9591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9592    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9594    break 2
9595  fi
9596done
9597  done
9598IFS=$as_save_IFS
9599
9600  ;;
9601esac
9602fi
9603MKTEMP=$ac_cv_path_MKTEMP
9604if test -n "$MKTEMP"; then
9605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9606$as_echo "$MKTEMP" >&6; }
9607else
9608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9609$as_echo "no" >&6; }
9610fi
9611
9612
9613          if test "x$MKTEMP" = x; then
9614            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9615          fi
9616        else
9617          # Otherwise we believe it is a complete path. Use it as it is.
9618          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9619$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9620          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9621$as_echo_n "checking for MKTEMP... " >&6; }
9622          if test ! -x "$tool_specified"; then
9623            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9624$as_echo "not found" >&6; }
9625            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9626          fi
9627          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9628$as_echo "$tool_specified" >&6; }
9629        fi
9630      fi
9631    fi
9632
9633  fi
9634
9635
9636
9637  if test "x$MKTEMP" = x; then
9638    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9639  fi
9640
9641
9642
9643
9644
9645  # Publish this variable in the help.
9646
9647
9648  if [ -z "${MV+x}" ]; then
9649    # The variable is not set by user, try to locate tool using the code snippet
9650    for ac_prog in mv
9651do
9652  # Extract the first word of "$ac_prog", so it can be a program name with args.
9653set dummy $ac_prog; ac_word=$2
9654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9655$as_echo_n "checking for $ac_word... " >&6; }
9656if ${ac_cv_path_MV+:} false; then :
9657  $as_echo_n "(cached) " >&6
9658else
9659  case $MV in
9660  [\\/]* | ?:[\\/]*)
9661  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9662  ;;
9663  *)
9664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9665for as_dir in $PATH
9666do
9667  IFS=$as_save_IFS
9668  test -z "$as_dir" && as_dir=.
9669    for ac_exec_ext in '' $ac_executable_extensions; do
9670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9671    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9673    break 2
9674  fi
9675done
9676  done
9677IFS=$as_save_IFS
9678
9679  ;;
9680esac
9681fi
9682MV=$ac_cv_path_MV
9683if test -n "$MV"; then
9684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9685$as_echo "$MV" >&6; }
9686else
9687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9688$as_echo "no" >&6; }
9689fi
9690
9691
9692  test -n "$MV" && break
9693done
9694
9695  else
9696    # The variable is set, but is it from the command line or the environment?
9697
9698    # Try to remove the string !MV! from our list.
9699    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9700    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9701      # If it failed, the variable was not from the command line. Ignore it,
9702      # but warn the user (except for BASH, which is always set by the calling BASH).
9703      if test "xMV" != xBASH; then
9704        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9705$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9706      fi
9707      # Try to locate tool using the code snippet
9708      for ac_prog in mv
9709do
9710  # Extract the first word of "$ac_prog", so it can be a program name with args.
9711set dummy $ac_prog; ac_word=$2
9712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9713$as_echo_n "checking for $ac_word... " >&6; }
9714if ${ac_cv_path_MV+:} false; then :
9715  $as_echo_n "(cached) " >&6
9716else
9717  case $MV in
9718  [\\/]* | ?:[\\/]*)
9719  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9720  ;;
9721  *)
9722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9723for as_dir in $PATH
9724do
9725  IFS=$as_save_IFS
9726  test -z "$as_dir" && as_dir=.
9727    for ac_exec_ext in '' $ac_executable_extensions; do
9728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9729    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9731    break 2
9732  fi
9733done
9734  done
9735IFS=$as_save_IFS
9736
9737  ;;
9738esac
9739fi
9740MV=$ac_cv_path_MV
9741if test -n "$MV"; then
9742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9743$as_echo "$MV" >&6; }
9744else
9745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9746$as_echo "no" >&6; }
9747fi
9748
9749
9750  test -n "$MV" && break
9751done
9752
9753    else
9754      # If it succeeded, then it was overridden by the user. We will use it
9755      # for the tool.
9756
9757      # First remove it from the list of overridden variables, so we can test
9758      # for unknown variables in the end.
9759      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9760
9761      # Check if we try to supply an empty value
9762      if test "x$MV" = x; then
9763        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9764$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9765        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9766$as_echo_n "checking for MV... " >&6; }
9767        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9768$as_echo "disabled" >&6; }
9769      else
9770        # Check if the provided tool contains a complete path.
9771        tool_specified="$MV"
9772        tool_basename="${tool_specified##*/}"
9773        if test "x$tool_basename" = "x$tool_specified"; then
9774          # A command without a complete path is provided, search $PATH.
9775          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9776$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9777          # Extract the first word of "$tool_basename", so it can be a program name with args.
9778set dummy $tool_basename; ac_word=$2
9779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9780$as_echo_n "checking for $ac_word... " >&6; }
9781if ${ac_cv_path_MV+:} false; then :
9782  $as_echo_n "(cached) " >&6
9783else
9784  case $MV in
9785  [\\/]* | ?:[\\/]*)
9786  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9787  ;;
9788  *)
9789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9790for as_dir in $PATH
9791do
9792  IFS=$as_save_IFS
9793  test -z "$as_dir" && as_dir=.
9794    for ac_exec_ext in '' $ac_executable_extensions; do
9795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9796    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9798    break 2
9799  fi
9800done
9801  done
9802IFS=$as_save_IFS
9803
9804  ;;
9805esac
9806fi
9807MV=$ac_cv_path_MV
9808if test -n "$MV"; then
9809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9810$as_echo "$MV" >&6; }
9811else
9812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9813$as_echo "no" >&6; }
9814fi
9815
9816
9817          if test "x$MV" = x; then
9818            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9819          fi
9820        else
9821          # Otherwise we believe it is a complete path. Use it as it is.
9822          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9823$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9824          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9825$as_echo_n "checking for MV... " >&6; }
9826          if test ! -x "$tool_specified"; then
9827            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9828$as_echo "not found" >&6; }
9829            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9830          fi
9831          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9832$as_echo "$tool_specified" >&6; }
9833        fi
9834      fi
9835    fi
9836
9837  fi
9838
9839
9840
9841  if test "x$MV" = x; then
9842    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9843  fi
9844
9845
9846
9847
9848
9849  # Publish this variable in the help.
9850
9851
9852  if [ -z "${NAWK+x}" ]; then
9853    # The variable is not set by user, try to locate tool using the code snippet
9854    for ac_prog in nawk gawk awk
9855do
9856  # Extract the first word of "$ac_prog", so it can be a program name with args.
9857set dummy $ac_prog; ac_word=$2
9858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9859$as_echo_n "checking for $ac_word... " >&6; }
9860if ${ac_cv_path_NAWK+:} false; then :
9861  $as_echo_n "(cached) " >&6
9862else
9863  case $NAWK in
9864  [\\/]* | ?:[\\/]*)
9865  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9866  ;;
9867  *)
9868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9869for as_dir in $PATH
9870do
9871  IFS=$as_save_IFS
9872  test -z "$as_dir" && as_dir=.
9873    for ac_exec_ext in '' $ac_executable_extensions; do
9874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9875    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9877    break 2
9878  fi
9879done
9880  done
9881IFS=$as_save_IFS
9882
9883  ;;
9884esac
9885fi
9886NAWK=$ac_cv_path_NAWK
9887if test -n "$NAWK"; then
9888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9889$as_echo "$NAWK" >&6; }
9890else
9891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9892$as_echo "no" >&6; }
9893fi
9894
9895
9896  test -n "$NAWK" && break
9897done
9898
9899  else
9900    # The variable is set, but is it from the command line or the environment?
9901
9902    # Try to remove the string !NAWK! from our list.
9903    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9904    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9905      # If it failed, the variable was not from the command line. Ignore it,
9906      # but warn the user (except for BASH, which is always set by the calling BASH).
9907      if test "xNAWK" != xBASH; then
9908        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9909$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9910      fi
9911      # Try to locate tool using the code snippet
9912      for ac_prog in nawk gawk awk
9913do
9914  # Extract the first word of "$ac_prog", so it can be a program name with args.
9915set dummy $ac_prog; ac_word=$2
9916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9917$as_echo_n "checking for $ac_word... " >&6; }
9918if ${ac_cv_path_NAWK+:} false; then :
9919  $as_echo_n "(cached) " >&6
9920else
9921  case $NAWK in
9922  [\\/]* | ?:[\\/]*)
9923  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9924  ;;
9925  *)
9926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9927for as_dir in $PATH
9928do
9929  IFS=$as_save_IFS
9930  test -z "$as_dir" && as_dir=.
9931    for ac_exec_ext in '' $ac_executable_extensions; do
9932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9933    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9935    break 2
9936  fi
9937done
9938  done
9939IFS=$as_save_IFS
9940
9941  ;;
9942esac
9943fi
9944NAWK=$ac_cv_path_NAWK
9945if test -n "$NAWK"; then
9946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9947$as_echo "$NAWK" >&6; }
9948else
9949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9950$as_echo "no" >&6; }
9951fi
9952
9953
9954  test -n "$NAWK" && break
9955done
9956
9957    else
9958      # If it succeeded, then it was overridden by the user. We will use it
9959      # for the tool.
9960
9961      # First remove it from the list of overridden variables, so we can test
9962      # for unknown variables in the end.
9963      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9964
9965      # Check if we try to supply an empty value
9966      if test "x$NAWK" = x; then
9967        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9968$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9969        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9970$as_echo_n "checking for NAWK... " >&6; }
9971        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9972$as_echo "disabled" >&6; }
9973      else
9974        # Check if the provided tool contains a complete path.
9975        tool_specified="$NAWK"
9976        tool_basename="${tool_specified##*/}"
9977        if test "x$tool_basename" = "x$tool_specified"; then
9978          # A command without a complete path is provided, search $PATH.
9979          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9980$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9981          # Extract the first word of "$tool_basename", so it can be a program name with args.
9982set dummy $tool_basename; ac_word=$2
9983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9984$as_echo_n "checking for $ac_word... " >&6; }
9985if ${ac_cv_path_NAWK+:} false; then :
9986  $as_echo_n "(cached) " >&6
9987else
9988  case $NAWK in
9989  [\\/]* | ?:[\\/]*)
9990  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9991  ;;
9992  *)
9993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9994for as_dir in $PATH
9995do
9996  IFS=$as_save_IFS
9997  test -z "$as_dir" && as_dir=.
9998    for ac_exec_ext in '' $ac_executable_extensions; do
9999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10000    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10002    break 2
10003  fi
10004done
10005  done
10006IFS=$as_save_IFS
10007
10008  ;;
10009esac
10010fi
10011NAWK=$ac_cv_path_NAWK
10012if test -n "$NAWK"; then
10013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10014$as_echo "$NAWK" >&6; }
10015else
10016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10017$as_echo "no" >&6; }
10018fi
10019
10020
10021          if test "x$NAWK" = x; then
10022            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10023          fi
10024        else
10025          # Otherwise we believe it is a complete path. Use it as it is.
10026          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10027$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10028          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10029$as_echo_n "checking for NAWK... " >&6; }
10030          if test ! -x "$tool_specified"; then
10031            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10032$as_echo "not found" >&6; }
10033            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10034          fi
10035          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10036$as_echo "$tool_specified" >&6; }
10037        fi
10038      fi
10039    fi
10040
10041  fi
10042
10043
10044
10045  if test "x$NAWK" = x; then
10046    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10047  fi
10048
10049
10050
10051
10052
10053  # Publish this variable in the help.
10054
10055
10056  if [ -z "${PRINTF+x}" ]; then
10057    # The variable is not set by user, try to locate tool using the code snippet
10058    for ac_prog in printf
10059do
10060  # Extract the first word of "$ac_prog", so it can be a program name with args.
10061set dummy $ac_prog; ac_word=$2
10062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10063$as_echo_n "checking for $ac_word... " >&6; }
10064if ${ac_cv_path_PRINTF+:} false; then :
10065  $as_echo_n "(cached) " >&6
10066else
10067  case $PRINTF in
10068  [\\/]* | ?:[\\/]*)
10069  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10070  ;;
10071  *)
10072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10073for as_dir in $PATH
10074do
10075  IFS=$as_save_IFS
10076  test -z "$as_dir" && as_dir=.
10077    for ac_exec_ext in '' $ac_executable_extensions; do
10078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10079    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10081    break 2
10082  fi
10083done
10084  done
10085IFS=$as_save_IFS
10086
10087  ;;
10088esac
10089fi
10090PRINTF=$ac_cv_path_PRINTF
10091if test -n "$PRINTF"; then
10092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10093$as_echo "$PRINTF" >&6; }
10094else
10095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10096$as_echo "no" >&6; }
10097fi
10098
10099
10100  test -n "$PRINTF" && break
10101done
10102
10103  else
10104    # The variable is set, but is it from the command line or the environment?
10105
10106    # Try to remove the string !PRINTF! from our list.
10107    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10108    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10109      # If it failed, the variable was not from the command line. Ignore it,
10110      # but warn the user (except for BASH, which is always set by the calling BASH).
10111      if test "xPRINTF" != xBASH; then
10112        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10113$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10114      fi
10115      # Try to locate tool using the code snippet
10116      for ac_prog in printf
10117do
10118  # Extract the first word of "$ac_prog", so it can be a program name with args.
10119set dummy $ac_prog; ac_word=$2
10120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10121$as_echo_n "checking for $ac_word... " >&6; }
10122if ${ac_cv_path_PRINTF+:} false; then :
10123  $as_echo_n "(cached) " >&6
10124else
10125  case $PRINTF in
10126  [\\/]* | ?:[\\/]*)
10127  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10128  ;;
10129  *)
10130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10131for as_dir in $PATH
10132do
10133  IFS=$as_save_IFS
10134  test -z "$as_dir" && as_dir=.
10135    for ac_exec_ext in '' $ac_executable_extensions; do
10136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10137    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10139    break 2
10140  fi
10141done
10142  done
10143IFS=$as_save_IFS
10144
10145  ;;
10146esac
10147fi
10148PRINTF=$ac_cv_path_PRINTF
10149if test -n "$PRINTF"; then
10150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10151$as_echo "$PRINTF" >&6; }
10152else
10153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10154$as_echo "no" >&6; }
10155fi
10156
10157
10158  test -n "$PRINTF" && break
10159done
10160
10161    else
10162      # If it succeeded, then it was overridden by the user. We will use it
10163      # for the tool.
10164
10165      # First remove it from the list of overridden variables, so we can test
10166      # for unknown variables in the end.
10167      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10168
10169      # Check if we try to supply an empty value
10170      if test "x$PRINTF" = x; then
10171        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10172$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10173        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10174$as_echo_n "checking for PRINTF... " >&6; }
10175        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10176$as_echo "disabled" >&6; }
10177      else
10178        # Check if the provided tool contains a complete path.
10179        tool_specified="$PRINTF"
10180        tool_basename="${tool_specified##*/}"
10181        if test "x$tool_basename" = "x$tool_specified"; then
10182          # A command without a complete path is provided, search $PATH.
10183          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10184$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10185          # Extract the first word of "$tool_basename", so it can be a program name with args.
10186set dummy $tool_basename; ac_word=$2
10187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10188$as_echo_n "checking for $ac_word... " >&6; }
10189if ${ac_cv_path_PRINTF+:} false; then :
10190  $as_echo_n "(cached) " >&6
10191else
10192  case $PRINTF in
10193  [\\/]* | ?:[\\/]*)
10194  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10195  ;;
10196  *)
10197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10198for as_dir in $PATH
10199do
10200  IFS=$as_save_IFS
10201  test -z "$as_dir" && as_dir=.
10202    for ac_exec_ext in '' $ac_executable_extensions; do
10203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10204    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10206    break 2
10207  fi
10208done
10209  done
10210IFS=$as_save_IFS
10211
10212  ;;
10213esac
10214fi
10215PRINTF=$ac_cv_path_PRINTF
10216if test -n "$PRINTF"; then
10217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10218$as_echo "$PRINTF" >&6; }
10219else
10220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10221$as_echo "no" >&6; }
10222fi
10223
10224
10225          if test "x$PRINTF" = x; then
10226            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10227          fi
10228        else
10229          # Otherwise we believe it is a complete path. Use it as it is.
10230          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10231$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10232          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10233$as_echo_n "checking for PRINTF... " >&6; }
10234          if test ! -x "$tool_specified"; then
10235            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10236$as_echo "not found" >&6; }
10237            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10238          fi
10239          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10240$as_echo "$tool_specified" >&6; }
10241        fi
10242      fi
10243    fi
10244
10245  fi
10246
10247
10248
10249  if test "x$PRINTF" = x; then
10250    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10251  fi
10252
10253
10254
10255
10256
10257  # Publish this variable in the help.
10258
10259
10260  if [ -z "${RM+x}" ]; then
10261    # The variable is not set by user, try to locate tool using the code snippet
10262    for ac_prog in rm
10263do
10264  # Extract the first word of "$ac_prog", so it can be a program name with args.
10265set dummy $ac_prog; ac_word=$2
10266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10267$as_echo_n "checking for $ac_word... " >&6; }
10268if ${ac_cv_path_RM+:} false; then :
10269  $as_echo_n "(cached) " >&6
10270else
10271  case $RM in
10272  [\\/]* | ?:[\\/]*)
10273  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10274  ;;
10275  *)
10276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10277for as_dir in $PATH
10278do
10279  IFS=$as_save_IFS
10280  test -z "$as_dir" && as_dir=.
10281    for ac_exec_ext in '' $ac_executable_extensions; do
10282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10283    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10285    break 2
10286  fi
10287done
10288  done
10289IFS=$as_save_IFS
10290
10291  ;;
10292esac
10293fi
10294RM=$ac_cv_path_RM
10295if test -n "$RM"; then
10296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10297$as_echo "$RM" >&6; }
10298else
10299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10300$as_echo "no" >&6; }
10301fi
10302
10303
10304  test -n "$RM" && break
10305done
10306
10307  else
10308    # The variable is set, but is it from the command line or the environment?
10309
10310    # Try to remove the string !RM! from our list.
10311    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10312    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10313      # If it failed, the variable was not from the command line. Ignore it,
10314      # but warn the user (except for BASH, which is always set by the calling BASH).
10315      if test "xRM" != xBASH; then
10316        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10317$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10318      fi
10319      # Try to locate tool using the code snippet
10320      for ac_prog in rm
10321do
10322  # Extract the first word of "$ac_prog", so it can be a program name with args.
10323set dummy $ac_prog; ac_word=$2
10324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10325$as_echo_n "checking for $ac_word... " >&6; }
10326if ${ac_cv_path_RM+:} false; then :
10327  $as_echo_n "(cached) " >&6
10328else
10329  case $RM in
10330  [\\/]* | ?:[\\/]*)
10331  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10332  ;;
10333  *)
10334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10335for as_dir in $PATH
10336do
10337  IFS=$as_save_IFS
10338  test -z "$as_dir" && as_dir=.
10339    for ac_exec_ext in '' $ac_executable_extensions; do
10340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10341    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10343    break 2
10344  fi
10345done
10346  done
10347IFS=$as_save_IFS
10348
10349  ;;
10350esac
10351fi
10352RM=$ac_cv_path_RM
10353if test -n "$RM"; then
10354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10355$as_echo "$RM" >&6; }
10356else
10357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10358$as_echo "no" >&6; }
10359fi
10360
10361
10362  test -n "$RM" && break
10363done
10364
10365    else
10366      # If it succeeded, then it was overridden by the user. We will use it
10367      # for the tool.
10368
10369      # First remove it from the list of overridden variables, so we can test
10370      # for unknown variables in the end.
10371      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10372
10373      # Check if we try to supply an empty value
10374      if test "x$RM" = x; then
10375        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10376$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10377        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10378$as_echo_n "checking for RM... " >&6; }
10379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10380$as_echo "disabled" >&6; }
10381      else
10382        # Check if the provided tool contains a complete path.
10383        tool_specified="$RM"
10384        tool_basename="${tool_specified##*/}"
10385        if test "x$tool_basename" = "x$tool_specified"; then
10386          # A command without a complete path is provided, search $PATH.
10387          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10388$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10389          # Extract the first word of "$tool_basename", so it can be a program name with args.
10390set dummy $tool_basename; ac_word=$2
10391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10392$as_echo_n "checking for $ac_word... " >&6; }
10393if ${ac_cv_path_RM+:} false; then :
10394  $as_echo_n "(cached) " >&6
10395else
10396  case $RM in
10397  [\\/]* | ?:[\\/]*)
10398  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10399  ;;
10400  *)
10401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10402for as_dir in $PATH
10403do
10404  IFS=$as_save_IFS
10405  test -z "$as_dir" && as_dir=.
10406    for ac_exec_ext in '' $ac_executable_extensions; do
10407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10408    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10410    break 2
10411  fi
10412done
10413  done
10414IFS=$as_save_IFS
10415
10416  ;;
10417esac
10418fi
10419RM=$ac_cv_path_RM
10420if test -n "$RM"; then
10421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10422$as_echo "$RM" >&6; }
10423else
10424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10425$as_echo "no" >&6; }
10426fi
10427
10428
10429          if test "x$RM" = x; then
10430            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10431          fi
10432        else
10433          # Otherwise we believe it is a complete path. Use it as it is.
10434          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10435$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10436          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10437$as_echo_n "checking for RM... " >&6; }
10438          if test ! -x "$tool_specified"; then
10439            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10440$as_echo "not found" >&6; }
10441            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10442          fi
10443          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10444$as_echo "$tool_specified" >&6; }
10445        fi
10446      fi
10447    fi
10448
10449  fi
10450
10451
10452
10453  if test "x$RM" = x; then
10454    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10455  fi
10456
10457
10458
10459
10460
10461  # Publish this variable in the help.
10462
10463
10464  if [ -z "${RMDIR+x}" ]; then
10465    # The variable is not set by user, try to locate tool using the code snippet
10466    for ac_prog in rmdir
10467do
10468  # Extract the first word of "$ac_prog", so it can be a program name with args.
10469set dummy $ac_prog; ac_word=$2
10470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10471$as_echo_n "checking for $ac_word... " >&6; }
10472if ${ac_cv_path_RMDIR+:} false; then :
10473  $as_echo_n "(cached) " >&6
10474else
10475  case $RMDIR in
10476  [\\/]* | ?:[\\/]*)
10477  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10478  ;;
10479  *)
10480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10481for as_dir in $PATH
10482do
10483  IFS=$as_save_IFS
10484  test -z "$as_dir" && as_dir=.
10485    for ac_exec_ext in '' $ac_executable_extensions; do
10486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10487    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10489    break 2
10490  fi
10491done
10492  done
10493IFS=$as_save_IFS
10494
10495  ;;
10496esac
10497fi
10498RMDIR=$ac_cv_path_RMDIR
10499if test -n "$RMDIR"; then
10500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10501$as_echo "$RMDIR" >&6; }
10502else
10503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10504$as_echo "no" >&6; }
10505fi
10506
10507
10508  test -n "$RMDIR" && break
10509done
10510
10511  else
10512    # The variable is set, but is it from the command line or the environment?
10513
10514    # Try to remove the string !RMDIR! from our list.
10515    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10516    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10517      # If it failed, the variable was not from the command line. Ignore it,
10518      # but warn the user (except for BASH, which is always set by the calling BASH).
10519      if test "xRMDIR" != xBASH; then
10520        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10521$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10522      fi
10523      # Try to locate tool using the code snippet
10524      for ac_prog in rmdir
10525do
10526  # Extract the first word of "$ac_prog", so it can be a program name with args.
10527set dummy $ac_prog; ac_word=$2
10528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10529$as_echo_n "checking for $ac_word... " >&6; }
10530if ${ac_cv_path_RMDIR+:} false; then :
10531  $as_echo_n "(cached) " >&6
10532else
10533  case $RMDIR in
10534  [\\/]* | ?:[\\/]*)
10535  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10536  ;;
10537  *)
10538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10539for as_dir in $PATH
10540do
10541  IFS=$as_save_IFS
10542  test -z "$as_dir" && as_dir=.
10543    for ac_exec_ext in '' $ac_executable_extensions; do
10544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10545    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10547    break 2
10548  fi
10549done
10550  done
10551IFS=$as_save_IFS
10552
10553  ;;
10554esac
10555fi
10556RMDIR=$ac_cv_path_RMDIR
10557if test -n "$RMDIR"; then
10558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10559$as_echo "$RMDIR" >&6; }
10560else
10561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10562$as_echo "no" >&6; }
10563fi
10564
10565
10566  test -n "$RMDIR" && break
10567done
10568
10569    else
10570      # If it succeeded, then it was overridden by the user. We will use it
10571      # for the tool.
10572
10573      # First remove it from the list of overridden variables, so we can test
10574      # for unknown variables in the end.
10575      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10576
10577      # Check if we try to supply an empty value
10578      if test "x$RMDIR" = x; then
10579        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10580$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10581        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10582$as_echo_n "checking for RMDIR... " >&6; }
10583        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10584$as_echo "disabled" >&6; }
10585      else
10586        # Check if the provided tool contains a complete path.
10587        tool_specified="$RMDIR"
10588        tool_basename="${tool_specified##*/}"
10589        if test "x$tool_basename" = "x$tool_specified"; then
10590          # A command without a complete path is provided, search $PATH.
10591          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10592$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10593          # Extract the first word of "$tool_basename", so it can be a program name with args.
10594set dummy $tool_basename; ac_word=$2
10595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10596$as_echo_n "checking for $ac_word... " >&6; }
10597if ${ac_cv_path_RMDIR+:} false; then :
10598  $as_echo_n "(cached) " >&6
10599else
10600  case $RMDIR in
10601  [\\/]* | ?:[\\/]*)
10602  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10603  ;;
10604  *)
10605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10606for as_dir in $PATH
10607do
10608  IFS=$as_save_IFS
10609  test -z "$as_dir" && as_dir=.
10610    for ac_exec_ext in '' $ac_executable_extensions; do
10611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10612    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10614    break 2
10615  fi
10616done
10617  done
10618IFS=$as_save_IFS
10619
10620  ;;
10621esac
10622fi
10623RMDIR=$ac_cv_path_RMDIR
10624if test -n "$RMDIR"; then
10625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10626$as_echo "$RMDIR" >&6; }
10627else
10628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10629$as_echo "no" >&6; }
10630fi
10631
10632
10633          if test "x$RMDIR" = x; then
10634            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10635          fi
10636        else
10637          # Otherwise we believe it is a complete path. Use it as it is.
10638          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10639$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10640          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10641$as_echo_n "checking for RMDIR... " >&6; }
10642          if test ! -x "$tool_specified"; then
10643            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10644$as_echo "not found" >&6; }
10645            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10646          fi
10647          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10648$as_echo "$tool_specified" >&6; }
10649        fi
10650      fi
10651    fi
10652
10653  fi
10654
10655
10656
10657  if test "x$RMDIR" = x; then
10658    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10659  fi
10660
10661
10662
10663
10664
10665  # Publish this variable in the help.
10666
10667
10668  if [ -z "${SH+x}" ]; then
10669    # The variable is not set by user, try to locate tool using the code snippet
10670    for ac_prog in sh
10671do
10672  # Extract the first word of "$ac_prog", so it can be a program name with args.
10673set dummy $ac_prog; ac_word=$2
10674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10675$as_echo_n "checking for $ac_word... " >&6; }
10676if ${ac_cv_path_SH+:} false; then :
10677  $as_echo_n "(cached) " >&6
10678else
10679  case $SH in
10680  [\\/]* | ?:[\\/]*)
10681  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10682  ;;
10683  *)
10684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10685for as_dir in $PATH
10686do
10687  IFS=$as_save_IFS
10688  test -z "$as_dir" && as_dir=.
10689    for ac_exec_ext in '' $ac_executable_extensions; do
10690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10691    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10693    break 2
10694  fi
10695done
10696  done
10697IFS=$as_save_IFS
10698
10699  ;;
10700esac
10701fi
10702SH=$ac_cv_path_SH
10703if test -n "$SH"; then
10704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10705$as_echo "$SH" >&6; }
10706else
10707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10708$as_echo "no" >&6; }
10709fi
10710
10711
10712  test -n "$SH" && break
10713done
10714
10715  else
10716    # The variable is set, but is it from the command line or the environment?
10717
10718    # Try to remove the string !SH! from our list.
10719    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10720    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10721      # If it failed, the variable was not from the command line. Ignore it,
10722      # but warn the user (except for BASH, which is always set by the calling BASH).
10723      if test "xSH" != xBASH; then
10724        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10725$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10726      fi
10727      # Try to locate tool using the code snippet
10728      for ac_prog in sh
10729do
10730  # Extract the first word of "$ac_prog", so it can be a program name with args.
10731set dummy $ac_prog; ac_word=$2
10732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10733$as_echo_n "checking for $ac_word... " >&6; }
10734if ${ac_cv_path_SH+:} false; then :
10735  $as_echo_n "(cached) " >&6
10736else
10737  case $SH in
10738  [\\/]* | ?:[\\/]*)
10739  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10740  ;;
10741  *)
10742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10743for as_dir in $PATH
10744do
10745  IFS=$as_save_IFS
10746  test -z "$as_dir" && as_dir=.
10747    for ac_exec_ext in '' $ac_executable_extensions; do
10748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10749    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10751    break 2
10752  fi
10753done
10754  done
10755IFS=$as_save_IFS
10756
10757  ;;
10758esac
10759fi
10760SH=$ac_cv_path_SH
10761if test -n "$SH"; then
10762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10763$as_echo "$SH" >&6; }
10764else
10765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10766$as_echo "no" >&6; }
10767fi
10768
10769
10770  test -n "$SH" && break
10771done
10772
10773    else
10774      # If it succeeded, then it was overridden by the user. We will use it
10775      # for the tool.
10776
10777      # First remove it from the list of overridden variables, so we can test
10778      # for unknown variables in the end.
10779      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10780
10781      # Check if we try to supply an empty value
10782      if test "x$SH" = x; then
10783        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10784$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10785        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10786$as_echo_n "checking for SH... " >&6; }
10787        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10788$as_echo "disabled" >&6; }
10789      else
10790        # Check if the provided tool contains a complete path.
10791        tool_specified="$SH"
10792        tool_basename="${tool_specified##*/}"
10793        if test "x$tool_basename" = "x$tool_specified"; then
10794          # A command without a complete path is provided, search $PATH.
10795          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10796$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10797          # Extract the first word of "$tool_basename", so it can be a program name with args.
10798set dummy $tool_basename; ac_word=$2
10799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10800$as_echo_n "checking for $ac_word... " >&6; }
10801if ${ac_cv_path_SH+:} false; then :
10802  $as_echo_n "(cached) " >&6
10803else
10804  case $SH in
10805  [\\/]* | ?:[\\/]*)
10806  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10807  ;;
10808  *)
10809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10810for as_dir in $PATH
10811do
10812  IFS=$as_save_IFS
10813  test -z "$as_dir" && as_dir=.
10814    for ac_exec_ext in '' $ac_executable_extensions; do
10815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10816    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10818    break 2
10819  fi
10820done
10821  done
10822IFS=$as_save_IFS
10823
10824  ;;
10825esac
10826fi
10827SH=$ac_cv_path_SH
10828if test -n "$SH"; then
10829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10830$as_echo "$SH" >&6; }
10831else
10832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10833$as_echo "no" >&6; }
10834fi
10835
10836
10837          if test "x$SH" = x; then
10838            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10839          fi
10840        else
10841          # Otherwise we believe it is a complete path. Use it as it is.
10842          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10843$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10844          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10845$as_echo_n "checking for SH... " >&6; }
10846          if test ! -x "$tool_specified"; then
10847            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10848$as_echo "not found" >&6; }
10849            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10850          fi
10851          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10852$as_echo "$tool_specified" >&6; }
10853        fi
10854      fi
10855    fi
10856
10857  fi
10858
10859
10860
10861  if test "x$SH" = x; then
10862    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10863  fi
10864
10865
10866
10867
10868
10869  # Publish this variable in the help.
10870
10871
10872  if [ -z "${SORT+x}" ]; then
10873    # The variable is not set by user, try to locate tool using the code snippet
10874    for ac_prog in sort
10875do
10876  # Extract the first word of "$ac_prog", so it can be a program name with args.
10877set dummy $ac_prog; ac_word=$2
10878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10879$as_echo_n "checking for $ac_word... " >&6; }
10880if ${ac_cv_path_SORT+:} false; then :
10881  $as_echo_n "(cached) " >&6
10882else
10883  case $SORT in
10884  [\\/]* | ?:[\\/]*)
10885  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10886  ;;
10887  *)
10888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10889for as_dir in $PATH
10890do
10891  IFS=$as_save_IFS
10892  test -z "$as_dir" && as_dir=.
10893    for ac_exec_ext in '' $ac_executable_extensions; do
10894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10895    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10897    break 2
10898  fi
10899done
10900  done
10901IFS=$as_save_IFS
10902
10903  ;;
10904esac
10905fi
10906SORT=$ac_cv_path_SORT
10907if test -n "$SORT"; then
10908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10909$as_echo "$SORT" >&6; }
10910else
10911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10912$as_echo "no" >&6; }
10913fi
10914
10915
10916  test -n "$SORT" && break
10917done
10918
10919  else
10920    # The variable is set, but is it from the command line or the environment?
10921
10922    # Try to remove the string !SORT! from our list.
10923    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10924    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10925      # If it failed, the variable was not from the command line. Ignore it,
10926      # but warn the user (except for BASH, which is always set by the calling BASH).
10927      if test "xSORT" != xBASH; then
10928        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10929$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10930      fi
10931      # Try to locate tool using the code snippet
10932      for ac_prog in sort
10933do
10934  # Extract the first word of "$ac_prog", so it can be a program name with args.
10935set dummy $ac_prog; ac_word=$2
10936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10937$as_echo_n "checking for $ac_word... " >&6; }
10938if ${ac_cv_path_SORT+:} false; then :
10939  $as_echo_n "(cached) " >&6
10940else
10941  case $SORT in
10942  [\\/]* | ?:[\\/]*)
10943  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10944  ;;
10945  *)
10946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10947for as_dir in $PATH
10948do
10949  IFS=$as_save_IFS
10950  test -z "$as_dir" && as_dir=.
10951    for ac_exec_ext in '' $ac_executable_extensions; do
10952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10953    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10955    break 2
10956  fi
10957done
10958  done
10959IFS=$as_save_IFS
10960
10961  ;;
10962esac
10963fi
10964SORT=$ac_cv_path_SORT
10965if test -n "$SORT"; then
10966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10967$as_echo "$SORT" >&6; }
10968else
10969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10970$as_echo "no" >&6; }
10971fi
10972
10973
10974  test -n "$SORT" && break
10975done
10976
10977    else
10978      # If it succeeded, then it was overridden by the user. We will use it
10979      # for the tool.
10980
10981      # First remove it from the list of overridden variables, so we can test
10982      # for unknown variables in the end.
10983      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10984
10985      # Check if we try to supply an empty value
10986      if test "x$SORT" = x; then
10987        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10988$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10989        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10990$as_echo_n "checking for SORT... " >&6; }
10991        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10992$as_echo "disabled" >&6; }
10993      else
10994        # Check if the provided tool contains a complete path.
10995        tool_specified="$SORT"
10996        tool_basename="${tool_specified##*/}"
10997        if test "x$tool_basename" = "x$tool_specified"; then
10998          # A command without a complete path is provided, search $PATH.
10999          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11000$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11001          # Extract the first word of "$tool_basename", so it can be a program name with args.
11002set dummy $tool_basename; ac_word=$2
11003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11004$as_echo_n "checking for $ac_word... " >&6; }
11005if ${ac_cv_path_SORT+:} false; then :
11006  $as_echo_n "(cached) " >&6
11007else
11008  case $SORT in
11009  [\\/]* | ?:[\\/]*)
11010  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11011  ;;
11012  *)
11013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11014for as_dir in $PATH
11015do
11016  IFS=$as_save_IFS
11017  test -z "$as_dir" && as_dir=.
11018    for ac_exec_ext in '' $ac_executable_extensions; do
11019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11020    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11022    break 2
11023  fi
11024done
11025  done
11026IFS=$as_save_IFS
11027
11028  ;;
11029esac
11030fi
11031SORT=$ac_cv_path_SORT
11032if test -n "$SORT"; then
11033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11034$as_echo "$SORT" >&6; }
11035else
11036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11037$as_echo "no" >&6; }
11038fi
11039
11040
11041          if test "x$SORT" = x; then
11042            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11043          fi
11044        else
11045          # Otherwise we believe it is a complete path. Use it as it is.
11046          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11047$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11048          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11049$as_echo_n "checking for SORT... " >&6; }
11050          if test ! -x "$tool_specified"; then
11051            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11052$as_echo "not found" >&6; }
11053            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11054          fi
11055          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11056$as_echo "$tool_specified" >&6; }
11057        fi
11058      fi
11059    fi
11060
11061  fi
11062
11063
11064
11065  if test "x$SORT" = x; then
11066    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11067  fi
11068
11069
11070
11071
11072
11073  # Publish this variable in the help.
11074
11075
11076  if [ -z "${TAIL+x}" ]; then
11077    # The variable is not set by user, try to locate tool using the code snippet
11078    for ac_prog in tail
11079do
11080  # Extract the first word of "$ac_prog", so it can be a program name with args.
11081set dummy $ac_prog; ac_word=$2
11082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11083$as_echo_n "checking for $ac_word... " >&6; }
11084if ${ac_cv_path_TAIL+:} false; then :
11085  $as_echo_n "(cached) " >&6
11086else
11087  case $TAIL in
11088  [\\/]* | ?:[\\/]*)
11089  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11090  ;;
11091  *)
11092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11093for as_dir in $PATH
11094do
11095  IFS=$as_save_IFS
11096  test -z "$as_dir" && as_dir=.
11097    for ac_exec_ext in '' $ac_executable_extensions; do
11098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11099    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11101    break 2
11102  fi
11103done
11104  done
11105IFS=$as_save_IFS
11106
11107  ;;
11108esac
11109fi
11110TAIL=$ac_cv_path_TAIL
11111if test -n "$TAIL"; then
11112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11113$as_echo "$TAIL" >&6; }
11114else
11115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11116$as_echo "no" >&6; }
11117fi
11118
11119
11120  test -n "$TAIL" && break
11121done
11122
11123  else
11124    # The variable is set, but is it from the command line or the environment?
11125
11126    # Try to remove the string !TAIL! from our list.
11127    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11128    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11129      # If it failed, the variable was not from the command line. Ignore it,
11130      # but warn the user (except for BASH, which is always set by the calling BASH).
11131      if test "xTAIL" != xBASH; then
11132        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11133$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11134      fi
11135      # Try to locate tool using the code snippet
11136      for ac_prog in tail
11137do
11138  # Extract the first word of "$ac_prog", so it can be a program name with args.
11139set dummy $ac_prog; ac_word=$2
11140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11141$as_echo_n "checking for $ac_word... " >&6; }
11142if ${ac_cv_path_TAIL+:} false; then :
11143  $as_echo_n "(cached) " >&6
11144else
11145  case $TAIL in
11146  [\\/]* | ?:[\\/]*)
11147  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11148  ;;
11149  *)
11150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11151for as_dir in $PATH
11152do
11153  IFS=$as_save_IFS
11154  test -z "$as_dir" && as_dir=.
11155    for ac_exec_ext in '' $ac_executable_extensions; do
11156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11157    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11159    break 2
11160  fi
11161done
11162  done
11163IFS=$as_save_IFS
11164
11165  ;;
11166esac
11167fi
11168TAIL=$ac_cv_path_TAIL
11169if test -n "$TAIL"; then
11170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11171$as_echo "$TAIL" >&6; }
11172else
11173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11174$as_echo "no" >&6; }
11175fi
11176
11177
11178  test -n "$TAIL" && break
11179done
11180
11181    else
11182      # If it succeeded, then it was overridden by the user. We will use it
11183      # for the tool.
11184
11185      # First remove it from the list of overridden variables, so we can test
11186      # for unknown variables in the end.
11187      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11188
11189      # Check if we try to supply an empty value
11190      if test "x$TAIL" = x; then
11191        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11192$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11193        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11194$as_echo_n "checking for TAIL... " >&6; }
11195        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11196$as_echo "disabled" >&6; }
11197      else
11198        # Check if the provided tool contains a complete path.
11199        tool_specified="$TAIL"
11200        tool_basename="${tool_specified##*/}"
11201        if test "x$tool_basename" = "x$tool_specified"; then
11202          # A command without a complete path is provided, search $PATH.
11203          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11204$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11205          # Extract the first word of "$tool_basename", so it can be a program name with args.
11206set dummy $tool_basename; ac_word=$2
11207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11208$as_echo_n "checking for $ac_word... " >&6; }
11209if ${ac_cv_path_TAIL+:} false; then :
11210  $as_echo_n "(cached) " >&6
11211else
11212  case $TAIL in
11213  [\\/]* | ?:[\\/]*)
11214  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11215  ;;
11216  *)
11217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11218for as_dir in $PATH
11219do
11220  IFS=$as_save_IFS
11221  test -z "$as_dir" && as_dir=.
11222    for ac_exec_ext in '' $ac_executable_extensions; do
11223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11224    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11226    break 2
11227  fi
11228done
11229  done
11230IFS=$as_save_IFS
11231
11232  ;;
11233esac
11234fi
11235TAIL=$ac_cv_path_TAIL
11236if test -n "$TAIL"; then
11237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11238$as_echo "$TAIL" >&6; }
11239else
11240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11241$as_echo "no" >&6; }
11242fi
11243
11244
11245          if test "x$TAIL" = x; then
11246            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11247          fi
11248        else
11249          # Otherwise we believe it is a complete path. Use it as it is.
11250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11251$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11252          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11253$as_echo_n "checking for TAIL... " >&6; }
11254          if test ! -x "$tool_specified"; then
11255            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11256$as_echo "not found" >&6; }
11257            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11258          fi
11259          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11260$as_echo "$tool_specified" >&6; }
11261        fi
11262      fi
11263    fi
11264
11265  fi
11266
11267
11268
11269  if test "x$TAIL" = x; then
11270    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11271  fi
11272
11273
11274
11275
11276
11277  # Publish this variable in the help.
11278
11279
11280  if [ -z "${TAR+x}" ]; then
11281    # The variable is not set by user, try to locate tool using the code snippet
11282    for ac_prog in gtar tar
11283do
11284  # Extract the first word of "$ac_prog", so it can be a program name with args.
11285set dummy $ac_prog; ac_word=$2
11286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11287$as_echo_n "checking for $ac_word... " >&6; }
11288if ${ac_cv_path_TAR+:} false; then :
11289  $as_echo_n "(cached) " >&6
11290else
11291  case $TAR in
11292  [\\/]* | ?:[\\/]*)
11293  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11294  ;;
11295  *)
11296  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11297for as_dir in $PATH
11298do
11299  IFS=$as_save_IFS
11300  test -z "$as_dir" && as_dir=.
11301    for ac_exec_ext in '' $ac_executable_extensions; do
11302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11303    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11305    break 2
11306  fi
11307done
11308  done
11309IFS=$as_save_IFS
11310
11311  ;;
11312esac
11313fi
11314TAR=$ac_cv_path_TAR
11315if test -n "$TAR"; then
11316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11317$as_echo "$TAR" >&6; }
11318else
11319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11320$as_echo "no" >&6; }
11321fi
11322
11323
11324  test -n "$TAR" && break
11325done
11326
11327  else
11328    # The variable is set, but is it from the command line or the environment?
11329
11330    # Try to remove the string !TAR! from our list.
11331    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11332    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11333      # If it failed, the variable was not from the command line. Ignore it,
11334      # but warn the user (except for BASH, which is always set by the calling BASH).
11335      if test "xTAR" != xBASH; then
11336        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11337$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11338      fi
11339      # Try to locate tool using the code snippet
11340      for ac_prog in gtar tar
11341do
11342  # Extract the first word of "$ac_prog", so it can be a program name with args.
11343set dummy $ac_prog; ac_word=$2
11344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11345$as_echo_n "checking for $ac_word... " >&6; }
11346if ${ac_cv_path_TAR+:} false; then :
11347  $as_echo_n "(cached) " >&6
11348else
11349  case $TAR in
11350  [\\/]* | ?:[\\/]*)
11351  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11352  ;;
11353  *)
11354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11355for as_dir in $PATH
11356do
11357  IFS=$as_save_IFS
11358  test -z "$as_dir" && as_dir=.
11359    for ac_exec_ext in '' $ac_executable_extensions; do
11360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11361    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11363    break 2
11364  fi
11365done
11366  done
11367IFS=$as_save_IFS
11368
11369  ;;
11370esac
11371fi
11372TAR=$ac_cv_path_TAR
11373if test -n "$TAR"; then
11374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11375$as_echo "$TAR" >&6; }
11376else
11377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11378$as_echo "no" >&6; }
11379fi
11380
11381
11382  test -n "$TAR" && break
11383done
11384
11385    else
11386      # If it succeeded, then it was overridden by the user. We will use it
11387      # for the tool.
11388
11389      # First remove it from the list of overridden variables, so we can test
11390      # for unknown variables in the end.
11391      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11392
11393      # Check if we try to supply an empty value
11394      if test "x$TAR" = x; then
11395        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11396$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11397        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11398$as_echo_n "checking for TAR... " >&6; }
11399        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11400$as_echo "disabled" >&6; }
11401      else
11402        # Check if the provided tool contains a complete path.
11403        tool_specified="$TAR"
11404        tool_basename="${tool_specified##*/}"
11405        if test "x$tool_basename" = "x$tool_specified"; then
11406          # A command without a complete path is provided, search $PATH.
11407          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11408$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11409          # Extract the first word of "$tool_basename", so it can be a program name with args.
11410set dummy $tool_basename; ac_word=$2
11411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11412$as_echo_n "checking for $ac_word... " >&6; }
11413if ${ac_cv_path_TAR+:} false; then :
11414  $as_echo_n "(cached) " >&6
11415else
11416  case $TAR in
11417  [\\/]* | ?:[\\/]*)
11418  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11419  ;;
11420  *)
11421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11422for as_dir in $PATH
11423do
11424  IFS=$as_save_IFS
11425  test -z "$as_dir" && as_dir=.
11426    for ac_exec_ext in '' $ac_executable_extensions; do
11427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11428    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11430    break 2
11431  fi
11432done
11433  done
11434IFS=$as_save_IFS
11435
11436  ;;
11437esac
11438fi
11439TAR=$ac_cv_path_TAR
11440if test -n "$TAR"; then
11441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11442$as_echo "$TAR" >&6; }
11443else
11444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11445$as_echo "no" >&6; }
11446fi
11447
11448
11449          if test "x$TAR" = x; then
11450            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11451          fi
11452        else
11453          # Otherwise we believe it is a complete path. Use it as it is.
11454          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11455$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11456          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11457$as_echo_n "checking for TAR... " >&6; }
11458          if test ! -x "$tool_specified"; then
11459            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11460$as_echo "not found" >&6; }
11461            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11462          fi
11463          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11464$as_echo "$tool_specified" >&6; }
11465        fi
11466      fi
11467    fi
11468
11469  fi
11470
11471
11472
11473  if test "x$TAR" = x; then
11474    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11475  fi
11476
11477
11478
11479
11480
11481  # Publish this variable in the help.
11482
11483
11484  if [ -z "${TEE+x}" ]; then
11485    # The variable is not set by user, try to locate tool using the code snippet
11486    for ac_prog in tee
11487do
11488  # Extract the first word of "$ac_prog", so it can be a program name with args.
11489set dummy $ac_prog; ac_word=$2
11490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11491$as_echo_n "checking for $ac_word... " >&6; }
11492if ${ac_cv_path_TEE+:} false; then :
11493  $as_echo_n "(cached) " >&6
11494else
11495  case $TEE in
11496  [\\/]* | ?:[\\/]*)
11497  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11498  ;;
11499  *)
11500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11501for as_dir in $PATH
11502do
11503  IFS=$as_save_IFS
11504  test -z "$as_dir" && as_dir=.
11505    for ac_exec_ext in '' $ac_executable_extensions; do
11506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11507    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11509    break 2
11510  fi
11511done
11512  done
11513IFS=$as_save_IFS
11514
11515  ;;
11516esac
11517fi
11518TEE=$ac_cv_path_TEE
11519if test -n "$TEE"; then
11520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11521$as_echo "$TEE" >&6; }
11522else
11523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11524$as_echo "no" >&6; }
11525fi
11526
11527
11528  test -n "$TEE" && break
11529done
11530
11531  else
11532    # The variable is set, but is it from the command line or the environment?
11533
11534    # Try to remove the string !TEE! from our list.
11535    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11536    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11537      # If it failed, the variable was not from the command line. Ignore it,
11538      # but warn the user (except for BASH, which is always set by the calling BASH).
11539      if test "xTEE" != xBASH; then
11540        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11541$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11542      fi
11543      # Try to locate tool using the code snippet
11544      for ac_prog in tee
11545do
11546  # Extract the first word of "$ac_prog", so it can be a program name with args.
11547set dummy $ac_prog; ac_word=$2
11548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11549$as_echo_n "checking for $ac_word... " >&6; }
11550if ${ac_cv_path_TEE+:} false; then :
11551  $as_echo_n "(cached) " >&6
11552else
11553  case $TEE in
11554  [\\/]* | ?:[\\/]*)
11555  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11556  ;;
11557  *)
11558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11559for as_dir in $PATH
11560do
11561  IFS=$as_save_IFS
11562  test -z "$as_dir" && as_dir=.
11563    for ac_exec_ext in '' $ac_executable_extensions; do
11564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11565    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11567    break 2
11568  fi
11569done
11570  done
11571IFS=$as_save_IFS
11572
11573  ;;
11574esac
11575fi
11576TEE=$ac_cv_path_TEE
11577if test -n "$TEE"; then
11578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11579$as_echo "$TEE" >&6; }
11580else
11581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11582$as_echo "no" >&6; }
11583fi
11584
11585
11586  test -n "$TEE" && break
11587done
11588
11589    else
11590      # If it succeeded, then it was overridden by the user. We will use it
11591      # for the tool.
11592
11593      # First remove it from the list of overridden variables, so we can test
11594      # for unknown variables in the end.
11595      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11596
11597      # Check if we try to supply an empty value
11598      if test "x$TEE" = x; then
11599        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11600$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11601        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11602$as_echo_n "checking for TEE... " >&6; }
11603        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11604$as_echo "disabled" >&6; }
11605      else
11606        # Check if the provided tool contains a complete path.
11607        tool_specified="$TEE"
11608        tool_basename="${tool_specified##*/}"
11609        if test "x$tool_basename" = "x$tool_specified"; then
11610          # A command without a complete path is provided, search $PATH.
11611          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11612$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11613          # Extract the first word of "$tool_basename", so it can be a program name with args.
11614set dummy $tool_basename; ac_word=$2
11615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11616$as_echo_n "checking for $ac_word... " >&6; }
11617if ${ac_cv_path_TEE+:} false; then :
11618  $as_echo_n "(cached) " >&6
11619else
11620  case $TEE in
11621  [\\/]* | ?:[\\/]*)
11622  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11623  ;;
11624  *)
11625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11626for as_dir in $PATH
11627do
11628  IFS=$as_save_IFS
11629  test -z "$as_dir" && as_dir=.
11630    for ac_exec_ext in '' $ac_executable_extensions; do
11631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11632    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11634    break 2
11635  fi
11636done
11637  done
11638IFS=$as_save_IFS
11639
11640  ;;
11641esac
11642fi
11643TEE=$ac_cv_path_TEE
11644if test -n "$TEE"; then
11645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11646$as_echo "$TEE" >&6; }
11647else
11648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11649$as_echo "no" >&6; }
11650fi
11651
11652
11653          if test "x$TEE" = x; then
11654            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11655          fi
11656        else
11657          # Otherwise we believe it is a complete path. Use it as it is.
11658          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11659$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11660          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11661$as_echo_n "checking for TEE... " >&6; }
11662          if test ! -x "$tool_specified"; then
11663            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11664$as_echo "not found" >&6; }
11665            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11666          fi
11667          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11668$as_echo "$tool_specified" >&6; }
11669        fi
11670      fi
11671    fi
11672
11673  fi
11674
11675
11676
11677  if test "x$TEE" = x; then
11678    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11679  fi
11680
11681
11682
11683
11684
11685  # Publish this variable in the help.
11686
11687
11688  if [ -z "${TOUCH+x}" ]; then
11689    # The variable is not set by user, try to locate tool using the code snippet
11690    for ac_prog in touch
11691do
11692  # Extract the first word of "$ac_prog", so it can be a program name with args.
11693set dummy $ac_prog; ac_word=$2
11694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11695$as_echo_n "checking for $ac_word... " >&6; }
11696if ${ac_cv_path_TOUCH+:} false; then :
11697  $as_echo_n "(cached) " >&6
11698else
11699  case $TOUCH in
11700  [\\/]* | ?:[\\/]*)
11701  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11702  ;;
11703  *)
11704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11705for as_dir in $PATH
11706do
11707  IFS=$as_save_IFS
11708  test -z "$as_dir" && as_dir=.
11709    for ac_exec_ext in '' $ac_executable_extensions; do
11710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11711    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11713    break 2
11714  fi
11715done
11716  done
11717IFS=$as_save_IFS
11718
11719  ;;
11720esac
11721fi
11722TOUCH=$ac_cv_path_TOUCH
11723if test -n "$TOUCH"; then
11724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11725$as_echo "$TOUCH" >&6; }
11726else
11727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11728$as_echo "no" >&6; }
11729fi
11730
11731
11732  test -n "$TOUCH" && break
11733done
11734
11735  else
11736    # The variable is set, but is it from the command line or the environment?
11737
11738    # Try to remove the string !TOUCH! from our list.
11739    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11740    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11741      # If it failed, the variable was not from the command line. Ignore it,
11742      # but warn the user (except for BASH, which is always set by the calling BASH).
11743      if test "xTOUCH" != xBASH; then
11744        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11745$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11746      fi
11747      # Try to locate tool using the code snippet
11748      for ac_prog in touch
11749do
11750  # Extract the first word of "$ac_prog", so it can be a program name with args.
11751set dummy $ac_prog; ac_word=$2
11752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11753$as_echo_n "checking for $ac_word... " >&6; }
11754if ${ac_cv_path_TOUCH+:} false; then :
11755  $as_echo_n "(cached) " >&6
11756else
11757  case $TOUCH in
11758  [\\/]* | ?:[\\/]*)
11759  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11760  ;;
11761  *)
11762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11763for as_dir in $PATH
11764do
11765  IFS=$as_save_IFS
11766  test -z "$as_dir" && as_dir=.
11767    for ac_exec_ext in '' $ac_executable_extensions; do
11768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11769    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11771    break 2
11772  fi
11773done
11774  done
11775IFS=$as_save_IFS
11776
11777  ;;
11778esac
11779fi
11780TOUCH=$ac_cv_path_TOUCH
11781if test -n "$TOUCH"; then
11782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11783$as_echo "$TOUCH" >&6; }
11784else
11785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11786$as_echo "no" >&6; }
11787fi
11788
11789
11790  test -n "$TOUCH" && break
11791done
11792
11793    else
11794      # If it succeeded, then it was overridden by the user. We will use it
11795      # for the tool.
11796
11797      # First remove it from the list of overridden variables, so we can test
11798      # for unknown variables in the end.
11799      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11800
11801      # Check if we try to supply an empty value
11802      if test "x$TOUCH" = x; then
11803        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11804$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11805        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11806$as_echo_n "checking for TOUCH... " >&6; }
11807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11808$as_echo "disabled" >&6; }
11809      else
11810        # Check if the provided tool contains a complete path.
11811        tool_specified="$TOUCH"
11812        tool_basename="${tool_specified##*/}"
11813        if test "x$tool_basename" = "x$tool_specified"; then
11814          # A command without a complete path is provided, search $PATH.
11815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11816$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11817          # Extract the first word of "$tool_basename", so it can be a program name with args.
11818set dummy $tool_basename; ac_word=$2
11819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11820$as_echo_n "checking for $ac_word... " >&6; }
11821if ${ac_cv_path_TOUCH+:} false; then :
11822  $as_echo_n "(cached) " >&6
11823else
11824  case $TOUCH in
11825  [\\/]* | ?:[\\/]*)
11826  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11827  ;;
11828  *)
11829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11830for as_dir in $PATH
11831do
11832  IFS=$as_save_IFS
11833  test -z "$as_dir" && as_dir=.
11834    for ac_exec_ext in '' $ac_executable_extensions; do
11835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11836    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11838    break 2
11839  fi
11840done
11841  done
11842IFS=$as_save_IFS
11843
11844  ;;
11845esac
11846fi
11847TOUCH=$ac_cv_path_TOUCH
11848if test -n "$TOUCH"; then
11849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11850$as_echo "$TOUCH" >&6; }
11851else
11852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11853$as_echo "no" >&6; }
11854fi
11855
11856
11857          if test "x$TOUCH" = x; then
11858            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11859          fi
11860        else
11861          # Otherwise we believe it is a complete path. Use it as it is.
11862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11863$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11864          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11865$as_echo_n "checking for TOUCH... " >&6; }
11866          if test ! -x "$tool_specified"; then
11867            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11868$as_echo "not found" >&6; }
11869            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11870          fi
11871          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11872$as_echo "$tool_specified" >&6; }
11873        fi
11874      fi
11875    fi
11876
11877  fi
11878
11879
11880
11881  if test "x$TOUCH" = x; then
11882    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11883  fi
11884
11885
11886
11887
11888
11889  # Publish this variable in the help.
11890
11891
11892  if [ -z "${TR+x}" ]; then
11893    # The variable is not set by user, try to locate tool using the code snippet
11894    for ac_prog in tr
11895do
11896  # Extract the first word of "$ac_prog", so it can be a program name with args.
11897set dummy $ac_prog; ac_word=$2
11898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11899$as_echo_n "checking for $ac_word... " >&6; }
11900if ${ac_cv_path_TR+:} false; then :
11901  $as_echo_n "(cached) " >&6
11902else
11903  case $TR in
11904  [\\/]* | ?:[\\/]*)
11905  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11906  ;;
11907  *)
11908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11909for as_dir in $PATH
11910do
11911  IFS=$as_save_IFS
11912  test -z "$as_dir" && as_dir=.
11913    for ac_exec_ext in '' $ac_executable_extensions; do
11914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11915    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11917    break 2
11918  fi
11919done
11920  done
11921IFS=$as_save_IFS
11922
11923  ;;
11924esac
11925fi
11926TR=$ac_cv_path_TR
11927if test -n "$TR"; then
11928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11929$as_echo "$TR" >&6; }
11930else
11931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11932$as_echo "no" >&6; }
11933fi
11934
11935
11936  test -n "$TR" && break
11937done
11938
11939  else
11940    # The variable is set, but is it from the command line or the environment?
11941
11942    # Try to remove the string !TR! from our list.
11943    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11944    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11945      # If it failed, the variable was not from the command line. Ignore it,
11946      # but warn the user (except for BASH, which is always set by the calling BASH).
11947      if test "xTR" != xBASH; then
11948        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11949$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11950      fi
11951      # Try to locate tool using the code snippet
11952      for ac_prog in tr
11953do
11954  # Extract the first word of "$ac_prog", so it can be a program name with args.
11955set dummy $ac_prog; ac_word=$2
11956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11957$as_echo_n "checking for $ac_word... " >&6; }
11958if ${ac_cv_path_TR+:} false; then :
11959  $as_echo_n "(cached) " >&6
11960else
11961  case $TR in
11962  [\\/]* | ?:[\\/]*)
11963  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11964  ;;
11965  *)
11966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11967for as_dir in $PATH
11968do
11969  IFS=$as_save_IFS
11970  test -z "$as_dir" && as_dir=.
11971    for ac_exec_ext in '' $ac_executable_extensions; do
11972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11973    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11975    break 2
11976  fi
11977done
11978  done
11979IFS=$as_save_IFS
11980
11981  ;;
11982esac
11983fi
11984TR=$ac_cv_path_TR
11985if test -n "$TR"; then
11986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11987$as_echo "$TR" >&6; }
11988else
11989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11990$as_echo "no" >&6; }
11991fi
11992
11993
11994  test -n "$TR" && break
11995done
11996
11997    else
11998      # If it succeeded, then it was overridden by the user. We will use it
11999      # for the tool.
12000
12001      # First remove it from the list of overridden variables, so we can test
12002      # for unknown variables in the end.
12003      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12004
12005      # Check if we try to supply an empty value
12006      if test "x$TR" = x; then
12007        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12008$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12009        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12010$as_echo_n "checking for TR... " >&6; }
12011        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12012$as_echo "disabled" >&6; }
12013      else
12014        # Check if the provided tool contains a complete path.
12015        tool_specified="$TR"
12016        tool_basename="${tool_specified##*/}"
12017        if test "x$tool_basename" = "x$tool_specified"; then
12018          # A command without a complete path is provided, search $PATH.
12019          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12020$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12021          # Extract the first word of "$tool_basename", so it can be a program name with args.
12022set dummy $tool_basename; ac_word=$2
12023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12024$as_echo_n "checking for $ac_word... " >&6; }
12025if ${ac_cv_path_TR+:} false; then :
12026  $as_echo_n "(cached) " >&6
12027else
12028  case $TR in
12029  [\\/]* | ?:[\\/]*)
12030  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12031  ;;
12032  *)
12033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12034for as_dir in $PATH
12035do
12036  IFS=$as_save_IFS
12037  test -z "$as_dir" && as_dir=.
12038    for ac_exec_ext in '' $ac_executable_extensions; do
12039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12040    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12042    break 2
12043  fi
12044done
12045  done
12046IFS=$as_save_IFS
12047
12048  ;;
12049esac
12050fi
12051TR=$ac_cv_path_TR
12052if test -n "$TR"; then
12053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12054$as_echo "$TR" >&6; }
12055else
12056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12057$as_echo "no" >&6; }
12058fi
12059
12060
12061          if test "x$TR" = x; then
12062            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12063          fi
12064        else
12065          # Otherwise we believe it is a complete path. Use it as it is.
12066          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12067$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12068          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12069$as_echo_n "checking for TR... " >&6; }
12070          if test ! -x "$tool_specified"; then
12071            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12072$as_echo "not found" >&6; }
12073            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12074          fi
12075          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12076$as_echo "$tool_specified" >&6; }
12077        fi
12078      fi
12079    fi
12080
12081  fi
12082
12083
12084
12085  if test "x$TR" = x; then
12086    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12087  fi
12088
12089
12090
12091
12092
12093  # Publish this variable in the help.
12094
12095
12096  if [ -z "${UNAME+x}" ]; then
12097    # The variable is not set by user, try to locate tool using the code snippet
12098    for ac_prog in uname
12099do
12100  # Extract the first word of "$ac_prog", so it can be a program name with args.
12101set dummy $ac_prog; ac_word=$2
12102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12103$as_echo_n "checking for $ac_word... " >&6; }
12104if ${ac_cv_path_UNAME+:} false; then :
12105  $as_echo_n "(cached) " >&6
12106else
12107  case $UNAME in
12108  [\\/]* | ?:[\\/]*)
12109  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12110  ;;
12111  *)
12112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12113for as_dir in $PATH
12114do
12115  IFS=$as_save_IFS
12116  test -z "$as_dir" && as_dir=.
12117    for ac_exec_ext in '' $ac_executable_extensions; do
12118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12119    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12121    break 2
12122  fi
12123done
12124  done
12125IFS=$as_save_IFS
12126
12127  ;;
12128esac
12129fi
12130UNAME=$ac_cv_path_UNAME
12131if test -n "$UNAME"; then
12132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12133$as_echo "$UNAME" >&6; }
12134else
12135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12136$as_echo "no" >&6; }
12137fi
12138
12139
12140  test -n "$UNAME" && break
12141done
12142
12143  else
12144    # The variable is set, but is it from the command line or the environment?
12145
12146    # Try to remove the string !UNAME! from our list.
12147    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12148    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12149      # If it failed, the variable was not from the command line. Ignore it,
12150      # but warn the user (except for BASH, which is always set by the calling BASH).
12151      if test "xUNAME" != xBASH; then
12152        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12153$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12154      fi
12155      # Try to locate tool using the code snippet
12156      for ac_prog in uname
12157do
12158  # Extract the first word of "$ac_prog", so it can be a program name with args.
12159set dummy $ac_prog; ac_word=$2
12160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12161$as_echo_n "checking for $ac_word... " >&6; }
12162if ${ac_cv_path_UNAME+:} false; then :
12163  $as_echo_n "(cached) " >&6
12164else
12165  case $UNAME in
12166  [\\/]* | ?:[\\/]*)
12167  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12168  ;;
12169  *)
12170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12171for as_dir in $PATH
12172do
12173  IFS=$as_save_IFS
12174  test -z "$as_dir" && as_dir=.
12175    for ac_exec_ext in '' $ac_executable_extensions; do
12176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12177    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12179    break 2
12180  fi
12181done
12182  done
12183IFS=$as_save_IFS
12184
12185  ;;
12186esac
12187fi
12188UNAME=$ac_cv_path_UNAME
12189if test -n "$UNAME"; then
12190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12191$as_echo "$UNAME" >&6; }
12192else
12193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12194$as_echo "no" >&6; }
12195fi
12196
12197
12198  test -n "$UNAME" && break
12199done
12200
12201    else
12202      # If it succeeded, then it was overridden by the user. We will use it
12203      # for the tool.
12204
12205      # First remove it from the list of overridden variables, so we can test
12206      # for unknown variables in the end.
12207      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12208
12209      # Check if we try to supply an empty value
12210      if test "x$UNAME" = x; then
12211        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12212$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12213        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12214$as_echo_n "checking for UNAME... " >&6; }
12215        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12216$as_echo "disabled" >&6; }
12217      else
12218        # Check if the provided tool contains a complete path.
12219        tool_specified="$UNAME"
12220        tool_basename="${tool_specified##*/}"
12221        if test "x$tool_basename" = "x$tool_specified"; then
12222          # A command without a complete path is provided, search $PATH.
12223          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12224$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12225          # Extract the first word of "$tool_basename", so it can be a program name with args.
12226set dummy $tool_basename; ac_word=$2
12227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12228$as_echo_n "checking for $ac_word... " >&6; }
12229if ${ac_cv_path_UNAME+:} false; then :
12230  $as_echo_n "(cached) " >&6
12231else
12232  case $UNAME in
12233  [\\/]* | ?:[\\/]*)
12234  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12235  ;;
12236  *)
12237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12238for as_dir in $PATH
12239do
12240  IFS=$as_save_IFS
12241  test -z "$as_dir" && as_dir=.
12242    for ac_exec_ext in '' $ac_executable_extensions; do
12243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12244    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12246    break 2
12247  fi
12248done
12249  done
12250IFS=$as_save_IFS
12251
12252  ;;
12253esac
12254fi
12255UNAME=$ac_cv_path_UNAME
12256if test -n "$UNAME"; then
12257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12258$as_echo "$UNAME" >&6; }
12259else
12260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12261$as_echo "no" >&6; }
12262fi
12263
12264
12265          if test "x$UNAME" = x; then
12266            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12267          fi
12268        else
12269          # Otherwise we believe it is a complete path. Use it as it is.
12270          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12271$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12272          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12273$as_echo_n "checking for UNAME... " >&6; }
12274          if test ! -x "$tool_specified"; then
12275            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12276$as_echo "not found" >&6; }
12277            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12278          fi
12279          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12280$as_echo "$tool_specified" >&6; }
12281        fi
12282      fi
12283    fi
12284
12285  fi
12286
12287
12288
12289  if test "x$UNAME" = x; then
12290    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12291  fi
12292
12293
12294
12295
12296
12297  # Publish this variable in the help.
12298
12299
12300  if [ -z "${UNIQ+x}" ]; then
12301    # The variable is not set by user, try to locate tool using the code snippet
12302    for ac_prog in uniq
12303do
12304  # Extract the first word of "$ac_prog", so it can be a program name with args.
12305set dummy $ac_prog; ac_word=$2
12306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12307$as_echo_n "checking for $ac_word... " >&6; }
12308if ${ac_cv_path_UNIQ+:} false; then :
12309  $as_echo_n "(cached) " >&6
12310else
12311  case $UNIQ in
12312  [\\/]* | ?:[\\/]*)
12313  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12314  ;;
12315  *)
12316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12317for as_dir in $PATH
12318do
12319  IFS=$as_save_IFS
12320  test -z "$as_dir" && as_dir=.
12321    for ac_exec_ext in '' $ac_executable_extensions; do
12322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12323    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12325    break 2
12326  fi
12327done
12328  done
12329IFS=$as_save_IFS
12330
12331  ;;
12332esac
12333fi
12334UNIQ=$ac_cv_path_UNIQ
12335if test -n "$UNIQ"; then
12336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12337$as_echo "$UNIQ" >&6; }
12338else
12339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12340$as_echo "no" >&6; }
12341fi
12342
12343
12344  test -n "$UNIQ" && break
12345done
12346
12347  else
12348    # The variable is set, but is it from the command line or the environment?
12349
12350    # Try to remove the string !UNIQ! from our list.
12351    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12352    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12353      # If it failed, the variable was not from the command line. Ignore it,
12354      # but warn the user (except for BASH, which is always set by the calling BASH).
12355      if test "xUNIQ" != xBASH; then
12356        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12357$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12358      fi
12359      # Try to locate tool using the code snippet
12360      for ac_prog in uniq
12361do
12362  # Extract the first word of "$ac_prog", so it can be a program name with args.
12363set dummy $ac_prog; ac_word=$2
12364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12365$as_echo_n "checking for $ac_word... " >&6; }
12366if ${ac_cv_path_UNIQ+:} false; then :
12367  $as_echo_n "(cached) " >&6
12368else
12369  case $UNIQ in
12370  [\\/]* | ?:[\\/]*)
12371  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12372  ;;
12373  *)
12374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12375for as_dir in $PATH
12376do
12377  IFS=$as_save_IFS
12378  test -z "$as_dir" && as_dir=.
12379    for ac_exec_ext in '' $ac_executable_extensions; do
12380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12381    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12383    break 2
12384  fi
12385done
12386  done
12387IFS=$as_save_IFS
12388
12389  ;;
12390esac
12391fi
12392UNIQ=$ac_cv_path_UNIQ
12393if test -n "$UNIQ"; then
12394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12395$as_echo "$UNIQ" >&6; }
12396else
12397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12398$as_echo "no" >&6; }
12399fi
12400
12401
12402  test -n "$UNIQ" && break
12403done
12404
12405    else
12406      # If it succeeded, then it was overridden by the user. We will use it
12407      # for the tool.
12408
12409      # First remove it from the list of overridden variables, so we can test
12410      # for unknown variables in the end.
12411      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12412
12413      # Check if we try to supply an empty value
12414      if test "x$UNIQ" = x; then
12415        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12416$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12417        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12418$as_echo_n "checking for UNIQ... " >&6; }
12419        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12420$as_echo "disabled" >&6; }
12421      else
12422        # Check if the provided tool contains a complete path.
12423        tool_specified="$UNIQ"
12424        tool_basename="${tool_specified##*/}"
12425        if test "x$tool_basename" = "x$tool_specified"; then
12426          # A command without a complete path is provided, search $PATH.
12427          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12428$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12429          # Extract the first word of "$tool_basename", so it can be a program name with args.
12430set dummy $tool_basename; ac_word=$2
12431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12432$as_echo_n "checking for $ac_word... " >&6; }
12433if ${ac_cv_path_UNIQ+:} false; then :
12434  $as_echo_n "(cached) " >&6
12435else
12436  case $UNIQ in
12437  [\\/]* | ?:[\\/]*)
12438  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12439  ;;
12440  *)
12441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12442for as_dir in $PATH
12443do
12444  IFS=$as_save_IFS
12445  test -z "$as_dir" && as_dir=.
12446    for ac_exec_ext in '' $ac_executable_extensions; do
12447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12448    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12450    break 2
12451  fi
12452done
12453  done
12454IFS=$as_save_IFS
12455
12456  ;;
12457esac
12458fi
12459UNIQ=$ac_cv_path_UNIQ
12460if test -n "$UNIQ"; then
12461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12462$as_echo "$UNIQ" >&6; }
12463else
12464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12465$as_echo "no" >&6; }
12466fi
12467
12468
12469          if test "x$UNIQ" = x; then
12470            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12471          fi
12472        else
12473          # Otherwise we believe it is a complete path. Use it as it is.
12474          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12475$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12476          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12477$as_echo_n "checking for UNIQ... " >&6; }
12478          if test ! -x "$tool_specified"; then
12479            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12480$as_echo "not found" >&6; }
12481            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12482          fi
12483          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12484$as_echo "$tool_specified" >&6; }
12485        fi
12486      fi
12487    fi
12488
12489  fi
12490
12491
12492
12493  if test "x$UNIQ" = x; then
12494    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12495  fi
12496
12497
12498
12499
12500
12501  # Publish this variable in the help.
12502
12503
12504  if [ -z "${WC+x}" ]; then
12505    # The variable is not set by user, try to locate tool using the code snippet
12506    for ac_prog in wc
12507do
12508  # Extract the first word of "$ac_prog", so it can be a program name with args.
12509set dummy $ac_prog; ac_word=$2
12510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12511$as_echo_n "checking for $ac_word... " >&6; }
12512if ${ac_cv_path_WC+:} false; then :
12513  $as_echo_n "(cached) " >&6
12514else
12515  case $WC in
12516  [\\/]* | ?:[\\/]*)
12517  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12518  ;;
12519  *)
12520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12521for as_dir in $PATH
12522do
12523  IFS=$as_save_IFS
12524  test -z "$as_dir" && as_dir=.
12525    for ac_exec_ext in '' $ac_executable_extensions; do
12526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12527    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12529    break 2
12530  fi
12531done
12532  done
12533IFS=$as_save_IFS
12534
12535  ;;
12536esac
12537fi
12538WC=$ac_cv_path_WC
12539if test -n "$WC"; then
12540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12541$as_echo "$WC" >&6; }
12542else
12543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12544$as_echo "no" >&6; }
12545fi
12546
12547
12548  test -n "$WC" && break
12549done
12550
12551  else
12552    # The variable is set, but is it from the command line or the environment?
12553
12554    # Try to remove the string !WC! from our list.
12555    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12556    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12557      # If it failed, the variable was not from the command line. Ignore it,
12558      # but warn the user (except for BASH, which is always set by the calling BASH).
12559      if test "xWC" != xBASH; then
12560        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12561$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12562      fi
12563      # Try to locate tool using the code snippet
12564      for ac_prog in wc
12565do
12566  # Extract the first word of "$ac_prog", so it can be a program name with args.
12567set dummy $ac_prog; ac_word=$2
12568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12569$as_echo_n "checking for $ac_word... " >&6; }
12570if ${ac_cv_path_WC+:} false; then :
12571  $as_echo_n "(cached) " >&6
12572else
12573  case $WC in
12574  [\\/]* | ?:[\\/]*)
12575  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12576  ;;
12577  *)
12578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12579for as_dir in $PATH
12580do
12581  IFS=$as_save_IFS
12582  test -z "$as_dir" && as_dir=.
12583    for ac_exec_ext in '' $ac_executable_extensions; do
12584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12585    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12587    break 2
12588  fi
12589done
12590  done
12591IFS=$as_save_IFS
12592
12593  ;;
12594esac
12595fi
12596WC=$ac_cv_path_WC
12597if test -n "$WC"; then
12598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12599$as_echo "$WC" >&6; }
12600else
12601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12602$as_echo "no" >&6; }
12603fi
12604
12605
12606  test -n "$WC" && break
12607done
12608
12609    else
12610      # If it succeeded, then it was overridden by the user. We will use it
12611      # for the tool.
12612
12613      # First remove it from the list of overridden variables, so we can test
12614      # for unknown variables in the end.
12615      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12616
12617      # Check if we try to supply an empty value
12618      if test "x$WC" = x; then
12619        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12620$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12621        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12622$as_echo_n "checking for WC... " >&6; }
12623        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12624$as_echo "disabled" >&6; }
12625      else
12626        # Check if the provided tool contains a complete path.
12627        tool_specified="$WC"
12628        tool_basename="${tool_specified##*/}"
12629        if test "x$tool_basename" = "x$tool_specified"; then
12630          # A command without a complete path is provided, search $PATH.
12631          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12632$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12633          # Extract the first word of "$tool_basename", so it can be a program name with args.
12634set dummy $tool_basename; ac_word=$2
12635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12636$as_echo_n "checking for $ac_word... " >&6; }
12637if ${ac_cv_path_WC+:} false; then :
12638  $as_echo_n "(cached) " >&6
12639else
12640  case $WC in
12641  [\\/]* | ?:[\\/]*)
12642  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12643  ;;
12644  *)
12645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12646for as_dir in $PATH
12647do
12648  IFS=$as_save_IFS
12649  test -z "$as_dir" && as_dir=.
12650    for ac_exec_ext in '' $ac_executable_extensions; do
12651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12652    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12654    break 2
12655  fi
12656done
12657  done
12658IFS=$as_save_IFS
12659
12660  ;;
12661esac
12662fi
12663WC=$ac_cv_path_WC
12664if test -n "$WC"; then
12665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12666$as_echo "$WC" >&6; }
12667else
12668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12669$as_echo "no" >&6; }
12670fi
12671
12672
12673          if test "x$WC" = x; then
12674            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12675          fi
12676        else
12677          # Otherwise we believe it is a complete path. Use it as it is.
12678          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12679$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12680          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12681$as_echo_n "checking for WC... " >&6; }
12682          if test ! -x "$tool_specified"; then
12683            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12684$as_echo "not found" >&6; }
12685            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12686          fi
12687          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12688$as_echo "$tool_specified" >&6; }
12689        fi
12690      fi
12691    fi
12692
12693  fi
12694
12695
12696
12697  if test "x$WC" = x; then
12698    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12699  fi
12700
12701
12702
12703
12704
12705  # Publish this variable in the help.
12706
12707
12708  if [ -z "${WHICH+x}" ]; then
12709    # The variable is not set by user, try to locate tool using the code snippet
12710    for ac_prog in which
12711do
12712  # Extract the first word of "$ac_prog", so it can be a program name with args.
12713set dummy $ac_prog; ac_word=$2
12714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12715$as_echo_n "checking for $ac_word... " >&6; }
12716if ${ac_cv_path_WHICH+:} false; then :
12717  $as_echo_n "(cached) " >&6
12718else
12719  case $WHICH in
12720  [\\/]* | ?:[\\/]*)
12721  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12722  ;;
12723  *)
12724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12725for as_dir in $PATH
12726do
12727  IFS=$as_save_IFS
12728  test -z "$as_dir" && as_dir=.
12729    for ac_exec_ext in '' $ac_executable_extensions; do
12730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12731    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12733    break 2
12734  fi
12735done
12736  done
12737IFS=$as_save_IFS
12738
12739  ;;
12740esac
12741fi
12742WHICH=$ac_cv_path_WHICH
12743if test -n "$WHICH"; then
12744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12745$as_echo "$WHICH" >&6; }
12746else
12747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12748$as_echo "no" >&6; }
12749fi
12750
12751
12752  test -n "$WHICH" && break
12753done
12754
12755  else
12756    # The variable is set, but is it from the command line or the environment?
12757
12758    # Try to remove the string !WHICH! from our list.
12759    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12760    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12761      # If it failed, the variable was not from the command line. Ignore it,
12762      # but warn the user (except for BASH, which is always set by the calling BASH).
12763      if test "xWHICH" != xBASH; then
12764        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12765$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12766      fi
12767      # Try to locate tool using the code snippet
12768      for ac_prog in which
12769do
12770  # Extract the first word of "$ac_prog", so it can be a program name with args.
12771set dummy $ac_prog; ac_word=$2
12772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12773$as_echo_n "checking for $ac_word... " >&6; }
12774if ${ac_cv_path_WHICH+:} false; then :
12775  $as_echo_n "(cached) " >&6
12776else
12777  case $WHICH in
12778  [\\/]* | ?:[\\/]*)
12779  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12780  ;;
12781  *)
12782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12783for as_dir in $PATH
12784do
12785  IFS=$as_save_IFS
12786  test -z "$as_dir" && as_dir=.
12787    for ac_exec_ext in '' $ac_executable_extensions; do
12788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12789    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12791    break 2
12792  fi
12793done
12794  done
12795IFS=$as_save_IFS
12796
12797  ;;
12798esac
12799fi
12800WHICH=$ac_cv_path_WHICH
12801if test -n "$WHICH"; then
12802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12803$as_echo "$WHICH" >&6; }
12804else
12805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12806$as_echo "no" >&6; }
12807fi
12808
12809
12810  test -n "$WHICH" && break
12811done
12812
12813    else
12814      # If it succeeded, then it was overridden by the user. We will use it
12815      # for the tool.
12816
12817      # First remove it from the list of overridden variables, so we can test
12818      # for unknown variables in the end.
12819      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12820
12821      # Check if we try to supply an empty value
12822      if test "x$WHICH" = x; then
12823        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12824$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12825        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12826$as_echo_n "checking for WHICH... " >&6; }
12827        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12828$as_echo "disabled" >&6; }
12829      else
12830        # Check if the provided tool contains a complete path.
12831        tool_specified="$WHICH"
12832        tool_basename="${tool_specified##*/}"
12833        if test "x$tool_basename" = "x$tool_specified"; then
12834          # A command without a complete path is provided, search $PATH.
12835          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12836$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12837          # Extract the first word of "$tool_basename", so it can be a program name with args.
12838set dummy $tool_basename; ac_word=$2
12839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12840$as_echo_n "checking for $ac_word... " >&6; }
12841if ${ac_cv_path_WHICH+:} false; then :
12842  $as_echo_n "(cached) " >&6
12843else
12844  case $WHICH in
12845  [\\/]* | ?:[\\/]*)
12846  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12847  ;;
12848  *)
12849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12850for as_dir in $PATH
12851do
12852  IFS=$as_save_IFS
12853  test -z "$as_dir" && as_dir=.
12854    for ac_exec_ext in '' $ac_executable_extensions; do
12855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12856    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12858    break 2
12859  fi
12860done
12861  done
12862IFS=$as_save_IFS
12863
12864  ;;
12865esac
12866fi
12867WHICH=$ac_cv_path_WHICH
12868if test -n "$WHICH"; then
12869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12870$as_echo "$WHICH" >&6; }
12871else
12872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12873$as_echo "no" >&6; }
12874fi
12875
12876
12877          if test "x$WHICH" = x; then
12878            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12879          fi
12880        else
12881          # Otherwise we believe it is a complete path. Use it as it is.
12882          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12883$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12884          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12885$as_echo_n "checking for WHICH... " >&6; }
12886          if test ! -x "$tool_specified"; then
12887            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12888$as_echo "not found" >&6; }
12889            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12890          fi
12891          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12892$as_echo "$tool_specified" >&6; }
12893        fi
12894      fi
12895    fi
12896
12897  fi
12898
12899
12900
12901  if test "x$WHICH" = x; then
12902    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12903  fi
12904
12905
12906
12907
12908
12909  # Publish this variable in the help.
12910
12911
12912  if [ -z "${XARGS+x}" ]; then
12913    # The variable is not set by user, try to locate tool using the code snippet
12914    for ac_prog in xargs
12915do
12916  # Extract the first word of "$ac_prog", so it can be a program name with args.
12917set dummy $ac_prog; ac_word=$2
12918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12919$as_echo_n "checking for $ac_word... " >&6; }
12920if ${ac_cv_path_XARGS+:} false; then :
12921  $as_echo_n "(cached) " >&6
12922else
12923  case $XARGS in
12924  [\\/]* | ?:[\\/]*)
12925  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12926  ;;
12927  *)
12928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12929for as_dir in $PATH
12930do
12931  IFS=$as_save_IFS
12932  test -z "$as_dir" && as_dir=.
12933    for ac_exec_ext in '' $ac_executable_extensions; do
12934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12935    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12937    break 2
12938  fi
12939done
12940  done
12941IFS=$as_save_IFS
12942
12943  ;;
12944esac
12945fi
12946XARGS=$ac_cv_path_XARGS
12947if test -n "$XARGS"; then
12948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12949$as_echo "$XARGS" >&6; }
12950else
12951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12952$as_echo "no" >&6; }
12953fi
12954
12955
12956  test -n "$XARGS" && break
12957done
12958
12959  else
12960    # The variable is set, but is it from the command line or the environment?
12961
12962    # Try to remove the string !XARGS! from our list.
12963    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12964    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12965      # If it failed, the variable was not from the command line. Ignore it,
12966      # but warn the user (except for BASH, which is always set by the calling BASH).
12967      if test "xXARGS" != xBASH; then
12968        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12969$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12970      fi
12971      # Try to locate tool using the code snippet
12972      for ac_prog in xargs
12973do
12974  # Extract the first word of "$ac_prog", so it can be a program name with args.
12975set dummy $ac_prog; ac_word=$2
12976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12977$as_echo_n "checking for $ac_word... " >&6; }
12978if ${ac_cv_path_XARGS+:} false; then :
12979  $as_echo_n "(cached) " >&6
12980else
12981  case $XARGS in
12982  [\\/]* | ?:[\\/]*)
12983  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12984  ;;
12985  *)
12986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12987for as_dir in $PATH
12988do
12989  IFS=$as_save_IFS
12990  test -z "$as_dir" && as_dir=.
12991    for ac_exec_ext in '' $ac_executable_extensions; do
12992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12993    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12995    break 2
12996  fi
12997done
12998  done
12999IFS=$as_save_IFS
13000
13001  ;;
13002esac
13003fi
13004XARGS=$ac_cv_path_XARGS
13005if test -n "$XARGS"; then
13006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13007$as_echo "$XARGS" >&6; }
13008else
13009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13010$as_echo "no" >&6; }
13011fi
13012
13013
13014  test -n "$XARGS" && break
13015done
13016
13017    else
13018      # If it succeeded, then it was overridden by the user. We will use it
13019      # for the tool.
13020
13021      # First remove it from the list of overridden variables, so we can test
13022      # for unknown variables in the end.
13023      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13024
13025      # Check if we try to supply an empty value
13026      if test "x$XARGS" = x; then
13027        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13028$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13029        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13030$as_echo_n "checking for XARGS... " >&6; }
13031        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13032$as_echo "disabled" >&6; }
13033      else
13034        # Check if the provided tool contains a complete path.
13035        tool_specified="$XARGS"
13036        tool_basename="${tool_specified##*/}"
13037        if test "x$tool_basename" = "x$tool_specified"; then
13038          # A command without a complete path is provided, search $PATH.
13039          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13040$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13041          # Extract the first word of "$tool_basename", so it can be a program name with args.
13042set dummy $tool_basename; ac_word=$2
13043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13044$as_echo_n "checking for $ac_word... " >&6; }
13045if ${ac_cv_path_XARGS+:} false; then :
13046  $as_echo_n "(cached) " >&6
13047else
13048  case $XARGS in
13049  [\\/]* | ?:[\\/]*)
13050  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13051  ;;
13052  *)
13053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13054for as_dir in $PATH
13055do
13056  IFS=$as_save_IFS
13057  test -z "$as_dir" && as_dir=.
13058    for ac_exec_ext in '' $ac_executable_extensions; do
13059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13060    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13062    break 2
13063  fi
13064done
13065  done
13066IFS=$as_save_IFS
13067
13068  ;;
13069esac
13070fi
13071XARGS=$ac_cv_path_XARGS
13072if test -n "$XARGS"; then
13073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13074$as_echo "$XARGS" >&6; }
13075else
13076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13077$as_echo "no" >&6; }
13078fi
13079
13080
13081          if test "x$XARGS" = x; then
13082            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13083          fi
13084        else
13085          # Otherwise we believe it is a complete path. Use it as it is.
13086          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13087$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13088          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13089$as_echo_n "checking for XARGS... " >&6; }
13090          if test ! -x "$tool_specified"; then
13091            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13092$as_echo "not found" >&6; }
13093            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13094          fi
13095          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13096$as_echo "$tool_specified" >&6; }
13097        fi
13098      fi
13099    fi
13100
13101  fi
13102
13103
13104
13105  if test "x$XARGS" = x; then
13106    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13107  fi
13108
13109
13110
13111  # Then required tools that require some special treatment.
13112
13113
13114  # Publish this variable in the help.
13115
13116
13117  if [ -z "${AWK+x}" ]; then
13118    # The variable is not set by user, try to locate tool using the code snippet
13119    for ac_prog in gawk mawk nawk awk
13120do
13121  # Extract the first word of "$ac_prog", so it can be a program name with args.
13122set dummy $ac_prog; ac_word=$2
13123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13124$as_echo_n "checking for $ac_word... " >&6; }
13125if ${ac_cv_prog_AWK+:} false; then :
13126  $as_echo_n "(cached) " >&6
13127else
13128  if test -n "$AWK"; then
13129  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13130else
13131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13132for as_dir in $PATH
13133do
13134  IFS=$as_save_IFS
13135  test -z "$as_dir" && as_dir=.
13136    for ac_exec_ext in '' $ac_executable_extensions; do
13137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13138    ac_cv_prog_AWK="$ac_prog"
13139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13140    break 2
13141  fi
13142done
13143  done
13144IFS=$as_save_IFS
13145
13146fi
13147fi
13148AWK=$ac_cv_prog_AWK
13149if test -n "$AWK"; then
13150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13151$as_echo "$AWK" >&6; }
13152else
13153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13154$as_echo "no" >&6; }
13155fi
13156
13157
13158  test -n "$AWK" && break
13159done
13160
13161  else
13162    # The variable is set, but is it from the command line or the environment?
13163
13164    # Try to remove the string !AWK! from our list.
13165    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13166    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13167      # If it failed, the variable was not from the command line. Ignore it,
13168      # but warn the user (except for BASH, which is always set by the calling BASH).
13169      if test "xAWK" != xBASH; then
13170        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13171$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13172      fi
13173      # Try to locate tool using the code snippet
13174      for ac_prog in gawk mawk nawk awk
13175do
13176  # Extract the first word of "$ac_prog", so it can be a program name with args.
13177set dummy $ac_prog; ac_word=$2
13178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13179$as_echo_n "checking for $ac_word... " >&6; }
13180if ${ac_cv_prog_AWK+:} false; then :
13181  $as_echo_n "(cached) " >&6
13182else
13183  if test -n "$AWK"; then
13184  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13185else
13186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13187for as_dir in $PATH
13188do
13189  IFS=$as_save_IFS
13190  test -z "$as_dir" && as_dir=.
13191    for ac_exec_ext in '' $ac_executable_extensions; do
13192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13193    ac_cv_prog_AWK="$ac_prog"
13194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13195    break 2
13196  fi
13197done
13198  done
13199IFS=$as_save_IFS
13200
13201fi
13202fi
13203AWK=$ac_cv_prog_AWK
13204if test -n "$AWK"; then
13205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13206$as_echo "$AWK" >&6; }
13207else
13208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13209$as_echo "no" >&6; }
13210fi
13211
13212
13213  test -n "$AWK" && break
13214done
13215
13216    else
13217      # If it succeeded, then it was overridden by the user. We will use it
13218      # for the tool.
13219
13220      # First remove it from the list of overridden variables, so we can test
13221      # for unknown variables in the end.
13222      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13223
13224      # Check if we try to supply an empty value
13225      if test "x$AWK" = x; then
13226        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13227$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13228        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13229$as_echo_n "checking for AWK... " >&6; }
13230        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13231$as_echo "disabled" >&6; }
13232      else
13233        # Check if the provided tool contains a complete path.
13234        tool_specified="$AWK"
13235        tool_basename="${tool_specified##*/}"
13236        if test "x$tool_basename" = "x$tool_specified"; then
13237          # A command without a complete path is provided, search $PATH.
13238          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13239$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13240          # Extract the first word of "$tool_basename", so it can be a program name with args.
13241set dummy $tool_basename; ac_word=$2
13242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13243$as_echo_n "checking for $ac_word... " >&6; }
13244if ${ac_cv_path_AWK+:} false; then :
13245  $as_echo_n "(cached) " >&6
13246else
13247  case $AWK in
13248  [\\/]* | ?:[\\/]*)
13249  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13250  ;;
13251  *)
13252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13253for as_dir in $PATH
13254do
13255  IFS=$as_save_IFS
13256  test -z "$as_dir" && as_dir=.
13257    for ac_exec_ext in '' $ac_executable_extensions; do
13258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13259    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13261    break 2
13262  fi
13263done
13264  done
13265IFS=$as_save_IFS
13266
13267  ;;
13268esac
13269fi
13270AWK=$ac_cv_path_AWK
13271if test -n "$AWK"; then
13272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13273$as_echo "$AWK" >&6; }
13274else
13275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13276$as_echo "no" >&6; }
13277fi
13278
13279
13280          if test "x$AWK" = x; then
13281            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13282          fi
13283        else
13284          # Otherwise we believe it is a complete path. Use it as it is.
13285          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13286$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13287          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13288$as_echo_n "checking for AWK... " >&6; }
13289          if test ! -x "$tool_specified"; then
13290            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13291$as_echo "not found" >&6; }
13292            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13293          fi
13294          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13295$as_echo "$tool_specified" >&6; }
13296        fi
13297      fi
13298    fi
13299
13300  fi
13301
13302
13303  if test "x$AWK" = x; then
13304    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13305  fi
13306
13307
13308
13309
13310  # Publish this variable in the help.
13311
13312
13313  if [ -z "${GREP+x}" ]; then
13314    # The variable is not set by user, try to locate tool using the code snippet
13315    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13316$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13317if ${ac_cv_path_GREP+:} false; then :
13318  $as_echo_n "(cached) " >&6
13319else
13320  if test -z "$GREP"; then
13321  ac_path_GREP_found=false
13322  # Loop through the user's path and test for each of PROGNAME-LIST
13323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13324for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13325do
13326  IFS=$as_save_IFS
13327  test -z "$as_dir" && as_dir=.
13328    for ac_prog in grep ggrep; do
13329    for ac_exec_ext in '' $ac_executable_extensions; do
13330      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13331      as_fn_executable_p "$ac_path_GREP" || continue
13332# Check for GNU ac_path_GREP and select it if it is found.
13333  # Check for GNU $ac_path_GREP
13334case `"$ac_path_GREP" --version 2>&1` in
13335*GNU*)
13336  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13337*)
13338  ac_count=0
13339  $as_echo_n 0123456789 >"conftest.in"
13340  while :
13341  do
13342    cat "conftest.in" "conftest.in" >"conftest.tmp"
13343    mv "conftest.tmp" "conftest.in"
13344    cp "conftest.in" "conftest.nl"
13345    $as_echo 'GREP' >> "conftest.nl"
13346    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13347    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13348    as_fn_arith $ac_count + 1 && ac_count=$as_val
13349    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13350      # Best one so far, save it but keep looking for a better one
13351      ac_cv_path_GREP="$ac_path_GREP"
13352      ac_path_GREP_max=$ac_count
13353    fi
13354    # 10*(2^10) chars as input seems more than enough
13355    test $ac_count -gt 10 && break
13356  done
13357  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13358esac
13359
13360      $ac_path_GREP_found && break 3
13361    done
13362  done
13363  done
13364IFS=$as_save_IFS
13365  if test -z "$ac_cv_path_GREP"; then
13366    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13367  fi
13368else
13369  ac_cv_path_GREP=$GREP
13370fi
13371
13372fi
13373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13374$as_echo "$ac_cv_path_GREP" >&6; }
13375 GREP="$ac_cv_path_GREP"
13376
13377
13378  else
13379    # The variable is set, but is it from the command line or the environment?
13380
13381    # Try to remove the string !GREP! from our list.
13382    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13383    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13384      # If it failed, the variable was not from the command line. Ignore it,
13385      # but warn the user (except for BASH, which is always set by the calling BASH).
13386      if test "xGREP" != xBASH; then
13387        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13388$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13389      fi
13390      # Try to locate tool using the code snippet
13391      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13392$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13393if ${ac_cv_path_GREP+:} false; then :
13394  $as_echo_n "(cached) " >&6
13395else
13396  if test -z "$GREP"; then
13397  ac_path_GREP_found=false
13398  # Loop through the user's path and test for each of PROGNAME-LIST
13399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13400for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13401do
13402  IFS=$as_save_IFS
13403  test -z "$as_dir" && as_dir=.
13404    for ac_prog in grep ggrep; do
13405    for ac_exec_ext in '' $ac_executable_extensions; do
13406      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13407      as_fn_executable_p "$ac_path_GREP" || continue
13408# Check for GNU ac_path_GREP and select it if it is found.
13409  # Check for GNU $ac_path_GREP
13410case `"$ac_path_GREP" --version 2>&1` in
13411*GNU*)
13412  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13413*)
13414  ac_count=0
13415  $as_echo_n 0123456789 >"conftest.in"
13416  while :
13417  do
13418    cat "conftest.in" "conftest.in" >"conftest.tmp"
13419    mv "conftest.tmp" "conftest.in"
13420    cp "conftest.in" "conftest.nl"
13421    $as_echo 'GREP' >> "conftest.nl"
13422    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13423    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13424    as_fn_arith $ac_count + 1 && ac_count=$as_val
13425    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13426      # Best one so far, save it but keep looking for a better one
13427      ac_cv_path_GREP="$ac_path_GREP"
13428      ac_path_GREP_max=$ac_count
13429    fi
13430    # 10*(2^10) chars as input seems more than enough
13431    test $ac_count -gt 10 && break
13432  done
13433  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13434esac
13435
13436      $ac_path_GREP_found && break 3
13437    done
13438  done
13439  done
13440IFS=$as_save_IFS
13441  if test -z "$ac_cv_path_GREP"; then
13442    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13443  fi
13444else
13445  ac_cv_path_GREP=$GREP
13446fi
13447
13448fi
13449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13450$as_echo "$ac_cv_path_GREP" >&6; }
13451 GREP="$ac_cv_path_GREP"
13452
13453
13454    else
13455      # If it succeeded, then it was overridden by the user. We will use it
13456      # for the tool.
13457
13458      # First remove it from the list of overridden variables, so we can test
13459      # for unknown variables in the end.
13460      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13461
13462      # Check if we try to supply an empty value
13463      if test "x$GREP" = x; then
13464        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13465$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13466        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13467$as_echo_n "checking for GREP... " >&6; }
13468        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13469$as_echo "disabled" >&6; }
13470      else
13471        # Check if the provided tool contains a complete path.
13472        tool_specified="$GREP"
13473        tool_basename="${tool_specified##*/}"
13474        if test "x$tool_basename" = "x$tool_specified"; then
13475          # A command without a complete path is provided, search $PATH.
13476          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13477$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13478          # Extract the first word of "$tool_basename", so it can be a program name with args.
13479set dummy $tool_basename; ac_word=$2
13480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13481$as_echo_n "checking for $ac_word... " >&6; }
13482if ${ac_cv_path_GREP+:} false; then :
13483  $as_echo_n "(cached) " >&6
13484else
13485  case $GREP in
13486  [\\/]* | ?:[\\/]*)
13487  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13488  ;;
13489  *)
13490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13491for as_dir in $PATH
13492do
13493  IFS=$as_save_IFS
13494  test -z "$as_dir" && as_dir=.
13495    for ac_exec_ext in '' $ac_executable_extensions; do
13496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13497    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13499    break 2
13500  fi
13501done
13502  done
13503IFS=$as_save_IFS
13504
13505  ;;
13506esac
13507fi
13508GREP=$ac_cv_path_GREP
13509if test -n "$GREP"; then
13510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13511$as_echo "$GREP" >&6; }
13512else
13513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13514$as_echo "no" >&6; }
13515fi
13516
13517
13518          if test "x$GREP" = x; then
13519            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13520          fi
13521        else
13522          # Otherwise we believe it is a complete path. Use it as it is.
13523          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13524$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13525          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13526$as_echo_n "checking for GREP... " >&6; }
13527          if test ! -x "$tool_specified"; then
13528            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13529$as_echo "not found" >&6; }
13530            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13531          fi
13532          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13533$as_echo "$tool_specified" >&6; }
13534        fi
13535      fi
13536    fi
13537
13538  fi
13539
13540
13541  if test "x$GREP" = x; then
13542    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13543  fi
13544
13545
13546
13547
13548  # Publish this variable in the help.
13549
13550
13551  if [ -z "${EGREP+x}" ]; then
13552    # The variable is not set by user, try to locate tool using the code snippet
13553    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13554$as_echo_n "checking for egrep... " >&6; }
13555if ${ac_cv_path_EGREP+:} false; then :
13556  $as_echo_n "(cached) " >&6
13557else
13558  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13559   then ac_cv_path_EGREP="$GREP -E"
13560   else
13561     if test -z "$EGREP"; then
13562  ac_path_EGREP_found=false
13563  # Loop through the user's path and test for each of PROGNAME-LIST
13564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13565for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13566do
13567  IFS=$as_save_IFS
13568  test -z "$as_dir" && as_dir=.
13569    for ac_prog in egrep; do
13570    for ac_exec_ext in '' $ac_executable_extensions; do
13571      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13572      as_fn_executable_p "$ac_path_EGREP" || continue
13573# Check for GNU ac_path_EGREP and select it if it is found.
13574  # Check for GNU $ac_path_EGREP
13575case `"$ac_path_EGREP" --version 2>&1` in
13576*GNU*)
13577  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13578*)
13579  ac_count=0
13580  $as_echo_n 0123456789 >"conftest.in"
13581  while :
13582  do
13583    cat "conftest.in" "conftest.in" >"conftest.tmp"
13584    mv "conftest.tmp" "conftest.in"
13585    cp "conftest.in" "conftest.nl"
13586    $as_echo 'EGREP' >> "conftest.nl"
13587    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13588    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13589    as_fn_arith $ac_count + 1 && ac_count=$as_val
13590    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13591      # Best one so far, save it but keep looking for a better one
13592      ac_cv_path_EGREP="$ac_path_EGREP"
13593      ac_path_EGREP_max=$ac_count
13594    fi
13595    # 10*(2^10) chars as input seems more than enough
13596    test $ac_count -gt 10 && break
13597  done
13598  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13599esac
13600
13601      $ac_path_EGREP_found && break 3
13602    done
13603  done
13604  done
13605IFS=$as_save_IFS
13606  if test -z "$ac_cv_path_EGREP"; then
13607    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13608  fi
13609else
13610  ac_cv_path_EGREP=$EGREP
13611fi
13612
13613   fi
13614fi
13615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13616$as_echo "$ac_cv_path_EGREP" >&6; }
13617 EGREP="$ac_cv_path_EGREP"
13618
13619
13620  else
13621    # The variable is set, but is it from the command line or the environment?
13622
13623    # Try to remove the string !EGREP! from our list.
13624    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13625    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13626      # If it failed, the variable was not from the command line. Ignore it,
13627      # but warn the user (except for BASH, which is always set by the calling BASH).
13628      if test "xEGREP" != xBASH; then
13629        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13630$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13631      fi
13632      # Try to locate tool using the code snippet
13633      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13634$as_echo_n "checking for egrep... " >&6; }
13635if ${ac_cv_path_EGREP+:} false; then :
13636  $as_echo_n "(cached) " >&6
13637else
13638  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13639   then ac_cv_path_EGREP="$GREP -E"
13640   else
13641     if test -z "$EGREP"; then
13642  ac_path_EGREP_found=false
13643  # Loop through the user's path and test for each of PROGNAME-LIST
13644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13645for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13646do
13647  IFS=$as_save_IFS
13648  test -z "$as_dir" && as_dir=.
13649    for ac_prog in egrep; do
13650    for ac_exec_ext in '' $ac_executable_extensions; do
13651      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13652      as_fn_executable_p "$ac_path_EGREP" || continue
13653# Check for GNU ac_path_EGREP and select it if it is found.
13654  # Check for GNU $ac_path_EGREP
13655case `"$ac_path_EGREP" --version 2>&1` in
13656*GNU*)
13657  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13658*)
13659  ac_count=0
13660  $as_echo_n 0123456789 >"conftest.in"
13661  while :
13662  do
13663    cat "conftest.in" "conftest.in" >"conftest.tmp"
13664    mv "conftest.tmp" "conftest.in"
13665    cp "conftest.in" "conftest.nl"
13666    $as_echo 'EGREP' >> "conftest.nl"
13667    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13668    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13669    as_fn_arith $ac_count + 1 && ac_count=$as_val
13670    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13671      # Best one so far, save it but keep looking for a better one
13672      ac_cv_path_EGREP="$ac_path_EGREP"
13673      ac_path_EGREP_max=$ac_count
13674    fi
13675    # 10*(2^10) chars as input seems more than enough
13676    test $ac_count -gt 10 && break
13677  done
13678  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13679esac
13680
13681      $ac_path_EGREP_found && break 3
13682    done
13683  done
13684  done
13685IFS=$as_save_IFS
13686  if test -z "$ac_cv_path_EGREP"; then
13687    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13688  fi
13689else
13690  ac_cv_path_EGREP=$EGREP
13691fi
13692
13693   fi
13694fi
13695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13696$as_echo "$ac_cv_path_EGREP" >&6; }
13697 EGREP="$ac_cv_path_EGREP"
13698
13699
13700    else
13701      # If it succeeded, then it was overridden by the user. We will use it
13702      # for the tool.
13703
13704      # First remove it from the list of overridden variables, so we can test
13705      # for unknown variables in the end.
13706      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13707
13708      # Check if we try to supply an empty value
13709      if test "x$EGREP" = x; then
13710        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13711$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13712        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13713$as_echo_n "checking for EGREP... " >&6; }
13714        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13715$as_echo "disabled" >&6; }
13716      else
13717        # Check if the provided tool contains a complete path.
13718        tool_specified="$EGREP"
13719        tool_basename="${tool_specified##*/}"
13720        if test "x$tool_basename" = "x$tool_specified"; then
13721          # A command without a complete path is provided, search $PATH.
13722          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13723$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13724          # Extract the first word of "$tool_basename", so it can be a program name with args.
13725set dummy $tool_basename; ac_word=$2
13726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13727$as_echo_n "checking for $ac_word... " >&6; }
13728if ${ac_cv_path_EGREP+:} false; then :
13729  $as_echo_n "(cached) " >&6
13730else
13731  case $EGREP in
13732  [\\/]* | ?:[\\/]*)
13733  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13734  ;;
13735  *)
13736  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13737for as_dir in $PATH
13738do
13739  IFS=$as_save_IFS
13740  test -z "$as_dir" && as_dir=.
13741    for ac_exec_ext in '' $ac_executable_extensions; do
13742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13743    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13745    break 2
13746  fi
13747done
13748  done
13749IFS=$as_save_IFS
13750
13751  ;;
13752esac
13753fi
13754EGREP=$ac_cv_path_EGREP
13755if test -n "$EGREP"; then
13756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13757$as_echo "$EGREP" >&6; }
13758else
13759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13760$as_echo "no" >&6; }
13761fi
13762
13763
13764          if test "x$EGREP" = x; then
13765            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13766          fi
13767        else
13768          # Otherwise we believe it is a complete path. Use it as it is.
13769          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13770$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13771          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13772$as_echo_n "checking for EGREP... " >&6; }
13773          if test ! -x "$tool_specified"; then
13774            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13775$as_echo "not found" >&6; }
13776            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13777          fi
13778          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13779$as_echo "$tool_specified" >&6; }
13780        fi
13781      fi
13782    fi
13783
13784  fi
13785
13786
13787  if test "x$EGREP" = x; then
13788    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13789  fi
13790
13791
13792
13793
13794  # Publish this variable in the help.
13795
13796
13797  if [ -z "${FGREP+x}" ]; then
13798    # The variable is not set by user, try to locate tool using the code snippet
13799    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13800$as_echo_n "checking for fgrep... " >&6; }
13801if ${ac_cv_path_FGREP+:} false; then :
13802  $as_echo_n "(cached) " >&6
13803else
13804  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13805   then ac_cv_path_FGREP="$GREP -F"
13806   else
13807     if test -z "$FGREP"; then
13808  ac_path_FGREP_found=false
13809  # Loop through the user's path and test for each of PROGNAME-LIST
13810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13811for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13812do
13813  IFS=$as_save_IFS
13814  test -z "$as_dir" && as_dir=.
13815    for ac_prog in fgrep; do
13816    for ac_exec_ext in '' $ac_executable_extensions; do
13817      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13818      as_fn_executable_p "$ac_path_FGREP" || continue
13819# Check for GNU ac_path_FGREP and select it if it is found.
13820  # Check for GNU $ac_path_FGREP
13821case `"$ac_path_FGREP" --version 2>&1` in
13822*GNU*)
13823  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13824*)
13825  ac_count=0
13826  $as_echo_n 0123456789 >"conftest.in"
13827  while :
13828  do
13829    cat "conftest.in" "conftest.in" >"conftest.tmp"
13830    mv "conftest.tmp" "conftest.in"
13831    cp "conftest.in" "conftest.nl"
13832    $as_echo 'FGREP' >> "conftest.nl"
13833    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13834    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13835    as_fn_arith $ac_count + 1 && ac_count=$as_val
13836    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13837      # Best one so far, save it but keep looking for a better one
13838      ac_cv_path_FGREP="$ac_path_FGREP"
13839      ac_path_FGREP_max=$ac_count
13840    fi
13841    # 10*(2^10) chars as input seems more than enough
13842    test $ac_count -gt 10 && break
13843  done
13844  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13845esac
13846
13847      $ac_path_FGREP_found && break 3
13848    done
13849  done
13850  done
13851IFS=$as_save_IFS
13852  if test -z "$ac_cv_path_FGREP"; then
13853    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13854  fi
13855else
13856  ac_cv_path_FGREP=$FGREP
13857fi
13858
13859   fi
13860fi
13861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13862$as_echo "$ac_cv_path_FGREP" >&6; }
13863 FGREP="$ac_cv_path_FGREP"
13864
13865
13866  else
13867    # The variable is set, but is it from the command line or the environment?
13868
13869    # Try to remove the string !FGREP! from our list.
13870    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13871    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13872      # If it failed, the variable was not from the command line. Ignore it,
13873      # but warn the user (except for BASH, which is always set by the calling BASH).
13874      if test "xFGREP" != xBASH; then
13875        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13876$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13877      fi
13878      # Try to locate tool using the code snippet
13879      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13880$as_echo_n "checking for fgrep... " >&6; }
13881if ${ac_cv_path_FGREP+:} false; then :
13882  $as_echo_n "(cached) " >&6
13883else
13884  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13885   then ac_cv_path_FGREP="$GREP -F"
13886   else
13887     if test -z "$FGREP"; then
13888  ac_path_FGREP_found=false
13889  # Loop through the user's path and test for each of PROGNAME-LIST
13890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13891for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13892do
13893  IFS=$as_save_IFS
13894  test -z "$as_dir" && as_dir=.
13895    for ac_prog in fgrep; do
13896    for ac_exec_ext in '' $ac_executable_extensions; do
13897      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13898      as_fn_executable_p "$ac_path_FGREP" || continue
13899# Check for GNU ac_path_FGREP and select it if it is found.
13900  # Check for GNU $ac_path_FGREP
13901case `"$ac_path_FGREP" --version 2>&1` in
13902*GNU*)
13903  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13904*)
13905  ac_count=0
13906  $as_echo_n 0123456789 >"conftest.in"
13907  while :
13908  do
13909    cat "conftest.in" "conftest.in" >"conftest.tmp"
13910    mv "conftest.tmp" "conftest.in"
13911    cp "conftest.in" "conftest.nl"
13912    $as_echo 'FGREP' >> "conftest.nl"
13913    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13914    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13915    as_fn_arith $ac_count + 1 && ac_count=$as_val
13916    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13917      # Best one so far, save it but keep looking for a better one
13918      ac_cv_path_FGREP="$ac_path_FGREP"
13919      ac_path_FGREP_max=$ac_count
13920    fi
13921    # 10*(2^10) chars as input seems more than enough
13922    test $ac_count -gt 10 && break
13923  done
13924  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13925esac
13926
13927      $ac_path_FGREP_found && break 3
13928    done
13929  done
13930  done
13931IFS=$as_save_IFS
13932  if test -z "$ac_cv_path_FGREP"; then
13933    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13934  fi
13935else
13936  ac_cv_path_FGREP=$FGREP
13937fi
13938
13939   fi
13940fi
13941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13942$as_echo "$ac_cv_path_FGREP" >&6; }
13943 FGREP="$ac_cv_path_FGREP"
13944
13945
13946    else
13947      # If it succeeded, then it was overridden by the user. We will use it
13948      # for the tool.
13949
13950      # First remove it from the list of overridden variables, so we can test
13951      # for unknown variables in the end.
13952      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13953
13954      # Check if we try to supply an empty value
13955      if test "x$FGREP" = x; then
13956        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13957$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13958        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13959$as_echo_n "checking for FGREP... " >&6; }
13960        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13961$as_echo "disabled" >&6; }
13962      else
13963        # Check if the provided tool contains a complete path.
13964        tool_specified="$FGREP"
13965        tool_basename="${tool_specified##*/}"
13966        if test "x$tool_basename" = "x$tool_specified"; then
13967          # A command without a complete path is provided, search $PATH.
13968          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13969$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13970          # Extract the first word of "$tool_basename", so it can be a program name with args.
13971set dummy $tool_basename; ac_word=$2
13972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13973$as_echo_n "checking for $ac_word... " >&6; }
13974if ${ac_cv_path_FGREP+:} false; then :
13975  $as_echo_n "(cached) " >&6
13976else
13977  case $FGREP in
13978  [\\/]* | ?:[\\/]*)
13979  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13980  ;;
13981  *)
13982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13983for as_dir in $PATH
13984do
13985  IFS=$as_save_IFS
13986  test -z "$as_dir" && as_dir=.
13987    for ac_exec_ext in '' $ac_executable_extensions; do
13988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13989    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13991    break 2
13992  fi
13993done
13994  done
13995IFS=$as_save_IFS
13996
13997  ;;
13998esac
13999fi
14000FGREP=$ac_cv_path_FGREP
14001if test -n "$FGREP"; then
14002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14003$as_echo "$FGREP" >&6; }
14004else
14005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14006$as_echo "no" >&6; }
14007fi
14008
14009
14010          if test "x$FGREP" = x; then
14011            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14012          fi
14013        else
14014          # Otherwise we believe it is a complete path. Use it as it is.
14015          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14016$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14017          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14018$as_echo_n "checking for FGREP... " >&6; }
14019          if test ! -x "$tool_specified"; then
14020            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14021$as_echo "not found" >&6; }
14022            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14023          fi
14024          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14025$as_echo "$tool_specified" >&6; }
14026        fi
14027      fi
14028    fi
14029
14030  fi
14031
14032
14033  if test "x$FGREP" = x; then
14034    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14035  fi
14036
14037
14038
14039
14040  # Publish this variable in the help.
14041
14042
14043  if [ -z "${SED+x}" ]; then
14044    # The variable is not set by user, try to locate tool using the code snippet
14045    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14046$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14047if ${ac_cv_path_SED+:} false; then :
14048  $as_echo_n "(cached) " >&6
14049else
14050            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14051     for ac_i in 1 2 3 4 5 6 7; do
14052       ac_script="$ac_script$as_nl$ac_script"
14053     done
14054     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14055     { ac_script=; unset ac_script;}
14056     if test -z "$SED"; then
14057  ac_path_SED_found=false
14058  # Loop through the user's path and test for each of PROGNAME-LIST
14059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14060for as_dir in $PATH
14061do
14062  IFS=$as_save_IFS
14063  test -z "$as_dir" && as_dir=.
14064    for ac_prog in sed gsed; do
14065    for ac_exec_ext in '' $ac_executable_extensions; do
14066      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14067      as_fn_executable_p "$ac_path_SED" || continue
14068# Check for GNU ac_path_SED and select it if it is found.
14069  # Check for GNU $ac_path_SED
14070case `"$ac_path_SED" --version 2>&1` in
14071*GNU*)
14072  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14073*)
14074  ac_count=0
14075  $as_echo_n 0123456789 >"conftest.in"
14076  while :
14077  do
14078    cat "conftest.in" "conftest.in" >"conftest.tmp"
14079    mv "conftest.tmp" "conftest.in"
14080    cp "conftest.in" "conftest.nl"
14081    $as_echo '' >> "conftest.nl"
14082    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14083    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14084    as_fn_arith $ac_count + 1 && ac_count=$as_val
14085    if test $ac_count -gt ${ac_path_SED_max-0}; then
14086      # Best one so far, save it but keep looking for a better one
14087      ac_cv_path_SED="$ac_path_SED"
14088      ac_path_SED_max=$ac_count
14089    fi
14090    # 10*(2^10) chars as input seems more than enough
14091    test $ac_count -gt 10 && break
14092  done
14093  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14094esac
14095
14096      $ac_path_SED_found && break 3
14097    done
14098  done
14099  done
14100IFS=$as_save_IFS
14101  if test -z "$ac_cv_path_SED"; then
14102    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14103  fi
14104else
14105  ac_cv_path_SED=$SED
14106fi
14107
14108fi
14109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14110$as_echo "$ac_cv_path_SED" >&6; }
14111 SED="$ac_cv_path_SED"
14112  rm -f conftest.sed
14113
14114  else
14115    # The variable is set, but is it from the command line or the environment?
14116
14117    # Try to remove the string !SED! from our list.
14118    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14119    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14120      # If it failed, the variable was not from the command line. Ignore it,
14121      # but warn the user (except for BASH, which is always set by the calling BASH).
14122      if test "xSED" != xBASH; then
14123        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14124$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14125      fi
14126      # Try to locate tool using the code snippet
14127      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14128$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14129if ${ac_cv_path_SED+:} false; then :
14130  $as_echo_n "(cached) " >&6
14131else
14132            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14133     for ac_i in 1 2 3 4 5 6 7; do
14134       ac_script="$ac_script$as_nl$ac_script"
14135     done
14136     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14137     { ac_script=; unset ac_script;}
14138     if test -z "$SED"; then
14139  ac_path_SED_found=false
14140  # Loop through the user's path and test for each of PROGNAME-LIST
14141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14142for as_dir in $PATH
14143do
14144  IFS=$as_save_IFS
14145  test -z "$as_dir" && as_dir=.
14146    for ac_prog in sed gsed; do
14147    for ac_exec_ext in '' $ac_executable_extensions; do
14148      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14149      as_fn_executable_p "$ac_path_SED" || continue
14150# Check for GNU ac_path_SED and select it if it is found.
14151  # Check for GNU $ac_path_SED
14152case `"$ac_path_SED" --version 2>&1` in
14153*GNU*)
14154  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14155*)
14156  ac_count=0
14157  $as_echo_n 0123456789 >"conftest.in"
14158  while :
14159  do
14160    cat "conftest.in" "conftest.in" >"conftest.tmp"
14161    mv "conftest.tmp" "conftest.in"
14162    cp "conftest.in" "conftest.nl"
14163    $as_echo '' >> "conftest.nl"
14164    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14165    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14166    as_fn_arith $ac_count + 1 && ac_count=$as_val
14167    if test $ac_count -gt ${ac_path_SED_max-0}; then
14168      # Best one so far, save it but keep looking for a better one
14169      ac_cv_path_SED="$ac_path_SED"
14170      ac_path_SED_max=$ac_count
14171    fi
14172    # 10*(2^10) chars as input seems more than enough
14173    test $ac_count -gt 10 && break
14174  done
14175  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14176esac
14177
14178      $ac_path_SED_found && break 3
14179    done
14180  done
14181  done
14182IFS=$as_save_IFS
14183  if test -z "$ac_cv_path_SED"; then
14184    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14185  fi
14186else
14187  ac_cv_path_SED=$SED
14188fi
14189
14190fi
14191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14192$as_echo "$ac_cv_path_SED" >&6; }
14193 SED="$ac_cv_path_SED"
14194  rm -f conftest.sed
14195
14196    else
14197      # If it succeeded, then it was overridden by the user. We will use it
14198      # for the tool.
14199
14200      # First remove it from the list of overridden variables, so we can test
14201      # for unknown variables in the end.
14202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14203
14204      # Check if we try to supply an empty value
14205      if test "x$SED" = x; then
14206        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14207$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14208        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14209$as_echo_n "checking for SED... " >&6; }
14210        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14211$as_echo "disabled" >&6; }
14212      else
14213        # Check if the provided tool contains a complete path.
14214        tool_specified="$SED"
14215        tool_basename="${tool_specified##*/}"
14216        if test "x$tool_basename" = "x$tool_specified"; then
14217          # A command without a complete path is provided, search $PATH.
14218          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14219$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14220          # Extract the first word of "$tool_basename", so it can be a program name with args.
14221set dummy $tool_basename; ac_word=$2
14222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14223$as_echo_n "checking for $ac_word... " >&6; }
14224if ${ac_cv_path_SED+:} false; then :
14225  $as_echo_n "(cached) " >&6
14226else
14227  case $SED in
14228  [\\/]* | ?:[\\/]*)
14229  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14230  ;;
14231  *)
14232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14233for as_dir in $PATH
14234do
14235  IFS=$as_save_IFS
14236  test -z "$as_dir" && as_dir=.
14237    for ac_exec_ext in '' $ac_executable_extensions; do
14238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14239    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14241    break 2
14242  fi
14243done
14244  done
14245IFS=$as_save_IFS
14246
14247  ;;
14248esac
14249fi
14250SED=$ac_cv_path_SED
14251if test -n "$SED"; then
14252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14253$as_echo "$SED" >&6; }
14254else
14255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14256$as_echo "no" >&6; }
14257fi
14258
14259
14260          if test "x$SED" = x; then
14261            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14262          fi
14263        else
14264          # Otherwise we believe it is a complete path. Use it as it is.
14265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14266$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14267          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14268$as_echo_n "checking for SED... " >&6; }
14269          if test ! -x "$tool_specified"; then
14270            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14271$as_echo "not found" >&6; }
14272            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14273          fi
14274          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14275$as_echo "$tool_specified" >&6; }
14276        fi
14277      fi
14278    fi
14279
14280  fi
14281
14282
14283  if test "x$SED" = x; then
14284    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14285  fi
14286
14287
14288
14289  # Always force rm.
14290  RM="$RM -f"
14291
14292  # pwd behaves differently on various platforms and some don't support the -L flag.
14293  # Always use the bash builtin pwd to get uniform behavior.
14294  THEPWDCMD=pwd
14295
14296  # These are not required on all platforms
14297
14298
14299  # Publish this variable in the help.
14300
14301
14302  if [ -z "${CYGPATH+x}" ]; then
14303    # The variable is not set by user, try to locate tool using the code snippet
14304    for ac_prog in cygpath
14305do
14306  # Extract the first word of "$ac_prog", so it can be a program name with args.
14307set dummy $ac_prog; ac_word=$2
14308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14309$as_echo_n "checking for $ac_word... " >&6; }
14310if ${ac_cv_path_CYGPATH+:} false; then :
14311  $as_echo_n "(cached) " >&6
14312else
14313  case $CYGPATH in
14314  [\\/]* | ?:[\\/]*)
14315  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14316  ;;
14317  *)
14318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14319for as_dir in $PATH
14320do
14321  IFS=$as_save_IFS
14322  test -z "$as_dir" && as_dir=.
14323    for ac_exec_ext in '' $ac_executable_extensions; do
14324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14325    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14327    break 2
14328  fi
14329done
14330  done
14331IFS=$as_save_IFS
14332
14333  ;;
14334esac
14335fi
14336CYGPATH=$ac_cv_path_CYGPATH
14337if test -n "$CYGPATH"; then
14338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14339$as_echo "$CYGPATH" >&6; }
14340else
14341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14342$as_echo "no" >&6; }
14343fi
14344
14345
14346  test -n "$CYGPATH" && break
14347done
14348
14349  else
14350    # The variable is set, but is it from the command line or the environment?
14351
14352    # Try to remove the string !CYGPATH! from our list.
14353    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14354    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14355      # If it failed, the variable was not from the command line. Ignore it,
14356      # but warn the user (except for BASH, which is always set by the calling BASH).
14357      if test "xCYGPATH" != xBASH; then
14358        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14359$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14360      fi
14361      # Try to locate tool using the code snippet
14362      for ac_prog in cygpath
14363do
14364  # Extract the first word of "$ac_prog", so it can be a program name with args.
14365set dummy $ac_prog; ac_word=$2
14366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14367$as_echo_n "checking for $ac_word... " >&6; }
14368if ${ac_cv_path_CYGPATH+:} false; then :
14369  $as_echo_n "(cached) " >&6
14370else
14371  case $CYGPATH in
14372  [\\/]* | ?:[\\/]*)
14373  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14374  ;;
14375  *)
14376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14377for as_dir in $PATH
14378do
14379  IFS=$as_save_IFS
14380  test -z "$as_dir" && as_dir=.
14381    for ac_exec_ext in '' $ac_executable_extensions; do
14382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14383    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14385    break 2
14386  fi
14387done
14388  done
14389IFS=$as_save_IFS
14390
14391  ;;
14392esac
14393fi
14394CYGPATH=$ac_cv_path_CYGPATH
14395if test -n "$CYGPATH"; then
14396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14397$as_echo "$CYGPATH" >&6; }
14398else
14399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14400$as_echo "no" >&6; }
14401fi
14402
14403
14404  test -n "$CYGPATH" && break
14405done
14406
14407    else
14408      # If it succeeded, then it was overridden by the user. We will use it
14409      # for the tool.
14410
14411      # First remove it from the list of overridden variables, so we can test
14412      # for unknown variables in the end.
14413      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14414
14415      # Check if we try to supply an empty value
14416      if test "x$CYGPATH" = x; then
14417        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14418$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14419        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14420$as_echo_n "checking for CYGPATH... " >&6; }
14421        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14422$as_echo "disabled" >&6; }
14423      else
14424        # Check if the provided tool contains a complete path.
14425        tool_specified="$CYGPATH"
14426        tool_basename="${tool_specified##*/}"
14427        if test "x$tool_basename" = "x$tool_specified"; then
14428          # A command without a complete path is provided, search $PATH.
14429          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14430$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14431          # Extract the first word of "$tool_basename", so it can be a program name with args.
14432set dummy $tool_basename; ac_word=$2
14433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14434$as_echo_n "checking for $ac_word... " >&6; }
14435if ${ac_cv_path_CYGPATH+:} false; then :
14436  $as_echo_n "(cached) " >&6
14437else
14438  case $CYGPATH in
14439  [\\/]* | ?:[\\/]*)
14440  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14441  ;;
14442  *)
14443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14444for as_dir in $PATH
14445do
14446  IFS=$as_save_IFS
14447  test -z "$as_dir" && as_dir=.
14448    for ac_exec_ext in '' $ac_executable_extensions; do
14449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14450    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14452    break 2
14453  fi
14454done
14455  done
14456IFS=$as_save_IFS
14457
14458  ;;
14459esac
14460fi
14461CYGPATH=$ac_cv_path_CYGPATH
14462if test -n "$CYGPATH"; then
14463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14464$as_echo "$CYGPATH" >&6; }
14465else
14466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14467$as_echo "no" >&6; }
14468fi
14469
14470
14471          if test "x$CYGPATH" = x; then
14472            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14473          fi
14474        else
14475          # Otherwise we believe it is a complete path. Use it as it is.
14476          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14477$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14478          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14479$as_echo_n "checking for CYGPATH... " >&6; }
14480          if test ! -x "$tool_specified"; then
14481            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14482$as_echo "not found" >&6; }
14483            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14484          fi
14485          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14486$as_echo "$tool_specified" >&6; }
14487        fi
14488      fi
14489    fi
14490
14491  fi
14492
14493
14494
14495
14496  # Publish this variable in the help.
14497
14498
14499  if [ -z "${READLINK+x}" ]; then
14500    # The variable is not set by user, try to locate tool using the code snippet
14501    for ac_prog in greadlink readlink
14502do
14503  # Extract the first word of "$ac_prog", so it can be a program name with args.
14504set dummy $ac_prog; ac_word=$2
14505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14506$as_echo_n "checking for $ac_word... " >&6; }
14507if ${ac_cv_path_READLINK+:} false; then :
14508  $as_echo_n "(cached) " >&6
14509else
14510  case $READLINK in
14511  [\\/]* | ?:[\\/]*)
14512  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14513  ;;
14514  *)
14515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14516for as_dir in $PATH
14517do
14518  IFS=$as_save_IFS
14519  test -z "$as_dir" && as_dir=.
14520    for ac_exec_ext in '' $ac_executable_extensions; do
14521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14522    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14524    break 2
14525  fi
14526done
14527  done
14528IFS=$as_save_IFS
14529
14530  ;;
14531esac
14532fi
14533READLINK=$ac_cv_path_READLINK
14534if test -n "$READLINK"; then
14535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14536$as_echo "$READLINK" >&6; }
14537else
14538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14539$as_echo "no" >&6; }
14540fi
14541
14542
14543  test -n "$READLINK" && break
14544done
14545
14546  else
14547    # The variable is set, but is it from the command line or the environment?
14548
14549    # Try to remove the string !READLINK! from our list.
14550    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14551    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14552      # If it failed, the variable was not from the command line. Ignore it,
14553      # but warn the user (except for BASH, which is always set by the calling BASH).
14554      if test "xREADLINK" != xBASH; then
14555        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14556$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14557      fi
14558      # Try to locate tool using the code snippet
14559      for ac_prog in greadlink readlink
14560do
14561  # Extract the first word of "$ac_prog", so it can be a program name with args.
14562set dummy $ac_prog; ac_word=$2
14563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14564$as_echo_n "checking for $ac_word... " >&6; }
14565if ${ac_cv_path_READLINK+:} false; then :
14566  $as_echo_n "(cached) " >&6
14567else
14568  case $READLINK in
14569  [\\/]* | ?:[\\/]*)
14570  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14571  ;;
14572  *)
14573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14574for as_dir in $PATH
14575do
14576  IFS=$as_save_IFS
14577  test -z "$as_dir" && as_dir=.
14578    for ac_exec_ext in '' $ac_executable_extensions; do
14579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14580    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14582    break 2
14583  fi
14584done
14585  done
14586IFS=$as_save_IFS
14587
14588  ;;
14589esac
14590fi
14591READLINK=$ac_cv_path_READLINK
14592if test -n "$READLINK"; then
14593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14594$as_echo "$READLINK" >&6; }
14595else
14596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14597$as_echo "no" >&6; }
14598fi
14599
14600
14601  test -n "$READLINK" && break
14602done
14603
14604    else
14605      # If it succeeded, then it was overridden by the user. We will use it
14606      # for the tool.
14607
14608      # First remove it from the list of overridden variables, so we can test
14609      # for unknown variables in the end.
14610      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14611
14612      # Check if we try to supply an empty value
14613      if test "x$READLINK" = x; then
14614        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14615$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14616        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14617$as_echo_n "checking for READLINK... " >&6; }
14618        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14619$as_echo "disabled" >&6; }
14620      else
14621        # Check if the provided tool contains a complete path.
14622        tool_specified="$READLINK"
14623        tool_basename="${tool_specified##*/}"
14624        if test "x$tool_basename" = "x$tool_specified"; then
14625          # A command without a complete path is provided, search $PATH.
14626          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14627$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14628          # Extract the first word of "$tool_basename", so it can be a program name with args.
14629set dummy $tool_basename; ac_word=$2
14630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14631$as_echo_n "checking for $ac_word... " >&6; }
14632if ${ac_cv_path_READLINK+:} false; then :
14633  $as_echo_n "(cached) " >&6
14634else
14635  case $READLINK in
14636  [\\/]* | ?:[\\/]*)
14637  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14638  ;;
14639  *)
14640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14641for as_dir in $PATH
14642do
14643  IFS=$as_save_IFS
14644  test -z "$as_dir" && as_dir=.
14645    for ac_exec_ext in '' $ac_executable_extensions; do
14646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14647    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14649    break 2
14650  fi
14651done
14652  done
14653IFS=$as_save_IFS
14654
14655  ;;
14656esac
14657fi
14658READLINK=$ac_cv_path_READLINK
14659if test -n "$READLINK"; then
14660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14661$as_echo "$READLINK" >&6; }
14662else
14663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14664$as_echo "no" >&6; }
14665fi
14666
14667
14668          if test "x$READLINK" = x; then
14669            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14670          fi
14671        else
14672          # Otherwise we believe it is a complete path. Use it as it is.
14673          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14674$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14675          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14676$as_echo_n "checking for READLINK... " >&6; }
14677          if test ! -x "$tool_specified"; then
14678            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14679$as_echo "not found" >&6; }
14680            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14681          fi
14682          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14683$as_echo "$tool_specified" >&6; }
14684        fi
14685      fi
14686    fi
14687
14688  fi
14689
14690
14691
14692
14693  # Publish this variable in the help.
14694
14695
14696  if [ -z "${DF+x}" ]; then
14697    # The variable is not set by user, try to locate tool using the code snippet
14698    for ac_prog in df
14699do
14700  # Extract the first word of "$ac_prog", so it can be a program name with args.
14701set dummy $ac_prog; ac_word=$2
14702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14703$as_echo_n "checking for $ac_word... " >&6; }
14704if ${ac_cv_path_DF+:} false; then :
14705  $as_echo_n "(cached) " >&6
14706else
14707  case $DF in
14708  [\\/]* | ?:[\\/]*)
14709  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14710  ;;
14711  *)
14712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14713for as_dir in $PATH
14714do
14715  IFS=$as_save_IFS
14716  test -z "$as_dir" && as_dir=.
14717    for ac_exec_ext in '' $ac_executable_extensions; do
14718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14719    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14721    break 2
14722  fi
14723done
14724  done
14725IFS=$as_save_IFS
14726
14727  ;;
14728esac
14729fi
14730DF=$ac_cv_path_DF
14731if test -n "$DF"; then
14732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14733$as_echo "$DF" >&6; }
14734else
14735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14736$as_echo "no" >&6; }
14737fi
14738
14739
14740  test -n "$DF" && break
14741done
14742
14743  else
14744    # The variable is set, but is it from the command line or the environment?
14745
14746    # Try to remove the string !DF! from our list.
14747    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14748    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14749      # If it failed, the variable was not from the command line. Ignore it,
14750      # but warn the user (except for BASH, which is always set by the calling BASH).
14751      if test "xDF" != xBASH; then
14752        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14753$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14754      fi
14755      # Try to locate tool using the code snippet
14756      for ac_prog in df
14757do
14758  # Extract the first word of "$ac_prog", so it can be a program name with args.
14759set dummy $ac_prog; ac_word=$2
14760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14761$as_echo_n "checking for $ac_word... " >&6; }
14762if ${ac_cv_path_DF+:} false; then :
14763  $as_echo_n "(cached) " >&6
14764else
14765  case $DF in
14766  [\\/]* | ?:[\\/]*)
14767  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14768  ;;
14769  *)
14770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14771for as_dir in $PATH
14772do
14773  IFS=$as_save_IFS
14774  test -z "$as_dir" && as_dir=.
14775    for ac_exec_ext in '' $ac_executable_extensions; do
14776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14777    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14779    break 2
14780  fi
14781done
14782  done
14783IFS=$as_save_IFS
14784
14785  ;;
14786esac
14787fi
14788DF=$ac_cv_path_DF
14789if test -n "$DF"; then
14790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14791$as_echo "$DF" >&6; }
14792else
14793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14794$as_echo "no" >&6; }
14795fi
14796
14797
14798  test -n "$DF" && break
14799done
14800
14801    else
14802      # If it succeeded, then it was overridden by the user. We will use it
14803      # for the tool.
14804
14805      # First remove it from the list of overridden variables, so we can test
14806      # for unknown variables in the end.
14807      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14808
14809      # Check if we try to supply an empty value
14810      if test "x$DF" = x; then
14811        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14812$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14813        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14814$as_echo_n "checking for DF... " >&6; }
14815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14816$as_echo "disabled" >&6; }
14817      else
14818        # Check if the provided tool contains a complete path.
14819        tool_specified="$DF"
14820        tool_basename="${tool_specified##*/}"
14821        if test "x$tool_basename" = "x$tool_specified"; then
14822          # A command without a complete path is provided, search $PATH.
14823          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14824$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14825          # Extract the first word of "$tool_basename", so it can be a program name with args.
14826set dummy $tool_basename; ac_word=$2
14827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14828$as_echo_n "checking for $ac_word... " >&6; }
14829if ${ac_cv_path_DF+:} false; then :
14830  $as_echo_n "(cached) " >&6
14831else
14832  case $DF in
14833  [\\/]* | ?:[\\/]*)
14834  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14835  ;;
14836  *)
14837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14838for as_dir in $PATH
14839do
14840  IFS=$as_save_IFS
14841  test -z "$as_dir" && as_dir=.
14842    for ac_exec_ext in '' $ac_executable_extensions; do
14843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14844    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14846    break 2
14847  fi
14848done
14849  done
14850IFS=$as_save_IFS
14851
14852  ;;
14853esac
14854fi
14855DF=$ac_cv_path_DF
14856if test -n "$DF"; then
14857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14858$as_echo "$DF" >&6; }
14859else
14860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14861$as_echo "no" >&6; }
14862fi
14863
14864
14865          if test "x$DF" = x; then
14866            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14867          fi
14868        else
14869          # Otherwise we believe it is a complete path. Use it as it is.
14870          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14871$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14872          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14873$as_echo_n "checking for DF... " >&6; }
14874          if test ! -x "$tool_specified"; then
14875            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14876$as_echo "not found" >&6; }
14877            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14878          fi
14879          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14880$as_echo "$tool_specified" >&6; }
14881        fi
14882      fi
14883    fi
14884
14885  fi
14886
14887
14888
14889
14890  # Publish this variable in the help.
14891
14892
14893  if [ -z "${CPIO+x}" ]; then
14894    # The variable is not set by user, try to locate tool using the code snippet
14895    for ac_prog in cpio bsdcpio
14896do
14897  # Extract the first word of "$ac_prog", so it can be a program name with args.
14898set dummy $ac_prog; ac_word=$2
14899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14900$as_echo_n "checking for $ac_word... " >&6; }
14901if ${ac_cv_path_CPIO+:} false; then :
14902  $as_echo_n "(cached) " >&6
14903else
14904  case $CPIO in
14905  [\\/]* | ?:[\\/]*)
14906  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14907  ;;
14908  *)
14909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14910for as_dir in $PATH
14911do
14912  IFS=$as_save_IFS
14913  test -z "$as_dir" && as_dir=.
14914    for ac_exec_ext in '' $ac_executable_extensions; do
14915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14916    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14918    break 2
14919  fi
14920done
14921  done
14922IFS=$as_save_IFS
14923
14924  ;;
14925esac
14926fi
14927CPIO=$ac_cv_path_CPIO
14928if test -n "$CPIO"; then
14929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14930$as_echo "$CPIO" >&6; }
14931else
14932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14933$as_echo "no" >&6; }
14934fi
14935
14936
14937  test -n "$CPIO" && break
14938done
14939
14940  else
14941    # The variable is set, but is it from the command line or the environment?
14942
14943    # Try to remove the string !CPIO! from our list.
14944    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14945    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14946      # If it failed, the variable was not from the command line. Ignore it,
14947      # but warn the user (except for BASH, which is always set by the calling BASH).
14948      if test "xCPIO" != xBASH; then
14949        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14950$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14951      fi
14952      # Try to locate tool using the code snippet
14953      for ac_prog in cpio bsdcpio
14954do
14955  # Extract the first word of "$ac_prog", so it can be a program name with args.
14956set dummy $ac_prog; ac_word=$2
14957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14958$as_echo_n "checking for $ac_word... " >&6; }
14959if ${ac_cv_path_CPIO+:} false; then :
14960  $as_echo_n "(cached) " >&6
14961else
14962  case $CPIO in
14963  [\\/]* | ?:[\\/]*)
14964  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14965  ;;
14966  *)
14967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14968for as_dir in $PATH
14969do
14970  IFS=$as_save_IFS
14971  test -z "$as_dir" && as_dir=.
14972    for ac_exec_ext in '' $ac_executable_extensions; do
14973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14974    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14976    break 2
14977  fi
14978done
14979  done
14980IFS=$as_save_IFS
14981
14982  ;;
14983esac
14984fi
14985CPIO=$ac_cv_path_CPIO
14986if test -n "$CPIO"; then
14987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14988$as_echo "$CPIO" >&6; }
14989else
14990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14991$as_echo "no" >&6; }
14992fi
14993
14994
14995  test -n "$CPIO" && break
14996done
14997
14998    else
14999      # If it succeeded, then it was overridden by the user. We will use it
15000      # for the tool.
15001
15002      # First remove it from the list of overridden variables, so we can test
15003      # for unknown variables in the end.
15004      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15005
15006      # Check if we try to supply an empty value
15007      if test "x$CPIO" = x; then
15008        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15009$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15010        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15011$as_echo_n "checking for CPIO... " >&6; }
15012        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15013$as_echo "disabled" >&6; }
15014      else
15015        # Check if the provided tool contains a complete path.
15016        tool_specified="$CPIO"
15017        tool_basename="${tool_specified##*/}"
15018        if test "x$tool_basename" = "x$tool_specified"; then
15019          # A command without a complete path is provided, search $PATH.
15020          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15021$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15022          # Extract the first word of "$tool_basename", so it can be a program name with args.
15023set dummy $tool_basename; ac_word=$2
15024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15025$as_echo_n "checking for $ac_word... " >&6; }
15026if ${ac_cv_path_CPIO+:} false; then :
15027  $as_echo_n "(cached) " >&6
15028else
15029  case $CPIO in
15030  [\\/]* | ?:[\\/]*)
15031  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15032  ;;
15033  *)
15034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15035for as_dir in $PATH
15036do
15037  IFS=$as_save_IFS
15038  test -z "$as_dir" && as_dir=.
15039    for ac_exec_ext in '' $ac_executable_extensions; do
15040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15041    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15043    break 2
15044  fi
15045done
15046  done
15047IFS=$as_save_IFS
15048
15049  ;;
15050esac
15051fi
15052CPIO=$ac_cv_path_CPIO
15053if test -n "$CPIO"; then
15054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15055$as_echo "$CPIO" >&6; }
15056else
15057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15058$as_echo "no" >&6; }
15059fi
15060
15061
15062          if test "x$CPIO" = x; then
15063            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15064          fi
15065        else
15066          # Otherwise we believe it is a complete path. Use it as it is.
15067          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15068$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15069          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15070$as_echo_n "checking for CPIO... " >&6; }
15071          if test ! -x "$tool_specified"; then
15072            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15073$as_echo "not found" >&6; }
15074            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15075          fi
15076          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15077$as_echo "$tool_specified" >&6; }
15078        fi
15079      fi
15080    fi
15081
15082  fi
15083
15084
15085
15086
15087  # Publish this variable in the help.
15088
15089
15090  if [ -z "${NICE+x}" ]; then
15091    # The variable is not set by user, try to locate tool using the code snippet
15092    for ac_prog in nice
15093do
15094  # Extract the first word of "$ac_prog", so it can be a program name with args.
15095set dummy $ac_prog; ac_word=$2
15096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15097$as_echo_n "checking for $ac_word... " >&6; }
15098if ${ac_cv_path_NICE+:} false; then :
15099  $as_echo_n "(cached) " >&6
15100else
15101  case $NICE in
15102  [\\/]* | ?:[\\/]*)
15103  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15104  ;;
15105  *)
15106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15107for as_dir in $PATH
15108do
15109  IFS=$as_save_IFS
15110  test -z "$as_dir" && as_dir=.
15111    for ac_exec_ext in '' $ac_executable_extensions; do
15112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15113    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15115    break 2
15116  fi
15117done
15118  done
15119IFS=$as_save_IFS
15120
15121  ;;
15122esac
15123fi
15124NICE=$ac_cv_path_NICE
15125if test -n "$NICE"; then
15126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15127$as_echo "$NICE" >&6; }
15128else
15129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15130$as_echo "no" >&6; }
15131fi
15132
15133
15134  test -n "$NICE" && break
15135done
15136
15137  else
15138    # The variable is set, but is it from the command line or the environment?
15139
15140    # Try to remove the string !NICE! from our list.
15141    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15142    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15143      # If it failed, the variable was not from the command line. Ignore it,
15144      # but warn the user (except for BASH, which is always set by the calling BASH).
15145      if test "xNICE" != xBASH; then
15146        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15147$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15148      fi
15149      # Try to locate tool using the code snippet
15150      for ac_prog in nice
15151do
15152  # Extract the first word of "$ac_prog", so it can be a program name with args.
15153set dummy $ac_prog; ac_word=$2
15154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15155$as_echo_n "checking for $ac_word... " >&6; }
15156if ${ac_cv_path_NICE+:} false; then :
15157  $as_echo_n "(cached) " >&6
15158else
15159  case $NICE in
15160  [\\/]* | ?:[\\/]*)
15161  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15162  ;;
15163  *)
15164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15165for as_dir in $PATH
15166do
15167  IFS=$as_save_IFS
15168  test -z "$as_dir" && as_dir=.
15169    for ac_exec_ext in '' $ac_executable_extensions; do
15170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15171    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15173    break 2
15174  fi
15175done
15176  done
15177IFS=$as_save_IFS
15178
15179  ;;
15180esac
15181fi
15182NICE=$ac_cv_path_NICE
15183if test -n "$NICE"; then
15184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15185$as_echo "$NICE" >&6; }
15186else
15187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15188$as_echo "no" >&6; }
15189fi
15190
15191
15192  test -n "$NICE" && break
15193done
15194
15195    else
15196      # If it succeeded, then it was overridden by the user. We will use it
15197      # for the tool.
15198
15199      # First remove it from the list of overridden variables, so we can test
15200      # for unknown variables in the end.
15201      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15202
15203      # Check if we try to supply an empty value
15204      if test "x$NICE" = x; then
15205        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15206$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15207        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15208$as_echo_n "checking for NICE... " >&6; }
15209        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15210$as_echo "disabled" >&6; }
15211      else
15212        # Check if the provided tool contains a complete path.
15213        tool_specified="$NICE"
15214        tool_basename="${tool_specified##*/}"
15215        if test "x$tool_basename" = "x$tool_specified"; then
15216          # A command without a complete path is provided, search $PATH.
15217          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15218$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15219          # Extract the first word of "$tool_basename", so it can be a program name with args.
15220set dummy $tool_basename; ac_word=$2
15221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15222$as_echo_n "checking for $ac_word... " >&6; }
15223if ${ac_cv_path_NICE+:} false; then :
15224  $as_echo_n "(cached) " >&6
15225else
15226  case $NICE in
15227  [\\/]* | ?:[\\/]*)
15228  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15229  ;;
15230  *)
15231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15232for as_dir in $PATH
15233do
15234  IFS=$as_save_IFS
15235  test -z "$as_dir" && as_dir=.
15236    for ac_exec_ext in '' $ac_executable_extensions; do
15237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15238    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15240    break 2
15241  fi
15242done
15243  done
15244IFS=$as_save_IFS
15245
15246  ;;
15247esac
15248fi
15249NICE=$ac_cv_path_NICE
15250if test -n "$NICE"; then
15251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15252$as_echo "$NICE" >&6; }
15253else
15254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15255$as_echo "no" >&6; }
15256fi
15257
15258
15259          if test "x$NICE" = x; then
15260            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15261          fi
15262        else
15263          # Otherwise we believe it is a complete path. Use it as it is.
15264          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15265$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15266          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15267$as_echo_n "checking for NICE... " >&6; }
15268          if test ! -x "$tool_specified"; then
15269            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15270$as_echo "not found" >&6; }
15271            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15272          fi
15273          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15274$as_echo "$tool_specified" >&6; }
15275        fi
15276      fi
15277    fi
15278
15279  fi
15280
15281
15282
15283
15284# Now we can determine OpenJDK build and target platforms. This is required to
15285# have early on.
15286# Make sure we can run config.sub.
15287$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15288  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15289
15290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15291$as_echo_n "checking build system type... " >&6; }
15292if ${ac_cv_build+:} false; then :
15293  $as_echo_n "(cached) " >&6
15294else
15295  ac_build_alias=$build_alias
15296test "x$ac_build_alias" = x &&
15297  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15298test "x$ac_build_alias" = x &&
15299  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15300ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15301  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15302
15303fi
15304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15305$as_echo "$ac_cv_build" >&6; }
15306case $ac_cv_build in
15307*-*-*) ;;
15308*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15309esac
15310build=$ac_cv_build
15311ac_save_IFS=$IFS; IFS='-'
15312set x $ac_cv_build
15313shift
15314build_cpu=$1
15315build_vendor=$2
15316shift; shift
15317# Remember, the first character of IFS is used to create $*,
15318# except with old shells:
15319build_os=$*
15320IFS=$ac_save_IFS
15321case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15322
15323
15324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15325$as_echo_n "checking host system type... " >&6; }
15326if ${ac_cv_host+:} false; then :
15327  $as_echo_n "(cached) " >&6
15328else
15329  if test "x$host_alias" = x; then
15330  ac_cv_host=$ac_cv_build
15331else
15332  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15333    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15334fi
15335
15336fi
15337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15338$as_echo "$ac_cv_host" >&6; }
15339case $ac_cv_host in
15340*-*-*) ;;
15341*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15342esac
15343host=$ac_cv_host
15344ac_save_IFS=$IFS; IFS='-'
15345set x $ac_cv_host
15346shift
15347host_cpu=$1
15348host_vendor=$2
15349shift; shift
15350# Remember, the first character of IFS is used to create $*,
15351# except with old shells:
15352host_os=$*
15353IFS=$ac_save_IFS
15354case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15355
15356
15357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15358$as_echo_n "checking target system type... " >&6; }
15359if ${ac_cv_target+:} false; then :
15360  $as_echo_n "(cached) " >&6
15361else
15362  if test "x$target_alias" = x; then
15363  ac_cv_target=$ac_cv_host
15364else
15365  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15366    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15367fi
15368
15369fi
15370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15371$as_echo "$ac_cv_target" >&6; }
15372case $ac_cv_target in
15373*-*-*) ;;
15374*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15375esac
15376target=$ac_cv_target
15377ac_save_IFS=$IFS; IFS='-'
15378set x $ac_cv_target
15379shift
15380target_cpu=$1
15381target_vendor=$2
15382shift; shift
15383# Remember, the first character of IFS is used to create $*,
15384# except with old shells:
15385target_os=$*
15386IFS=$ac_save_IFS
15387case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15388
15389
15390# The aliases save the names the user supplied, while $host etc.
15391# will get canonicalized.
15392test -n "$target_alias" &&
15393  test "$program_prefix$program_suffix$program_transform_name" = \
15394    NONENONEs,x,x, &&
15395  program_prefix=${target_alias}-
15396
15397  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15398  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15399  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15400  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15401  # to use the configure naming style.
15402
15403
15404
15405
15406
15407  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15408  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15409  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15410  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15411  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15412  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15413
15414
15415
15416  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15417
15418  case "$build_os" in
15419    *linux*)
15420      VAR_OS=linux
15421      VAR_OS_TYPE=unix
15422      ;;
15423    *solaris*)
15424      VAR_OS=solaris
15425      VAR_OS_TYPE=unix
15426      ;;
15427    *darwin*)
15428      VAR_OS=macosx
15429      VAR_OS_TYPE=unix
15430      ;;
15431    *bsd*)
15432      VAR_OS=bsd
15433      VAR_OS_TYPE=unix
15434      ;;
15435    *cygwin*)
15436      VAR_OS=windows
15437      VAR_OS_ENV=windows.cygwin
15438      ;;
15439    *mingw*)
15440      VAR_OS=windows
15441      VAR_OS_ENV=windows.msys
15442      ;;
15443    *aix*)
15444      VAR_OS=aix
15445      VAR_OS_TYPE=unix
15446      ;;
15447    *)
15448      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15449      ;;
15450  esac
15451
15452
15453  # First argument is the cpu name from the trip/quad
15454  case "$build_cpu" in
15455    x86_64)
15456      VAR_CPU=x86_64
15457      VAR_CPU_ARCH=x86
15458      VAR_CPU_BITS=64
15459      VAR_CPU_ENDIAN=little
15460      ;;
15461    i?86)
15462      VAR_CPU=x86
15463      VAR_CPU_ARCH=x86
15464      VAR_CPU_BITS=32
15465      VAR_CPU_ENDIAN=little
15466      ;;
15467    arm*)
15468      VAR_CPU=arm
15469      VAR_CPU_ARCH=arm
15470      VAR_CPU_BITS=32
15471      VAR_CPU_ENDIAN=little
15472      ;;
15473    aarch64)
15474      VAR_CPU=aarch64
15475      VAR_CPU_ARCH=aarch64
15476      VAR_CPU_BITS=64
15477      VAR_CPU_ENDIAN=little
15478      ;;
15479    powerpc)
15480      VAR_CPU=ppc
15481      VAR_CPU_ARCH=ppc
15482      VAR_CPU_BITS=32
15483      VAR_CPU_ENDIAN=big
15484      ;;
15485    powerpc64)
15486      VAR_CPU=ppc64
15487      VAR_CPU_ARCH=ppc
15488      VAR_CPU_BITS=64
15489      VAR_CPU_ENDIAN=big
15490      ;;
15491    powerpc64le)
15492      VAR_CPU=ppc64le
15493      VAR_CPU_ARCH=ppc
15494      VAR_CPU_BITS=64
15495      VAR_CPU_ENDIAN=little
15496      ;;
15497    s390)
15498      VAR_CPU=s390
15499      VAR_CPU_ARCH=s390
15500      VAR_CPU_BITS=32
15501      VAR_CPU_ENDIAN=big
15502      ;;
15503    s390x)
15504      VAR_CPU=s390x
15505      VAR_CPU_ARCH=s390
15506      VAR_CPU_BITS=64
15507      VAR_CPU_ENDIAN=big
15508      ;;
15509    sparc)
15510      VAR_CPU=sparc
15511      VAR_CPU_ARCH=sparc
15512      VAR_CPU_BITS=32
15513      VAR_CPU_ENDIAN=big
15514      ;;
15515    sparcv9|sparc64)
15516      VAR_CPU=sparcv9
15517      VAR_CPU_ARCH=sparc
15518      VAR_CPU_BITS=64
15519      VAR_CPU_ENDIAN=big
15520      ;;
15521    *)
15522      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15523      ;;
15524  esac
15525
15526  # ..and setup our own variables. (Do this explicitely to facilitate searching)
15527  OPENJDK_BUILD_OS="$VAR_OS"
15528  if test "x$VAR_OS_TYPE" != x; then
15529    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15530  else
15531    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15532  fi
15533  if test "x$VAR_OS_ENV" != x; then
15534    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15535  else
15536    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15537  fi
15538  OPENJDK_BUILD_CPU="$VAR_CPU"
15539  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15540  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15541  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15542
15543
15544
15545
15546
15547
15548
15549
15550  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15551$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15553$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15554
15555  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15556
15557  case "$host_os" in
15558    *linux*)
15559      VAR_OS=linux
15560      VAR_OS_TYPE=unix
15561      ;;
15562    *solaris*)
15563      VAR_OS=solaris
15564      VAR_OS_TYPE=unix
15565      ;;
15566    *darwin*)
15567      VAR_OS=macosx
15568      VAR_OS_TYPE=unix
15569      ;;
15570    *bsd*)
15571      VAR_OS=bsd
15572      VAR_OS_TYPE=unix
15573      ;;
15574    *cygwin*)
15575      VAR_OS=windows
15576      VAR_OS_ENV=windows.cygwin
15577      ;;
15578    *mingw*)
15579      VAR_OS=windows
15580      VAR_OS_ENV=windows.msys
15581      ;;
15582    *aix*)
15583      VAR_OS=aix
15584      VAR_OS_TYPE=unix
15585      ;;
15586    *)
15587      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15588      ;;
15589  esac
15590
15591
15592  # First argument is the cpu name from the trip/quad
15593  case "$host_cpu" in
15594    x86_64)
15595      VAR_CPU=x86_64
15596      VAR_CPU_ARCH=x86
15597      VAR_CPU_BITS=64
15598      VAR_CPU_ENDIAN=little
15599      ;;
15600    i?86)
15601      VAR_CPU=x86
15602      VAR_CPU_ARCH=x86
15603      VAR_CPU_BITS=32
15604      VAR_CPU_ENDIAN=little
15605      ;;
15606    arm*)
15607      VAR_CPU=arm
15608      VAR_CPU_ARCH=arm
15609      VAR_CPU_BITS=32
15610      VAR_CPU_ENDIAN=little
15611      ;;
15612    aarch64)
15613      VAR_CPU=aarch64
15614      VAR_CPU_ARCH=aarch64
15615      VAR_CPU_BITS=64
15616      VAR_CPU_ENDIAN=little
15617      ;;
15618    powerpc)
15619      VAR_CPU=ppc
15620      VAR_CPU_ARCH=ppc
15621      VAR_CPU_BITS=32
15622      VAR_CPU_ENDIAN=big
15623      ;;
15624    powerpc64)
15625      VAR_CPU=ppc64
15626      VAR_CPU_ARCH=ppc
15627      VAR_CPU_BITS=64
15628      VAR_CPU_ENDIAN=big
15629      ;;
15630    powerpc64le)
15631      VAR_CPU=ppc64le
15632      VAR_CPU_ARCH=ppc
15633      VAR_CPU_BITS=64
15634      VAR_CPU_ENDIAN=little
15635      ;;
15636    s390)
15637      VAR_CPU=s390
15638      VAR_CPU_ARCH=s390
15639      VAR_CPU_BITS=32
15640      VAR_CPU_ENDIAN=big
15641      ;;
15642    s390x)
15643      VAR_CPU=s390x
15644      VAR_CPU_ARCH=s390
15645      VAR_CPU_BITS=64
15646      VAR_CPU_ENDIAN=big
15647      ;;
15648    sparc)
15649      VAR_CPU=sparc
15650      VAR_CPU_ARCH=sparc
15651      VAR_CPU_BITS=32
15652      VAR_CPU_ENDIAN=big
15653      ;;
15654    sparcv9|sparc64)
15655      VAR_CPU=sparcv9
15656      VAR_CPU_ARCH=sparc
15657      VAR_CPU_BITS=64
15658      VAR_CPU_ENDIAN=big
15659      ;;
15660    *)
15661      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15662      ;;
15663  esac
15664
15665  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15666  OPENJDK_TARGET_OS="$VAR_OS"
15667  if test "x$VAR_OS_TYPE" != x; then
15668    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15669  else
15670    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15671  fi
15672  if test "x$VAR_OS_ENV" != x; then
15673    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15674  else
15675    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15676  fi
15677  OPENJDK_TARGET_CPU="$VAR_CPU"
15678  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15679  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15680  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15681
15682
15683
15684
15685
15686
15687
15688
15689  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15690$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15692$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15693
15694
15695
15696# Check whether --with-target-bits was given.
15697if test "${with_target_bits+set}" = set; then :
15698  withval=$with_target_bits;
15699fi
15700
15701
15702  # We have three types of compiles:
15703  # native  == normal compilation, target system == build system
15704  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15705  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15706  #
15707  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15708    # We're doing a proper cross-compilation
15709    COMPILE_TYPE="cross"
15710  else
15711    COMPILE_TYPE="native"
15712  fi
15713
15714  if test "x$with_target_bits" != x; then
15715    if test "x$COMPILE_TYPE" = "xcross"; then
15716      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15717    fi
15718
15719    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15720      # A reduced build is requested
15721      COMPILE_TYPE="reduced"
15722      OPENJDK_TARGET_CPU_BITS=32
15723      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15724        OPENJDK_TARGET_CPU=x86
15725      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15726        OPENJDK_TARGET_CPU=sparc
15727      else
15728        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15729      fi
15730    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15731      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
15732    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15733      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15734$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15735    else
15736      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15737    fi
15738  fi
15739
15740
15741  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15742$as_echo_n "checking compilation type... " >&6; }
15743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15744$as_echo "$COMPILE_TYPE" >&6; }
15745
15746
15747  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15748    REQUIRED_OS_NAME=SunOS
15749    REQUIRED_OS_VERSION=5.10
15750  fi
15751  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15752    REQUIRED_OS_NAME=Linux
15753    REQUIRED_OS_VERSION=2.6
15754  fi
15755  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15756    REQUIRED_OS_NAME=Windows
15757    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15758      REQUIRED_OS_VERSION=5.2
15759    else
15760      REQUIRED_OS_VERSION=5.1
15761    fi
15762  fi
15763  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15764    REQUIRED_OS_NAME=Darwin
15765    REQUIRED_OS_VERSION=11.2
15766  fi
15767  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15768    REQUIRED_OS_NAME=AIX
15769    REQUIRED_OS_VERSION=7.1
15770  fi
15771
15772
15773
15774
15775
15776
15777  # Also store the legacy naming of the cpu.
15778  # Ie i586 and amd64 instead of x86 and x86_64
15779  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15780  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15781    OPENJDK_TARGET_CPU_LEGACY="i586"
15782  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15783    # On all platforms except MacOSX replace x86_64 with amd64.
15784    OPENJDK_TARGET_CPU_LEGACY="amd64"
15785  fi
15786
15787
15788  # And the second legacy naming of the cpu.
15789  # Ie i386 and amd64 instead of x86 and x86_64.
15790  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15791  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15792    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15793  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15794    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15795  fi
15796
15797
15798  # This is the name of the cpu (but using i386 and amd64 instead of
15799  # x86 and x86_64, respectively), preceeded by a /, to be used when
15800  # locating libraries. On macosx, it's empty, though.
15801  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15802  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15803    OPENJDK_TARGET_CPU_LIBDIR=""
15804  fi
15805
15806
15807  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15808  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15809  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15810  OPENJDK_TARGET_CPU_ISADIR=""
15811  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15812    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15813      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15814    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15815      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15816    fi
15817  fi
15818
15819
15820  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15821  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15822  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15823    # On linux only, we replace x86 with i386.
15824    OPENJDK_TARGET_CPU_OSARCH="i386"
15825  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15826    # On all platforms except macosx, we replace x86_64 with amd64.
15827    OPENJDK_TARGET_CPU_OSARCH="amd64"
15828  fi
15829
15830
15831  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15832  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15833    OPENJDK_TARGET_CPU_JLI="i386"
15834  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15835    # On all platforms except macosx, we replace x86_64 with amd64.
15836    OPENJDK_TARGET_CPU_JLI="amd64"
15837  fi
15838  # Now setup the -D flags for building libjli.
15839  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15840  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15841    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15842      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15843    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15844      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15845    fi
15846  fi
15847
15848
15849  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15850      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15851  else
15852      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15853  fi
15854
15855
15856  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15857  # Macosx is osx and x86_64 is x64
15858  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15859    OPENJDK_TARGET_OS_BUNDLE="osx"
15860  else
15861    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15862  fi
15863  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15864    OPENJDK_TARGET_CPU_BUNDLE="x64"
15865  else
15866    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15867  fi
15868  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15869
15870
15871
15872
15873  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15874    A_LP64="LP64:="
15875    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15876    # unpack200.exe
15877    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15878      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15879    fi
15880  fi
15881  LP64=$A_LP64
15882
15883
15884  if test "x$COMPILE_TYPE" = "xcross"; then
15885    # FIXME: ... or should this include reduced builds..?
15886    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15887  else
15888    DEFINE_CROSS_COMPILE_ARCH=""
15889  fi
15890
15891
15892  # Convert openjdk platform names to hotspot names
15893
15894  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15895  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15896    HOTSPOT_TARGET_OS=bsd
15897  fi
15898
15899
15900  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15901  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15902    HOTSPOT_TARGET_OS_TYPE=posix
15903  fi
15904
15905
15906  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15907  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15908    HOTSPOT_TARGET_CPU=x86_32
15909  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15910    HOTSPOT_TARGET_CPU=sparc
15911  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15912    HOTSPOT_TARGET_CPU=ppc_64
15913  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15914    HOTSPOT_TARGET_CPU=ppc_64
15915  fi
15916
15917
15918  # This is identical with OPENJDK_*, but define anyway for consistency.
15919  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15920
15921
15922  # Setup HOTSPOT_TARGET_CPU_DEFINE
15923  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15924    HOTSPOT_TARGET_CPU_DEFINE=IA32
15925  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15926    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15927  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15928    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15929  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15930    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15931  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15932    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15933  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15934    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15935
15936  # The cpu defines below are for zero, we don't support them directly.
15937  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15938    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15939  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15940    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15941  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15942    HOTSPOT_TARGET_CPU_DEFINE=S390
15943  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15944    HOTSPOT_TARGET_CPU_DEFINE=S390
15945  elif test "x$OPENJDK_TARGET_CPU" != x; then
15946    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
15947  fi
15948
15949
15950
15951
15952  # Also store the legacy naming of the cpu.
15953  # Ie i586 and amd64 instead of x86 and x86_64
15954  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15955  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15956    OPENJDK_BUILD_CPU_LEGACY="i586"
15957  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15958    # On all platforms except MacOSX replace x86_64 with amd64.
15959    OPENJDK_BUILD_CPU_LEGACY="amd64"
15960  fi
15961
15962
15963  # And the second legacy naming of the cpu.
15964  # Ie i386 and amd64 instead of x86 and x86_64.
15965  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15966  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15967    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15968  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15969    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15970  fi
15971
15972
15973  # This is the name of the cpu (but using i386 and amd64 instead of
15974  # x86 and x86_64, respectively), preceeded by a /, to be used when
15975  # locating libraries. On macosx, it's empty, though.
15976  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15977  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15978    OPENJDK_BUILD_CPU_LIBDIR=""
15979  fi
15980
15981
15982  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15983  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15984  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15985  OPENJDK_BUILD_CPU_ISADIR=""
15986  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15987    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15988      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15989    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15990      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15991    fi
15992  fi
15993
15994
15995  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15996  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15997  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15998    # On linux only, we replace x86 with i386.
15999    OPENJDK_BUILD_CPU_OSARCH="i386"
16000  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16001    # On all platforms except macosx, we replace x86_64 with amd64.
16002    OPENJDK_BUILD_CPU_OSARCH="amd64"
16003  fi
16004
16005
16006  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16007  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16008    OPENJDK_BUILD_CPU_JLI="i386"
16009  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16010    # On all platforms except macosx, we replace x86_64 with amd64.
16011    OPENJDK_BUILD_CPU_JLI="amd64"
16012  fi
16013  # Now setup the -D flags for building libjli.
16014  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
16015  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16016    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
16017      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
16018    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
16019      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
16020    fi
16021  fi
16022
16023
16024  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16025      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16026  else
16027      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16028  fi
16029
16030
16031  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16032  # Macosx is osx and x86_64 is x64
16033  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16034    OPENJDK_BUILD_OS_BUNDLE="osx"
16035  else
16036    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16037  fi
16038  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16039    OPENJDK_BUILD_CPU_BUNDLE="x64"
16040  else
16041    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16042  fi
16043  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16044
16045
16046
16047
16048  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16049    A_LP64="LP64:="
16050    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16051    # unpack200.exe
16052    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16053      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16054    fi
16055  fi
16056  LP64=$A_LP64
16057
16058
16059  if test "x$COMPILE_TYPE" = "xcross"; then
16060    # FIXME: ... or should this include reduced builds..?
16061    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16062  else
16063    DEFINE_CROSS_COMPILE_ARCH=""
16064  fi
16065
16066
16067  # Convert openjdk platform names to hotspot names
16068
16069  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16070  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16071    HOTSPOT_BUILD_OS=bsd
16072  fi
16073
16074
16075  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16076  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16077    HOTSPOT_BUILD_OS_TYPE=posix
16078  fi
16079
16080
16081  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16082  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16083    HOTSPOT_BUILD_CPU=x86_32
16084  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16085    HOTSPOT_BUILD_CPU=sparc
16086  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16087    HOTSPOT_BUILD_CPU=ppc_64
16088  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16089    HOTSPOT_BUILD_CPU=ppc_64
16090  fi
16091
16092
16093  # This is identical with OPENJDK_*, but define anyway for consistency.
16094  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16095
16096
16097  # Setup HOTSPOT_BUILD_CPU_DEFINE
16098  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16099    HOTSPOT_BUILD_CPU_DEFINE=IA32
16100  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16101    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16102  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16103    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16104  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16105    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16106  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16107    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16108  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16109    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16110
16111  # The cpu defines below are for zero, we don't support them directly.
16112  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16113    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16114  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16115    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16116  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16117    HOTSPOT_BUILD_CPU_DEFINE=S390
16118  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16119    HOTSPOT_BUILD_CPU_DEFINE=S390
16120  elif test "x$OPENJDK_BUILD_CPU" != x; then
16121    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16122  fi
16123
16124
16125
16126
16127  # ZERO_ARCHDEF is used to enable architecture-specific code.
16128  # This is used in legacy hotspot build.
16129  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16130
16131
16132
16133
16134
16135# Continue setting up basic stuff. Most remaining code require fundamental tools.
16136
16137  # Save the current directory this script was started from
16138  CURDIR="$PWD"
16139
16140  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16141  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16142  # was not available at that time.
16143  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16144  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16145    ORIGINAL_PATH="$REWRITTEN_PATH"
16146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16147$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16148  fi
16149
16150  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16151    PATH_SEP=";"
16152
16153  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16154  if test $SRC_ROOT_LENGTH -gt 100; then
16155    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16156  fi
16157
16158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16159    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16160$as_echo_n "checking cygwin release... " >&6; }
16161    CYGWIN_VERSION=`$UNAME -r`
16162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16163$as_echo "$CYGWIN_VERSION" >&6; }
16164    WINDOWS_ENV_VENDOR='cygwin'
16165    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16166
16167    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16168    if test "x$CYGWIN_VERSION_OLD" != x; then
16169      { $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
16170$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;}
16171      as_fn_error $? "Cannot continue" "$LINENO" 5
16172    fi
16173    if test "x$CYGPATH" = x; then
16174      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16175    fi
16176    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16177$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16178    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16179    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16180    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16181    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16183$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16184    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16185    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16186    if test "x$test_cygdrive_prefix" = x; then
16187      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16188    fi
16189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16191$as_echo_n "checking msys release... " >&6; }
16192    MSYS_VERSION=`$UNAME -r`
16193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16194$as_echo "$MSYS_VERSION" >&6; }
16195
16196    WINDOWS_ENV_VENDOR='msys'
16197    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16198
16199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16200$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16201    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16202    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16203
16204  windows_path="$MSYS_ROOT_PATH"
16205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16206    unix_path=`$CYGPATH -u "$windows_path"`
16207    MSYS_ROOT_PATH="$unix_path"
16208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16210    MSYS_ROOT_PATH="$unix_path"
16211  fi
16212
16213    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16214$as_echo "$MSYS_ROOT_PATH" >&6; }
16215    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16216  else
16217    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16218  fi
16219
16220  # Test if windows or unix (cygwin/msys) find is first in path.
16221  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16222$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16223  FIND_BINARY_OUTPUT=`find --version 2>&1`
16224  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16226$as_echo "unix style" >&6; }
16227  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16229$as_echo "Windows" >&6; }
16230    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16231$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16232    { $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
16233$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16234    as_fn_error $? "Cannot continue" "$LINENO" 5
16235  else
16236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16237$as_echo "unknown" >&6; }
16238    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16239$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16240  fi
16241
16242  else
16243    PATH_SEP=":"
16244  fi
16245
16246
16247  # We get the top-level directory from the supporting wrappers.
16248  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16249$as_echo_n "checking for top-level directory... " >&6; }
16250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16251$as_echo "$TOPDIR" >&6; }
16252
16253
16254  # Save the original version of TOPDIR for string comparisons
16255  ORIGINAL_TOPDIR="$TOPDIR"
16256
16257
16258  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16259
16260  # Only process if variable expands to non-empty
16261
16262  if test "x$CURDIR" != x; then
16263    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16264
16265  # Input might be given as Windows format, start by converting to
16266  # unix format.
16267  path="$CURDIR"
16268  new_path=`$CYGPATH -u "$path"`
16269
16270  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16271  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16272  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16273  # "foo.exe" is OK but "foo" is an error.
16274  #
16275  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16276  # It is also a way to make sure we got the proper file name for the real test later on.
16277  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16278  if test "x$test_shortpath" = x; then
16279    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16280$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16281    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16282  fi
16283
16284  # Call helper function which possibly converts this using DOS-style short mode.
16285  # If so, the updated path is stored in $new_path.
16286
16287  input_path="$new_path"
16288  # Check if we need to convert this using DOS-style short mode. If the path
16289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16290  # take no chances and rewrite it.
16291  # Note: m4 eats our [], so we need to use [ and ] instead.
16292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16293  if test "x$has_forbidden_chars" != x; then
16294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16295    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16296    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16297    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16298      # Going to short mode and back again did indeed matter. Since short mode is
16299      # case insensitive, let's make it lowercase to improve readability.
16300      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16301      # Now convert it back to Unix-style (cygpath)
16302      input_path=`$CYGPATH -u "$shortmode_path"`
16303      new_path="$input_path"
16304    fi
16305  fi
16306
16307  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16308  if test "x$test_cygdrive_prefix" = x; then
16309    # As a simple fix, exclude /usr/bin since it's not a real path.
16310    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16311      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16312      # a path prefixed by /cygdrive for fixpath to work.
16313      new_path="$CYGWIN_ROOT_PATH$input_path"
16314    fi
16315  fi
16316
16317
16318  if test "x$path" != "x$new_path"; then
16319    CURDIR="$new_path"
16320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16321$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16322  fi
16323
16324    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16325
16326  path="$CURDIR"
16327  has_colon=`$ECHO $path | $GREP ^.:`
16328  new_path="$path"
16329  if test "x$has_colon" = x; then
16330    # Not in mixed or Windows style, start by that.
16331    new_path=`cmd //c echo $path`
16332  fi
16333
16334
16335  input_path="$new_path"
16336  # Check if we need to convert this using DOS-style short mode. If the path
16337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16338  # take no chances and rewrite it.
16339  # Note: m4 eats our [], so we need to use [ and ] instead.
16340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16341  if test "x$has_forbidden_chars" != x; then
16342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16343    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16344  fi
16345
16346
16347  windows_path="$new_path"
16348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16349    unix_path=`$CYGPATH -u "$windows_path"`
16350    new_path="$unix_path"
16351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16353    new_path="$unix_path"
16354  fi
16355
16356  if test "x$path" != "x$new_path"; then
16357    CURDIR="$new_path"
16358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16359$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16360  fi
16361
16362  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16363  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16364
16365    else
16366      # We're on a unix platform. Hooray! :)
16367      path="$CURDIR"
16368      has_space=`$ECHO "$path" | $GREP " "`
16369      if test "x$has_space" != x; then
16370        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16371$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16372        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16373      fi
16374
16375      # Use eval to expand a potential ~
16376      eval path="$path"
16377      if test ! -f "$path" && test ! -d "$path"; then
16378        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16379      fi
16380
16381      if test -d "$path"; then
16382        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16383      else
16384        dir="`$DIRNAME "$path"`"
16385        base="`$BASENAME "$path"`"
16386        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16387      fi
16388    fi
16389  fi
16390
16391
16392  # Only process if variable expands to non-empty
16393
16394  if test "x$TOPDIR" != x; then
16395    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16396
16397  # Input might be given as Windows format, start by converting to
16398  # unix format.
16399  path="$TOPDIR"
16400  new_path=`$CYGPATH -u "$path"`
16401
16402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16405  # "foo.exe" is OK but "foo" is an error.
16406  #
16407  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16408  # It is also a way to make sure we got the proper file name for the real test later on.
16409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16410  if test "x$test_shortpath" = x; then
16411    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16412$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16413    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16414  fi
16415
16416  # Call helper function which possibly converts this using DOS-style short mode.
16417  # If so, the updated path is stored in $new_path.
16418
16419  input_path="$new_path"
16420  # Check if we need to convert this using DOS-style short mode. If the path
16421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16422  # take no chances and rewrite it.
16423  # Note: m4 eats our [], so we need to use [ and ] instead.
16424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16425  if test "x$has_forbidden_chars" != x; then
16426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16430      # Going to short mode and back again did indeed matter. Since short mode is
16431      # case insensitive, let's make it lowercase to improve readability.
16432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16433      # Now convert it back to Unix-style (cygpath)
16434      input_path=`$CYGPATH -u "$shortmode_path"`
16435      new_path="$input_path"
16436    fi
16437  fi
16438
16439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16440  if test "x$test_cygdrive_prefix" = x; then
16441    # As a simple fix, exclude /usr/bin since it's not a real path.
16442    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16444      # a path prefixed by /cygdrive for fixpath to work.
16445      new_path="$CYGWIN_ROOT_PATH$input_path"
16446    fi
16447  fi
16448
16449
16450  if test "x$path" != "x$new_path"; then
16451    TOPDIR="$new_path"
16452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16453$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16454  fi
16455
16456    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16457
16458  path="$TOPDIR"
16459  has_colon=`$ECHO $path | $GREP ^.:`
16460  new_path="$path"
16461  if test "x$has_colon" = x; then
16462    # Not in mixed or Windows style, start by that.
16463    new_path=`cmd //c echo $path`
16464  fi
16465
16466
16467  input_path="$new_path"
16468  # Check if we need to convert this using DOS-style short mode. If the path
16469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16470  # take no chances and rewrite it.
16471  # Note: m4 eats our [], so we need to use [ and ] instead.
16472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16473  if test "x$has_forbidden_chars" != x; then
16474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16475    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16476  fi
16477
16478
16479  windows_path="$new_path"
16480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16481    unix_path=`$CYGPATH -u "$windows_path"`
16482    new_path="$unix_path"
16483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16485    new_path="$unix_path"
16486  fi
16487
16488  if test "x$path" != "x$new_path"; then
16489    TOPDIR="$new_path"
16490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16491$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16492  fi
16493
16494  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16495  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16496
16497    else
16498      # We're on a unix platform. Hooray! :)
16499      path="$TOPDIR"
16500      has_space=`$ECHO "$path" | $GREP " "`
16501      if test "x$has_space" != x; then
16502        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16503$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16504        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16505      fi
16506
16507      # Use eval to expand a potential ~
16508      eval path="$path"
16509      if test ! -f "$path" && test ! -d "$path"; then
16510        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16511      fi
16512
16513      if test -d "$path"; then
16514        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16515      else
16516        dir="`$DIRNAME "$path"`"
16517        base="`$BASENAME "$path"`"
16518        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16519      fi
16520    fi
16521  fi
16522
16523  # SRC_ROOT is a traditional alias for TOPDIR.
16524  SRC_ROOT=$TOPDIR
16525
16526  # Calculate a canonical version of TOPDIR for string comparisons
16527  CANONICAL_TOPDIR=$TOPDIR
16528
16529  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16530    # Follow a chain of symbolic links. Use readlink
16531    # where it exists, else fall back to horribly
16532    # complicated shell code.
16533    if test "x$READLINK_TESTED" != yes; then
16534      # On MacOSX there is a readlink tool with a different
16535      # purpose than the GNU readlink tool. Check the found readlink.
16536      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16537      if test "x$ISGNU" = x; then
16538        # A readlink that we do not know how to use.
16539        # Are there other non-GNU readlinks out there?
16540        READLINK_TESTED=yes
16541        READLINK=
16542      fi
16543    fi
16544
16545    if test "x$READLINK" != x; then
16546      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16547    else
16548      # Save the current directory for restoring afterwards
16549      STARTDIR=$PWD
16550      COUNTER=0
16551      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16552      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16553      cd $sym_link_dir
16554      # Use -P flag to resolve symlinks in directories.
16555      cd `$THEPWDCMD -P`
16556      sym_link_dir=`$THEPWDCMD -P`
16557      # Resolve file symlinks
16558      while test $COUNTER -lt 20; do
16559        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16560        if test "x$ISLINK" == x; then
16561          # This is not a symbolic link! We are done!
16562          break
16563        fi
16564        # Again resolve directory symlinks since the target of the just found
16565        # link could be in a different directory
16566        cd `$DIRNAME $ISLINK`
16567        sym_link_dir=`$THEPWDCMD -P`
16568        sym_link_file=`$BASENAME $ISLINK`
16569        let COUNTER=COUNTER+1
16570      done
16571      cd $STARTDIR
16572      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16573    fi
16574  fi
16575
16576
16577
16578  # Locate the directory of this script.
16579  AUTOCONF_DIR=$TOPDIR/common/autoconf
16580
16581  # Setup username (for use in adhoc version strings etc)
16582  # Outer [ ] to quote m4.
16583   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16584
16585
16586
16587# Check if it's a pure open build or if custom sources are to be used.
16588
16589  # Check whether --enable-openjdk-only was given.
16590if test "${enable_openjdk_only+set}" = set; then :
16591  enableval=$enable_openjdk_only;
16592else
16593  enable_openjdk_only="no"
16594fi
16595
16596
16597  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16598$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16600$as_echo "$enable_openjdk_only" >&6; }
16601  if test "x$enable_openjdk_only" = "xyes"; then
16602    SUPPRESS_CUSTOM_EXTENSIONS="true"
16603  elif test "x$enable_openjdk_only" = "xno"; then
16604    SUPPRESS_CUSTOM_EXTENSIONS="false"
16605  else
16606    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16607  fi
16608
16609  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16610  # the IncludeCustomExtension macro.
16611
16612
16613# Check whether --with-custom-make-dir was given.
16614if test "${with_custom_make_dir+set}" = set; then :
16615  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
16616$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16617fi
16618
16619
16620
16621
16622# These are needed to be able to create a configuration name (and thus the output directory)
16623
16624  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16625$as_echo_n "checking which variant of the JDK to build... " >&6; }
16626
16627# Check whether --with-jdk-variant was given.
16628if test "${with_jdk_variant+set}" = set; then :
16629  withval=$with_jdk_variant;
16630fi
16631
16632
16633  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16634    JDK_VARIANT="normal"
16635  else
16636    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16637  fi
16638
16639
16640
16641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16642$as_echo "$JDK_VARIANT" >&6; }
16643
16644
16645  DEBUG_LEVEL="release"
16646  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16647$as_echo_n "checking which debug level to use... " >&6; }
16648  # Check whether --enable-debug was given.
16649if test "${enable_debug+set}" = set; then :
16650  enableval=$enable_debug;
16651        ENABLE_DEBUG="${enableval}"
16652        DEBUG_LEVEL="fastdebug"
16653
16654else
16655  ENABLE_DEBUG="no"
16656fi
16657
16658
16659
16660# Check whether --with-debug-level was given.
16661if test "${with_debug_level+set}" = set; then :
16662  withval=$with_debug_level;
16663        DEBUG_LEVEL="${withval}"
16664        if test "x$ENABLE_DEBUG" = xyes; then
16665          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16666        fi
16667
16668fi
16669
16670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16671$as_echo "$DEBUG_LEVEL" >&6; }
16672
16673  if test "x$DEBUG_LEVEL" != xrelease && \
16674      test "x$DEBUG_LEVEL" != xoptimized && \
16675      test "x$DEBUG_LEVEL" != xfastdebug && \
16676      test "x$DEBUG_LEVEL" != xslowdebug; then
16677    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16678  fi
16679
16680  # Translate DEBUG_LEVEL to debug level used by Hotspot
16681  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16682  if test "x$DEBUG_LEVEL" = xrelease; then
16683    HOTSPOT_DEBUG_LEVEL="product"
16684  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16685    HOTSPOT_DEBUG_LEVEL="debug"
16686  fi
16687
16688  if test "x$DEBUG_LEVEL" = xoptimized; then
16689    # The debug level 'optimized' is a little special because it is currently only
16690    # applicable to the HotSpot build where it means to build a completely
16691    # optimized version of the VM without any debugging code (like for the
16692    # 'release' debug level which is called 'product' in the HotSpot build) but
16693    # with the exception that it can contain additional code which is otherwise
16694    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16695    # test new and/or experimental features which are not intended for customer
16696    # shipment. Because these new features need to be tested and benchmarked in
16697    # real world scenarios, we want to build the containing JDK at the 'release'
16698    # debug level.
16699    DEBUG_LEVEL="release"
16700  fi
16701
16702
16703
16704
16705
16706
16707# Check whether --with-jvm-variants was given.
16708if test "${with_jvm_variants+set}" = set; then :
16709  withval=$with_jvm_variants;
16710fi
16711
16712
16713  if test "x$with_jvm_variants" = x; then
16714    with_jvm_variants="server"
16715  fi
16716  JVM_VARIANTS_OPT="$with_jvm_variants"
16717
16718  # Has the user listed more than one variant?
16719  # Additional [] needed to keep m4 from mangling shell constructs.
16720  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16721    BUILDING_MULTIPLE_JVM_VARIANTS=true
16722  else
16723    BUILDING_MULTIPLE_JVM_VARIANTS=false
16724  fi
16725  # Replace the commas with AND for use in the build directory name.
16726  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16727
16728  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16729$as_echo_n "checking which variants of the JVM to build... " >&6; }
16730  # JVM_VARIANTS is a space-separated list.
16731  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16732  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16734$as_echo "$JVM_VARIANTS" >&6; }
16735
16736  # Check that the selected variants are valid
16737
16738  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16739  # Notice that the original variant failes on SLES 10 and 11
16740  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16741  STACK=${JVM_VARIANTS// /$'\n'}
16742  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16743  if test "x$INVALID_VARIANTS" != x; then
16744    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16745$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16746    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16747  fi
16748
16749  # All "special" variants share the same output directory ("server")
16750  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16751  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16752  STACK=${JVM_VARIANTS// /$'\n'}
16753  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16754  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16755    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16756  fi
16757
16758
16759
16760
16761  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16762    # zero behaves as a platform and rewrites these values. This is really weird. :(
16763    # We are guaranteed that we do not build any other variants when building zero.
16764    HOTSPOT_TARGET_CPU=zero
16765    HOTSPOT_TARGET_CPU_ARCH=zero
16766  fi
16767
16768
16769# With basic setup done, call the custom early hook.
16770
16771
16772# Check if we have devkits, extra paths or sysroot set.
16773
16774
16775# Check whether --with-devkit was given.
16776if test "${with_devkit+set}" = set; then :
16777  withval=$with_devkit;
16778
16779  # Only process if variable expands to non-empty
16780
16781  if test "x$with_devkit" != x; then
16782    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16783
16784  # Input might be given as Windows format, start by converting to
16785  # unix format.
16786  path="$with_devkit"
16787  new_path=`$CYGPATH -u "$path"`
16788
16789  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16790  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16791  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16792  # "foo.exe" is OK but "foo" is an error.
16793  #
16794  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16795  # It is also a way to make sure we got the proper file name for the real test later on.
16796  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16797  if test "x$test_shortpath" = x; then
16798    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16799$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16800    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16801  fi
16802
16803  # Call helper function which possibly converts this using DOS-style short mode.
16804  # If so, the updated path is stored in $new_path.
16805
16806  input_path="$new_path"
16807  # Check if we need to convert this using DOS-style short mode. If the path
16808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16809  # take no chances and rewrite it.
16810  # Note: m4 eats our [], so we need to use [ and ] instead.
16811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16812  if test "x$has_forbidden_chars" != x; then
16813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16817      # Going to short mode and back again did indeed matter. Since short mode is
16818      # case insensitive, let's make it lowercase to improve readability.
16819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16820      # Now convert it back to Unix-style (cygpath)
16821      input_path=`$CYGPATH -u "$shortmode_path"`
16822      new_path="$input_path"
16823    fi
16824  fi
16825
16826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16827  if test "x$test_cygdrive_prefix" = x; then
16828    # As a simple fix, exclude /usr/bin since it's not a real path.
16829    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16831      # a path prefixed by /cygdrive for fixpath to work.
16832      new_path="$CYGWIN_ROOT_PATH$input_path"
16833    fi
16834  fi
16835
16836
16837  if test "x$path" != "x$new_path"; then
16838    with_devkit="$new_path"
16839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16840$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16841  fi
16842
16843    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16844
16845  path="$with_devkit"
16846  has_colon=`$ECHO $path | $GREP ^.:`
16847  new_path="$path"
16848  if test "x$has_colon" = x; then
16849    # Not in mixed or Windows style, start by that.
16850    new_path=`cmd //c echo $path`
16851  fi
16852
16853
16854  input_path="$new_path"
16855  # Check if we need to convert this using DOS-style short mode. If the path
16856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16857  # take no chances and rewrite it.
16858  # Note: m4 eats our [], so we need to use [ and ] instead.
16859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16860  if test "x$has_forbidden_chars" != x; then
16861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16863  fi
16864
16865
16866  windows_path="$new_path"
16867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16868    unix_path=`$CYGPATH -u "$windows_path"`
16869    new_path="$unix_path"
16870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16872    new_path="$unix_path"
16873  fi
16874
16875  if test "x$path" != "x$new_path"; then
16876    with_devkit="$new_path"
16877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16878$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16879  fi
16880
16881  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16882  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16883
16884    else
16885      # We're on a unix platform. Hooray! :)
16886      path="$with_devkit"
16887      has_space=`$ECHO "$path" | $GREP " "`
16888      if test "x$has_space" != x; then
16889        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16890$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16891        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16892      fi
16893
16894      # Use eval to expand a potential ~
16895      eval path="$path"
16896      if test ! -f "$path" && test ! -d "$path"; then
16897        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16898      fi
16899
16900      if test -d "$path"; then
16901        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16902      else
16903        dir="`$DIRNAME "$path"`"
16904        base="`$BASENAME "$path"`"
16905        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16906      fi
16907    fi
16908  fi
16909
16910        DEVKIT_ROOT="$with_devkit"
16911        # Check for a meta data info file in the root of the devkit
16912        if test -f "$DEVKIT_ROOT/devkit.info"; then
16913          . $DEVKIT_ROOT/devkit.info
16914          # This potentially sets the following:
16915          # A descriptive name of the devkit
16916
16917  if test "x$DEVKIT_NAME" = x; then
16918    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16919  fi
16920
16921          # Corresponds to --with-extra-path
16922
16923  if test "x$DEVKIT_EXTRA_PATH" = x; then
16924    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16925  fi
16926
16927          # Corresponds to --with-toolchain-path
16928
16929  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16930    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16931  fi
16932
16933          # Corresponds to --with-sysroot
16934
16935  if test "x$DEVKIT_SYSROOT" = x; then
16936    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16937  fi
16938
16939
16940          # Identifies the Visual Studio version in the devkit
16941
16942  if test "x$DEVKIT_VS_VERSION" = x; then
16943    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16944  fi
16945
16946          # The Visual Studio include environment variable
16947
16948  if test "x$DEVKIT_VS_INCLUDE" = x; then
16949    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16950  fi
16951
16952          # The Visual Studio lib environment variable
16953
16954  if test "x$DEVKIT_VS_LIB" = x; then
16955    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16956  fi
16957
16958          # Corresponds to --with-msvcr-dll
16959
16960  if test "x$DEVKIT_MSVCR_DLL" = x; then
16961    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16962  fi
16963
16964          # Corresponds to --with-msvcp-dll
16965
16966  if test "x$DEVKIT_MSVCP_DLL" = x; then
16967    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16968  fi
16969
16970        fi
16971
16972        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16973$as_echo_n "checking for devkit... " >&6; }
16974        if test "x$DEVKIT_NAME" != x; then
16975          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16976$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16977        else
16978          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16979$as_echo "$DEVKIT_ROOT" >&6; }
16980        fi
16981
16982
16983  if test "x$DEVKIT_EXTRA_PATH" != x; then
16984    if test "x$EXTRA_PATH" = x; then
16985      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16986    else
16987      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16988    fi
16989  fi
16990
16991
16992        # Fallback default of just /bin if DEVKIT_PATH is not defined
16993        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16994          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16995        fi
16996
16997  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16998    if test "x$TOOLCHAIN_PATH" = x; then
16999      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17000    else
17001      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17002    fi
17003  fi
17004
17005
17006        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17007        # places for backwards compatiblity.
17008        if test "x$DEVKIT_SYSROOT" != x; then
17009          SYSROOT="$DEVKIT_SYSROOT"
17010        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17011          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17012        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17013          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17014        fi
17015
17016
17017fi
17018
17019
17020  # You can force the sysroot if the sysroot encoded into the compiler tools
17021  # is not correct.
17022
17023# Check whether --with-sys-root was given.
17024if test "${with_sys_root+set}" = set; then :
17025  withval=$with_sys_root; SYSROOT=$with_sys_root
17026
17027fi
17028
17029
17030
17031# Check whether --with-sysroot was given.
17032if test "${with_sysroot+set}" = set; then :
17033  withval=$with_sysroot; SYSROOT=$with_sysroot
17034
17035fi
17036
17037
17038
17039# Check whether --with-tools-dir was given.
17040if test "${with_tools_dir+set}" = set; then :
17041  withval=$with_tools_dir;
17042  if test "x$with_tools_dir" != x; then
17043    if test "x$TOOLCHAIN_PATH" = x; then
17044      TOOLCHAIN_PATH="$with_tools_dir"
17045    else
17046      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17047    fi
17048  fi
17049
17050
17051fi
17052
17053
17054
17055# Check whether --with-toolchain-path was given.
17056if test "${with_toolchain_path+set}" = set; then :
17057  withval=$with_toolchain_path;
17058  if test "x$with_toolchain_path" != x; then
17059    if test "x$TOOLCHAIN_PATH" = x; then
17060      TOOLCHAIN_PATH="$with_toolchain_path"
17061    else
17062      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17063    fi
17064  fi
17065
17066
17067fi
17068
17069
17070
17071# Check whether --with-extra-path was given.
17072if test "${with_extra_path+set}" = set; then :
17073  withval=$with_extra_path;
17074  if test "x$with_extra_path" != x; then
17075    if test "x$EXTRA_PATH" = x; then
17076      EXTRA_PATH="$with_extra_path"
17077    else
17078      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17079    fi
17080  fi
17081
17082
17083fi
17084
17085
17086  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17087    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17088    # If not, detect if Xcode is installed by running xcodebuild -version
17089    # if no Xcode installed, xcodebuild exits with 1
17090    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17091    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17092      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17093      # fall back on the stub binary in /usr/bin/xcodebuild
17094      # Extract the first word of "xcodebuild", so it can be a program name with args.
17095set dummy xcodebuild; ac_word=$2
17096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17097$as_echo_n "checking for $ac_word... " >&6; }
17098if ${ac_cv_path_XCODEBUILD+:} false; then :
17099  $as_echo_n "(cached) " >&6
17100else
17101  case $XCODEBUILD in
17102  [\\/]* | ?:[\\/]*)
17103  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17104  ;;
17105  *)
17106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17107for as_dir in $TOOLCHAIN_PATH
17108do
17109  IFS=$as_save_IFS
17110  test -z "$as_dir" && as_dir=.
17111    for ac_exec_ext in '' $ac_executable_extensions; do
17112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17113    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17115    break 2
17116  fi
17117done
17118  done
17119IFS=$as_save_IFS
17120
17121  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17122  ;;
17123esac
17124fi
17125XCODEBUILD=$ac_cv_path_XCODEBUILD
17126if test -n "$XCODEBUILD"; then
17127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17128$as_echo "$XCODEBUILD" >&6; }
17129else
17130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17131$as_echo "no" >&6; }
17132fi
17133
17134
17135    else
17136      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17137      # when only the command line tools are installed there are no SDKs, so headers
17138      # are copied into the system frameworks
17139      XCODEBUILD=
17140
17141    fi
17142
17143    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17144$as_echo_n "checking for sdk name... " >&6; }
17145
17146# Check whether --with-sdk-name was given.
17147if test "${with_sdk_name+set}" = set; then :
17148  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17149
17150fi
17151
17152    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17153$as_echo "$SDKNAME" >&6; }
17154
17155    # if toolchain path is specified then don't rely on system headers, they may not compile
17156    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17157    test -z "$TOOLCHAIN_PATH" && \
17158      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17159
17160    if test -z "$SYSROOT"; then
17161      if test -n "$XCODEBUILD"; then
17162        # if we don't have system headers, use default SDK name (last resort)
17163        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17164          SDKNAME=${SDKNAME:-macosx}
17165        fi
17166
17167        if test -n "$SDKNAME"; then
17168          # Call xcodebuild to determine SYSROOT
17169          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17170        fi
17171      else
17172        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17173          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
17174        fi
17175      fi
17176    else
17177      # warn user if --with-sdk-name was also set
17178      if test -n "$with_sdk_name"; then
17179        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17180$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17181      fi
17182    fi
17183
17184    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17185      # If no system framework headers, then SYSROOT must be set, or we won't build
17186      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
17187    fi
17188
17189    # Perform a basic sanity test
17190    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17191      if test -z "$SYSROOT"; then
17192        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
17193      else
17194        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17195      fi
17196    fi
17197
17198    # set SDKROOT too, Xcode tools will pick it up
17199    SDKROOT=$SYSROOT
17200
17201  fi
17202
17203  # Prepend the extra path to the global path
17204
17205  if test "x$EXTRA_PATH" != x; then
17206    if test "x$PATH" = x; then
17207      PATH="$EXTRA_PATH"
17208    else
17209      PATH="$EXTRA_PATH:$PATH"
17210    fi
17211  fi
17212
17213
17214  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17215$as_echo_n "checking for sysroot... " >&6; }
17216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17217$as_echo "$SYSROOT" >&6; }
17218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17219$as_echo_n "checking for toolchain path... " >&6; }
17220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17221$as_echo "$TOOLCHAIN_PATH" >&6; }
17222  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17223$as_echo_n "checking for extra path... " >&6; }
17224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17225$as_echo "$EXTRA_PATH" >&6; }
17226
17227
17228# To properly create a configuration name, we need to have the OpenJDK target
17229# and options (variants and debug level) parsed.
17230
17231
17232
17233# Check whether --with-conf-name was given.
17234if test "${with_conf_name+set}" = set; then :
17235  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17236fi
17237
17238
17239  # Test from where we are running configure, in or outside of src root.
17240  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17241$as_echo_n "checking where to store configuration... " >&6; }
17242  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17243      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17244      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17245    # We are running configure from the src root.
17246    # Create a default ./build/target-variant-debuglevel output root.
17247    if test "x${CONF_NAME}" = x; then
17248      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17249$as_echo "in default location" >&6; }
17250      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17251    else
17252      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17253$as_echo "in build directory with custom name" >&6; }
17254    fi
17255    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17256    $MKDIR -p "$OUTPUT_ROOT"
17257    if test ! -d "$OUTPUT_ROOT"; then
17258      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17259    fi
17260  else
17261    # We are running configure from outside of the src dir.
17262    # Then use the current directory as output dir!
17263    # If configuration is situated in normal build directory, just use the build
17264    # directory name as configuration name, otherwise use the complete path.
17265    if test "x${CONF_NAME}" = x; then
17266      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17267    fi
17268    OUTPUT_ROOT="$CURDIR"
17269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17270$as_echo "in current directory" >&6; }
17271
17272    # WARNING: This might be a bad thing to do. You need to be sure you want to
17273    # have a configuration in this directory. Do some sanity checks!
17274
17275    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17276      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17277      # other files
17278      files_present=`$LS $OUTPUT_ROOT`
17279      # Configure has already touched config.log and confdefs.h in the current dir when this check
17280      # is performed.
17281      filtered_files=`$ECHO "$files_present" \
17282          | $SED -e 's/config.log//g' \
17283              -e 's/configure.log//g' \
17284              -e 's/confdefs.h//g' \
17285              -e 's/ //g' \
17286          | $TR -d '\n'`
17287      if test "x$filtered_files" != x; then
17288        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17289$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17290        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17291$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17292        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17293$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17294        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17295$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17296        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17297$as_echo "$as_me: seriously mess up just about everything." >&6;}
17298        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17299$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17300        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17301$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17302        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17303      fi
17304    fi
17305  fi
17306  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17307$as_echo_n "checking what configuration name to use... " >&6; }
17308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17309$as_echo "$CONF_NAME" >&6; }
17310
17311
17312  # Only process if variable expands to non-empty
17313
17314  if test "x$OUTPUT_ROOT" != x; then
17315    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17316
17317  # Input might be given as Windows format, start by converting to
17318  # unix format.
17319  path="$OUTPUT_ROOT"
17320  new_path=`$CYGPATH -u "$path"`
17321
17322  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17323  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17324  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17325  # "foo.exe" is OK but "foo" is an error.
17326  #
17327  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17328  # It is also a way to make sure we got the proper file name for the real test later on.
17329  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17330  if test "x$test_shortpath" = x; then
17331    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17332$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17333    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17334  fi
17335
17336  # Call helper function which possibly converts this using DOS-style short mode.
17337  # If so, the updated path is stored in $new_path.
17338
17339  input_path="$new_path"
17340  # Check if we need to convert this using DOS-style short mode. If the path
17341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17342  # take no chances and rewrite it.
17343  # Note: m4 eats our [], so we need to use [ and ] instead.
17344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17345  if test "x$has_forbidden_chars" != x; then
17346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17347    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17348    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17349    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17350      # Going to short mode and back again did indeed matter. Since short mode is
17351      # case insensitive, let's make it lowercase to improve readability.
17352      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17353      # Now convert it back to Unix-style (cygpath)
17354      input_path=`$CYGPATH -u "$shortmode_path"`
17355      new_path="$input_path"
17356    fi
17357  fi
17358
17359  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17360  if test "x$test_cygdrive_prefix" = x; then
17361    # As a simple fix, exclude /usr/bin since it's not a real path.
17362    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17363      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17364      # a path prefixed by /cygdrive for fixpath to work.
17365      new_path="$CYGWIN_ROOT_PATH$input_path"
17366    fi
17367  fi
17368
17369
17370  if test "x$path" != "x$new_path"; then
17371    OUTPUT_ROOT="$new_path"
17372    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17373$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17374  fi
17375
17376    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17377
17378  path="$OUTPUT_ROOT"
17379  has_colon=`$ECHO $path | $GREP ^.:`
17380  new_path="$path"
17381  if test "x$has_colon" = x; then
17382    # Not in mixed or Windows style, start by that.
17383    new_path=`cmd //c echo $path`
17384  fi
17385
17386
17387  input_path="$new_path"
17388  # Check if we need to convert this using DOS-style short mode. If the path
17389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17390  # take no chances and rewrite it.
17391  # Note: m4 eats our [], so we need to use [ and ] instead.
17392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17393  if test "x$has_forbidden_chars" != x; then
17394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17396  fi
17397
17398
17399  windows_path="$new_path"
17400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17401    unix_path=`$CYGPATH -u "$windows_path"`
17402    new_path="$unix_path"
17403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17405    new_path="$unix_path"
17406  fi
17407
17408  if test "x$path" != "x$new_path"; then
17409    OUTPUT_ROOT="$new_path"
17410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17411$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17412  fi
17413
17414  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17415  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17416
17417    else
17418      # We're on a unix platform. Hooray! :)
17419      path="$OUTPUT_ROOT"
17420      has_space=`$ECHO "$path" | $GREP " "`
17421      if test "x$has_space" != x; then
17422        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17423$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17424        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17425      fi
17426
17427      # Use eval to expand a potential ~
17428      eval path="$path"
17429      if test ! -f "$path" && test ! -d "$path"; then
17430        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17431      fi
17432
17433      if test -d "$path"; then
17434        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17435      else
17436        dir="`$DIRNAME "$path"`"
17437        base="`$BASENAME "$path"`"
17438        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17439      fi
17440    fi
17441  fi
17442
17443
17444  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17445  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17446
17447  SPEC=$OUTPUT_ROOT/spec.gmk
17448
17449  CONF_NAME=$CONF_NAME
17450
17451  OUTPUT_ROOT=$OUTPUT_ROOT
17452
17453
17454
17455  # The spec.gmk file contains all variables for the make system.
17456  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17457
17458  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17459  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17460
17461  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17462  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17463
17464  # The compare.sh is used to compare the build output to other builds.
17465  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17466
17467  # The generated Makefile knows where the spec.gmk is and where the source is.
17468  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17469  # which will look for generated configurations
17470  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17471
17472
17473
17474# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17475
17476  for ac_prog in apt-get yum port pkgutil pkgadd
17477do
17478  # Extract the first word of "$ac_prog", so it can be a program name with args.
17479set dummy $ac_prog; ac_word=$2
17480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17481$as_echo_n "checking for $ac_word... " >&6; }
17482if ${ac_cv_prog_PKGHANDLER+:} false; then :
17483  $as_echo_n "(cached) " >&6
17484else
17485  if test -n "$PKGHANDLER"; then
17486  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17487else
17488as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17489for as_dir in $PATH
17490do
17491  IFS=$as_save_IFS
17492  test -z "$as_dir" && as_dir=.
17493    for ac_exec_ext in '' $ac_executable_extensions; do
17494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17495    ac_cv_prog_PKGHANDLER="$ac_prog"
17496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17497    break 2
17498  fi
17499done
17500  done
17501IFS=$as_save_IFS
17502
17503fi
17504fi
17505PKGHANDLER=$ac_cv_prog_PKGHANDLER
17506if test -n "$PKGHANDLER"; then
17507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17508$as_echo "$PKGHANDLER" >&6; }
17509else
17510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17511$as_echo "no" >&6; }
17512fi
17513
17514
17515  test -n "$PKGHANDLER" && break
17516done
17517
17518
17519
17520# Setup tools that requires more complex handling, or that is not needed by the configure script.
17521
17522
17523
17524  # Publish this variable in the help.
17525
17526
17527  if [ -z "${MAKE+x}" ]; then
17528    # The variable is not set by user, try to locate tool using the code snippet
17529
17530    # Try our hardest to locate a correct version of GNU make
17531    for ac_prog in gmake
17532do
17533  # Extract the first word of "$ac_prog", so it can be a program name with args.
17534set dummy $ac_prog; ac_word=$2
17535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17536$as_echo_n "checking for $ac_word... " >&6; }
17537if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17538  $as_echo_n "(cached) " >&6
17539else
17540  case $CHECK_GMAKE in
17541  [\\/]* | ?:[\\/]*)
17542  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17543  ;;
17544  *)
17545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17546for as_dir in $PATH
17547do
17548  IFS=$as_save_IFS
17549  test -z "$as_dir" && as_dir=.
17550    for ac_exec_ext in '' $ac_executable_extensions; do
17551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17552    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17554    break 2
17555  fi
17556done
17557  done
17558IFS=$as_save_IFS
17559
17560  ;;
17561esac
17562fi
17563CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17564if test -n "$CHECK_GMAKE"; then
17565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17566$as_echo "$CHECK_GMAKE" >&6; }
17567else
17568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17569$as_echo "no" >&6; }
17570fi
17571
17572
17573  test -n "$CHECK_GMAKE" && break
17574done
17575
17576
17577  MAKE_CANDIDATE=""$CHECK_GMAKE""
17578  DESCRIPTION="gmake in PATH"
17579
17580  # On Cygwin, we require a newer version of make than on other platforms
17581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17582    MAKE_VERSION_EXPR="-e 4\."
17583    MAKE_REQUIRED_VERSION="4.0"
17584   else
17585    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17586    MAKE_REQUIRED_VERSION="3.81"
17587  fi
17588
17589  if test "x$MAKE_CANDIDATE" != x; then
17590    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17591$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17592    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17593    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17594    if test "x$IS_GNU_MAKE" = x; then
17595      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17596$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17597    else
17598      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17599      if test "x$IS_MODERN_MAKE" = x; then
17600        { $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
17601$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;}
17602      else
17603        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17604          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17605            MAKE_EXPECTED_ENV='cygwin'
17606          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17607            MAKE_EXPECTED_ENV='msys'
17608          else
17609            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17610          fi
17611          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17612          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17613        else
17614          # Not relevant for non-Windows
17615          IS_MAKE_CORRECT_ENV=true
17616        fi
17617        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17618          { $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
17619$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;}
17620        else
17621          FOUND_MAKE=$MAKE_CANDIDATE
17622
17623  # Only process if variable expands to non-empty
17624
17625  if test "x$FOUND_MAKE" != x; then
17626    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17627
17628  # First separate the path from the arguments. This will split at the first
17629  # space.
17630  complete="$FOUND_MAKE"
17631  path="${complete%% *}"
17632  tmp="$complete EOL"
17633  arguments="${tmp#* }"
17634
17635  # Input might be given as Windows format, start by converting to
17636  # unix format.
17637  new_path=`$CYGPATH -u "$path"`
17638
17639  # Now try to locate executable using which
17640  new_path=`$WHICH "$new_path" 2> /dev/null`
17641  # bat and cmd files are not always considered executable in cygwin causing which
17642  # to not find them
17643  if test "x$new_path" = x \
17644      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17645      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17646    new_path=`$CYGPATH -u "$path"`
17647  fi
17648  if test "x$new_path" = x; then
17649    # Oops. Which didn't find the executable.
17650    # The splitting of arguments from the executable at a space might have been incorrect,
17651    # since paths with space are more likely in Windows. Give it another try with the whole
17652    # argument.
17653    path="$complete"
17654    arguments="EOL"
17655    new_path=`$CYGPATH -u "$path"`
17656    new_path=`$WHICH "$new_path" 2> /dev/null`
17657    # bat and cmd files are not always considered executable in cygwin causing which
17658    # to not find them
17659    if test "x$new_path" = x \
17660        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17661        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17662      new_path=`$CYGPATH -u "$path"`
17663    fi
17664    if test "x$new_path" = x; then
17665      # It's still not found. Now this is an unrecoverable error.
17666      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17667$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17668      has_space=`$ECHO "$complete" | $GREP " "`
17669      if test "x$has_space" != x; then
17670        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17671$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17672      fi
17673      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17674    fi
17675  fi
17676
17677  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17678  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17679  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17680  # "foo.exe" is OK but "foo" is an error.
17681  #
17682  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17683  # It is also a way to make sure we got the proper file name for the real test later on.
17684  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17685  if test "x$test_shortpath" = x; then
17686    # Short path failed, file does not exist as specified.
17687    # Try adding .exe or .cmd
17688    if test -f "${new_path}.exe"; then
17689      input_to_shortpath="${new_path}.exe"
17690    elif test -f "${new_path}.cmd"; then
17691      input_to_shortpath="${new_path}.cmd"
17692    else
17693      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17694$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17695      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17696$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17697      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17698    fi
17699  else
17700    input_to_shortpath="$new_path"
17701  fi
17702
17703  # Call helper function which possibly converts this using DOS-style short mode.
17704  # If so, the updated path is stored in $new_path.
17705  new_path="$input_to_shortpath"
17706
17707  input_path="$input_to_shortpath"
17708  # Check if we need to convert this using DOS-style short mode. If the path
17709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17710  # take no chances and rewrite it.
17711  # Note: m4 eats our [], so we need to use [ and ] instead.
17712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17713  if test "x$has_forbidden_chars" != x; then
17714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17715    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17716    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17717    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17718      # Going to short mode and back again did indeed matter. Since short mode is
17719      # case insensitive, let's make it lowercase to improve readability.
17720      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17721      # Now convert it back to Unix-style (cygpath)
17722      input_path=`$CYGPATH -u "$shortmode_path"`
17723      new_path="$input_path"
17724    fi
17725  fi
17726
17727  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17728  if test "x$test_cygdrive_prefix" = x; then
17729    # As a simple fix, exclude /usr/bin since it's not a real path.
17730    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17731      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17732      # a path prefixed by /cygdrive for fixpath to work.
17733      new_path="$CYGWIN_ROOT_PATH$input_path"
17734    fi
17735  fi
17736
17737  # remove trailing .exe if any
17738  new_path="${new_path/%.exe/}"
17739
17740    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17741
17742  # First separate the path from the arguments. This will split at the first
17743  # space.
17744  complete="$FOUND_MAKE"
17745  path="${complete%% *}"
17746  tmp="$complete EOL"
17747  arguments="${tmp#* }"
17748
17749  # Input might be given as Windows format, start by converting to
17750  # unix format.
17751  new_path="$path"
17752
17753  windows_path="$new_path"
17754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17755    unix_path=`$CYGPATH -u "$windows_path"`
17756    new_path="$unix_path"
17757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17759    new_path="$unix_path"
17760  fi
17761
17762
17763  # Now try to locate executable using which
17764  new_path=`$WHICH "$new_path" 2> /dev/null`
17765
17766  if test "x$new_path" = x; then
17767    # Oops. Which didn't find the executable.
17768    # The splitting of arguments from the executable at a space might have been incorrect,
17769    # since paths with space are more likely in Windows. Give it another try with the whole
17770    # argument.
17771    path="$complete"
17772    arguments="EOL"
17773    new_path="$path"
17774
17775  windows_path="$new_path"
17776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17777    unix_path=`$CYGPATH -u "$windows_path"`
17778    new_path="$unix_path"
17779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17781    new_path="$unix_path"
17782  fi
17783
17784
17785    new_path=`$WHICH "$new_path" 2> /dev/null`
17786    # bat and cmd files are not always considered executable in MSYS causing which
17787    # to not find them
17788    if test "x$new_path" = x \
17789        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17790        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17791      new_path="$path"
17792
17793  windows_path="$new_path"
17794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17795    unix_path=`$CYGPATH -u "$windows_path"`
17796    new_path="$unix_path"
17797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17799    new_path="$unix_path"
17800  fi
17801
17802    fi
17803
17804    if test "x$new_path" = x; then
17805      # It's still not found. Now this is an unrecoverable error.
17806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17807$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17808      has_space=`$ECHO "$complete" | $GREP " "`
17809      if test "x$has_space" != x; then
17810        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17811$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17812      fi
17813      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17814    fi
17815  fi
17816
17817  # Now new_path has a complete unix path to the binary
17818  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17819    # Keep paths in /bin as-is, but remove trailing .exe if any
17820    new_path="${new_path/%.exe/}"
17821    # Do not save /bin paths to all_fixpath_prefixes!
17822  else
17823    # Not in mixed or Windows style, start by that.
17824    new_path=`cmd //c echo $new_path`
17825
17826  input_path="$new_path"
17827  # Check if we need to convert this using DOS-style short mode. If the path
17828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17829  # take no chances and rewrite it.
17830  # Note: m4 eats our [], so we need to use [ and ] instead.
17831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17832  if test "x$has_forbidden_chars" != x; then
17833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17834    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17835  fi
17836
17837    # Output is in $new_path
17838
17839  windows_path="$new_path"
17840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17841    unix_path=`$CYGPATH -u "$windows_path"`
17842    new_path="$unix_path"
17843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17845    new_path="$unix_path"
17846  fi
17847
17848    # remove trailing .exe if any
17849    new_path="${new_path/%.exe/}"
17850
17851    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17852    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17853  fi
17854
17855    else
17856      # We're on a unix platform. Hooray! :)
17857      # First separate the path from the arguments. This will split at the first
17858      # space.
17859      complete="$FOUND_MAKE"
17860      path="${complete%% *}"
17861      tmp="$complete EOL"
17862      arguments="${tmp#* }"
17863
17864      # Cannot rely on the command "which" here since it doesn't always work.
17865      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17866      if test -z "$is_absolute_path"; then
17867        # Path to executable is not absolute. Find it.
17868        IFS_save="$IFS"
17869        IFS=:
17870        for p in $PATH; do
17871          if test -f "$p/$path" && test -x "$p/$path"; then
17872            new_path="$p/$path"
17873            break
17874          fi
17875        done
17876        IFS="$IFS_save"
17877      else
17878        # This is an absolute path, we can use it without further modifications.
17879        new_path="$path"
17880      fi
17881
17882      if test "x$new_path" = x; then
17883        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17884$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17885        has_space=`$ECHO "$complete" | $GREP " "`
17886        if test "x$has_space" != x; then
17887          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17888$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17889        fi
17890        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17891      fi
17892    fi
17893
17894    # Now join together the path and the arguments once again
17895    if test "x$arguments" != xEOL; then
17896      new_complete="$new_path ${arguments% *}"
17897    else
17898      new_complete="$new_path"
17899    fi
17900
17901    if test "x$complete" != "x$new_complete"; then
17902      FOUND_MAKE="$new_complete"
17903      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17904$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17905    fi
17906  fi
17907
17908        fi
17909      fi
17910    fi
17911  fi
17912
17913
17914    if test "x$FOUND_MAKE" = x; then
17915      for ac_prog in make
17916do
17917  # Extract the first word of "$ac_prog", so it can be a program name with args.
17918set dummy $ac_prog; ac_word=$2
17919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17920$as_echo_n "checking for $ac_word... " >&6; }
17921if ${ac_cv_path_CHECK_MAKE+:} false; then :
17922  $as_echo_n "(cached) " >&6
17923else
17924  case $CHECK_MAKE in
17925  [\\/]* | ?:[\\/]*)
17926  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17927  ;;
17928  *)
17929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17930for as_dir in $PATH
17931do
17932  IFS=$as_save_IFS
17933  test -z "$as_dir" && as_dir=.
17934    for ac_exec_ext in '' $ac_executable_extensions; do
17935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17936    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17938    break 2
17939  fi
17940done
17941  done
17942IFS=$as_save_IFS
17943
17944  ;;
17945esac
17946fi
17947CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17948if test -n "$CHECK_MAKE"; then
17949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17950$as_echo "$CHECK_MAKE" >&6; }
17951else
17952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17953$as_echo "no" >&6; }
17954fi
17955
17956
17957  test -n "$CHECK_MAKE" && break
17958done
17959
17960
17961  MAKE_CANDIDATE=""$CHECK_MAKE""
17962  DESCRIPTION="make in PATH"
17963
17964  # On Cygwin, we require a newer version of make than on other platforms
17965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17966    MAKE_VERSION_EXPR="-e 4\."
17967    MAKE_REQUIRED_VERSION="4.0"
17968   else
17969    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17970    MAKE_REQUIRED_VERSION="3.81"
17971  fi
17972
17973  if test "x$MAKE_CANDIDATE" != x; then
17974    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17975$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17976    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17977    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17978    if test "x$IS_GNU_MAKE" = x; then
17979      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17980$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17981    else
17982      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17983      if test "x$IS_MODERN_MAKE" = x; then
17984        { $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
17985$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;}
17986      else
17987        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17988          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17989            MAKE_EXPECTED_ENV='cygwin'
17990          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17991            MAKE_EXPECTED_ENV='msys'
17992          else
17993            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17994          fi
17995          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17996          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17997        else
17998          # Not relevant for non-Windows
17999          IS_MAKE_CORRECT_ENV=true
18000        fi
18001        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18002          { $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
18003$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;}
18004        else
18005          FOUND_MAKE=$MAKE_CANDIDATE
18006
18007  # Only process if variable expands to non-empty
18008
18009  if test "x$FOUND_MAKE" != x; then
18010    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18011
18012  # First separate the path from the arguments. This will split at the first
18013  # space.
18014  complete="$FOUND_MAKE"
18015  path="${complete%% *}"
18016  tmp="$complete EOL"
18017  arguments="${tmp#* }"
18018
18019  # Input might be given as Windows format, start by converting to
18020  # unix format.
18021  new_path=`$CYGPATH -u "$path"`
18022
18023  # Now try to locate executable using which
18024  new_path=`$WHICH "$new_path" 2> /dev/null`
18025  # bat and cmd files are not always considered executable in cygwin causing which
18026  # to not find them
18027  if test "x$new_path" = x \
18028      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18029      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18030    new_path=`$CYGPATH -u "$path"`
18031  fi
18032  if test "x$new_path" = x; then
18033    # Oops. Which didn't find the executable.
18034    # The splitting of arguments from the executable at a space might have been incorrect,
18035    # since paths with space are more likely in Windows. Give it another try with the whole
18036    # argument.
18037    path="$complete"
18038    arguments="EOL"
18039    new_path=`$CYGPATH -u "$path"`
18040    new_path=`$WHICH "$new_path" 2> /dev/null`
18041    # bat and cmd files are not always considered executable in cygwin causing which
18042    # to not find them
18043    if test "x$new_path" = x \
18044        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18045        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18046      new_path=`$CYGPATH -u "$path"`
18047    fi
18048    if test "x$new_path" = x; then
18049      # It's still not found. Now this is an unrecoverable error.
18050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18051$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18052      has_space=`$ECHO "$complete" | $GREP " "`
18053      if test "x$has_space" != x; then
18054        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18055$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18056      fi
18057      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18058    fi
18059  fi
18060
18061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18064  # "foo.exe" is OK but "foo" is an error.
18065  #
18066  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18067  # It is also a way to make sure we got the proper file name for the real test later on.
18068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18069  if test "x$test_shortpath" = x; then
18070    # Short path failed, file does not exist as specified.
18071    # Try adding .exe or .cmd
18072    if test -f "${new_path}.exe"; then
18073      input_to_shortpath="${new_path}.exe"
18074    elif test -f "${new_path}.cmd"; then
18075      input_to_shortpath="${new_path}.cmd"
18076    else
18077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18078$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18079      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18080$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18081      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18082    fi
18083  else
18084    input_to_shortpath="$new_path"
18085  fi
18086
18087  # Call helper function which possibly converts this using DOS-style short mode.
18088  # If so, the updated path is stored in $new_path.
18089  new_path="$input_to_shortpath"
18090
18091  input_path="$input_to_shortpath"
18092  # Check if we need to convert this using DOS-style short mode. If the path
18093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18094  # take no chances and rewrite it.
18095  # Note: m4 eats our [], so we need to use [ and ] instead.
18096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18097  if test "x$has_forbidden_chars" != x; then
18098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18102      # Going to short mode and back again did indeed matter. Since short mode is
18103      # case insensitive, let's make it lowercase to improve readability.
18104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18105      # Now convert it back to Unix-style (cygpath)
18106      input_path=`$CYGPATH -u "$shortmode_path"`
18107      new_path="$input_path"
18108    fi
18109  fi
18110
18111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18112  if test "x$test_cygdrive_prefix" = x; then
18113    # As a simple fix, exclude /usr/bin since it's not a real path.
18114    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18116      # a path prefixed by /cygdrive for fixpath to work.
18117      new_path="$CYGWIN_ROOT_PATH$input_path"
18118    fi
18119  fi
18120
18121  # remove trailing .exe if any
18122  new_path="${new_path/%.exe/}"
18123
18124    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18125
18126  # First separate the path from the arguments. This will split at the first
18127  # space.
18128  complete="$FOUND_MAKE"
18129  path="${complete%% *}"
18130  tmp="$complete EOL"
18131  arguments="${tmp#* }"
18132
18133  # Input might be given as Windows format, start by converting to
18134  # unix format.
18135  new_path="$path"
18136
18137  windows_path="$new_path"
18138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18139    unix_path=`$CYGPATH -u "$windows_path"`
18140    new_path="$unix_path"
18141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18143    new_path="$unix_path"
18144  fi
18145
18146
18147  # Now try to locate executable using which
18148  new_path=`$WHICH "$new_path" 2> /dev/null`
18149
18150  if test "x$new_path" = x; then
18151    # Oops. Which didn't find the executable.
18152    # The splitting of arguments from the executable at a space might have been incorrect,
18153    # since paths with space are more likely in Windows. Give it another try with the whole
18154    # argument.
18155    path="$complete"
18156    arguments="EOL"
18157    new_path="$path"
18158
18159  windows_path="$new_path"
18160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18161    unix_path=`$CYGPATH -u "$windows_path"`
18162    new_path="$unix_path"
18163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18165    new_path="$unix_path"
18166  fi
18167
18168
18169    new_path=`$WHICH "$new_path" 2> /dev/null`
18170    # bat and cmd files are not always considered executable in MSYS causing which
18171    # to not find them
18172    if test "x$new_path" = x \
18173        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18174        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18175      new_path="$path"
18176
18177  windows_path="$new_path"
18178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18179    unix_path=`$CYGPATH -u "$windows_path"`
18180    new_path="$unix_path"
18181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18183    new_path="$unix_path"
18184  fi
18185
18186    fi
18187
18188    if test "x$new_path" = x; then
18189      # It's still not found. Now this is an unrecoverable error.
18190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18191$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18192      has_space=`$ECHO "$complete" | $GREP " "`
18193      if test "x$has_space" != x; then
18194        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18195$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18196      fi
18197      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18198    fi
18199  fi
18200
18201  # Now new_path has a complete unix path to the binary
18202  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18203    # Keep paths in /bin as-is, but remove trailing .exe if any
18204    new_path="${new_path/%.exe/}"
18205    # Do not save /bin paths to all_fixpath_prefixes!
18206  else
18207    # Not in mixed or Windows style, start by that.
18208    new_path=`cmd //c echo $new_path`
18209
18210  input_path="$new_path"
18211  # Check if we need to convert this using DOS-style short mode. If the path
18212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18213  # take no chances and rewrite it.
18214  # Note: m4 eats our [], so we need to use [ and ] instead.
18215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18216  if test "x$has_forbidden_chars" != x; then
18217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18218    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18219  fi
18220
18221    # Output is in $new_path
18222
18223  windows_path="$new_path"
18224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18225    unix_path=`$CYGPATH -u "$windows_path"`
18226    new_path="$unix_path"
18227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18229    new_path="$unix_path"
18230  fi
18231
18232    # remove trailing .exe if any
18233    new_path="${new_path/%.exe/}"
18234
18235    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18236    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18237  fi
18238
18239    else
18240      # We're on a unix platform. Hooray! :)
18241      # First separate the path from the arguments. This will split at the first
18242      # space.
18243      complete="$FOUND_MAKE"
18244      path="${complete%% *}"
18245      tmp="$complete EOL"
18246      arguments="${tmp#* }"
18247
18248      # Cannot rely on the command "which" here since it doesn't always work.
18249      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18250      if test -z "$is_absolute_path"; then
18251        # Path to executable is not absolute. Find it.
18252        IFS_save="$IFS"
18253        IFS=:
18254        for p in $PATH; do
18255          if test -f "$p/$path" && test -x "$p/$path"; then
18256            new_path="$p/$path"
18257            break
18258          fi
18259        done
18260        IFS="$IFS_save"
18261      else
18262        # This is an absolute path, we can use it without further modifications.
18263        new_path="$path"
18264      fi
18265
18266      if test "x$new_path" = x; then
18267        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18268$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18269        has_space=`$ECHO "$complete" | $GREP " "`
18270        if test "x$has_space" != x; then
18271          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18272$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18273        fi
18274        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18275      fi
18276    fi
18277
18278    # Now join together the path and the arguments once again
18279    if test "x$arguments" != xEOL; then
18280      new_complete="$new_path ${arguments% *}"
18281    else
18282      new_complete="$new_path"
18283    fi
18284
18285    if test "x$complete" != "x$new_complete"; then
18286      FOUND_MAKE="$new_complete"
18287      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18288$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18289    fi
18290  fi
18291
18292        fi
18293      fi
18294    fi
18295  fi
18296
18297    fi
18298
18299    if test "x$FOUND_MAKE" = x; then
18300      if test "x$TOOLCHAIN_PATH" != x; then
18301        # We have a toolchain path, check that as well before giving up.
18302        OLD_PATH=$PATH
18303        PATH=$TOOLCHAIN_PATH:$PATH
18304        for ac_prog in gmake
18305do
18306  # Extract the first word of "$ac_prog", so it can be a program name with args.
18307set dummy $ac_prog; ac_word=$2
18308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18309$as_echo_n "checking for $ac_word... " >&6; }
18310if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18311  $as_echo_n "(cached) " >&6
18312else
18313  case $CHECK_TOOLSDIR_GMAKE in
18314  [\\/]* | ?:[\\/]*)
18315  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18316  ;;
18317  *)
18318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18319for as_dir in $PATH
18320do
18321  IFS=$as_save_IFS
18322  test -z "$as_dir" && as_dir=.
18323    for ac_exec_ext in '' $ac_executable_extensions; do
18324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18325    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18327    break 2
18328  fi
18329done
18330  done
18331IFS=$as_save_IFS
18332
18333  ;;
18334esac
18335fi
18336CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18337if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18339$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18340else
18341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18342$as_echo "no" >&6; }
18343fi
18344
18345
18346  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18347done
18348
18349
18350  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18351  DESCRIPTION="gmake in tools-dir"
18352
18353  # On Cygwin, we require a newer version of make than on other platforms
18354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18355    MAKE_VERSION_EXPR="-e 4\."
18356    MAKE_REQUIRED_VERSION="4.0"
18357   else
18358    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18359    MAKE_REQUIRED_VERSION="3.81"
18360  fi
18361
18362  if test "x$MAKE_CANDIDATE" != x; then
18363    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18364$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18365    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18366    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18367    if test "x$IS_GNU_MAKE" = x; then
18368      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18369$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18370    else
18371      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18372      if test "x$IS_MODERN_MAKE" = x; then
18373        { $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
18374$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;}
18375      else
18376        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18377          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18378            MAKE_EXPECTED_ENV='cygwin'
18379          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18380            MAKE_EXPECTED_ENV='msys'
18381          else
18382            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18383          fi
18384          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18385          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18386        else
18387          # Not relevant for non-Windows
18388          IS_MAKE_CORRECT_ENV=true
18389        fi
18390        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18391          { $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
18392$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;}
18393        else
18394          FOUND_MAKE=$MAKE_CANDIDATE
18395
18396  # Only process if variable expands to non-empty
18397
18398  if test "x$FOUND_MAKE" != x; then
18399    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18400
18401  # First separate the path from the arguments. This will split at the first
18402  # space.
18403  complete="$FOUND_MAKE"
18404  path="${complete%% *}"
18405  tmp="$complete EOL"
18406  arguments="${tmp#* }"
18407
18408  # Input might be given as Windows format, start by converting to
18409  # unix format.
18410  new_path=`$CYGPATH -u "$path"`
18411
18412  # Now try to locate executable using which
18413  new_path=`$WHICH "$new_path" 2> /dev/null`
18414  # bat and cmd files are not always considered executable in cygwin causing which
18415  # to not find them
18416  if test "x$new_path" = x \
18417      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18418      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18419    new_path=`$CYGPATH -u "$path"`
18420  fi
18421  if test "x$new_path" = x; then
18422    # Oops. Which didn't find the executable.
18423    # The splitting of arguments from the executable at a space might have been incorrect,
18424    # since paths with space are more likely in Windows. Give it another try with the whole
18425    # argument.
18426    path="$complete"
18427    arguments="EOL"
18428    new_path=`$CYGPATH -u "$path"`
18429    new_path=`$WHICH "$new_path" 2> /dev/null`
18430    # bat and cmd files are not always considered executable in cygwin causing which
18431    # to not find them
18432    if test "x$new_path" = x \
18433        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18434        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18435      new_path=`$CYGPATH -u "$path"`
18436    fi
18437    if test "x$new_path" = x; then
18438      # It's still not found. Now this is an unrecoverable error.
18439      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18440$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18441      has_space=`$ECHO "$complete" | $GREP " "`
18442      if test "x$has_space" != x; then
18443        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18444$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18445      fi
18446      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18447    fi
18448  fi
18449
18450  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18451  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18452  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18453  # "foo.exe" is OK but "foo" is an error.
18454  #
18455  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18456  # It is also a way to make sure we got the proper file name for the real test later on.
18457  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18458  if test "x$test_shortpath" = x; then
18459    # Short path failed, file does not exist as specified.
18460    # Try adding .exe or .cmd
18461    if test -f "${new_path}.exe"; then
18462      input_to_shortpath="${new_path}.exe"
18463    elif test -f "${new_path}.cmd"; then
18464      input_to_shortpath="${new_path}.cmd"
18465    else
18466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18467$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18468      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18469$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18470      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18471    fi
18472  else
18473    input_to_shortpath="$new_path"
18474  fi
18475
18476  # Call helper function which possibly converts this using DOS-style short mode.
18477  # If so, the updated path is stored in $new_path.
18478  new_path="$input_to_shortpath"
18479
18480  input_path="$input_to_shortpath"
18481  # Check if we need to convert this using DOS-style short mode. If the path
18482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18483  # take no chances and rewrite it.
18484  # Note: m4 eats our [], so we need to use [ and ] instead.
18485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18486  if test "x$has_forbidden_chars" != x; then
18487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18488    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18489    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18490    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18491      # Going to short mode and back again did indeed matter. Since short mode is
18492      # case insensitive, let's make it lowercase to improve readability.
18493      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18494      # Now convert it back to Unix-style (cygpath)
18495      input_path=`$CYGPATH -u "$shortmode_path"`
18496      new_path="$input_path"
18497    fi
18498  fi
18499
18500  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18501  if test "x$test_cygdrive_prefix" = x; then
18502    # As a simple fix, exclude /usr/bin since it's not a real path.
18503    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18504      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18505      # a path prefixed by /cygdrive for fixpath to work.
18506      new_path="$CYGWIN_ROOT_PATH$input_path"
18507    fi
18508  fi
18509
18510  # remove trailing .exe if any
18511  new_path="${new_path/%.exe/}"
18512
18513    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18514
18515  # First separate the path from the arguments. This will split at the first
18516  # space.
18517  complete="$FOUND_MAKE"
18518  path="${complete%% *}"
18519  tmp="$complete EOL"
18520  arguments="${tmp#* }"
18521
18522  # Input might be given as Windows format, start by converting to
18523  # unix format.
18524  new_path="$path"
18525
18526  windows_path="$new_path"
18527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18528    unix_path=`$CYGPATH -u "$windows_path"`
18529    new_path="$unix_path"
18530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18532    new_path="$unix_path"
18533  fi
18534
18535
18536  # Now try to locate executable using which
18537  new_path=`$WHICH "$new_path" 2> /dev/null`
18538
18539  if test "x$new_path" = x; then
18540    # Oops. Which didn't find the executable.
18541    # The splitting of arguments from the executable at a space might have been incorrect,
18542    # since paths with space are more likely in Windows. Give it another try with the whole
18543    # argument.
18544    path="$complete"
18545    arguments="EOL"
18546    new_path="$path"
18547
18548  windows_path="$new_path"
18549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18550    unix_path=`$CYGPATH -u "$windows_path"`
18551    new_path="$unix_path"
18552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18554    new_path="$unix_path"
18555  fi
18556
18557
18558    new_path=`$WHICH "$new_path" 2> /dev/null`
18559    # bat and cmd files are not always considered executable in MSYS causing which
18560    # to not find them
18561    if test "x$new_path" = x \
18562        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18563        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18564      new_path="$path"
18565
18566  windows_path="$new_path"
18567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18568    unix_path=`$CYGPATH -u "$windows_path"`
18569    new_path="$unix_path"
18570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18572    new_path="$unix_path"
18573  fi
18574
18575    fi
18576
18577    if test "x$new_path" = x; then
18578      # It's still not found. Now this is an unrecoverable error.
18579      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18580$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18581      has_space=`$ECHO "$complete" | $GREP " "`
18582      if test "x$has_space" != x; then
18583        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18584$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18585      fi
18586      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18587    fi
18588  fi
18589
18590  # Now new_path has a complete unix path to the binary
18591  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18592    # Keep paths in /bin as-is, but remove trailing .exe if any
18593    new_path="${new_path/%.exe/}"
18594    # Do not save /bin paths to all_fixpath_prefixes!
18595  else
18596    # Not in mixed or Windows style, start by that.
18597    new_path=`cmd //c echo $new_path`
18598
18599  input_path="$new_path"
18600  # Check if we need to convert this using DOS-style short mode. If the path
18601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18602  # take no chances and rewrite it.
18603  # Note: m4 eats our [], so we need to use [ and ] instead.
18604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18605  if test "x$has_forbidden_chars" != x; then
18606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18607    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18608  fi
18609
18610    # Output is in $new_path
18611
18612  windows_path="$new_path"
18613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18614    unix_path=`$CYGPATH -u "$windows_path"`
18615    new_path="$unix_path"
18616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18618    new_path="$unix_path"
18619  fi
18620
18621    # remove trailing .exe if any
18622    new_path="${new_path/%.exe/}"
18623
18624    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18625    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18626  fi
18627
18628    else
18629      # We're on a unix platform. Hooray! :)
18630      # First separate the path from the arguments. This will split at the first
18631      # space.
18632      complete="$FOUND_MAKE"
18633      path="${complete%% *}"
18634      tmp="$complete EOL"
18635      arguments="${tmp#* }"
18636
18637      # Cannot rely on the command "which" here since it doesn't always work.
18638      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18639      if test -z "$is_absolute_path"; then
18640        # Path to executable is not absolute. Find it.
18641        IFS_save="$IFS"
18642        IFS=:
18643        for p in $PATH; do
18644          if test -f "$p/$path" && test -x "$p/$path"; then
18645            new_path="$p/$path"
18646            break
18647          fi
18648        done
18649        IFS="$IFS_save"
18650      else
18651        # This is an absolute path, we can use it without further modifications.
18652        new_path="$path"
18653      fi
18654
18655      if test "x$new_path" = x; then
18656        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18657$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18658        has_space=`$ECHO "$complete" | $GREP " "`
18659        if test "x$has_space" != x; then
18660          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18661$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18662        fi
18663        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18664      fi
18665    fi
18666
18667    # Now join together the path and the arguments once again
18668    if test "x$arguments" != xEOL; then
18669      new_complete="$new_path ${arguments% *}"
18670    else
18671      new_complete="$new_path"
18672    fi
18673
18674    if test "x$complete" != "x$new_complete"; then
18675      FOUND_MAKE="$new_complete"
18676      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18677$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18678    fi
18679  fi
18680
18681        fi
18682      fi
18683    fi
18684  fi
18685
18686        if test "x$FOUND_MAKE" = x; then
18687          for ac_prog in make
18688do
18689  # Extract the first word of "$ac_prog", so it can be a program name with args.
18690set dummy $ac_prog; ac_word=$2
18691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18692$as_echo_n "checking for $ac_word... " >&6; }
18693if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18694  $as_echo_n "(cached) " >&6
18695else
18696  case $CHECK_TOOLSDIR_MAKE in
18697  [\\/]* | ?:[\\/]*)
18698  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18699  ;;
18700  *)
18701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18702for as_dir in $PATH
18703do
18704  IFS=$as_save_IFS
18705  test -z "$as_dir" && as_dir=.
18706    for ac_exec_ext in '' $ac_executable_extensions; do
18707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18708    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18710    break 2
18711  fi
18712done
18713  done
18714IFS=$as_save_IFS
18715
18716  ;;
18717esac
18718fi
18719CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18720if test -n "$CHECK_TOOLSDIR_MAKE"; then
18721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18722$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18723else
18724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18725$as_echo "no" >&6; }
18726fi
18727
18728
18729  test -n "$CHECK_TOOLSDIR_MAKE" && break
18730done
18731
18732
18733  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18734  DESCRIPTION="make in tools-dir"
18735
18736  # On Cygwin, we require a newer version of make than on other platforms
18737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18738    MAKE_VERSION_EXPR="-e 4\."
18739    MAKE_REQUIRED_VERSION="4.0"
18740   else
18741    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18742    MAKE_REQUIRED_VERSION="3.81"
18743  fi
18744
18745  if test "x$MAKE_CANDIDATE" != x; then
18746    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18747$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18748    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18749    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18750    if test "x$IS_GNU_MAKE" = x; then
18751      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18752$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18753    else
18754      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18755      if test "x$IS_MODERN_MAKE" = x; then
18756        { $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
18757$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;}
18758      else
18759        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18760          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18761            MAKE_EXPECTED_ENV='cygwin'
18762          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18763            MAKE_EXPECTED_ENV='msys'
18764          else
18765            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18766          fi
18767          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18768          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18769        else
18770          # Not relevant for non-Windows
18771          IS_MAKE_CORRECT_ENV=true
18772        fi
18773        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18774          { $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
18775$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;}
18776        else
18777          FOUND_MAKE=$MAKE_CANDIDATE
18778
18779  # Only process if variable expands to non-empty
18780
18781  if test "x$FOUND_MAKE" != x; then
18782    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18783
18784  # First separate the path from the arguments. This will split at the first
18785  # space.
18786  complete="$FOUND_MAKE"
18787  path="${complete%% *}"
18788  tmp="$complete EOL"
18789  arguments="${tmp#* }"
18790
18791  # Input might be given as Windows format, start by converting to
18792  # unix format.
18793  new_path=`$CYGPATH -u "$path"`
18794
18795  # Now try to locate executable using which
18796  new_path=`$WHICH "$new_path" 2> /dev/null`
18797  # bat and cmd files are not always considered executable in cygwin causing which
18798  # to not find them
18799  if test "x$new_path" = x \
18800      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18801      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18802    new_path=`$CYGPATH -u "$path"`
18803  fi
18804  if test "x$new_path" = x; then
18805    # Oops. Which didn't find the executable.
18806    # The splitting of arguments from the executable at a space might have been incorrect,
18807    # since paths with space are more likely in Windows. Give it another try with the whole
18808    # argument.
18809    path="$complete"
18810    arguments="EOL"
18811    new_path=`$CYGPATH -u "$path"`
18812    new_path=`$WHICH "$new_path" 2> /dev/null`
18813    # bat and cmd files are not always considered executable in cygwin causing which
18814    # to not find them
18815    if test "x$new_path" = x \
18816        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18817        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18818      new_path=`$CYGPATH -u "$path"`
18819    fi
18820    if test "x$new_path" = x; then
18821      # It's still not found. Now this is an unrecoverable error.
18822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18823$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18824      has_space=`$ECHO "$complete" | $GREP " "`
18825      if test "x$has_space" != x; then
18826        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18827$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18828      fi
18829      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18830    fi
18831  fi
18832
18833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18836  # "foo.exe" is OK but "foo" is an error.
18837  #
18838  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18839  # It is also a way to make sure we got the proper file name for the real test later on.
18840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18841  if test "x$test_shortpath" = x; then
18842    # Short path failed, file does not exist as specified.
18843    # Try adding .exe or .cmd
18844    if test -f "${new_path}.exe"; then
18845      input_to_shortpath="${new_path}.exe"
18846    elif test -f "${new_path}.cmd"; then
18847      input_to_shortpath="${new_path}.cmd"
18848    else
18849      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18850$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18851      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18852$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18853      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18854    fi
18855  else
18856    input_to_shortpath="$new_path"
18857  fi
18858
18859  # Call helper function which possibly converts this using DOS-style short mode.
18860  # If so, the updated path is stored in $new_path.
18861  new_path="$input_to_shortpath"
18862
18863  input_path="$input_to_shortpath"
18864  # Check if we need to convert this using DOS-style short mode. If the path
18865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18866  # take no chances and rewrite it.
18867  # Note: m4 eats our [], so we need to use [ and ] instead.
18868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18869  if test "x$has_forbidden_chars" != x; then
18870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18874      # Going to short mode and back again did indeed matter. Since short mode is
18875      # case insensitive, let's make it lowercase to improve readability.
18876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18877      # Now convert it back to Unix-style (cygpath)
18878      input_path=`$CYGPATH -u "$shortmode_path"`
18879      new_path="$input_path"
18880    fi
18881  fi
18882
18883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18884  if test "x$test_cygdrive_prefix" = x; then
18885    # As a simple fix, exclude /usr/bin since it's not a real path.
18886    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18888      # a path prefixed by /cygdrive for fixpath to work.
18889      new_path="$CYGWIN_ROOT_PATH$input_path"
18890    fi
18891  fi
18892
18893  # remove trailing .exe if any
18894  new_path="${new_path/%.exe/}"
18895
18896    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18897
18898  # First separate the path from the arguments. This will split at the first
18899  # space.
18900  complete="$FOUND_MAKE"
18901  path="${complete%% *}"
18902  tmp="$complete EOL"
18903  arguments="${tmp#* }"
18904
18905  # Input might be given as Windows format, start by converting to
18906  # unix format.
18907  new_path="$path"
18908
18909  windows_path="$new_path"
18910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18911    unix_path=`$CYGPATH -u "$windows_path"`
18912    new_path="$unix_path"
18913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18915    new_path="$unix_path"
18916  fi
18917
18918
18919  # Now try to locate executable using which
18920  new_path=`$WHICH "$new_path" 2> /dev/null`
18921
18922  if test "x$new_path" = x; then
18923    # Oops. Which didn't find the executable.
18924    # The splitting of arguments from the executable at a space might have been incorrect,
18925    # since paths with space are more likely in Windows. Give it another try with the whole
18926    # argument.
18927    path="$complete"
18928    arguments="EOL"
18929    new_path="$path"
18930
18931  windows_path="$new_path"
18932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18933    unix_path=`$CYGPATH -u "$windows_path"`
18934    new_path="$unix_path"
18935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18937    new_path="$unix_path"
18938  fi
18939
18940
18941    new_path=`$WHICH "$new_path" 2> /dev/null`
18942    # bat and cmd files are not always considered executable in MSYS causing which
18943    # to not find them
18944    if test "x$new_path" = x \
18945        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18946        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18947      new_path="$path"
18948
18949  windows_path="$new_path"
18950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18951    unix_path=`$CYGPATH -u "$windows_path"`
18952    new_path="$unix_path"
18953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18955    new_path="$unix_path"
18956  fi
18957
18958    fi
18959
18960    if test "x$new_path" = x; then
18961      # It's still not found. Now this is an unrecoverable error.
18962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18963$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18964      has_space=`$ECHO "$complete" | $GREP " "`
18965      if test "x$has_space" != x; then
18966        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18967$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18968      fi
18969      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18970    fi
18971  fi
18972
18973  # Now new_path has a complete unix path to the binary
18974  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18975    # Keep paths in /bin as-is, but remove trailing .exe if any
18976    new_path="${new_path/%.exe/}"
18977    # Do not save /bin paths to all_fixpath_prefixes!
18978  else
18979    # Not in mixed or Windows style, start by that.
18980    new_path=`cmd //c echo $new_path`
18981
18982  input_path="$new_path"
18983  # Check if we need to convert this using DOS-style short mode. If the path
18984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18985  # take no chances and rewrite it.
18986  # Note: m4 eats our [], so we need to use [ and ] instead.
18987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18988  if test "x$has_forbidden_chars" != x; then
18989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18991  fi
18992
18993    # Output is in $new_path
18994
18995  windows_path="$new_path"
18996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18997    unix_path=`$CYGPATH -u "$windows_path"`
18998    new_path="$unix_path"
18999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19001    new_path="$unix_path"
19002  fi
19003
19004    # remove trailing .exe if any
19005    new_path="${new_path/%.exe/}"
19006
19007    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19008    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19009  fi
19010
19011    else
19012      # We're on a unix platform. Hooray! :)
19013      # First separate the path from the arguments. This will split at the first
19014      # space.
19015      complete="$FOUND_MAKE"
19016      path="${complete%% *}"
19017      tmp="$complete EOL"
19018      arguments="${tmp#* }"
19019
19020      # Cannot rely on the command "which" here since it doesn't always work.
19021      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19022      if test -z "$is_absolute_path"; then
19023        # Path to executable is not absolute. Find it.
19024        IFS_save="$IFS"
19025        IFS=:
19026        for p in $PATH; do
19027          if test -f "$p/$path" && test -x "$p/$path"; then
19028            new_path="$p/$path"
19029            break
19030          fi
19031        done
19032        IFS="$IFS_save"
19033      else
19034        # This is an absolute path, we can use it without further modifications.
19035        new_path="$path"
19036      fi
19037
19038      if test "x$new_path" = x; then
19039        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19040$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19041        has_space=`$ECHO "$complete" | $GREP " "`
19042        if test "x$has_space" != x; then
19043          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19044$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19045        fi
19046        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19047      fi
19048    fi
19049
19050    # Now join together the path and the arguments once again
19051    if test "x$arguments" != xEOL; then
19052      new_complete="$new_path ${arguments% *}"
19053    else
19054      new_complete="$new_path"
19055    fi
19056
19057    if test "x$complete" != "x$new_complete"; then
19058      FOUND_MAKE="$new_complete"
19059      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19060$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19061    fi
19062  fi
19063
19064        fi
19065      fi
19066    fi
19067  fi
19068
19069        fi
19070        PATH=$OLD_PATH
19071      fi
19072    fi
19073
19074    if test "x$FOUND_MAKE" = x; then
19075      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
19076    fi
19077
19078  else
19079    # The variable is set, but is it from the command line or the environment?
19080
19081    # Try to remove the string !MAKE! from our list.
19082    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19083    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19084      # If it failed, the variable was not from the command line. Ignore it,
19085      # but warn the user (except for BASH, which is always set by the calling BASH).
19086      if test "xMAKE" != xBASH; then
19087        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19088$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19089      fi
19090      # Try to locate tool using the code snippet
19091
19092    # Try our hardest to locate a correct version of GNU make
19093    for ac_prog in gmake
19094do
19095  # Extract the first word of "$ac_prog", so it can be a program name with args.
19096set dummy $ac_prog; ac_word=$2
19097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19098$as_echo_n "checking for $ac_word... " >&6; }
19099if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19100  $as_echo_n "(cached) " >&6
19101else
19102  case $CHECK_GMAKE in
19103  [\\/]* | ?:[\\/]*)
19104  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19105  ;;
19106  *)
19107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19108for as_dir in $PATH
19109do
19110  IFS=$as_save_IFS
19111  test -z "$as_dir" && as_dir=.
19112    for ac_exec_ext in '' $ac_executable_extensions; do
19113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19114    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19116    break 2
19117  fi
19118done
19119  done
19120IFS=$as_save_IFS
19121
19122  ;;
19123esac
19124fi
19125CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19126if test -n "$CHECK_GMAKE"; then
19127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19128$as_echo "$CHECK_GMAKE" >&6; }
19129else
19130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19131$as_echo "no" >&6; }
19132fi
19133
19134
19135  test -n "$CHECK_GMAKE" && break
19136done
19137
19138
19139  MAKE_CANDIDATE=""$CHECK_GMAKE""
19140  DESCRIPTION="gmake in PATH"
19141
19142  # On Cygwin, we require a newer version of make than on other platforms
19143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19144    MAKE_VERSION_EXPR="-e 4\."
19145    MAKE_REQUIRED_VERSION="4.0"
19146   else
19147    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19148    MAKE_REQUIRED_VERSION="3.81"
19149  fi
19150
19151  if test "x$MAKE_CANDIDATE" != x; then
19152    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19153$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19154    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19155    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19156    if test "x$IS_GNU_MAKE" = x; then
19157      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19158$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19159    else
19160      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19161      if test "x$IS_MODERN_MAKE" = x; then
19162        { $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
19163$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;}
19164      else
19165        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19166          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19167            MAKE_EXPECTED_ENV='cygwin'
19168          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19169            MAKE_EXPECTED_ENV='msys'
19170          else
19171            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19172          fi
19173          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19174          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19175        else
19176          # Not relevant for non-Windows
19177          IS_MAKE_CORRECT_ENV=true
19178        fi
19179        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19180          { $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
19181$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;}
19182        else
19183          FOUND_MAKE=$MAKE_CANDIDATE
19184
19185  # Only process if variable expands to non-empty
19186
19187  if test "x$FOUND_MAKE" != x; then
19188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19189
19190  # First separate the path from the arguments. This will split at the first
19191  # space.
19192  complete="$FOUND_MAKE"
19193  path="${complete%% *}"
19194  tmp="$complete EOL"
19195  arguments="${tmp#* }"
19196
19197  # Input might be given as Windows format, start by converting to
19198  # unix format.
19199  new_path=`$CYGPATH -u "$path"`
19200
19201  # Now try to locate executable using which
19202  new_path=`$WHICH "$new_path" 2> /dev/null`
19203  # bat and cmd files are not always considered executable in cygwin causing which
19204  # to not find them
19205  if test "x$new_path" = x \
19206      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19207      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19208    new_path=`$CYGPATH -u "$path"`
19209  fi
19210  if test "x$new_path" = x; then
19211    # Oops. Which didn't find the executable.
19212    # The splitting of arguments from the executable at a space might have been incorrect,
19213    # since paths with space are more likely in Windows. Give it another try with the whole
19214    # argument.
19215    path="$complete"
19216    arguments="EOL"
19217    new_path=`$CYGPATH -u "$path"`
19218    new_path=`$WHICH "$new_path" 2> /dev/null`
19219    # bat and cmd files are not always considered executable in cygwin causing which
19220    # to not find them
19221    if test "x$new_path" = x \
19222        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19223        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19224      new_path=`$CYGPATH -u "$path"`
19225    fi
19226    if test "x$new_path" = x; then
19227      # It's still not found. Now this is an unrecoverable error.
19228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19229$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19230      has_space=`$ECHO "$complete" | $GREP " "`
19231      if test "x$has_space" != x; then
19232        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19233$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19234      fi
19235      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19236    fi
19237  fi
19238
19239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19242  # "foo.exe" is OK but "foo" is an error.
19243  #
19244  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19245  # It is also a way to make sure we got the proper file name for the real test later on.
19246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19247  if test "x$test_shortpath" = x; then
19248    # Short path failed, file does not exist as specified.
19249    # Try adding .exe or .cmd
19250    if test -f "${new_path}.exe"; then
19251      input_to_shortpath="${new_path}.exe"
19252    elif test -f "${new_path}.cmd"; then
19253      input_to_shortpath="${new_path}.cmd"
19254    else
19255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19256$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19257      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19258$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19259      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19260    fi
19261  else
19262    input_to_shortpath="$new_path"
19263  fi
19264
19265  # Call helper function which possibly converts this using DOS-style short mode.
19266  # If so, the updated path is stored in $new_path.
19267  new_path="$input_to_shortpath"
19268
19269  input_path="$input_to_shortpath"
19270  # Check if we need to convert this using DOS-style short mode. If the path
19271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19272  # take no chances and rewrite it.
19273  # Note: m4 eats our [], so we need to use [ and ] instead.
19274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19275  if test "x$has_forbidden_chars" != x; then
19276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19277    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19278    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19279    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19280      # Going to short mode and back again did indeed matter. Since short mode is
19281      # case insensitive, let's make it lowercase to improve readability.
19282      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19283      # Now convert it back to Unix-style (cygpath)
19284      input_path=`$CYGPATH -u "$shortmode_path"`
19285      new_path="$input_path"
19286    fi
19287  fi
19288
19289  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19290  if test "x$test_cygdrive_prefix" = x; then
19291    # As a simple fix, exclude /usr/bin since it's not a real path.
19292    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19293      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19294      # a path prefixed by /cygdrive for fixpath to work.
19295      new_path="$CYGWIN_ROOT_PATH$input_path"
19296    fi
19297  fi
19298
19299  # remove trailing .exe if any
19300  new_path="${new_path/%.exe/}"
19301
19302    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19303
19304  # First separate the path from the arguments. This will split at the first
19305  # space.
19306  complete="$FOUND_MAKE"
19307  path="${complete%% *}"
19308  tmp="$complete EOL"
19309  arguments="${tmp#* }"
19310
19311  # Input might be given as Windows format, start by converting to
19312  # unix format.
19313  new_path="$path"
19314
19315  windows_path="$new_path"
19316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19317    unix_path=`$CYGPATH -u "$windows_path"`
19318    new_path="$unix_path"
19319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19321    new_path="$unix_path"
19322  fi
19323
19324
19325  # Now try to locate executable using which
19326  new_path=`$WHICH "$new_path" 2> /dev/null`
19327
19328  if test "x$new_path" = x; then
19329    # Oops. Which didn't find the executable.
19330    # The splitting of arguments from the executable at a space might have been incorrect,
19331    # since paths with space are more likely in Windows. Give it another try with the whole
19332    # argument.
19333    path="$complete"
19334    arguments="EOL"
19335    new_path="$path"
19336
19337  windows_path="$new_path"
19338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19339    unix_path=`$CYGPATH -u "$windows_path"`
19340    new_path="$unix_path"
19341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19343    new_path="$unix_path"
19344  fi
19345
19346
19347    new_path=`$WHICH "$new_path" 2> /dev/null`
19348    # bat and cmd files are not always considered executable in MSYS causing which
19349    # to not find them
19350    if test "x$new_path" = x \
19351        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19352        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19353      new_path="$path"
19354
19355  windows_path="$new_path"
19356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19357    unix_path=`$CYGPATH -u "$windows_path"`
19358    new_path="$unix_path"
19359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19361    new_path="$unix_path"
19362  fi
19363
19364    fi
19365
19366    if test "x$new_path" = x; then
19367      # It's still not found. Now this is an unrecoverable error.
19368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19369$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19370      has_space=`$ECHO "$complete" | $GREP " "`
19371      if test "x$has_space" != x; then
19372        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19373$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19374      fi
19375      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19376    fi
19377  fi
19378
19379  # Now new_path has a complete unix path to the binary
19380  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19381    # Keep paths in /bin as-is, but remove trailing .exe if any
19382    new_path="${new_path/%.exe/}"
19383    # Do not save /bin paths to all_fixpath_prefixes!
19384  else
19385    # Not in mixed or Windows style, start by that.
19386    new_path=`cmd //c echo $new_path`
19387
19388  input_path="$new_path"
19389  # Check if we need to convert this using DOS-style short mode. If the path
19390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19391  # take no chances and rewrite it.
19392  # Note: m4 eats our [], so we need to use [ and ] instead.
19393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19394  if test "x$has_forbidden_chars" != x; then
19395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19397  fi
19398
19399    # Output is in $new_path
19400
19401  windows_path="$new_path"
19402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19403    unix_path=`$CYGPATH -u "$windows_path"`
19404    new_path="$unix_path"
19405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19407    new_path="$unix_path"
19408  fi
19409
19410    # remove trailing .exe if any
19411    new_path="${new_path/%.exe/}"
19412
19413    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19414    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19415  fi
19416
19417    else
19418      # We're on a unix platform. Hooray! :)
19419      # First separate the path from the arguments. This will split at the first
19420      # space.
19421      complete="$FOUND_MAKE"
19422      path="${complete%% *}"
19423      tmp="$complete EOL"
19424      arguments="${tmp#* }"
19425
19426      # Cannot rely on the command "which" here since it doesn't always work.
19427      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19428      if test -z "$is_absolute_path"; then
19429        # Path to executable is not absolute. Find it.
19430        IFS_save="$IFS"
19431        IFS=:
19432        for p in $PATH; do
19433          if test -f "$p/$path" && test -x "$p/$path"; then
19434            new_path="$p/$path"
19435            break
19436          fi
19437        done
19438        IFS="$IFS_save"
19439      else
19440        # This is an absolute path, we can use it without further modifications.
19441        new_path="$path"
19442      fi
19443
19444      if test "x$new_path" = x; then
19445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19446$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19447        has_space=`$ECHO "$complete" | $GREP " "`
19448        if test "x$has_space" != x; then
19449          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19450$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19451        fi
19452        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19453      fi
19454    fi
19455
19456    # Now join together the path and the arguments once again
19457    if test "x$arguments" != xEOL; then
19458      new_complete="$new_path ${arguments% *}"
19459    else
19460      new_complete="$new_path"
19461    fi
19462
19463    if test "x$complete" != "x$new_complete"; then
19464      FOUND_MAKE="$new_complete"
19465      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19466$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19467    fi
19468  fi
19469
19470        fi
19471      fi
19472    fi
19473  fi
19474
19475
19476    if test "x$FOUND_MAKE" = x; then
19477      for ac_prog in make
19478do
19479  # Extract the first word of "$ac_prog", so it can be a program name with args.
19480set dummy $ac_prog; ac_word=$2
19481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19482$as_echo_n "checking for $ac_word... " >&6; }
19483if ${ac_cv_path_CHECK_MAKE+:} false; then :
19484  $as_echo_n "(cached) " >&6
19485else
19486  case $CHECK_MAKE in
19487  [\\/]* | ?:[\\/]*)
19488  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19489  ;;
19490  *)
19491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19492for as_dir in $PATH
19493do
19494  IFS=$as_save_IFS
19495  test -z "$as_dir" && as_dir=.
19496    for ac_exec_ext in '' $ac_executable_extensions; do
19497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19498    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19500    break 2
19501  fi
19502done
19503  done
19504IFS=$as_save_IFS
19505
19506  ;;
19507esac
19508fi
19509CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19510if test -n "$CHECK_MAKE"; then
19511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19512$as_echo "$CHECK_MAKE" >&6; }
19513else
19514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19515$as_echo "no" >&6; }
19516fi
19517
19518
19519  test -n "$CHECK_MAKE" && break
19520done
19521
19522
19523  MAKE_CANDIDATE=""$CHECK_MAKE""
19524  DESCRIPTION="make in PATH"
19525
19526  # On Cygwin, we require a newer version of make than on other platforms
19527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19528    MAKE_VERSION_EXPR="-e 4\."
19529    MAKE_REQUIRED_VERSION="4.0"
19530   else
19531    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19532    MAKE_REQUIRED_VERSION="3.81"
19533  fi
19534
19535  if test "x$MAKE_CANDIDATE" != x; then
19536    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19537$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19538    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19539    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19540    if test "x$IS_GNU_MAKE" = x; then
19541      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19542$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19543    else
19544      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19545      if test "x$IS_MODERN_MAKE" = x; then
19546        { $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
19547$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;}
19548      else
19549        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19550          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19551            MAKE_EXPECTED_ENV='cygwin'
19552          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19553            MAKE_EXPECTED_ENV='msys'
19554          else
19555            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19556          fi
19557          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19558          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19559        else
19560          # Not relevant for non-Windows
19561          IS_MAKE_CORRECT_ENV=true
19562        fi
19563        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19564          { $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
19565$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;}
19566        else
19567          FOUND_MAKE=$MAKE_CANDIDATE
19568
19569  # Only process if variable expands to non-empty
19570
19571  if test "x$FOUND_MAKE" != x; then
19572    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19573
19574  # First separate the path from the arguments. This will split at the first
19575  # space.
19576  complete="$FOUND_MAKE"
19577  path="${complete%% *}"
19578  tmp="$complete EOL"
19579  arguments="${tmp#* }"
19580
19581  # Input might be given as Windows format, start by converting to
19582  # unix format.
19583  new_path=`$CYGPATH -u "$path"`
19584
19585  # Now try to locate executable using which
19586  new_path=`$WHICH "$new_path" 2> /dev/null`
19587  # bat and cmd files are not always considered executable in cygwin causing which
19588  # to not find them
19589  if test "x$new_path" = x \
19590      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19591      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19592    new_path=`$CYGPATH -u "$path"`
19593  fi
19594  if test "x$new_path" = x; then
19595    # Oops. Which didn't find the executable.
19596    # The splitting of arguments from the executable at a space might have been incorrect,
19597    # since paths with space are more likely in Windows. Give it another try with the whole
19598    # argument.
19599    path="$complete"
19600    arguments="EOL"
19601    new_path=`$CYGPATH -u "$path"`
19602    new_path=`$WHICH "$new_path" 2> /dev/null`
19603    # bat and cmd files are not always considered executable in cygwin causing which
19604    # to not find them
19605    if test "x$new_path" = x \
19606        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19607        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19608      new_path=`$CYGPATH -u "$path"`
19609    fi
19610    if test "x$new_path" = x; then
19611      # It's still not found. Now this is an unrecoverable error.
19612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19613$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19614      has_space=`$ECHO "$complete" | $GREP " "`
19615      if test "x$has_space" != x; then
19616        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19617$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19618      fi
19619      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19620    fi
19621  fi
19622
19623  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19624  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19625  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19626  # "foo.exe" is OK but "foo" is an error.
19627  #
19628  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19629  # It is also a way to make sure we got the proper file name for the real test later on.
19630  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19631  if test "x$test_shortpath" = x; then
19632    # Short path failed, file does not exist as specified.
19633    # Try adding .exe or .cmd
19634    if test -f "${new_path}.exe"; then
19635      input_to_shortpath="${new_path}.exe"
19636    elif test -f "${new_path}.cmd"; then
19637      input_to_shortpath="${new_path}.cmd"
19638    else
19639      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19640$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19641      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19642$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19643      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19644    fi
19645  else
19646    input_to_shortpath="$new_path"
19647  fi
19648
19649  # Call helper function which possibly converts this using DOS-style short mode.
19650  # If so, the updated path is stored in $new_path.
19651  new_path="$input_to_shortpath"
19652
19653  input_path="$input_to_shortpath"
19654  # Check if we need to convert this using DOS-style short mode. If the path
19655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19656  # take no chances and rewrite it.
19657  # Note: m4 eats our [], so we need to use [ and ] instead.
19658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19659  if test "x$has_forbidden_chars" != x; then
19660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19661    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19662    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19663    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19664      # Going to short mode and back again did indeed matter. Since short mode is
19665      # case insensitive, let's make it lowercase to improve readability.
19666      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19667      # Now convert it back to Unix-style (cygpath)
19668      input_path=`$CYGPATH -u "$shortmode_path"`
19669      new_path="$input_path"
19670    fi
19671  fi
19672
19673  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19674  if test "x$test_cygdrive_prefix" = x; then
19675    # As a simple fix, exclude /usr/bin since it's not a real path.
19676    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19677      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19678      # a path prefixed by /cygdrive for fixpath to work.
19679      new_path="$CYGWIN_ROOT_PATH$input_path"
19680    fi
19681  fi
19682
19683  # remove trailing .exe if any
19684  new_path="${new_path/%.exe/}"
19685
19686    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19687
19688  # First separate the path from the arguments. This will split at the first
19689  # space.
19690  complete="$FOUND_MAKE"
19691  path="${complete%% *}"
19692  tmp="$complete EOL"
19693  arguments="${tmp#* }"
19694
19695  # Input might be given as Windows format, start by converting to
19696  # unix format.
19697  new_path="$path"
19698
19699  windows_path="$new_path"
19700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19701    unix_path=`$CYGPATH -u "$windows_path"`
19702    new_path="$unix_path"
19703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19705    new_path="$unix_path"
19706  fi
19707
19708
19709  # Now try to locate executable using which
19710  new_path=`$WHICH "$new_path" 2> /dev/null`
19711
19712  if test "x$new_path" = x; then
19713    # Oops. Which didn't find the executable.
19714    # The splitting of arguments from the executable at a space might have been incorrect,
19715    # since paths with space are more likely in Windows. Give it another try with the whole
19716    # argument.
19717    path="$complete"
19718    arguments="EOL"
19719    new_path="$path"
19720
19721  windows_path="$new_path"
19722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19723    unix_path=`$CYGPATH -u "$windows_path"`
19724    new_path="$unix_path"
19725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19727    new_path="$unix_path"
19728  fi
19729
19730
19731    new_path=`$WHICH "$new_path" 2> /dev/null`
19732    # bat and cmd files are not always considered executable in MSYS causing which
19733    # to not find them
19734    if test "x$new_path" = x \
19735        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19736        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19737      new_path="$path"
19738
19739  windows_path="$new_path"
19740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19741    unix_path=`$CYGPATH -u "$windows_path"`
19742    new_path="$unix_path"
19743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19745    new_path="$unix_path"
19746  fi
19747
19748    fi
19749
19750    if test "x$new_path" = x; then
19751      # It's still not found. Now this is an unrecoverable error.
19752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19753$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19754      has_space=`$ECHO "$complete" | $GREP " "`
19755      if test "x$has_space" != x; then
19756        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19757$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19758      fi
19759      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19760    fi
19761  fi
19762
19763  # Now new_path has a complete unix path to the binary
19764  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19765    # Keep paths in /bin as-is, but remove trailing .exe if any
19766    new_path="${new_path/%.exe/}"
19767    # Do not save /bin paths to all_fixpath_prefixes!
19768  else
19769    # Not in mixed or Windows style, start by that.
19770    new_path=`cmd //c echo $new_path`
19771
19772  input_path="$new_path"
19773  # Check if we need to convert this using DOS-style short mode. If the path
19774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19775  # take no chances and rewrite it.
19776  # Note: m4 eats our [], so we need to use [ and ] instead.
19777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19778  if test "x$has_forbidden_chars" != x; then
19779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19780    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19781  fi
19782
19783    # Output is in $new_path
19784
19785  windows_path="$new_path"
19786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19787    unix_path=`$CYGPATH -u "$windows_path"`
19788    new_path="$unix_path"
19789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19791    new_path="$unix_path"
19792  fi
19793
19794    # remove trailing .exe if any
19795    new_path="${new_path/%.exe/}"
19796
19797    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19798    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19799  fi
19800
19801    else
19802      # We're on a unix platform. Hooray! :)
19803      # First separate the path from the arguments. This will split at the first
19804      # space.
19805      complete="$FOUND_MAKE"
19806      path="${complete%% *}"
19807      tmp="$complete EOL"
19808      arguments="${tmp#* }"
19809
19810      # Cannot rely on the command "which" here since it doesn't always work.
19811      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19812      if test -z "$is_absolute_path"; then
19813        # Path to executable is not absolute. Find it.
19814        IFS_save="$IFS"
19815        IFS=:
19816        for p in $PATH; do
19817          if test -f "$p/$path" && test -x "$p/$path"; then
19818            new_path="$p/$path"
19819            break
19820          fi
19821        done
19822        IFS="$IFS_save"
19823      else
19824        # This is an absolute path, we can use it without further modifications.
19825        new_path="$path"
19826      fi
19827
19828      if test "x$new_path" = x; then
19829        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19830$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19831        has_space=`$ECHO "$complete" | $GREP " "`
19832        if test "x$has_space" != x; then
19833          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19834$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19835        fi
19836        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19837      fi
19838    fi
19839
19840    # Now join together the path and the arguments once again
19841    if test "x$arguments" != xEOL; then
19842      new_complete="$new_path ${arguments% *}"
19843    else
19844      new_complete="$new_path"
19845    fi
19846
19847    if test "x$complete" != "x$new_complete"; then
19848      FOUND_MAKE="$new_complete"
19849      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19850$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19851    fi
19852  fi
19853
19854        fi
19855      fi
19856    fi
19857  fi
19858
19859    fi
19860
19861    if test "x$FOUND_MAKE" = x; then
19862      if test "x$TOOLCHAIN_PATH" != x; then
19863        # We have a toolchain path, check that as well before giving up.
19864        OLD_PATH=$PATH
19865        PATH=$TOOLCHAIN_PATH:$PATH
19866        for ac_prog in gmake
19867do
19868  # Extract the first word of "$ac_prog", so it can be a program name with args.
19869set dummy $ac_prog; ac_word=$2
19870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19871$as_echo_n "checking for $ac_word... " >&6; }
19872if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19873  $as_echo_n "(cached) " >&6
19874else
19875  case $CHECK_TOOLSDIR_GMAKE in
19876  [\\/]* | ?:[\\/]*)
19877  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19878  ;;
19879  *)
19880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19881for as_dir in $PATH
19882do
19883  IFS=$as_save_IFS
19884  test -z "$as_dir" && as_dir=.
19885    for ac_exec_ext in '' $ac_executable_extensions; do
19886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19887    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19889    break 2
19890  fi
19891done
19892  done
19893IFS=$as_save_IFS
19894
19895  ;;
19896esac
19897fi
19898CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19899if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19901$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19902else
19903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19904$as_echo "no" >&6; }
19905fi
19906
19907
19908  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19909done
19910
19911
19912  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19913  DESCRIPTION="gmake in tools-dir"
19914
19915  # On Cygwin, we require a newer version of make than on other platforms
19916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19917    MAKE_VERSION_EXPR="-e 4\."
19918    MAKE_REQUIRED_VERSION="4.0"
19919   else
19920    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19921    MAKE_REQUIRED_VERSION="3.81"
19922  fi
19923
19924  if test "x$MAKE_CANDIDATE" != x; then
19925    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19926$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19927    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19928    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19929    if test "x$IS_GNU_MAKE" = x; then
19930      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19931$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19932    else
19933      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19934      if test "x$IS_MODERN_MAKE" = x; then
19935        { $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
19936$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;}
19937      else
19938        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19939          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19940            MAKE_EXPECTED_ENV='cygwin'
19941          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19942            MAKE_EXPECTED_ENV='msys'
19943          else
19944            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19945          fi
19946          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19947          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19948        else
19949          # Not relevant for non-Windows
19950          IS_MAKE_CORRECT_ENV=true
19951        fi
19952        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19953          { $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
19954$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;}
19955        else
19956          FOUND_MAKE=$MAKE_CANDIDATE
19957
19958  # Only process if variable expands to non-empty
19959
19960  if test "x$FOUND_MAKE" != x; then
19961    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19962
19963  # First separate the path from the arguments. This will split at the first
19964  # space.
19965  complete="$FOUND_MAKE"
19966  path="${complete%% *}"
19967  tmp="$complete EOL"
19968  arguments="${tmp#* }"
19969
19970  # Input might be given as Windows format, start by converting to
19971  # unix format.
19972  new_path=`$CYGPATH -u "$path"`
19973
19974  # Now try to locate executable using which
19975  new_path=`$WHICH "$new_path" 2> /dev/null`
19976  # bat and cmd files are not always considered executable in cygwin causing which
19977  # to not find them
19978  if test "x$new_path" = x \
19979      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19980      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19981    new_path=`$CYGPATH -u "$path"`
19982  fi
19983  if test "x$new_path" = x; then
19984    # Oops. Which didn't find the executable.
19985    # The splitting of arguments from the executable at a space might have been incorrect,
19986    # since paths with space are more likely in Windows. Give it another try with the whole
19987    # argument.
19988    path="$complete"
19989    arguments="EOL"
19990    new_path=`$CYGPATH -u "$path"`
19991    new_path=`$WHICH "$new_path" 2> /dev/null`
19992    # bat and cmd files are not always considered executable in cygwin causing which
19993    # to not find them
19994    if test "x$new_path" = x \
19995        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19996        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19997      new_path=`$CYGPATH -u "$path"`
19998    fi
19999    if test "x$new_path" = x; then
20000      # It's still not found. Now this is an unrecoverable error.
20001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20002$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20003      has_space=`$ECHO "$complete" | $GREP " "`
20004      if test "x$has_space" != x; then
20005        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20006$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20007      fi
20008      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20009    fi
20010  fi
20011
20012  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20013  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20014  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20015  # "foo.exe" is OK but "foo" is an error.
20016  #
20017  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20018  # It is also a way to make sure we got the proper file name for the real test later on.
20019  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20020  if test "x$test_shortpath" = x; then
20021    # Short path failed, file does not exist as specified.
20022    # Try adding .exe or .cmd
20023    if test -f "${new_path}.exe"; then
20024      input_to_shortpath="${new_path}.exe"
20025    elif test -f "${new_path}.cmd"; then
20026      input_to_shortpath="${new_path}.cmd"
20027    else
20028      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20029$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20030      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20031$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20032      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20033    fi
20034  else
20035    input_to_shortpath="$new_path"
20036  fi
20037
20038  # Call helper function which possibly converts this using DOS-style short mode.
20039  # If so, the updated path is stored in $new_path.
20040  new_path="$input_to_shortpath"
20041
20042  input_path="$input_to_shortpath"
20043  # Check if we need to convert this using DOS-style short mode. If the path
20044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20045  # take no chances and rewrite it.
20046  # Note: m4 eats our [], so we need to use [ and ] instead.
20047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20048  if test "x$has_forbidden_chars" != x; then
20049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20050    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20051    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20052    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20053      # Going to short mode and back again did indeed matter. Since short mode is
20054      # case insensitive, let's make it lowercase to improve readability.
20055      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20056      # Now convert it back to Unix-style (cygpath)
20057      input_path=`$CYGPATH -u "$shortmode_path"`
20058      new_path="$input_path"
20059    fi
20060  fi
20061
20062  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20063  if test "x$test_cygdrive_prefix" = x; then
20064    # As a simple fix, exclude /usr/bin since it's not a real path.
20065    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20066      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20067      # a path prefixed by /cygdrive for fixpath to work.
20068      new_path="$CYGWIN_ROOT_PATH$input_path"
20069    fi
20070  fi
20071
20072  # remove trailing .exe if any
20073  new_path="${new_path/%.exe/}"
20074
20075    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20076
20077  # First separate the path from the arguments. This will split at the first
20078  # space.
20079  complete="$FOUND_MAKE"
20080  path="${complete%% *}"
20081  tmp="$complete EOL"
20082  arguments="${tmp#* }"
20083
20084  # Input might be given as Windows format, start by converting to
20085  # unix format.
20086  new_path="$path"
20087
20088  windows_path="$new_path"
20089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20090    unix_path=`$CYGPATH -u "$windows_path"`
20091    new_path="$unix_path"
20092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20094    new_path="$unix_path"
20095  fi
20096
20097
20098  # Now try to locate executable using which
20099  new_path=`$WHICH "$new_path" 2> /dev/null`
20100
20101  if test "x$new_path" = x; then
20102    # Oops. Which didn't find the executable.
20103    # The splitting of arguments from the executable at a space might have been incorrect,
20104    # since paths with space are more likely in Windows. Give it another try with the whole
20105    # argument.
20106    path="$complete"
20107    arguments="EOL"
20108    new_path="$path"
20109
20110  windows_path="$new_path"
20111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20112    unix_path=`$CYGPATH -u "$windows_path"`
20113    new_path="$unix_path"
20114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20116    new_path="$unix_path"
20117  fi
20118
20119
20120    new_path=`$WHICH "$new_path" 2> /dev/null`
20121    # bat and cmd files are not always considered executable in MSYS causing which
20122    # to not find them
20123    if test "x$new_path" = x \
20124        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20125        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20126      new_path="$path"
20127
20128  windows_path="$new_path"
20129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20130    unix_path=`$CYGPATH -u "$windows_path"`
20131    new_path="$unix_path"
20132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20134    new_path="$unix_path"
20135  fi
20136
20137    fi
20138
20139    if test "x$new_path" = x; then
20140      # It's still not found. Now this is an unrecoverable error.
20141      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20142$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20143      has_space=`$ECHO "$complete" | $GREP " "`
20144      if test "x$has_space" != x; then
20145        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20146$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20147      fi
20148      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20149    fi
20150  fi
20151
20152  # Now new_path has a complete unix path to the binary
20153  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20154    # Keep paths in /bin as-is, but remove trailing .exe if any
20155    new_path="${new_path/%.exe/}"
20156    # Do not save /bin paths to all_fixpath_prefixes!
20157  else
20158    # Not in mixed or Windows style, start by that.
20159    new_path=`cmd //c echo $new_path`
20160
20161  input_path="$new_path"
20162  # Check if we need to convert this using DOS-style short mode. If the path
20163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20164  # take no chances and rewrite it.
20165  # Note: m4 eats our [], so we need to use [ and ] instead.
20166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20167  if test "x$has_forbidden_chars" != x; then
20168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20169    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20170  fi
20171
20172    # Output is in $new_path
20173
20174  windows_path="$new_path"
20175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20176    unix_path=`$CYGPATH -u "$windows_path"`
20177    new_path="$unix_path"
20178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20180    new_path="$unix_path"
20181  fi
20182
20183    # remove trailing .exe if any
20184    new_path="${new_path/%.exe/}"
20185
20186    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20187    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20188  fi
20189
20190    else
20191      # We're on a unix platform. Hooray! :)
20192      # First separate the path from the arguments. This will split at the first
20193      # space.
20194      complete="$FOUND_MAKE"
20195      path="${complete%% *}"
20196      tmp="$complete EOL"
20197      arguments="${tmp#* }"
20198
20199      # Cannot rely on the command "which" here since it doesn't always work.
20200      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20201      if test -z "$is_absolute_path"; then
20202        # Path to executable is not absolute. Find it.
20203        IFS_save="$IFS"
20204        IFS=:
20205        for p in $PATH; do
20206          if test -f "$p/$path" && test -x "$p/$path"; then
20207            new_path="$p/$path"
20208            break
20209          fi
20210        done
20211        IFS="$IFS_save"
20212      else
20213        # This is an absolute path, we can use it without further modifications.
20214        new_path="$path"
20215      fi
20216
20217      if test "x$new_path" = x; then
20218        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20219$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20220        has_space=`$ECHO "$complete" | $GREP " "`
20221        if test "x$has_space" != x; then
20222          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20223$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20224        fi
20225        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20226      fi
20227    fi
20228
20229    # Now join together the path and the arguments once again
20230    if test "x$arguments" != xEOL; then
20231      new_complete="$new_path ${arguments% *}"
20232    else
20233      new_complete="$new_path"
20234    fi
20235
20236    if test "x$complete" != "x$new_complete"; then
20237      FOUND_MAKE="$new_complete"
20238      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20239$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20240    fi
20241  fi
20242
20243        fi
20244      fi
20245    fi
20246  fi
20247
20248        if test "x$FOUND_MAKE" = x; then
20249          for ac_prog in make
20250do
20251  # Extract the first word of "$ac_prog", so it can be a program name with args.
20252set dummy $ac_prog; ac_word=$2
20253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20254$as_echo_n "checking for $ac_word... " >&6; }
20255if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20256  $as_echo_n "(cached) " >&6
20257else
20258  case $CHECK_TOOLSDIR_MAKE in
20259  [\\/]* | ?:[\\/]*)
20260  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20261  ;;
20262  *)
20263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20264for as_dir in $PATH
20265do
20266  IFS=$as_save_IFS
20267  test -z "$as_dir" && as_dir=.
20268    for ac_exec_ext in '' $ac_executable_extensions; do
20269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20270    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20272    break 2
20273  fi
20274done
20275  done
20276IFS=$as_save_IFS
20277
20278  ;;
20279esac
20280fi
20281CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20282if test -n "$CHECK_TOOLSDIR_MAKE"; then
20283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20284$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20285else
20286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20287$as_echo "no" >&6; }
20288fi
20289
20290
20291  test -n "$CHECK_TOOLSDIR_MAKE" && break
20292done
20293
20294
20295  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20296  DESCRIPTION="make in tools-dir"
20297
20298  # On Cygwin, we require a newer version of make than on other platforms
20299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20300    MAKE_VERSION_EXPR="-e 4\."
20301    MAKE_REQUIRED_VERSION="4.0"
20302   else
20303    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20304    MAKE_REQUIRED_VERSION="3.81"
20305  fi
20306
20307  if test "x$MAKE_CANDIDATE" != x; then
20308    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20309$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20310    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20311    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20312    if test "x$IS_GNU_MAKE" = x; then
20313      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20314$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20315    else
20316      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20317      if test "x$IS_MODERN_MAKE" = x; then
20318        { $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
20319$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;}
20320      else
20321        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20322          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20323            MAKE_EXPECTED_ENV='cygwin'
20324          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20325            MAKE_EXPECTED_ENV='msys'
20326          else
20327            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20328          fi
20329          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20330          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20331        else
20332          # Not relevant for non-Windows
20333          IS_MAKE_CORRECT_ENV=true
20334        fi
20335        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20336          { $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
20337$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;}
20338        else
20339          FOUND_MAKE=$MAKE_CANDIDATE
20340
20341  # Only process if variable expands to non-empty
20342
20343  if test "x$FOUND_MAKE" != x; then
20344    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20345
20346  # First separate the path from the arguments. This will split at the first
20347  # space.
20348  complete="$FOUND_MAKE"
20349  path="${complete%% *}"
20350  tmp="$complete EOL"
20351  arguments="${tmp#* }"
20352
20353  # Input might be given as Windows format, start by converting to
20354  # unix format.
20355  new_path=`$CYGPATH -u "$path"`
20356
20357  # Now try to locate executable using which
20358  new_path=`$WHICH "$new_path" 2> /dev/null`
20359  # bat and cmd files are not always considered executable in cygwin causing which
20360  # to not find them
20361  if test "x$new_path" = x \
20362      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20363      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20364    new_path=`$CYGPATH -u "$path"`
20365  fi
20366  if test "x$new_path" = x; then
20367    # Oops. Which didn't find the executable.
20368    # The splitting of arguments from the executable at a space might have been incorrect,
20369    # since paths with space are more likely in Windows. Give it another try with the whole
20370    # argument.
20371    path="$complete"
20372    arguments="EOL"
20373    new_path=`$CYGPATH -u "$path"`
20374    new_path=`$WHICH "$new_path" 2> /dev/null`
20375    # bat and cmd files are not always considered executable in cygwin causing which
20376    # to not find them
20377    if test "x$new_path" = x \
20378        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20379        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20380      new_path=`$CYGPATH -u "$path"`
20381    fi
20382    if test "x$new_path" = x; then
20383      # It's still not found. Now this is an unrecoverable error.
20384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20385$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20386      has_space=`$ECHO "$complete" | $GREP " "`
20387      if test "x$has_space" != x; then
20388        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20389$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20390      fi
20391      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20392    fi
20393  fi
20394
20395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20398  # "foo.exe" is OK but "foo" is an error.
20399  #
20400  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20401  # It is also a way to make sure we got the proper file name for the real test later on.
20402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20403  if test "x$test_shortpath" = x; then
20404    # Short path failed, file does not exist as specified.
20405    # Try adding .exe or .cmd
20406    if test -f "${new_path}.exe"; then
20407      input_to_shortpath="${new_path}.exe"
20408    elif test -f "${new_path}.cmd"; then
20409      input_to_shortpath="${new_path}.cmd"
20410    else
20411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20412$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20413      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20414$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20415      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20416    fi
20417  else
20418    input_to_shortpath="$new_path"
20419  fi
20420
20421  # Call helper function which possibly converts this using DOS-style short mode.
20422  # If so, the updated path is stored in $new_path.
20423  new_path="$input_to_shortpath"
20424
20425  input_path="$input_to_shortpath"
20426  # Check if we need to convert this using DOS-style short mode. If the path
20427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20428  # take no chances and rewrite it.
20429  # Note: m4 eats our [], so we need to use [ and ] instead.
20430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20431  if test "x$has_forbidden_chars" != x; then
20432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20433    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20434    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20435    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20436      # Going to short mode and back again did indeed matter. Since short mode is
20437      # case insensitive, let's make it lowercase to improve readability.
20438      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20439      # Now convert it back to Unix-style (cygpath)
20440      input_path=`$CYGPATH -u "$shortmode_path"`
20441      new_path="$input_path"
20442    fi
20443  fi
20444
20445  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20446  if test "x$test_cygdrive_prefix" = x; then
20447    # As a simple fix, exclude /usr/bin since it's not a real path.
20448    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20449      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20450      # a path prefixed by /cygdrive for fixpath to work.
20451      new_path="$CYGWIN_ROOT_PATH$input_path"
20452    fi
20453  fi
20454
20455  # remove trailing .exe if any
20456  new_path="${new_path/%.exe/}"
20457
20458    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20459
20460  # First separate the path from the arguments. This will split at the first
20461  # space.
20462  complete="$FOUND_MAKE"
20463  path="${complete%% *}"
20464  tmp="$complete EOL"
20465  arguments="${tmp#* }"
20466
20467  # Input might be given as Windows format, start by converting to
20468  # unix format.
20469  new_path="$path"
20470
20471  windows_path="$new_path"
20472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20473    unix_path=`$CYGPATH -u "$windows_path"`
20474    new_path="$unix_path"
20475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20477    new_path="$unix_path"
20478  fi
20479
20480
20481  # Now try to locate executable using which
20482  new_path=`$WHICH "$new_path" 2> /dev/null`
20483
20484  if test "x$new_path" = x; then
20485    # Oops. Which didn't find the executable.
20486    # The splitting of arguments from the executable at a space might have been incorrect,
20487    # since paths with space are more likely in Windows. Give it another try with the whole
20488    # argument.
20489    path="$complete"
20490    arguments="EOL"
20491    new_path="$path"
20492
20493  windows_path="$new_path"
20494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20495    unix_path=`$CYGPATH -u "$windows_path"`
20496    new_path="$unix_path"
20497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20499    new_path="$unix_path"
20500  fi
20501
20502
20503    new_path=`$WHICH "$new_path" 2> /dev/null`
20504    # bat and cmd files are not always considered executable in MSYS causing which
20505    # to not find them
20506    if test "x$new_path" = x \
20507        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20508        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20509      new_path="$path"
20510
20511  windows_path="$new_path"
20512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20513    unix_path=`$CYGPATH -u "$windows_path"`
20514    new_path="$unix_path"
20515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20517    new_path="$unix_path"
20518  fi
20519
20520    fi
20521
20522    if test "x$new_path" = x; then
20523      # It's still not found. Now this is an unrecoverable error.
20524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20525$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20526      has_space=`$ECHO "$complete" | $GREP " "`
20527      if test "x$has_space" != x; then
20528        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20529$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20530      fi
20531      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20532    fi
20533  fi
20534
20535  # Now new_path has a complete unix path to the binary
20536  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20537    # Keep paths in /bin as-is, but remove trailing .exe if any
20538    new_path="${new_path/%.exe/}"
20539    # Do not save /bin paths to all_fixpath_prefixes!
20540  else
20541    # Not in mixed or Windows style, start by that.
20542    new_path=`cmd //c echo $new_path`
20543
20544  input_path="$new_path"
20545  # Check if we need to convert this using DOS-style short mode. If the path
20546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20547  # take no chances and rewrite it.
20548  # Note: m4 eats our [], so we need to use [ and ] instead.
20549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20550  if test "x$has_forbidden_chars" != x; then
20551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20552    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20553  fi
20554
20555    # Output is in $new_path
20556
20557  windows_path="$new_path"
20558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20559    unix_path=`$CYGPATH -u "$windows_path"`
20560    new_path="$unix_path"
20561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20563    new_path="$unix_path"
20564  fi
20565
20566    # remove trailing .exe if any
20567    new_path="${new_path/%.exe/}"
20568
20569    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20570    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20571  fi
20572
20573    else
20574      # We're on a unix platform. Hooray! :)
20575      # First separate the path from the arguments. This will split at the first
20576      # space.
20577      complete="$FOUND_MAKE"
20578      path="${complete%% *}"
20579      tmp="$complete EOL"
20580      arguments="${tmp#* }"
20581
20582      # Cannot rely on the command "which" here since it doesn't always work.
20583      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20584      if test -z "$is_absolute_path"; then
20585        # Path to executable is not absolute. Find it.
20586        IFS_save="$IFS"
20587        IFS=:
20588        for p in $PATH; do
20589          if test -f "$p/$path" && test -x "$p/$path"; then
20590            new_path="$p/$path"
20591            break
20592          fi
20593        done
20594        IFS="$IFS_save"
20595      else
20596        # This is an absolute path, we can use it without further modifications.
20597        new_path="$path"
20598      fi
20599
20600      if test "x$new_path" = x; then
20601        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20602$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20603        has_space=`$ECHO "$complete" | $GREP " "`
20604        if test "x$has_space" != x; then
20605          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20606$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20607        fi
20608        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20609      fi
20610    fi
20611
20612    # Now join together the path and the arguments once again
20613    if test "x$arguments" != xEOL; then
20614      new_complete="$new_path ${arguments% *}"
20615    else
20616      new_complete="$new_path"
20617    fi
20618
20619    if test "x$complete" != "x$new_complete"; then
20620      FOUND_MAKE="$new_complete"
20621      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20622$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20623    fi
20624  fi
20625
20626        fi
20627      fi
20628    fi
20629  fi
20630
20631        fi
20632        PATH=$OLD_PATH
20633      fi
20634    fi
20635
20636    if test "x$FOUND_MAKE" = x; then
20637      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
20638    fi
20639
20640    else
20641      # If it succeeded, then it was overridden by the user. We will use it
20642      # for the tool.
20643
20644      # First remove it from the list of overridden variables, so we can test
20645      # for unknown variables in the end.
20646      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20647
20648      # Check if we try to supply an empty value
20649      if test "x$MAKE" = x; then
20650        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20651$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20652        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20653$as_echo_n "checking for MAKE... " >&6; }
20654        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20655$as_echo "disabled" >&6; }
20656      else
20657        # Check if the provided tool contains a complete path.
20658        tool_specified="$MAKE"
20659        tool_basename="${tool_specified##*/}"
20660        if test "x$tool_basename" = "x$tool_specified"; then
20661          # A command without a complete path is provided, search $PATH.
20662          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20663$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20664          # Extract the first word of "$tool_basename", so it can be a program name with args.
20665set dummy $tool_basename; ac_word=$2
20666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20667$as_echo_n "checking for $ac_word... " >&6; }
20668if ${ac_cv_path_MAKE+:} false; then :
20669  $as_echo_n "(cached) " >&6
20670else
20671  case $MAKE in
20672  [\\/]* | ?:[\\/]*)
20673  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20674  ;;
20675  *)
20676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20677for as_dir in $PATH
20678do
20679  IFS=$as_save_IFS
20680  test -z "$as_dir" && as_dir=.
20681    for ac_exec_ext in '' $ac_executable_extensions; do
20682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20683    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20685    break 2
20686  fi
20687done
20688  done
20689IFS=$as_save_IFS
20690
20691  ;;
20692esac
20693fi
20694MAKE=$ac_cv_path_MAKE
20695if test -n "$MAKE"; then
20696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20697$as_echo "$MAKE" >&6; }
20698else
20699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20700$as_echo "no" >&6; }
20701fi
20702
20703
20704          if test "x$MAKE" = x; then
20705            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20706          fi
20707        else
20708          # Otherwise we believe it is a complete path. Use it as it is.
20709          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20710$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20711          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20712$as_echo_n "checking for MAKE... " >&6; }
20713          if test ! -x "$tool_specified"; then
20714            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20715$as_echo "not found" >&6; }
20716            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20717          fi
20718          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20719$as_echo "$tool_specified" >&6; }
20720        fi
20721      fi
20722    fi
20723
20724    # If MAKE was set by user, verify the version
20725
20726  MAKE_CANDIDATE=""$MAKE""
20727  DESCRIPTION="user supplied MAKE=$MAKE"
20728
20729  # On Cygwin, we require a newer version of make than on other platforms
20730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20731    MAKE_VERSION_EXPR="-e 4\."
20732    MAKE_REQUIRED_VERSION="4.0"
20733   else
20734    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20735    MAKE_REQUIRED_VERSION="3.81"
20736  fi
20737
20738  if test "x$MAKE_CANDIDATE" != x; then
20739    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20740$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20741    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20742    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20743    if test "x$IS_GNU_MAKE" = x; then
20744      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20745$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20746    else
20747      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20748      if test "x$IS_MODERN_MAKE" = x; then
20749        { $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
20750$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;}
20751      else
20752        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20753          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20754            MAKE_EXPECTED_ENV='cygwin'
20755          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20756            MAKE_EXPECTED_ENV='msys'
20757          else
20758            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20759          fi
20760          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20761          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20762        else
20763          # Not relevant for non-Windows
20764          IS_MAKE_CORRECT_ENV=true
20765        fi
20766        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20767          { $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
20768$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;}
20769        else
20770          FOUND_MAKE=$MAKE_CANDIDATE
20771
20772  # Only process if variable expands to non-empty
20773
20774  if test "x$FOUND_MAKE" != x; then
20775    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20776
20777  # First separate the path from the arguments. This will split at the first
20778  # space.
20779  complete="$FOUND_MAKE"
20780  path="${complete%% *}"
20781  tmp="$complete EOL"
20782  arguments="${tmp#* }"
20783
20784  # Input might be given as Windows format, start by converting to
20785  # unix format.
20786  new_path=`$CYGPATH -u "$path"`
20787
20788  # Now try to locate executable using which
20789  new_path=`$WHICH "$new_path" 2> /dev/null`
20790  # bat and cmd files are not always considered executable in cygwin causing which
20791  # to not find them
20792  if test "x$new_path" = x \
20793      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20794      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20795    new_path=`$CYGPATH -u "$path"`
20796  fi
20797  if test "x$new_path" = x; then
20798    # Oops. Which didn't find the executable.
20799    # The splitting of arguments from the executable at a space might have been incorrect,
20800    # since paths with space are more likely in Windows. Give it another try with the whole
20801    # argument.
20802    path="$complete"
20803    arguments="EOL"
20804    new_path=`$CYGPATH -u "$path"`
20805    new_path=`$WHICH "$new_path" 2> /dev/null`
20806    # bat and cmd files are not always considered executable in cygwin causing which
20807    # to not find them
20808    if test "x$new_path" = x \
20809        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20810        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20811      new_path=`$CYGPATH -u "$path"`
20812    fi
20813    if test "x$new_path" = x; then
20814      # It's still not found. Now this is an unrecoverable error.
20815      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20816$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20817      has_space=`$ECHO "$complete" | $GREP " "`
20818      if test "x$has_space" != x; then
20819        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20820$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20821      fi
20822      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20823    fi
20824  fi
20825
20826  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20827  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20828  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20829  # "foo.exe" is OK but "foo" is an error.
20830  #
20831  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20832  # It is also a way to make sure we got the proper file name for the real test later on.
20833  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20834  if test "x$test_shortpath" = x; then
20835    # Short path failed, file does not exist as specified.
20836    # Try adding .exe or .cmd
20837    if test -f "${new_path}.exe"; then
20838      input_to_shortpath="${new_path}.exe"
20839    elif test -f "${new_path}.cmd"; then
20840      input_to_shortpath="${new_path}.cmd"
20841    else
20842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20843$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20844      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20845$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20846      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20847    fi
20848  else
20849    input_to_shortpath="$new_path"
20850  fi
20851
20852  # Call helper function which possibly converts this using DOS-style short mode.
20853  # If so, the updated path is stored in $new_path.
20854  new_path="$input_to_shortpath"
20855
20856  input_path="$input_to_shortpath"
20857  # Check if we need to convert this using DOS-style short mode. If the path
20858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20859  # take no chances and rewrite it.
20860  # Note: m4 eats our [], so we need to use [ and ] instead.
20861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20862  if test "x$has_forbidden_chars" != x; then
20863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20864    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20865    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20866    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20867      # Going to short mode and back again did indeed matter. Since short mode is
20868      # case insensitive, let's make it lowercase to improve readability.
20869      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20870      # Now convert it back to Unix-style (cygpath)
20871      input_path=`$CYGPATH -u "$shortmode_path"`
20872      new_path="$input_path"
20873    fi
20874  fi
20875
20876  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20877  if test "x$test_cygdrive_prefix" = x; then
20878    # As a simple fix, exclude /usr/bin since it's not a real path.
20879    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20880      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20881      # a path prefixed by /cygdrive for fixpath to work.
20882      new_path="$CYGWIN_ROOT_PATH$input_path"
20883    fi
20884  fi
20885
20886  # remove trailing .exe if any
20887  new_path="${new_path/%.exe/}"
20888
20889    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20890
20891  # First separate the path from the arguments. This will split at the first
20892  # space.
20893  complete="$FOUND_MAKE"
20894  path="${complete%% *}"
20895  tmp="$complete EOL"
20896  arguments="${tmp#* }"
20897
20898  # Input might be given as Windows format, start by converting to
20899  # unix format.
20900  new_path="$path"
20901
20902  windows_path="$new_path"
20903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20904    unix_path=`$CYGPATH -u "$windows_path"`
20905    new_path="$unix_path"
20906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20908    new_path="$unix_path"
20909  fi
20910
20911
20912  # Now try to locate executable using which
20913  new_path=`$WHICH "$new_path" 2> /dev/null`
20914
20915  if test "x$new_path" = x; then
20916    # Oops. Which didn't find the executable.
20917    # The splitting of arguments from the executable at a space might have been incorrect,
20918    # since paths with space are more likely in Windows. Give it another try with the whole
20919    # argument.
20920    path="$complete"
20921    arguments="EOL"
20922    new_path="$path"
20923
20924  windows_path="$new_path"
20925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20926    unix_path=`$CYGPATH -u "$windows_path"`
20927    new_path="$unix_path"
20928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20930    new_path="$unix_path"
20931  fi
20932
20933
20934    new_path=`$WHICH "$new_path" 2> /dev/null`
20935    # bat and cmd files are not always considered executable in MSYS causing which
20936    # to not find them
20937    if test "x$new_path" = x \
20938        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20939        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20940      new_path="$path"
20941
20942  windows_path="$new_path"
20943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20944    unix_path=`$CYGPATH -u "$windows_path"`
20945    new_path="$unix_path"
20946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20948    new_path="$unix_path"
20949  fi
20950
20951    fi
20952
20953    if test "x$new_path" = x; then
20954      # It's still not found. Now this is an unrecoverable error.
20955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20956$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20957      has_space=`$ECHO "$complete" | $GREP " "`
20958      if test "x$has_space" != x; then
20959        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20960$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20961      fi
20962      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20963    fi
20964  fi
20965
20966  # Now new_path has a complete unix path to the binary
20967  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20968    # Keep paths in /bin as-is, but remove trailing .exe if any
20969    new_path="${new_path/%.exe/}"
20970    # Do not save /bin paths to all_fixpath_prefixes!
20971  else
20972    # Not in mixed or Windows style, start by that.
20973    new_path=`cmd //c echo $new_path`
20974
20975  input_path="$new_path"
20976  # Check if we need to convert this using DOS-style short mode. If the path
20977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20978  # take no chances and rewrite it.
20979  # Note: m4 eats our [], so we need to use [ and ] instead.
20980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20981  if test "x$has_forbidden_chars" != x; then
20982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20983    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20984  fi
20985
20986    # Output is in $new_path
20987
20988  windows_path="$new_path"
20989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20990    unix_path=`$CYGPATH -u "$windows_path"`
20991    new_path="$unix_path"
20992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20994    new_path="$unix_path"
20995  fi
20996
20997    # remove trailing .exe if any
20998    new_path="${new_path/%.exe/}"
20999
21000    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21001    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21002  fi
21003
21004    else
21005      # We're on a unix platform. Hooray! :)
21006      # First separate the path from the arguments. This will split at the first
21007      # space.
21008      complete="$FOUND_MAKE"
21009      path="${complete%% *}"
21010      tmp="$complete EOL"
21011      arguments="${tmp#* }"
21012
21013      # Cannot rely on the command "which" here since it doesn't always work.
21014      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21015      if test -z "$is_absolute_path"; then
21016        # Path to executable is not absolute. Find it.
21017        IFS_save="$IFS"
21018        IFS=:
21019        for p in $PATH; do
21020          if test -f "$p/$path" && test -x "$p/$path"; then
21021            new_path="$p/$path"
21022            break
21023          fi
21024        done
21025        IFS="$IFS_save"
21026      else
21027        # This is an absolute path, we can use it without further modifications.
21028        new_path="$path"
21029      fi
21030
21031      if test "x$new_path" = x; then
21032        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21033$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21034        has_space=`$ECHO "$complete" | $GREP " "`
21035        if test "x$has_space" != x; then
21036          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21037$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21038        fi
21039        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21040      fi
21041    fi
21042
21043    # Now join together the path and the arguments once again
21044    if test "x$arguments" != xEOL; then
21045      new_complete="$new_path ${arguments% *}"
21046    else
21047      new_complete="$new_path"
21048    fi
21049
21050    if test "x$complete" != "x$new_complete"; then
21051      FOUND_MAKE="$new_complete"
21052      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21053$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21054    fi
21055  fi
21056
21057        fi
21058      fi
21059    fi
21060  fi
21061
21062    if test "x$FOUND_MAKE" = x; then
21063      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21064    fi
21065
21066  fi
21067
21068
21069  MAKE=$FOUND_MAKE
21070
21071  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21072$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21073
21074
21075  # Check if make supports the output sync option and if so, setup using it.
21076  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21077$as_echo_n "checking if make --output-sync is supported... " >&6; }
21078  if $MAKE --version -O > /dev/null 2>&1; then
21079    OUTPUT_SYNC_SUPPORTED=true
21080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21081$as_echo "yes" >&6; }
21082    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21083$as_echo_n "checking for output-sync value... " >&6; }
21084
21085# Check whether --with-output-sync was given.
21086if test "${with_output_sync+set}" = set; then :
21087  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21088fi
21089
21090    if test "x$OUTPUT_SYNC" = "x"; then
21091      OUTPUT_SYNC=none
21092    fi
21093    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21094$as_echo "$OUTPUT_SYNC" >&6; }
21095    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21096      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21097    fi
21098  else
21099    OUTPUT_SYNC_SUPPORTED=false
21100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21101$as_echo "no" >&6; }
21102  fi
21103
21104
21105
21106
21107
21108
21109  # Test if find supports -delete
21110  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21111$as_echo_n "checking if find supports -delete... " >&6; }
21112  FIND_DELETE="-delete"
21113
21114  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21115
21116  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21117
21118  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21119  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21120    # No, it does not.
21121    $RM $DELETEDIR/TestIfFindSupportsDelete
21122    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21123      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21124      FIND_DELETE="-print | $XARGS $RM"
21125    else
21126      FIND_DELETE="-exec $RM \{\} \+"
21127    fi
21128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21129$as_echo "no" >&6; }
21130  else
21131    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21132$as_echo "yes" >&6; }
21133  fi
21134  $RMDIR $DELETEDIR
21135
21136
21137
21138  # Test which kind of tar was found
21139  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21140    TAR_TYPE="gnu"
21141  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21142    TAR_TYPE="bsd"
21143  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21144    TAR_TYPE="solaris"
21145  fi
21146  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21147$as_echo_n "checking what type of tar was found... " >&6; }
21148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21149$as_echo "$TAR_TYPE" >&6; }
21150
21151  TAR_CREATE_FILE_PARAM=""
21152
21153  if test "x$TAR_TYPE" = "xgnu"; then
21154    TAR_INCLUDE_PARAM="T"
21155    TAR_SUPPORTS_TRANSFORM="true"
21156    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21157      # When using gnu tar for Solaris targets, need to use compatibility mode
21158      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21159    fi
21160  else
21161    TAR_INCLUDE_PARAM="I"
21162    TAR_SUPPORTS_TRANSFORM="false"
21163  fi
21164
21165
21166
21167
21168
21169
21170  # These tools might not be installed by default,
21171  # need hint on how to install them.
21172
21173
21174
21175  # Publish this variable in the help.
21176
21177
21178  if [ -z "${UNZIP+x}" ]; then
21179    # The variable is not set by user, try to locate tool using the code snippet
21180    for ac_prog in unzip
21181do
21182  # Extract the first word of "$ac_prog", so it can be a program name with args.
21183set dummy $ac_prog; ac_word=$2
21184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21185$as_echo_n "checking for $ac_word... " >&6; }
21186if ${ac_cv_path_UNZIP+:} false; then :
21187  $as_echo_n "(cached) " >&6
21188else
21189  case $UNZIP in
21190  [\\/]* | ?:[\\/]*)
21191  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21192  ;;
21193  *)
21194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21195for as_dir in $PATH
21196do
21197  IFS=$as_save_IFS
21198  test -z "$as_dir" && as_dir=.
21199    for ac_exec_ext in '' $ac_executable_extensions; do
21200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21201    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21203    break 2
21204  fi
21205done
21206  done
21207IFS=$as_save_IFS
21208
21209  ;;
21210esac
21211fi
21212UNZIP=$ac_cv_path_UNZIP
21213if test -n "$UNZIP"; then
21214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21215$as_echo "$UNZIP" >&6; }
21216else
21217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21218$as_echo "no" >&6; }
21219fi
21220
21221
21222  test -n "$UNZIP" && break
21223done
21224
21225  else
21226    # The variable is set, but is it from the command line or the environment?
21227
21228    # Try to remove the string !UNZIP! from our list.
21229    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21230    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21231      # If it failed, the variable was not from the command line. Ignore it,
21232      # but warn the user (except for BASH, which is always set by the calling BASH).
21233      if test "xUNZIP" != xBASH; then
21234        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21235$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21236      fi
21237      # Try to locate tool using the code snippet
21238      for ac_prog in unzip
21239do
21240  # Extract the first word of "$ac_prog", so it can be a program name with args.
21241set dummy $ac_prog; ac_word=$2
21242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21243$as_echo_n "checking for $ac_word... " >&6; }
21244if ${ac_cv_path_UNZIP+:} false; then :
21245  $as_echo_n "(cached) " >&6
21246else
21247  case $UNZIP in
21248  [\\/]* | ?:[\\/]*)
21249  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21250  ;;
21251  *)
21252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21253for as_dir in $PATH
21254do
21255  IFS=$as_save_IFS
21256  test -z "$as_dir" && as_dir=.
21257    for ac_exec_ext in '' $ac_executable_extensions; do
21258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21259    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21261    break 2
21262  fi
21263done
21264  done
21265IFS=$as_save_IFS
21266
21267  ;;
21268esac
21269fi
21270UNZIP=$ac_cv_path_UNZIP
21271if test -n "$UNZIP"; then
21272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21273$as_echo "$UNZIP" >&6; }
21274else
21275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21276$as_echo "no" >&6; }
21277fi
21278
21279
21280  test -n "$UNZIP" && break
21281done
21282
21283    else
21284      # If it succeeded, then it was overridden by the user. We will use it
21285      # for the tool.
21286
21287      # First remove it from the list of overridden variables, so we can test
21288      # for unknown variables in the end.
21289      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21290
21291      # Check if we try to supply an empty value
21292      if test "x$UNZIP" = x; then
21293        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21294$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21296$as_echo_n "checking for UNZIP... " >&6; }
21297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21298$as_echo "disabled" >&6; }
21299      else
21300        # Check if the provided tool contains a complete path.
21301        tool_specified="$UNZIP"
21302        tool_basename="${tool_specified##*/}"
21303        if test "x$tool_basename" = "x$tool_specified"; then
21304          # A command without a complete path is provided, search $PATH.
21305          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21306$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21307          # Extract the first word of "$tool_basename", so it can be a program name with args.
21308set dummy $tool_basename; ac_word=$2
21309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21310$as_echo_n "checking for $ac_word... " >&6; }
21311if ${ac_cv_path_UNZIP+:} false; then :
21312  $as_echo_n "(cached) " >&6
21313else
21314  case $UNZIP in
21315  [\\/]* | ?:[\\/]*)
21316  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21317  ;;
21318  *)
21319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21320for as_dir in $PATH
21321do
21322  IFS=$as_save_IFS
21323  test -z "$as_dir" && as_dir=.
21324    for ac_exec_ext in '' $ac_executable_extensions; do
21325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21326    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21328    break 2
21329  fi
21330done
21331  done
21332IFS=$as_save_IFS
21333
21334  ;;
21335esac
21336fi
21337UNZIP=$ac_cv_path_UNZIP
21338if test -n "$UNZIP"; then
21339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21340$as_echo "$UNZIP" >&6; }
21341else
21342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21343$as_echo "no" >&6; }
21344fi
21345
21346
21347          if test "x$UNZIP" = x; then
21348            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21349          fi
21350        else
21351          # Otherwise we believe it is a complete path. Use it as it is.
21352          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21353$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21354          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21355$as_echo_n "checking for UNZIP... " >&6; }
21356          if test ! -x "$tool_specified"; then
21357            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21358$as_echo "not found" >&6; }
21359            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21360          fi
21361          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21362$as_echo "$tool_specified" >&6; }
21363        fi
21364      fi
21365    fi
21366
21367  fi
21368
21369
21370
21371  if test "x$UNZIP" = x; then
21372    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21373  fi
21374
21375
21376  # Since zip uses "ZIP" as a environment variable for passing options, we need
21377  # to name our variable differently, hence ZIPEXE.
21378
21379
21380
21381  # Publish this variable in the help.
21382
21383
21384  if [ -z "${ZIPEXE+x}" ]; then
21385    # The variable is not set by user, try to locate tool using the code snippet
21386    for ac_prog in zip
21387do
21388  # Extract the first word of "$ac_prog", so it can be a program name with args.
21389set dummy $ac_prog; ac_word=$2
21390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21391$as_echo_n "checking for $ac_word... " >&6; }
21392if ${ac_cv_path_ZIPEXE+:} false; then :
21393  $as_echo_n "(cached) " >&6
21394else
21395  case $ZIPEXE in
21396  [\\/]* | ?:[\\/]*)
21397  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21398  ;;
21399  *)
21400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21401for as_dir in $PATH
21402do
21403  IFS=$as_save_IFS
21404  test -z "$as_dir" && as_dir=.
21405    for ac_exec_ext in '' $ac_executable_extensions; do
21406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21407    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21409    break 2
21410  fi
21411done
21412  done
21413IFS=$as_save_IFS
21414
21415  ;;
21416esac
21417fi
21418ZIPEXE=$ac_cv_path_ZIPEXE
21419if test -n "$ZIPEXE"; then
21420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21421$as_echo "$ZIPEXE" >&6; }
21422else
21423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21424$as_echo "no" >&6; }
21425fi
21426
21427
21428  test -n "$ZIPEXE" && break
21429done
21430
21431  else
21432    # The variable is set, but is it from the command line or the environment?
21433
21434    # Try to remove the string !ZIPEXE! from our list.
21435    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21436    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21437      # If it failed, the variable was not from the command line. Ignore it,
21438      # but warn the user (except for BASH, which is always set by the calling BASH).
21439      if test "xZIPEXE" != xBASH; then
21440        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21441$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21442      fi
21443      # Try to locate tool using the code snippet
21444      for ac_prog in zip
21445do
21446  # Extract the first word of "$ac_prog", so it can be a program name with args.
21447set dummy $ac_prog; ac_word=$2
21448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21449$as_echo_n "checking for $ac_word... " >&6; }
21450if ${ac_cv_path_ZIPEXE+:} false; then :
21451  $as_echo_n "(cached) " >&6
21452else
21453  case $ZIPEXE in
21454  [\\/]* | ?:[\\/]*)
21455  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21456  ;;
21457  *)
21458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21459for as_dir in $PATH
21460do
21461  IFS=$as_save_IFS
21462  test -z "$as_dir" && as_dir=.
21463    for ac_exec_ext in '' $ac_executable_extensions; do
21464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21465    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21467    break 2
21468  fi
21469done
21470  done
21471IFS=$as_save_IFS
21472
21473  ;;
21474esac
21475fi
21476ZIPEXE=$ac_cv_path_ZIPEXE
21477if test -n "$ZIPEXE"; then
21478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21479$as_echo "$ZIPEXE" >&6; }
21480else
21481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21482$as_echo "no" >&6; }
21483fi
21484
21485
21486  test -n "$ZIPEXE" && break
21487done
21488
21489    else
21490      # If it succeeded, then it was overridden by the user. We will use it
21491      # for the tool.
21492
21493      # First remove it from the list of overridden variables, so we can test
21494      # for unknown variables in the end.
21495      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21496
21497      # Check if we try to supply an empty value
21498      if test "x$ZIPEXE" = x; then
21499        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21500$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21501        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21502$as_echo_n "checking for ZIPEXE... " >&6; }
21503        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21504$as_echo "disabled" >&6; }
21505      else
21506        # Check if the provided tool contains a complete path.
21507        tool_specified="$ZIPEXE"
21508        tool_basename="${tool_specified##*/}"
21509        if test "x$tool_basename" = "x$tool_specified"; then
21510          # A command without a complete path is provided, search $PATH.
21511          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21512$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21513          # Extract the first word of "$tool_basename", so it can be a program name with args.
21514set dummy $tool_basename; ac_word=$2
21515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21516$as_echo_n "checking for $ac_word... " >&6; }
21517if ${ac_cv_path_ZIPEXE+:} false; then :
21518  $as_echo_n "(cached) " >&6
21519else
21520  case $ZIPEXE in
21521  [\\/]* | ?:[\\/]*)
21522  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21523  ;;
21524  *)
21525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21526for as_dir in $PATH
21527do
21528  IFS=$as_save_IFS
21529  test -z "$as_dir" && as_dir=.
21530    for ac_exec_ext in '' $ac_executable_extensions; do
21531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21532    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21534    break 2
21535  fi
21536done
21537  done
21538IFS=$as_save_IFS
21539
21540  ;;
21541esac
21542fi
21543ZIPEXE=$ac_cv_path_ZIPEXE
21544if test -n "$ZIPEXE"; then
21545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21546$as_echo "$ZIPEXE" >&6; }
21547else
21548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21549$as_echo "no" >&6; }
21550fi
21551
21552
21553          if test "x$ZIPEXE" = x; then
21554            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21555          fi
21556        else
21557          # Otherwise we believe it is a complete path. Use it as it is.
21558          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21559$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21560          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21561$as_echo_n "checking for ZIPEXE... " >&6; }
21562          if test ! -x "$tool_specified"; then
21563            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21564$as_echo "not found" >&6; }
21565            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21566          fi
21567          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21568$as_echo "$tool_specified" >&6; }
21569        fi
21570      fi
21571    fi
21572
21573  fi
21574
21575
21576
21577  if test "x$ZIPEXE" = x; then
21578    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21579  fi
21580
21581
21582
21583  # Non-required basic tools
21584
21585
21586
21587  # Publish this variable in the help.
21588
21589
21590  if [ -z "${LDD+x}" ]; then
21591    # The variable is not set by user, try to locate tool using the code snippet
21592    for ac_prog in ldd
21593do
21594  # Extract the first word of "$ac_prog", so it can be a program name with args.
21595set dummy $ac_prog; ac_word=$2
21596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21597$as_echo_n "checking for $ac_word... " >&6; }
21598if ${ac_cv_path_LDD+:} false; then :
21599  $as_echo_n "(cached) " >&6
21600else
21601  case $LDD in
21602  [\\/]* | ?:[\\/]*)
21603  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21604  ;;
21605  *)
21606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21607for as_dir in $PATH
21608do
21609  IFS=$as_save_IFS
21610  test -z "$as_dir" && as_dir=.
21611    for ac_exec_ext in '' $ac_executable_extensions; do
21612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21613    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21615    break 2
21616  fi
21617done
21618  done
21619IFS=$as_save_IFS
21620
21621  ;;
21622esac
21623fi
21624LDD=$ac_cv_path_LDD
21625if test -n "$LDD"; then
21626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21627$as_echo "$LDD" >&6; }
21628else
21629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21630$as_echo "no" >&6; }
21631fi
21632
21633
21634  test -n "$LDD" && break
21635done
21636
21637  else
21638    # The variable is set, but is it from the command line or the environment?
21639
21640    # Try to remove the string !LDD! from our list.
21641    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21642    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21643      # If it failed, the variable was not from the command line. Ignore it,
21644      # but warn the user (except for BASH, which is always set by the calling BASH).
21645      if test "xLDD" != xBASH; then
21646        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21647$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21648      fi
21649      # Try to locate tool using the code snippet
21650      for ac_prog in ldd
21651do
21652  # Extract the first word of "$ac_prog", so it can be a program name with args.
21653set dummy $ac_prog; ac_word=$2
21654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21655$as_echo_n "checking for $ac_word... " >&6; }
21656if ${ac_cv_path_LDD+:} false; then :
21657  $as_echo_n "(cached) " >&6
21658else
21659  case $LDD in
21660  [\\/]* | ?:[\\/]*)
21661  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21662  ;;
21663  *)
21664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21665for as_dir in $PATH
21666do
21667  IFS=$as_save_IFS
21668  test -z "$as_dir" && as_dir=.
21669    for ac_exec_ext in '' $ac_executable_extensions; do
21670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21671    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21673    break 2
21674  fi
21675done
21676  done
21677IFS=$as_save_IFS
21678
21679  ;;
21680esac
21681fi
21682LDD=$ac_cv_path_LDD
21683if test -n "$LDD"; then
21684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21685$as_echo "$LDD" >&6; }
21686else
21687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21688$as_echo "no" >&6; }
21689fi
21690
21691
21692  test -n "$LDD" && break
21693done
21694
21695    else
21696      # If it succeeded, then it was overridden by the user. We will use it
21697      # for the tool.
21698
21699      # First remove it from the list of overridden variables, so we can test
21700      # for unknown variables in the end.
21701      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21702
21703      # Check if we try to supply an empty value
21704      if test "x$LDD" = x; then
21705        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21706$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21707        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21708$as_echo_n "checking for LDD... " >&6; }
21709        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21710$as_echo "disabled" >&6; }
21711      else
21712        # Check if the provided tool contains a complete path.
21713        tool_specified="$LDD"
21714        tool_basename="${tool_specified##*/}"
21715        if test "x$tool_basename" = "x$tool_specified"; then
21716          # A command without a complete path is provided, search $PATH.
21717          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21718$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21719          # Extract the first word of "$tool_basename", so it can be a program name with args.
21720set dummy $tool_basename; ac_word=$2
21721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21722$as_echo_n "checking for $ac_word... " >&6; }
21723if ${ac_cv_path_LDD+:} false; then :
21724  $as_echo_n "(cached) " >&6
21725else
21726  case $LDD in
21727  [\\/]* | ?:[\\/]*)
21728  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21729  ;;
21730  *)
21731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21732for as_dir in $PATH
21733do
21734  IFS=$as_save_IFS
21735  test -z "$as_dir" && as_dir=.
21736    for ac_exec_ext in '' $ac_executable_extensions; do
21737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21738    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21740    break 2
21741  fi
21742done
21743  done
21744IFS=$as_save_IFS
21745
21746  ;;
21747esac
21748fi
21749LDD=$ac_cv_path_LDD
21750if test -n "$LDD"; then
21751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21752$as_echo "$LDD" >&6; }
21753else
21754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21755$as_echo "no" >&6; }
21756fi
21757
21758
21759          if test "x$LDD" = x; then
21760            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21761          fi
21762        else
21763          # Otherwise we believe it is a complete path. Use it as it is.
21764          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21765$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21766          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21767$as_echo_n "checking for LDD... " >&6; }
21768          if test ! -x "$tool_specified"; then
21769            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21770$as_echo "not found" >&6; }
21771            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21772          fi
21773          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21774$as_echo "$tool_specified" >&6; }
21775        fi
21776      fi
21777    fi
21778
21779  fi
21780
21781
21782  if test "x$LDD" = "x"; then
21783    # List shared lib dependencies is used for
21784    # debug output and checking for forbidden dependencies.
21785    # We can build without it.
21786    LDD="true"
21787  fi
21788
21789
21790  # Publish this variable in the help.
21791
21792
21793  if [ -z "${OTOOL+x}" ]; then
21794    # The variable is not set by user, try to locate tool using the code snippet
21795    for ac_prog in otool
21796do
21797  # Extract the first word of "$ac_prog", so it can be a program name with args.
21798set dummy $ac_prog; ac_word=$2
21799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21800$as_echo_n "checking for $ac_word... " >&6; }
21801if ${ac_cv_path_OTOOL+:} false; then :
21802  $as_echo_n "(cached) " >&6
21803else
21804  case $OTOOL in
21805  [\\/]* | ?:[\\/]*)
21806  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21807  ;;
21808  *)
21809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21810for as_dir in $PATH
21811do
21812  IFS=$as_save_IFS
21813  test -z "$as_dir" && as_dir=.
21814    for ac_exec_ext in '' $ac_executable_extensions; do
21815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21816    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21818    break 2
21819  fi
21820done
21821  done
21822IFS=$as_save_IFS
21823
21824  ;;
21825esac
21826fi
21827OTOOL=$ac_cv_path_OTOOL
21828if test -n "$OTOOL"; then
21829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21830$as_echo "$OTOOL" >&6; }
21831else
21832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21833$as_echo "no" >&6; }
21834fi
21835
21836
21837  test -n "$OTOOL" && break
21838done
21839
21840  else
21841    # The variable is set, but is it from the command line or the environment?
21842
21843    # Try to remove the string !OTOOL! from our list.
21844    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21845    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21846      # If it failed, the variable was not from the command line. Ignore it,
21847      # but warn the user (except for BASH, which is always set by the calling BASH).
21848      if test "xOTOOL" != xBASH; then
21849        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21850$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21851      fi
21852      # Try to locate tool using the code snippet
21853      for ac_prog in otool
21854do
21855  # Extract the first word of "$ac_prog", so it can be a program name with args.
21856set dummy $ac_prog; ac_word=$2
21857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21858$as_echo_n "checking for $ac_word... " >&6; }
21859if ${ac_cv_path_OTOOL+:} false; then :
21860  $as_echo_n "(cached) " >&6
21861else
21862  case $OTOOL in
21863  [\\/]* | ?:[\\/]*)
21864  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21865  ;;
21866  *)
21867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21868for as_dir in $PATH
21869do
21870  IFS=$as_save_IFS
21871  test -z "$as_dir" && as_dir=.
21872    for ac_exec_ext in '' $ac_executable_extensions; do
21873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21874    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21876    break 2
21877  fi
21878done
21879  done
21880IFS=$as_save_IFS
21881
21882  ;;
21883esac
21884fi
21885OTOOL=$ac_cv_path_OTOOL
21886if test -n "$OTOOL"; then
21887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21888$as_echo "$OTOOL" >&6; }
21889else
21890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21891$as_echo "no" >&6; }
21892fi
21893
21894
21895  test -n "$OTOOL" && break
21896done
21897
21898    else
21899      # If it succeeded, then it was overridden by the user. We will use it
21900      # for the tool.
21901
21902      # First remove it from the list of overridden variables, so we can test
21903      # for unknown variables in the end.
21904      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21905
21906      # Check if we try to supply an empty value
21907      if test "x$OTOOL" = x; then
21908        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21909$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21910        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21911$as_echo_n "checking for OTOOL... " >&6; }
21912        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21913$as_echo "disabled" >&6; }
21914      else
21915        # Check if the provided tool contains a complete path.
21916        tool_specified="$OTOOL"
21917        tool_basename="${tool_specified##*/}"
21918        if test "x$tool_basename" = "x$tool_specified"; then
21919          # A command without a complete path is provided, search $PATH.
21920          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21921$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21922          # Extract the first word of "$tool_basename", so it can be a program name with args.
21923set dummy $tool_basename; ac_word=$2
21924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21925$as_echo_n "checking for $ac_word... " >&6; }
21926if ${ac_cv_path_OTOOL+:} false; then :
21927  $as_echo_n "(cached) " >&6
21928else
21929  case $OTOOL in
21930  [\\/]* | ?:[\\/]*)
21931  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21932  ;;
21933  *)
21934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21935for as_dir in $PATH
21936do
21937  IFS=$as_save_IFS
21938  test -z "$as_dir" && as_dir=.
21939    for ac_exec_ext in '' $ac_executable_extensions; do
21940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21941    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21943    break 2
21944  fi
21945done
21946  done
21947IFS=$as_save_IFS
21948
21949  ;;
21950esac
21951fi
21952OTOOL=$ac_cv_path_OTOOL
21953if test -n "$OTOOL"; then
21954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21955$as_echo "$OTOOL" >&6; }
21956else
21957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21958$as_echo "no" >&6; }
21959fi
21960
21961
21962          if test "x$OTOOL" = x; then
21963            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21964          fi
21965        else
21966          # Otherwise we believe it is a complete path. Use it as it is.
21967          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21968$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21969          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21970$as_echo_n "checking for OTOOL... " >&6; }
21971          if test ! -x "$tool_specified"; then
21972            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21973$as_echo "not found" >&6; }
21974            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21975          fi
21976          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21977$as_echo "$tool_specified" >&6; }
21978        fi
21979      fi
21980    fi
21981
21982  fi
21983
21984
21985  if test "x$OTOOL" = "x"; then
21986    OTOOL="true"
21987  fi
21988
21989
21990  # Publish this variable in the help.
21991
21992
21993  if [ -z "${READELF+x}" ]; then
21994    # The variable is not set by user, try to locate tool using the code snippet
21995    for ac_prog in greadelf readelf
21996do
21997  # Extract the first word of "$ac_prog", so it can be a program name with args.
21998set dummy $ac_prog; ac_word=$2
21999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22000$as_echo_n "checking for $ac_word... " >&6; }
22001if ${ac_cv_path_READELF+:} false; then :
22002  $as_echo_n "(cached) " >&6
22003else
22004  case $READELF in
22005  [\\/]* | ?:[\\/]*)
22006  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22007  ;;
22008  *)
22009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22010for as_dir in $PATH
22011do
22012  IFS=$as_save_IFS
22013  test -z "$as_dir" && as_dir=.
22014    for ac_exec_ext in '' $ac_executable_extensions; do
22015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22016    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22018    break 2
22019  fi
22020done
22021  done
22022IFS=$as_save_IFS
22023
22024  ;;
22025esac
22026fi
22027READELF=$ac_cv_path_READELF
22028if test -n "$READELF"; then
22029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22030$as_echo "$READELF" >&6; }
22031else
22032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22033$as_echo "no" >&6; }
22034fi
22035
22036
22037  test -n "$READELF" && break
22038done
22039
22040  else
22041    # The variable is set, but is it from the command line or the environment?
22042
22043    # Try to remove the string !READELF! from our list.
22044    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22045    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22046      # If it failed, the variable was not from the command line. Ignore it,
22047      # but warn the user (except for BASH, which is always set by the calling BASH).
22048      if test "xREADELF" != xBASH; then
22049        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22050$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22051      fi
22052      # Try to locate tool using the code snippet
22053      for ac_prog in greadelf readelf
22054do
22055  # Extract the first word of "$ac_prog", so it can be a program name with args.
22056set dummy $ac_prog; ac_word=$2
22057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22058$as_echo_n "checking for $ac_word... " >&6; }
22059if ${ac_cv_path_READELF+:} false; then :
22060  $as_echo_n "(cached) " >&6
22061else
22062  case $READELF in
22063  [\\/]* | ?:[\\/]*)
22064  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22065  ;;
22066  *)
22067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22068for as_dir in $PATH
22069do
22070  IFS=$as_save_IFS
22071  test -z "$as_dir" && as_dir=.
22072    for ac_exec_ext in '' $ac_executable_extensions; do
22073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22074    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22076    break 2
22077  fi
22078done
22079  done
22080IFS=$as_save_IFS
22081
22082  ;;
22083esac
22084fi
22085READELF=$ac_cv_path_READELF
22086if test -n "$READELF"; then
22087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22088$as_echo "$READELF" >&6; }
22089else
22090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22091$as_echo "no" >&6; }
22092fi
22093
22094
22095  test -n "$READELF" && break
22096done
22097
22098    else
22099      # If it succeeded, then it was overridden by the user. We will use it
22100      # for the tool.
22101
22102      # First remove it from the list of overridden variables, so we can test
22103      # for unknown variables in the end.
22104      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22105
22106      # Check if we try to supply an empty value
22107      if test "x$READELF" = x; then
22108        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22109$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22110        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22111$as_echo_n "checking for READELF... " >&6; }
22112        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22113$as_echo "disabled" >&6; }
22114      else
22115        # Check if the provided tool contains a complete path.
22116        tool_specified="$READELF"
22117        tool_basename="${tool_specified##*/}"
22118        if test "x$tool_basename" = "x$tool_specified"; then
22119          # A command without a complete path is provided, search $PATH.
22120          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22121$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22122          # Extract the first word of "$tool_basename", so it can be a program name with args.
22123set dummy $tool_basename; ac_word=$2
22124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22125$as_echo_n "checking for $ac_word... " >&6; }
22126if ${ac_cv_path_READELF+:} false; then :
22127  $as_echo_n "(cached) " >&6
22128else
22129  case $READELF in
22130  [\\/]* | ?:[\\/]*)
22131  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22132  ;;
22133  *)
22134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22135for as_dir in $PATH
22136do
22137  IFS=$as_save_IFS
22138  test -z "$as_dir" && as_dir=.
22139    for ac_exec_ext in '' $ac_executable_extensions; do
22140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22141    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22143    break 2
22144  fi
22145done
22146  done
22147IFS=$as_save_IFS
22148
22149  ;;
22150esac
22151fi
22152READELF=$ac_cv_path_READELF
22153if test -n "$READELF"; then
22154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22155$as_echo "$READELF" >&6; }
22156else
22157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22158$as_echo "no" >&6; }
22159fi
22160
22161
22162          if test "x$READELF" = x; then
22163            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22164          fi
22165        else
22166          # Otherwise we believe it is a complete path. Use it as it is.
22167          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22168$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22169          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22170$as_echo_n "checking for READELF... " >&6; }
22171          if test ! -x "$tool_specified"; then
22172            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22173$as_echo "not found" >&6; }
22174            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22175          fi
22176          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22177$as_echo "$tool_specified" >&6; }
22178        fi
22179      fi
22180    fi
22181
22182  fi
22183
22184
22185
22186
22187  # Publish this variable in the help.
22188
22189
22190  if [ -z "${HG+x}" ]; then
22191    # The variable is not set by user, try to locate tool using the code snippet
22192    for ac_prog in hg
22193do
22194  # Extract the first word of "$ac_prog", so it can be a program name with args.
22195set dummy $ac_prog; ac_word=$2
22196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22197$as_echo_n "checking for $ac_word... " >&6; }
22198if ${ac_cv_path_HG+:} false; then :
22199  $as_echo_n "(cached) " >&6
22200else
22201  case $HG in
22202  [\\/]* | ?:[\\/]*)
22203  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22204  ;;
22205  *)
22206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22207for as_dir in $PATH
22208do
22209  IFS=$as_save_IFS
22210  test -z "$as_dir" && as_dir=.
22211    for ac_exec_ext in '' $ac_executable_extensions; do
22212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22213    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22215    break 2
22216  fi
22217done
22218  done
22219IFS=$as_save_IFS
22220
22221  ;;
22222esac
22223fi
22224HG=$ac_cv_path_HG
22225if test -n "$HG"; then
22226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22227$as_echo "$HG" >&6; }
22228else
22229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22230$as_echo "no" >&6; }
22231fi
22232
22233
22234  test -n "$HG" && break
22235done
22236
22237  else
22238    # The variable is set, but is it from the command line or the environment?
22239
22240    # Try to remove the string !HG! from our list.
22241    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22242    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22243      # If it failed, the variable was not from the command line. Ignore it,
22244      # but warn the user (except for BASH, which is always set by the calling BASH).
22245      if test "xHG" != xBASH; then
22246        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22247$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22248      fi
22249      # Try to locate tool using the code snippet
22250      for ac_prog in hg
22251do
22252  # Extract the first word of "$ac_prog", so it can be a program name with args.
22253set dummy $ac_prog; ac_word=$2
22254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22255$as_echo_n "checking for $ac_word... " >&6; }
22256if ${ac_cv_path_HG+:} false; then :
22257  $as_echo_n "(cached) " >&6
22258else
22259  case $HG in
22260  [\\/]* | ?:[\\/]*)
22261  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22262  ;;
22263  *)
22264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22265for as_dir in $PATH
22266do
22267  IFS=$as_save_IFS
22268  test -z "$as_dir" && as_dir=.
22269    for ac_exec_ext in '' $ac_executable_extensions; do
22270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22271    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22273    break 2
22274  fi
22275done
22276  done
22277IFS=$as_save_IFS
22278
22279  ;;
22280esac
22281fi
22282HG=$ac_cv_path_HG
22283if test -n "$HG"; then
22284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22285$as_echo "$HG" >&6; }
22286else
22287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22288$as_echo "no" >&6; }
22289fi
22290
22291
22292  test -n "$HG" && break
22293done
22294
22295    else
22296      # If it succeeded, then it was overridden by the user. We will use it
22297      # for the tool.
22298
22299      # First remove it from the list of overridden variables, so we can test
22300      # for unknown variables in the end.
22301      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22302
22303      # Check if we try to supply an empty value
22304      if test "x$HG" = x; then
22305        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22306$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22307        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22308$as_echo_n "checking for HG... " >&6; }
22309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22310$as_echo "disabled" >&6; }
22311      else
22312        # Check if the provided tool contains a complete path.
22313        tool_specified="$HG"
22314        tool_basename="${tool_specified##*/}"
22315        if test "x$tool_basename" = "x$tool_specified"; then
22316          # A command without a complete path is provided, search $PATH.
22317          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22318$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22319          # Extract the first word of "$tool_basename", so it can be a program name with args.
22320set dummy $tool_basename; ac_word=$2
22321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22322$as_echo_n "checking for $ac_word... " >&6; }
22323if ${ac_cv_path_HG+:} false; then :
22324  $as_echo_n "(cached) " >&6
22325else
22326  case $HG in
22327  [\\/]* | ?:[\\/]*)
22328  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22329  ;;
22330  *)
22331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22332for as_dir in $PATH
22333do
22334  IFS=$as_save_IFS
22335  test -z "$as_dir" && as_dir=.
22336    for ac_exec_ext in '' $ac_executable_extensions; do
22337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22338    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22340    break 2
22341  fi
22342done
22343  done
22344IFS=$as_save_IFS
22345
22346  ;;
22347esac
22348fi
22349HG=$ac_cv_path_HG
22350if test -n "$HG"; then
22351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22352$as_echo "$HG" >&6; }
22353else
22354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22355$as_echo "no" >&6; }
22356fi
22357
22358
22359          if test "x$HG" = x; then
22360            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22361          fi
22362        else
22363          # Otherwise we believe it is a complete path. Use it as it is.
22364          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22365$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22366          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22367$as_echo_n "checking for HG... " >&6; }
22368          if test ! -x "$tool_specified"; then
22369            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22370$as_echo "not found" >&6; }
22371            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22372          fi
22373          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22374$as_echo "$tool_specified" >&6; }
22375        fi
22376      fi
22377    fi
22378
22379  fi
22380
22381
22382
22383
22384  # Publish this variable in the help.
22385
22386
22387  if [ -z "${STAT+x}" ]; then
22388    # The variable is not set by user, try to locate tool using the code snippet
22389    for ac_prog in stat
22390do
22391  # Extract the first word of "$ac_prog", so it can be a program name with args.
22392set dummy $ac_prog; ac_word=$2
22393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22394$as_echo_n "checking for $ac_word... " >&6; }
22395if ${ac_cv_path_STAT+:} false; then :
22396  $as_echo_n "(cached) " >&6
22397else
22398  case $STAT in
22399  [\\/]* | ?:[\\/]*)
22400  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22401  ;;
22402  *)
22403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22404for as_dir in $PATH
22405do
22406  IFS=$as_save_IFS
22407  test -z "$as_dir" && as_dir=.
22408    for ac_exec_ext in '' $ac_executable_extensions; do
22409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22410    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22412    break 2
22413  fi
22414done
22415  done
22416IFS=$as_save_IFS
22417
22418  ;;
22419esac
22420fi
22421STAT=$ac_cv_path_STAT
22422if test -n "$STAT"; then
22423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22424$as_echo "$STAT" >&6; }
22425else
22426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22427$as_echo "no" >&6; }
22428fi
22429
22430
22431  test -n "$STAT" && break
22432done
22433
22434  else
22435    # The variable is set, but is it from the command line or the environment?
22436
22437    # Try to remove the string !STAT! from our list.
22438    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22439    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22440      # If it failed, the variable was not from the command line. Ignore it,
22441      # but warn the user (except for BASH, which is always set by the calling BASH).
22442      if test "xSTAT" != xBASH; then
22443        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22444$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22445      fi
22446      # Try to locate tool using the code snippet
22447      for ac_prog in stat
22448do
22449  # Extract the first word of "$ac_prog", so it can be a program name with args.
22450set dummy $ac_prog; ac_word=$2
22451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22452$as_echo_n "checking for $ac_word... " >&6; }
22453if ${ac_cv_path_STAT+:} false; then :
22454  $as_echo_n "(cached) " >&6
22455else
22456  case $STAT in
22457  [\\/]* | ?:[\\/]*)
22458  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22459  ;;
22460  *)
22461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22462for as_dir in $PATH
22463do
22464  IFS=$as_save_IFS
22465  test -z "$as_dir" && as_dir=.
22466    for ac_exec_ext in '' $ac_executable_extensions; do
22467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22468    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22470    break 2
22471  fi
22472done
22473  done
22474IFS=$as_save_IFS
22475
22476  ;;
22477esac
22478fi
22479STAT=$ac_cv_path_STAT
22480if test -n "$STAT"; then
22481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22482$as_echo "$STAT" >&6; }
22483else
22484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22485$as_echo "no" >&6; }
22486fi
22487
22488
22489  test -n "$STAT" && break
22490done
22491
22492    else
22493      # If it succeeded, then it was overridden by the user. We will use it
22494      # for the tool.
22495
22496      # First remove it from the list of overridden variables, so we can test
22497      # for unknown variables in the end.
22498      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22499
22500      # Check if we try to supply an empty value
22501      if test "x$STAT" = x; then
22502        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22503$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22504        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22505$as_echo_n "checking for STAT... " >&6; }
22506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22507$as_echo "disabled" >&6; }
22508      else
22509        # Check if the provided tool contains a complete path.
22510        tool_specified="$STAT"
22511        tool_basename="${tool_specified##*/}"
22512        if test "x$tool_basename" = "x$tool_specified"; then
22513          # A command without a complete path is provided, search $PATH.
22514          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22515$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22516          # Extract the first word of "$tool_basename", so it can be a program name with args.
22517set dummy $tool_basename; ac_word=$2
22518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22519$as_echo_n "checking for $ac_word... " >&6; }
22520if ${ac_cv_path_STAT+:} false; then :
22521  $as_echo_n "(cached) " >&6
22522else
22523  case $STAT in
22524  [\\/]* | ?:[\\/]*)
22525  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22526  ;;
22527  *)
22528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22529for as_dir in $PATH
22530do
22531  IFS=$as_save_IFS
22532  test -z "$as_dir" && as_dir=.
22533    for ac_exec_ext in '' $ac_executable_extensions; do
22534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22535    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22537    break 2
22538  fi
22539done
22540  done
22541IFS=$as_save_IFS
22542
22543  ;;
22544esac
22545fi
22546STAT=$ac_cv_path_STAT
22547if test -n "$STAT"; then
22548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22549$as_echo "$STAT" >&6; }
22550else
22551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22552$as_echo "no" >&6; }
22553fi
22554
22555
22556          if test "x$STAT" = x; then
22557            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22558          fi
22559        else
22560          # Otherwise we believe it is a complete path. Use it as it is.
22561          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22562$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22563          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22564$as_echo_n "checking for STAT... " >&6; }
22565          if test ! -x "$tool_specified"; then
22566            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22567$as_echo "not found" >&6; }
22568            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22569          fi
22570          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22571$as_echo "$tool_specified" >&6; }
22572        fi
22573      fi
22574    fi
22575
22576  fi
22577
22578
22579
22580
22581  # Publish this variable in the help.
22582
22583
22584  if [ -z "${TIME+x}" ]; then
22585    # The variable is not set by user, try to locate tool using the code snippet
22586    for ac_prog in time
22587do
22588  # Extract the first word of "$ac_prog", so it can be a program name with args.
22589set dummy $ac_prog; ac_word=$2
22590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22591$as_echo_n "checking for $ac_word... " >&6; }
22592if ${ac_cv_path_TIME+:} false; then :
22593  $as_echo_n "(cached) " >&6
22594else
22595  case $TIME in
22596  [\\/]* | ?:[\\/]*)
22597  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22598  ;;
22599  *)
22600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22601for as_dir in $PATH
22602do
22603  IFS=$as_save_IFS
22604  test -z "$as_dir" && as_dir=.
22605    for ac_exec_ext in '' $ac_executable_extensions; do
22606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22607    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22609    break 2
22610  fi
22611done
22612  done
22613IFS=$as_save_IFS
22614
22615  ;;
22616esac
22617fi
22618TIME=$ac_cv_path_TIME
22619if test -n "$TIME"; then
22620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22621$as_echo "$TIME" >&6; }
22622else
22623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22624$as_echo "no" >&6; }
22625fi
22626
22627
22628  test -n "$TIME" && break
22629done
22630
22631  else
22632    # The variable is set, but is it from the command line or the environment?
22633
22634    # Try to remove the string !TIME! from our list.
22635    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22636    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22637      # If it failed, the variable was not from the command line. Ignore it,
22638      # but warn the user (except for BASH, which is always set by the calling BASH).
22639      if test "xTIME" != xBASH; then
22640        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22641$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22642      fi
22643      # Try to locate tool using the code snippet
22644      for ac_prog in time
22645do
22646  # Extract the first word of "$ac_prog", so it can be a program name with args.
22647set dummy $ac_prog; ac_word=$2
22648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22649$as_echo_n "checking for $ac_word... " >&6; }
22650if ${ac_cv_path_TIME+:} false; then :
22651  $as_echo_n "(cached) " >&6
22652else
22653  case $TIME in
22654  [\\/]* | ?:[\\/]*)
22655  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22656  ;;
22657  *)
22658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22659for as_dir in $PATH
22660do
22661  IFS=$as_save_IFS
22662  test -z "$as_dir" && as_dir=.
22663    for ac_exec_ext in '' $ac_executable_extensions; do
22664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22665    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22667    break 2
22668  fi
22669done
22670  done
22671IFS=$as_save_IFS
22672
22673  ;;
22674esac
22675fi
22676TIME=$ac_cv_path_TIME
22677if test -n "$TIME"; then
22678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22679$as_echo "$TIME" >&6; }
22680else
22681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22682$as_echo "no" >&6; }
22683fi
22684
22685
22686  test -n "$TIME" && break
22687done
22688
22689    else
22690      # If it succeeded, then it was overridden by the user. We will use it
22691      # for the tool.
22692
22693      # First remove it from the list of overridden variables, so we can test
22694      # for unknown variables in the end.
22695      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22696
22697      # Check if we try to supply an empty value
22698      if test "x$TIME" = x; then
22699        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22700$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22701        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22702$as_echo_n "checking for TIME... " >&6; }
22703        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22704$as_echo "disabled" >&6; }
22705      else
22706        # Check if the provided tool contains a complete path.
22707        tool_specified="$TIME"
22708        tool_basename="${tool_specified##*/}"
22709        if test "x$tool_basename" = "x$tool_specified"; then
22710          # A command without a complete path is provided, search $PATH.
22711          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22712$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22713          # Extract the first word of "$tool_basename", so it can be a program name with args.
22714set dummy $tool_basename; ac_word=$2
22715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22716$as_echo_n "checking for $ac_word... " >&6; }
22717if ${ac_cv_path_TIME+:} false; then :
22718  $as_echo_n "(cached) " >&6
22719else
22720  case $TIME in
22721  [\\/]* | ?:[\\/]*)
22722  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22723  ;;
22724  *)
22725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22726for as_dir in $PATH
22727do
22728  IFS=$as_save_IFS
22729  test -z "$as_dir" && as_dir=.
22730    for ac_exec_ext in '' $ac_executable_extensions; do
22731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22732    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22734    break 2
22735  fi
22736done
22737  done
22738IFS=$as_save_IFS
22739
22740  ;;
22741esac
22742fi
22743TIME=$ac_cv_path_TIME
22744if test -n "$TIME"; then
22745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22746$as_echo "$TIME" >&6; }
22747else
22748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22749$as_echo "no" >&6; }
22750fi
22751
22752
22753          if test "x$TIME" = x; then
22754            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22755          fi
22756        else
22757          # Otherwise we believe it is a complete path. Use it as it is.
22758          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22759$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22760          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22761$as_echo_n "checking for TIME... " >&6; }
22762          if test ! -x "$tool_specified"; then
22763            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22764$as_echo "not found" >&6; }
22765            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22766          fi
22767          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22768$as_echo "$tool_specified" >&6; }
22769        fi
22770      fi
22771    fi
22772
22773  fi
22774
22775
22776  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
22777  # be in the user path.
22778
22779
22780  # Publish this variable in the help.
22781
22782
22783  if [ -z "${DTRACE+x}" ]; then
22784    # The variable is not set by user, try to locate tool using the code snippet
22785    for ac_prog in dtrace
22786do
22787  # Extract the first word of "$ac_prog", so it can be a program name with args.
22788set dummy $ac_prog; ac_word=$2
22789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22790$as_echo_n "checking for $ac_word... " >&6; }
22791if ${ac_cv_path_DTRACE+:} false; then :
22792  $as_echo_n "(cached) " >&6
22793else
22794  case $DTRACE in
22795  [\\/]* | ?:[\\/]*)
22796  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22797  ;;
22798  *)
22799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22800as_dummy="$PATH:/usr/sbin"
22801for as_dir in $as_dummy
22802do
22803  IFS=$as_save_IFS
22804  test -z "$as_dir" && as_dir=.
22805    for ac_exec_ext in '' $ac_executable_extensions; do
22806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22807    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22809    break 2
22810  fi
22811done
22812  done
22813IFS=$as_save_IFS
22814
22815  ;;
22816esac
22817fi
22818DTRACE=$ac_cv_path_DTRACE
22819if test -n "$DTRACE"; then
22820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22821$as_echo "$DTRACE" >&6; }
22822else
22823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22824$as_echo "no" >&6; }
22825fi
22826
22827
22828  test -n "$DTRACE" && break
22829done
22830
22831  else
22832    # The variable is set, but is it from the command line or the environment?
22833
22834    # Try to remove the string !DTRACE! from our list.
22835    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22836    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22837      # If it failed, the variable was not from the command line. Ignore it,
22838      # but warn the user (except for BASH, which is always set by the calling BASH).
22839      if test "xDTRACE" != xBASH; then
22840        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22841$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22842      fi
22843      # Try to locate tool using the code snippet
22844      for ac_prog in dtrace
22845do
22846  # Extract the first word of "$ac_prog", so it can be a program name with args.
22847set dummy $ac_prog; ac_word=$2
22848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22849$as_echo_n "checking for $ac_word... " >&6; }
22850if ${ac_cv_path_DTRACE+:} false; then :
22851  $as_echo_n "(cached) " >&6
22852else
22853  case $DTRACE in
22854  [\\/]* | ?:[\\/]*)
22855  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22856  ;;
22857  *)
22858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22859as_dummy="$PATH:/usr/sbin"
22860for as_dir in $as_dummy
22861do
22862  IFS=$as_save_IFS
22863  test -z "$as_dir" && as_dir=.
22864    for ac_exec_ext in '' $ac_executable_extensions; do
22865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22866    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22868    break 2
22869  fi
22870done
22871  done
22872IFS=$as_save_IFS
22873
22874  ;;
22875esac
22876fi
22877DTRACE=$ac_cv_path_DTRACE
22878if test -n "$DTRACE"; then
22879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22880$as_echo "$DTRACE" >&6; }
22881else
22882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22883$as_echo "no" >&6; }
22884fi
22885
22886
22887  test -n "$DTRACE" && break
22888done
22889
22890    else
22891      # If it succeeded, then it was overridden by the user. We will use it
22892      # for the tool.
22893
22894      # First remove it from the list of overridden variables, so we can test
22895      # for unknown variables in the end.
22896      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22897
22898      # Check if we try to supply an empty value
22899      if test "x$DTRACE" = x; then
22900        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22901$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22902        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22903$as_echo_n "checking for DTRACE... " >&6; }
22904        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22905$as_echo "disabled" >&6; }
22906      else
22907        # Check if the provided tool contains a complete path.
22908        tool_specified="$DTRACE"
22909        tool_basename="${tool_specified##*/}"
22910        if test "x$tool_basename" = "x$tool_specified"; then
22911          # A command without a complete path is provided, search $PATH.
22912          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22913$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22914          # Extract the first word of "$tool_basename", so it can be a program name with args.
22915set dummy $tool_basename; ac_word=$2
22916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22917$as_echo_n "checking for $ac_word... " >&6; }
22918if ${ac_cv_path_DTRACE+:} false; then :
22919  $as_echo_n "(cached) " >&6
22920else
22921  case $DTRACE in
22922  [\\/]* | ?:[\\/]*)
22923  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22924  ;;
22925  *)
22926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22927for as_dir in $PATH
22928do
22929  IFS=$as_save_IFS
22930  test -z "$as_dir" && as_dir=.
22931    for ac_exec_ext in '' $ac_executable_extensions; do
22932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22933    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22935    break 2
22936  fi
22937done
22938  done
22939IFS=$as_save_IFS
22940
22941  ;;
22942esac
22943fi
22944DTRACE=$ac_cv_path_DTRACE
22945if test -n "$DTRACE"; then
22946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22947$as_echo "$DTRACE" >&6; }
22948else
22949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22950$as_echo "no" >&6; }
22951fi
22952
22953
22954          if test "x$DTRACE" = x; then
22955            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22956          fi
22957        else
22958          # Otherwise we believe it is a complete path. Use it as it is.
22959          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22960$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22961          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22962$as_echo_n "checking for DTRACE... " >&6; }
22963          if test ! -x "$tool_specified"; then
22964            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22965$as_echo "not found" >&6; }
22966            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22967          fi
22968          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22969$as_echo "$tool_specified" >&6; }
22970        fi
22971      fi
22972    fi
22973
22974  fi
22975
22976
22977
22978
22979  # Publish this variable in the help.
22980
22981
22982  if [ -z "${PATCH+x}" ]; then
22983    # The variable is not set by user, try to locate tool using the code snippet
22984    for ac_prog in gpatch patch
22985do
22986  # Extract the first word of "$ac_prog", so it can be a program name with args.
22987set dummy $ac_prog; ac_word=$2
22988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22989$as_echo_n "checking for $ac_word... " >&6; }
22990if ${ac_cv_path_PATCH+:} false; then :
22991  $as_echo_n "(cached) " >&6
22992else
22993  case $PATCH in
22994  [\\/]* | ?:[\\/]*)
22995  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22996  ;;
22997  *)
22998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22999for as_dir in $PATH
23000do
23001  IFS=$as_save_IFS
23002  test -z "$as_dir" && as_dir=.
23003    for ac_exec_ext in '' $ac_executable_extensions; do
23004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23005    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23007    break 2
23008  fi
23009done
23010  done
23011IFS=$as_save_IFS
23012
23013  ;;
23014esac
23015fi
23016PATCH=$ac_cv_path_PATCH
23017if test -n "$PATCH"; then
23018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23019$as_echo "$PATCH" >&6; }
23020else
23021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23022$as_echo "no" >&6; }
23023fi
23024
23025
23026  test -n "$PATCH" && break
23027done
23028
23029  else
23030    # The variable is set, but is it from the command line or the environment?
23031
23032    # Try to remove the string !PATCH! from our list.
23033    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23034    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23035      # If it failed, the variable was not from the command line. Ignore it,
23036      # but warn the user (except for BASH, which is always set by the calling BASH).
23037      if test "xPATCH" != xBASH; then
23038        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23039$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23040      fi
23041      # Try to locate tool using the code snippet
23042      for ac_prog in gpatch patch
23043do
23044  # Extract the first word of "$ac_prog", so it can be a program name with args.
23045set dummy $ac_prog; ac_word=$2
23046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23047$as_echo_n "checking for $ac_word... " >&6; }
23048if ${ac_cv_path_PATCH+:} false; then :
23049  $as_echo_n "(cached) " >&6
23050else
23051  case $PATCH in
23052  [\\/]* | ?:[\\/]*)
23053  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23054  ;;
23055  *)
23056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23057for as_dir in $PATH
23058do
23059  IFS=$as_save_IFS
23060  test -z "$as_dir" && as_dir=.
23061    for ac_exec_ext in '' $ac_executable_extensions; do
23062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23063    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23065    break 2
23066  fi
23067done
23068  done
23069IFS=$as_save_IFS
23070
23071  ;;
23072esac
23073fi
23074PATCH=$ac_cv_path_PATCH
23075if test -n "$PATCH"; then
23076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23077$as_echo "$PATCH" >&6; }
23078else
23079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23080$as_echo "no" >&6; }
23081fi
23082
23083
23084  test -n "$PATCH" && break
23085done
23086
23087    else
23088      # If it succeeded, then it was overridden by the user. We will use it
23089      # for the tool.
23090
23091      # First remove it from the list of overridden variables, so we can test
23092      # for unknown variables in the end.
23093      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23094
23095      # Check if we try to supply an empty value
23096      if test "x$PATCH" = x; then
23097        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23098$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23099        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23100$as_echo_n "checking for PATCH... " >&6; }
23101        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23102$as_echo "disabled" >&6; }
23103      else
23104        # Check if the provided tool contains a complete path.
23105        tool_specified="$PATCH"
23106        tool_basename="${tool_specified##*/}"
23107        if test "x$tool_basename" = "x$tool_specified"; then
23108          # A command without a complete path is provided, search $PATH.
23109          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23110$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23111          # Extract the first word of "$tool_basename", so it can be a program name with args.
23112set dummy $tool_basename; ac_word=$2
23113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23114$as_echo_n "checking for $ac_word... " >&6; }
23115if ${ac_cv_path_PATCH+:} false; then :
23116  $as_echo_n "(cached) " >&6
23117else
23118  case $PATCH in
23119  [\\/]* | ?:[\\/]*)
23120  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23121  ;;
23122  *)
23123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23124for as_dir in $PATH
23125do
23126  IFS=$as_save_IFS
23127  test -z "$as_dir" && as_dir=.
23128    for ac_exec_ext in '' $ac_executable_extensions; do
23129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23130    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23132    break 2
23133  fi
23134done
23135  done
23136IFS=$as_save_IFS
23137
23138  ;;
23139esac
23140fi
23141PATCH=$ac_cv_path_PATCH
23142if test -n "$PATCH"; then
23143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23144$as_echo "$PATCH" >&6; }
23145else
23146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23147$as_echo "no" >&6; }
23148fi
23149
23150
23151          if test "x$PATCH" = x; then
23152            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23153          fi
23154        else
23155          # Otherwise we believe it is a complete path. Use it as it is.
23156          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23157$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23158          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23159$as_echo_n "checking for PATCH... " >&6; }
23160          if test ! -x "$tool_specified"; then
23161            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23162$as_echo "not found" >&6; }
23163            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23164          fi
23165          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23166$as_echo "$tool_specified" >&6; }
23167        fi
23168      fi
23169    fi
23170
23171  fi
23172
23173
23174  # Check if it's GNU time
23175  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23176  if test "x$IS_GNU_TIME" != x; then
23177    IS_GNU_TIME=yes
23178  else
23179    IS_GNU_TIME=no
23180  fi
23181
23182
23183  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23184
23185
23186
23187  # Publish this variable in the help.
23188
23189
23190  if [ -z "${DSYMUTIL+x}" ]; then
23191    # The variable is not set by user, try to locate tool using the code snippet
23192    for ac_prog in dsymutil
23193do
23194  # Extract the first word of "$ac_prog", so it can be a program name with args.
23195set dummy $ac_prog; ac_word=$2
23196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23197$as_echo_n "checking for $ac_word... " >&6; }
23198if ${ac_cv_path_DSYMUTIL+:} false; then :
23199  $as_echo_n "(cached) " >&6
23200else
23201  case $DSYMUTIL in
23202  [\\/]* | ?:[\\/]*)
23203  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23204  ;;
23205  *)
23206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23207for as_dir in $PATH
23208do
23209  IFS=$as_save_IFS
23210  test -z "$as_dir" && as_dir=.
23211    for ac_exec_ext in '' $ac_executable_extensions; do
23212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23213    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23215    break 2
23216  fi
23217done
23218  done
23219IFS=$as_save_IFS
23220
23221  ;;
23222esac
23223fi
23224DSYMUTIL=$ac_cv_path_DSYMUTIL
23225if test -n "$DSYMUTIL"; then
23226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23227$as_echo "$DSYMUTIL" >&6; }
23228else
23229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23230$as_echo "no" >&6; }
23231fi
23232
23233
23234  test -n "$DSYMUTIL" && break
23235done
23236
23237  else
23238    # The variable is set, but is it from the command line or the environment?
23239
23240    # Try to remove the string !DSYMUTIL! from our list.
23241    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23242    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23243      # If it failed, the variable was not from the command line. Ignore it,
23244      # but warn the user (except for BASH, which is always set by the calling BASH).
23245      if test "xDSYMUTIL" != xBASH; then
23246        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23247$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23248      fi
23249      # Try to locate tool using the code snippet
23250      for ac_prog in dsymutil
23251do
23252  # Extract the first word of "$ac_prog", so it can be a program name with args.
23253set dummy $ac_prog; ac_word=$2
23254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23255$as_echo_n "checking for $ac_word... " >&6; }
23256if ${ac_cv_path_DSYMUTIL+:} false; then :
23257  $as_echo_n "(cached) " >&6
23258else
23259  case $DSYMUTIL in
23260  [\\/]* | ?:[\\/]*)
23261  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23262  ;;
23263  *)
23264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23265for as_dir in $PATH
23266do
23267  IFS=$as_save_IFS
23268  test -z "$as_dir" && as_dir=.
23269    for ac_exec_ext in '' $ac_executable_extensions; do
23270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23271    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23273    break 2
23274  fi
23275done
23276  done
23277IFS=$as_save_IFS
23278
23279  ;;
23280esac
23281fi
23282DSYMUTIL=$ac_cv_path_DSYMUTIL
23283if test -n "$DSYMUTIL"; then
23284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23285$as_echo "$DSYMUTIL" >&6; }
23286else
23287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23288$as_echo "no" >&6; }
23289fi
23290
23291
23292  test -n "$DSYMUTIL" && break
23293done
23294
23295    else
23296      # If it succeeded, then it was overridden by the user. We will use it
23297      # for the tool.
23298
23299      # First remove it from the list of overridden variables, so we can test
23300      # for unknown variables in the end.
23301      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23302
23303      # Check if we try to supply an empty value
23304      if test "x$DSYMUTIL" = x; then
23305        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23306$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23307        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23308$as_echo_n "checking for DSYMUTIL... " >&6; }
23309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23310$as_echo "disabled" >&6; }
23311      else
23312        # Check if the provided tool contains a complete path.
23313        tool_specified="$DSYMUTIL"
23314        tool_basename="${tool_specified##*/}"
23315        if test "x$tool_basename" = "x$tool_specified"; then
23316          # A command without a complete path is provided, search $PATH.
23317          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23318$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23319          # Extract the first word of "$tool_basename", so it can be a program name with args.
23320set dummy $tool_basename; ac_word=$2
23321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23322$as_echo_n "checking for $ac_word... " >&6; }
23323if ${ac_cv_path_DSYMUTIL+:} false; then :
23324  $as_echo_n "(cached) " >&6
23325else
23326  case $DSYMUTIL in
23327  [\\/]* | ?:[\\/]*)
23328  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23329  ;;
23330  *)
23331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23332for as_dir in $PATH
23333do
23334  IFS=$as_save_IFS
23335  test -z "$as_dir" && as_dir=.
23336    for ac_exec_ext in '' $ac_executable_extensions; do
23337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23338    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23340    break 2
23341  fi
23342done
23343  done
23344IFS=$as_save_IFS
23345
23346  ;;
23347esac
23348fi
23349DSYMUTIL=$ac_cv_path_DSYMUTIL
23350if test -n "$DSYMUTIL"; then
23351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23352$as_echo "$DSYMUTIL" >&6; }
23353else
23354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23355$as_echo "no" >&6; }
23356fi
23357
23358
23359          if test "x$DSYMUTIL" = x; then
23360            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23361          fi
23362        else
23363          # Otherwise we believe it is a complete path. Use it as it is.
23364          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23365$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23366          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23367$as_echo_n "checking for DSYMUTIL... " >&6; }
23368          if test ! -x "$tool_specified"; then
23369            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23370$as_echo "not found" >&6; }
23371            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23372          fi
23373          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23374$as_echo "$tool_specified" >&6; }
23375        fi
23376      fi
23377    fi
23378
23379  fi
23380
23381
23382
23383  if test "x$DSYMUTIL" = x; then
23384    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23385  fi
23386
23387
23388
23389
23390
23391  # Publish this variable in the help.
23392
23393
23394  if [ -z "${XATTR+x}" ]; then
23395    # The variable is not set by user, try to locate tool using the code snippet
23396    for ac_prog in xattr
23397do
23398  # Extract the first word of "$ac_prog", so it can be a program name with args.
23399set dummy $ac_prog; ac_word=$2
23400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23401$as_echo_n "checking for $ac_word... " >&6; }
23402if ${ac_cv_path_XATTR+:} false; then :
23403  $as_echo_n "(cached) " >&6
23404else
23405  case $XATTR in
23406  [\\/]* | ?:[\\/]*)
23407  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23408  ;;
23409  *)
23410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23411for as_dir in $PATH
23412do
23413  IFS=$as_save_IFS
23414  test -z "$as_dir" && as_dir=.
23415    for ac_exec_ext in '' $ac_executable_extensions; do
23416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23417    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23419    break 2
23420  fi
23421done
23422  done
23423IFS=$as_save_IFS
23424
23425  ;;
23426esac
23427fi
23428XATTR=$ac_cv_path_XATTR
23429if test -n "$XATTR"; then
23430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23431$as_echo "$XATTR" >&6; }
23432else
23433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23434$as_echo "no" >&6; }
23435fi
23436
23437
23438  test -n "$XATTR" && break
23439done
23440
23441  else
23442    # The variable is set, but is it from the command line or the environment?
23443
23444    # Try to remove the string !XATTR! from our list.
23445    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23446    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23447      # If it failed, the variable was not from the command line. Ignore it,
23448      # but warn the user (except for BASH, which is always set by the calling BASH).
23449      if test "xXATTR" != xBASH; then
23450        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23451$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23452      fi
23453      # Try to locate tool using the code snippet
23454      for ac_prog in xattr
23455do
23456  # Extract the first word of "$ac_prog", so it can be a program name with args.
23457set dummy $ac_prog; ac_word=$2
23458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23459$as_echo_n "checking for $ac_word... " >&6; }
23460if ${ac_cv_path_XATTR+:} false; then :
23461  $as_echo_n "(cached) " >&6
23462else
23463  case $XATTR in
23464  [\\/]* | ?:[\\/]*)
23465  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23466  ;;
23467  *)
23468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23469for as_dir in $PATH
23470do
23471  IFS=$as_save_IFS
23472  test -z "$as_dir" && as_dir=.
23473    for ac_exec_ext in '' $ac_executable_extensions; do
23474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23475    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23477    break 2
23478  fi
23479done
23480  done
23481IFS=$as_save_IFS
23482
23483  ;;
23484esac
23485fi
23486XATTR=$ac_cv_path_XATTR
23487if test -n "$XATTR"; then
23488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23489$as_echo "$XATTR" >&6; }
23490else
23491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23492$as_echo "no" >&6; }
23493fi
23494
23495
23496  test -n "$XATTR" && break
23497done
23498
23499    else
23500      # If it succeeded, then it was overridden by the user. We will use it
23501      # for the tool.
23502
23503      # First remove it from the list of overridden variables, so we can test
23504      # for unknown variables in the end.
23505      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23506
23507      # Check if we try to supply an empty value
23508      if test "x$XATTR" = x; then
23509        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23510$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23511        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23512$as_echo_n "checking for XATTR... " >&6; }
23513        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23514$as_echo "disabled" >&6; }
23515      else
23516        # Check if the provided tool contains a complete path.
23517        tool_specified="$XATTR"
23518        tool_basename="${tool_specified##*/}"
23519        if test "x$tool_basename" = "x$tool_specified"; then
23520          # A command without a complete path is provided, search $PATH.
23521          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23522$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23523          # Extract the first word of "$tool_basename", so it can be a program name with args.
23524set dummy $tool_basename; ac_word=$2
23525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23526$as_echo_n "checking for $ac_word... " >&6; }
23527if ${ac_cv_path_XATTR+:} false; then :
23528  $as_echo_n "(cached) " >&6
23529else
23530  case $XATTR in
23531  [\\/]* | ?:[\\/]*)
23532  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23533  ;;
23534  *)
23535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23536for as_dir in $PATH
23537do
23538  IFS=$as_save_IFS
23539  test -z "$as_dir" && as_dir=.
23540    for ac_exec_ext in '' $ac_executable_extensions; do
23541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23542    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23544    break 2
23545  fi
23546done
23547  done
23548IFS=$as_save_IFS
23549
23550  ;;
23551esac
23552fi
23553XATTR=$ac_cv_path_XATTR
23554if test -n "$XATTR"; then
23555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23556$as_echo "$XATTR" >&6; }
23557else
23558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23559$as_echo "no" >&6; }
23560fi
23561
23562
23563          if test "x$XATTR" = x; then
23564            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23565          fi
23566        else
23567          # Otherwise we believe it is a complete path. Use it as it is.
23568          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23569$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23570          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23571$as_echo_n "checking for XATTR... " >&6; }
23572          if test ! -x "$tool_specified"; then
23573            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23574$as_echo "not found" >&6; }
23575            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23576          fi
23577          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23578$as_echo "$tool_specified" >&6; }
23579        fi
23580      fi
23581    fi
23582
23583  fi
23584
23585
23586
23587  if test "x$XATTR" = x; then
23588    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23589  fi
23590
23591
23592
23593
23594  # Publish this variable in the help.
23595
23596
23597  if [ -z "${CODESIGN+x}" ]; then
23598    # The variable is not set by user, try to locate tool using the code snippet
23599    for ac_prog in codesign
23600do
23601  # Extract the first word of "$ac_prog", so it can be a program name with args.
23602set dummy $ac_prog; ac_word=$2
23603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23604$as_echo_n "checking for $ac_word... " >&6; }
23605if ${ac_cv_path_CODESIGN+:} false; then :
23606  $as_echo_n "(cached) " >&6
23607else
23608  case $CODESIGN in
23609  [\\/]* | ?:[\\/]*)
23610  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23611  ;;
23612  *)
23613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23614for as_dir in $PATH
23615do
23616  IFS=$as_save_IFS
23617  test -z "$as_dir" && as_dir=.
23618    for ac_exec_ext in '' $ac_executable_extensions; do
23619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23620    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23622    break 2
23623  fi
23624done
23625  done
23626IFS=$as_save_IFS
23627
23628  ;;
23629esac
23630fi
23631CODESIGN=$ac_cv_path_CODESIGN
23632if test -n "$CODESIGN"; then
23633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23634$as_echo "$CODESIGN" >&6; }
23635else
23636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23637$as_echo "no" >&6; }
23638fi
23639
23640
23641  test -n "$CODESIGN" && break
23642done
23643
23644  else
23645    # The variable is set, but is it from the command line or the environment?
23646
23647    # Try to remove the string !CODESIGN! from our list.
23648    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23649    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23650      # If it failed, the variable was not from the command line. Ignore it,
23651      # but warn the user (except for BASH, which is always set by the calling BASH).
23652      if test "xCODESIGN" != xBASH; then
23653        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23654$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23655      fi
23656      # Try to locate tool using the code snippet
23657      for ac_prog in codesign
23658do
23659  # Extract the first word of "$ac_prog", so it can be a program name with args.
23660set dummy $ac_prog; ac_word=$2
23661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23662$as_echo_n "checking for $ac_word... " >&6; }
23663if ${ac_cv_path_CODESIGN+:} false; then :
23664  $as_echo_n "(cached) " >&6
23665else
23666  case $CODESIGN in
23667  [\\/]* | ?:[\\/]*)
23668  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23669  ;;
23670  *)
23671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23672for as_dir in $PATH
23673do
23674  IFS=$as_save_IFS
23675  test -z "$as_dir" && as_dir=.
23676    for ac_exec_ext in '' $ac_executable_extensions; do
23677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23678    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23680    break 2
23681  fi
23682done
23683  done
23684IFS=$as_save_IFS
23685
23686  ;;
23687esac
23688fi
23689CODESIGN=$ac_cv_path_CODESIGN
23690if test -n "$CODESIGN"; then
23691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23692$as_echo "$CODESIGN" >&6; }
23693else
23694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23695$as_echo "no" >&6; }
23696fi
23697
23698
23699  test -n "$CODESIGN" && break
23700done
23701
23702    else
23703      # If it succeeded, then it was overridden by the user. We will use it
23704      # for the tool.
23705
23706      # First remove it from the list of overridden variables, so we can test
23707      # for unknown variables in the end.
23708      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23709
23710      # Check if we try to supply an empty value
23711      if test "x$CODESIGN" = x; then
23712        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23713$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23714        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23715$as_echo_n "checking for CODESIGN... " >&6; }
23716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23717$as_echo "disabled" >&6; }
23718      else
23719        # Check if the provided tool contains a complete path.
23720        tool_specified="$CODESIGN"
23721        tool_basename="${tool_specified##*/}"
23722        if test "x$tool_basename" = "x$tool_specified"; then
23723          # A command without a complete path is provided, search $PATH.
23724          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23725$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23726          # Extract the first word of "$tool_basename", so it can be a program name with args.
23727set dummy $tool_basename; ac_word=$2
23728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23729$as_echo_n "checking for $ac_word... " >&6; }
23730if ${ac_cv_path_CODESIGN+:} false; then :
23731  $as_echo_n "(cached) " >&6
23732else
23733  case $CODESIGN in
23734  [\\/]* | ?:[\\/]*)
23735  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23736  ;;
23737  *)
23738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23739for as_dir in $PATH
23740do
23741  IFS=$as_save_IFS
23742  test -z "$as_dir" && as_dir=.
23743    for ac_exec_ext in '' $ac_executable_extensions; do
23744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23745    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23747    break 2
23748  fi
23749done
23750  done
23751IFS=$as_save_IFS
23752
23753  ;;
23754esac
23755fi
23756CODESIGN=$ac_cv_path_CODESIGN
23757if test -n "$CODESIGN"; then
23758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23759$as_echo "$CODESIGN" >&6; }
23760else
23761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23762$as_echo "no" >&6; }
23763fi
23764
23765
23766          if test "x$CODESIGN" = x; then
23767            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23768          fi
23769        else
23770          # Otherwise we believe it is a complete path. Use it as it is.
23771          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23772$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23773          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23774$as_echo_n "checking for CODESIGN... " >&6; }
23775          if test ! -x "$tool_specified"; then
23776            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23777$as_echo "not found" >&6; }
23778            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23779          fi
23780          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23781$as_echo "$tool_specified" >&6; }
23782        fi
23783      fi
23784    fi
23785
23786  fi
23787
23788
23789    if test "x$CODESIGN" != "x"; then
23790      # Verify that the openjdk_codesign certificate is present
23791      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23792$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23793      $RM codesign-testfile
23794      $TOUCH codesign-testfile
23795      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23796      $RM codesign-testfile
23797      if test "x$CODESIGN" = x; then
23798        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23799$as_echo "no" >&6; }
23800      else
23801        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23802$as_echo "yes" >&6; }
23803      fi
23804    fi
23805
23806
23807
23808  # Publish this variable in the help.
23809
23810
23811  if [ -z "${SETFILE+x}" ]; then
23812    # The variable is not set by user, try to locate tool using the code snippet
23813    for ac_prog in SetFile
23814do
23815  # Extract the first word of "$ac_prog", so it can be a program name with args.
23816set dummy $ac_prog; ac_word=$2
23817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23818$as_echo_n "checking for $ac_word... " >&6; }
23819if ${ac_cv_path_SETFILE+:} false; then :
23820  $as_echo_n "(cached) " >&6
23821else
23822  case $SETFILE in
23823  [\\/]* | ?:[\\/]*)
23824  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23825  ;;
23826  *)
23827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23828for as_dir in $PATH
23829do
23830  IFS=$as_save_IFS
23831  test -z "$as_dir" && as_dir=.
23832    for ac_exec_ext in '' $ac_executable_extensions; do
23833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23834    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23836    break 2
23837  fi
23838done
23839  done
23840IFS=$as_save_IFS
23841
23842  ;;
23843esac
23844fi
23845SETFILE=$ac_cv_path_SETFILE
23846if test -n "$SETFILE"; then
23847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23848$as_echo "$SETFILE" >&6; }
23849else
23850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23851$as_echo "no" >&6; }
23852fi
23853
23854
23855  test -n "$SETFILE" && break
23856done
23857
23858  else
23859    # The variable is set, but is it from the command line or the environment?
23860
23861    # Try to remove the string !SETFILE! from our list.
23862    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23863    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23864      # If it failed, the variable was not from the command line. Ignore it,
23865      # but warn the user (except for BASH, which is always set by the calling BASH).
23866      if test "xSETFILE" != xBASH; then
23867        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23868$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23869      fi
23870      # Try to locate tool using the code snippet
23871      for ac_prog in SetFile
23872do
23873  # Extract the first word of "$ac_prog", so it can be a program name with args.
23874set dummy $ac_prog; ac_word=$2
23875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23876$as_echo_n "checking for $ac_word... " >&6; }
23877if ${ac_cv_path_SETFILE+:} false; then :
23878  $as_echo_n "(cached) " >&6
23879else
23880  case $SETFILE in
23881  [\\/]* | ?:[\\/]*)
23882  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23883  ;;
23884  *)
23885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23886for as_dir in $PATH
23887do
23888  IFS=$as_save_IFS
23889  test -z "$as_dir" && as_dir=.
23890    for ac_exec_ext in '' $ac_executable_extensions; do
23891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23892    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23894    break 2
23895  fi
23896done
23897  done
23898IFS=$as_save_IFS
23899
23900  ;;
23901esac
23902fi
23903SETFILE=$ac_cv_path_SETFILE
23904if test -n "$SETFILE"; then
23905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23906$as_echo "$SETFILE" >&6; }
23907else
23908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23909$as_echo "no" >&6; }
23910fi
23911
23912
23913  test -n "$SETFILE" && break
23914done
23915
23916    else
23917      # If it succeeded, then it was overridden by the user. We will use it
23918      # for the tool.
23919
23920      # First remove it from the list of overridden variables, so we can test
23921      # for unknown variables in the end.
23922      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23923
23924      # Check if we try to supply an empty value
23925      if test "x$SETFILE" = x; then
23926        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23927$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23928        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23929$as_echo_n "checking for SETFILE... " >&6; }
23930        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23931$as_echo "disabled" >&6; }
23932      else
23933        # Check if the provided tool contains a complete path.
23934        tool_specified="$SETFILE"
23935        tool_basename="${tool_specified##*/}"
23936        if test "x$tool_basename" = "x$tool_specified"; then
23937          # A command without a complete path is provided, search $PATH.
23938          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23939$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23940          # Extract the first word of "$tool_basename", so it can be a program name with args.
23941set dummy $tool_basename; ac_word=$2
23942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23943$as_echo_n "checking for $ac_word... " >&6; }
23944if ${ac_cv_path_SETFILE+:} false; then :
23945  $as_echo_n "(cached) " >&6
23946else
23947  case $SETFILE in
23948  [\\/]* | ?:[\\/]*)
23949  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23950  ;;
23951  *)
23952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23953for as_dir in $PATH
23954do
23955  IFS=$as_save_IFS
23956  test -z "$as_dir" && as_dir=.
23957    for ac_exec_ext in '' $ac_executable_extensions; do
23958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23959    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23961    break 2
23962  fi
23963done
23964  done
23965IFS=$as_save_IFS
23966
23967  ;;
23968esac
23969fi
23970SETFILE=$ac_cv_path_SETFILE
23971if test -n "$SETFILE"; then
23972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23973$as_echo "$SETFILE" >&6; }
23974else
23975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23976$as_echo "no" >&6; }
23977fi
23978
23979
23980          if test "x$SETFILE" = x; then
23981            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23982          fi
23983        else
23984          # Otherwise we believe it is a complete path. Use it as it is.
23985          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23986$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23987          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23988$as_echo_n "checking for SETFILE... " >&6; }
23989          if test ! -x "$tool_specified"; then
23990            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23991$as_echo "not found" >&6; }
23992            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23993          fi
23994          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23995$as_echo "$tool_specified" >&6; }
23996        fi
23997      fi
23998    fi
23999
24000  fi
24001
24002
24003
24004  if test "x$SETFILE" = x; then
24005    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24006  fi
24007
24008
24009  fi
24010
24011
24012  # Test if bash supports pipefail.
24013  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24014$as_echo_n "checking if bash supports pipefail... " >&6; }
24015  if ${BASH} -c 'set -o pipefail'; then
24016    BASH_ARGS="$BASH_ARGS -o pipefail"
24017    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24018$as_echo "yes" >&6; }
24019  else
24020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24021$as_echo "no" >&6; }
24022  fi
24023
24024  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24025$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24026  if ${BASH} -e -c 'true'; then
24027    BASH_ARGS="$BASH_ARGS -e"
24028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24029$as_echo "yes" >&6; }
24030  else
24031    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24032$as_echo "no" >&6; }
24033  fi
24034
24035
24036
24037
24038# Check if pkg-config is available.
24039
24040
24041if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24042	if test -n "$ac_tool_prefix"; then
24043  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24044set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24046$as_echo_n "checking for $ac_word... " >&6; }
24047if ${ac_cv_path_PKG_CONFIG+:} false; then :
24048  $as_echo_n "(cached) " >&6
24049else
24050  case $PKG_CONFIG in
24051  [\\/]* | ?:[\\/]*)
24052  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24053  ;;
24054  *)
24055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24056for as_dir in $PATH
24057do
24058  IFS=$as_save_IFS
24059  test -z "$as_dir" && as_dir=.
24060    for ac_exec_ext in '' $ac_executable_extensions; do
24061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24062    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24064    break 2
24065  fi
24066done
24067  done
24068IFS=$as_save_IFS
24069
24070  ;;
24071esac
24072fi
24073PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24074if test -n "$PKG_CONFIG"; then
24075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24076$as_echo "$PKG_CONFIG" >&6; }
24077else
24078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24079$as_echo "no" >&6; }
24080fi
24081
24082
24083fi
24084if test -z "$ac_cv_path_PKG_CONFIG"; then
24085  ac_pt_PKG_CONFIG=$PKG_CONFIG
24086  # Extract the first word of "pkg-config", so it can be a program name with args.
24087set dummy pkg-config; ac_word=$2
24088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24089$as_echo_n "checking for $ac_word... " >&6; }
24090if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24091  $as_echo_n "(cached) " >&6
24092else
24093  case $ac_pt_PKG_CONFIG in
24094  [\\/]* | ?:[\\/]*)
24095  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24096  ;;
24097  *)
24098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24099for as_dir in $PATH
24100do
24101  IFS=$as_save_IFS
24102  test -z "$as_dir" && as_dir=.
24103    for ac_exec_ext in '' $ac_executable_extensions; do
24104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24105    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24107    break 2
24108  fi
24109done
24110  done
24111IFS=$as_save_IFS
24112
24113  ;;
24114esac
24115fi
24116ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24117if test -n "$ac_pt_PKG_CONFIG"; then
24118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24119$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24120else
24121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24122$as_echo "no" >&6; }
24123fi
24124
24125  if test "x$ac_pt_PKG_CONFIG" = x; then
24126    PKG_CONFIG=""
24127  else
24128    case $cross_compiling:$ac_tool_warned in
24129yes:)
24130{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24131$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24132ac_tool_warned=yes ;;
24133esac
24134    PKG_CONFIG=$ac_pt_PKG_CONFIG
24135  fi
24136else
24137  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24138fi
24139
24140fi
24141if test -n "$PKG_CONFIG"; then
24142	_pkg_min_version=0.9.0
24143	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24144$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24145	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24146		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24147$as_echo "yes" >&6; }
24148	else
24149		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24150$as_echo "no" >&6; }
24151		PKG_CONFIG=""
24152	fi
24153
24154fi
24155
24156# After basic tools have been setup, we can check build os specific details.
24157
24158  ###############################################################################
24159
24160  # Note that this is the build platform OS version!
24161
24162  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24163  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24164  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24165  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24166
24167
24168
24169
24170
24171# Misc basic settings
24172
24173
24174# Check whether --with-default-make-target was given.
24175if test "${with_default_make_target+set}" = set; then :
24176  withval=$with_default_make_target;
24177fi
24178
24179  if test "x$with_default_make_target" = "x" \
24180      || test "x$with_default_make_target" = "xyes"; then
24181    DEFAULT_MAKE_TARGET="exploded-image"
24182  elif test "x$with_default_make_target" = "xno"; then
24183    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24184  else
24185    DEFAULT_MAKE_TARGET="$with_default_make_target"
24186  fi
24187
24188
24189
24190
24191###############################################################################
24192#
24193# Determine OpenJDK variants, options and version numbers.
24194#
24195###############################################################################
24196
24197# We need build & target for this.
24198
24199  # Should we build a JDK without a graphical UI?
24200  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24201$as_echo_n "checking headless only... " >&6; }
24202  # Check whether --enable-headless-only was given.
24203if test "${enable_headless_only+set}" = set; then :
24204  enableval=$enable_headless_only;
24205fi
24206
24207
24208  if test "x$enable_headless_only" = "xyes"; then
24209    ENABLE_HEADLESS_ONLY="true"
24210    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24211$as_echo "yes" >&6; }
24212  elif test "x$enable_headless_only" = "xno"; then
24213    ENABLE_HEADLESS_ONLY="false"
24214    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24215$as_echo "no" >&6; }
24216  elif test "x$enable_headless_only" = "x"; then
24217    ENABLE_HEADLESS_ONLY="false"
24218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24219$as_echo "no" >&6; }
24220  else
24221    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24222  fi
24223
24224
24225
24226  # Choose cacerts source file
24227
24228# Check whether --with-cacerts-file was given.
24229if test "${with_cacerts_file+set}" = set; then :
24230  withval=$with_cacerts_file;
24231fi
24232
24233  if test "x$with_cacerts_file" != x; then
24234    CACERTS_FILE=$with_cacerts_file
24235  fi
24236
24237
24238  # Enable or disable unlimited crypto
24239  # Check whether --enable-unlimited-crypto was given.
24240if test "${enable_unlimited_crypto+set}" = set; then :
24241  enableval=$enable_unlimited_crypto;
24242else
24243  enable_unlimited_crypto=no
24244fi
24245
24246  if test "x$enable_unlimited_crypto" = "xyes"; then
24247    UNLIMITED_CRYPTO=true
24248  else
24249    UNLIMITED_CRYPTO=false
24250  fi
24251
24252
24253  # Should we build the serviceability agent (SA)?
24254  INCLUDE_SA=true
24255  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24256    INCLUDE_SA=false
24257  fi
24258  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24259    INCLUDE_SA=false
24260  fi
24261
24262
24263  # Compress jars
24264  COMPRESS_JARS=false
24265
24266
24267
24268  # Setup default copyright year. Mostly overridden when building close to a new year.
24269
24270# Check whether --with-copyright-year was given.
24271if test "${with_copyright_year+set}" = set; then :
24272  withval=$with_copyright_year;
24273fi
24274
24275  if test "x$with_copyright_year" = xyes; then
24276    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24277  elif test "x$with_copyright_year" != x; then
24278    COPYRIGHT_YEAR="$with_copyright_year"
24279  else
24280    COPYRIGHT_YEAR=`$DATE +'%Y'`
24281  fi
24282
24283
24284
24285  # Check whether --enable-keep-packaged-modules was given.
24286if test "${enable_keep_packaged_modules+set}" = set; then :
24287  enableval=$enable_keep_packaged_modules;
24288fi
24289
24290
24291  if test "x$enable_keep_packaged_modules" = "xyes"; then
24292    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24293$as_echo_n "checking if packaged modules are kept... " >&6; }
24294    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24295$as_echo "yes" >&6; }
24296    JLINK_KEEP_PACKAGED_MODULES=true
24297  elif test "x$enable_keep_packaged_modules" = "xno"; then
24298    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24299$as_echo_n "checking if packaged modules are kept... " >&6; }
24300    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24301$as_echo "no" >&6; }
24302    JLINK_KEEP_PACKAGED_MODULES=false
24303  elif test "x$enable_keep_packaged_modules" = "x"; then
24304    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24305$as_echo "yes (default)" >&6; }
24306    JLINK_KEEP_PACKAGED_MODULES=true
24307  else
24308    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24309  fi
24310
24311
24312
24313
24314  # Warn user that old version arguments are deprecated.
24315
24316
24317# Check whether --with-milestone was given.
24318if test "${with_milestone+set}" = set; then :
24319  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24320$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24321fi
24322
24323
24324
24325
24326# Check whether --with-update-version was given.
24327if test "${with_update_version+set}" = set; then :
24328  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24329$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24330fi
24331
24332
24333
24334
24335# Check whether --with-user-release-suffix was given.
24336if test "${with_user_release_suffix+set}" = set; then :
24337  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
24338$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24339fi
24340
24341
24342
24343
24344# Check whether --with-build-number was given.
24345if test "${with_build_number+set}" = set; then :
24346  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24347$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24348fi
24349
24350
24351
24352  # Source the version numbers file
24353  . $AUTOCONF_DIR/version-numbers
24354
24355  # Some non-version number information is set in that file
24356
24357
24358
24359
24360
24361
24362
24363
24364
24365  # Override version from arguments
24366
24367  # If --with-version-string is set, process it first. It is possible to
24368  # override parts with more specific flags, since these are processed later.
24369
24370# Check whether --with-version-string was given.
24371if test "${with_version_string+set}" = set; then :
24372  withval=$with_version_string;
24373fi
24374
24375  if test "x$with_version_string" = xyes; then
24376    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24377  elif test "x$with_version_string" != x; then
24378    # Additional [] needed to keep m4 from mangling shell constructs.
24379    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24380      VERSION_MAJOR=${BASH_REMATCH[1]}
24381      VERSION_MINOR=${BASH_REMATCH[3]}
24382      VERSION_SECURITY=${BASH_REMATCH[5]}
24383      VERSION_PATCH=${BASH_REMATCH[7]}
24384      VERSION_PRE=${BASH_REMATCH[9]}
24385      version_plus_separator=${BASH_REMATCH[11]}
24386      VERSION_BUILD=${BASH_REMATCH[12]}
24387      VERSION_OPT=${BASH_REMATCH[14]}
24388      # Unspecified numerical fields are interpreted as 0.
24389      if test "x$VERSION_MINOR" = x; then
24390        VERSION_MINOR=0
24391      fi
24392      if test "x$VERSION_SECURITY" = x; then
24393        VERSION_SECURITY=0
24394      fi
24395      if test "x$VERSION_PATCH" = x; then
24396        VERSION_PATCH=0
24397      fi
24398      if test "x$version_plus_separator" != x \
24399          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24400        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24401      fi
24402      # Stop the version part process from setting default values.
24403      # We still allow them to explicitely override though.
24404      NO_DEFAULT_VERSION_PARTS=true
24405    else
24406      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24407    fi
24408  fi
24409
24410
24411# Check whether --with-version-pre was given.
24412if test "${with_version_pre+set}" = set; then :
24413  withval=$with_version_pre; with_version_pre_present=true
24414else
24415  with_version_pre_present=false
24416fi
24417
24418
24419  if test "x$with_version_pre_present" = xtrue; then
24420    if test "x$with_version_pre" = xyes; then
24421      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24422    elif test "x$with_version_pre" = xno; then
24423      # Interpret --without-* as empty string instead of the literal "no"
24424      VERSION_PRE=
24425    else
24426      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24427       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24428      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24429        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24430$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24431      fi
24432    fi
24433  else
24434    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24435      # Default is to use "internal" as pre
24436      VERSION_PRE="internal"
24437    fi
24438  fi
24439
24440
24441# Check whether --with-version-opt was given.
24442if test "${with_version_opt+set}" = set; then :
24443  withval=$with_version_opt; with_version_opt_present=true
24444else
24445  with_version_opt_present=false
24446fi
24447
24448
24449  if test "x$with_version_opt_present" = xtrue; then
24450    if test "x$with_version_opt" = xyes; then
24451      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24452    elif test "x$with_version_opt" = xno; then
24453      # Interpret --without-* as empty string instead of the literal "no"
24454      VERSION_OPT=
24455    else
24456      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24457       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24458      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24459        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24460$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24461      fi
24462    fi
24463  else
24464    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24465      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
24466      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
24467      # Outer [ ] to quote m4.
24468       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24469      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24470    fi
24471  fi
24472
24473
24474# Check whether --with-version-build was given.
24475if test "${with_version_build+set}" = set; then :
24476  withval=$with_version_build; with_version_build_present=true
24477else
24478  with_version_build_present=false
24479fi
24480
24481
24482  if test "x$with_version_build_present" = xtrue; then
24483    if test "x$with_version_build" = xyes; then
24484      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24485    elif test "x$with_version_build" = xno; then
24486      # Interpret --without-* as empty string instead of the literal "no"
24487      VERSION_BUILD=
24488    elif test "x$with_version_build" = x; then
24489      VERSION_BUILD=
24490    else
24491
24492  # Additional [] needed to keep m4 from mangling shell constructs.
24493  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24494    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24495  fi
24496  # Extract the version number without leading zeros.
24497  cleaned_value=${BASH_REMATCH[1]}
24498  if test "x$cleaned_value" = x; then
24499    # Special case for zero
24500    cleaned_value=${BASH_REMATCH[2]}
24501  fi
24502
24503  if test $cleaned_value -gt 255; then
24504    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24505  fi
24506  if test "x$cleaned_value" != "x$with_version_build"; then
24507    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24508$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24509  fi
24510  VERSION_BUILD=$cleaned_value
24511
24512    fi
24513  else
24514    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24515      # Default is to not have a build number.
24516      VERSION_BUILD=""
24517      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24518      VERSION_BUILD=0
24519    fi
24520  fi
24521
24522
24523# Check whether --with-version-major was given.
24524if test "${with_version_major+set}" = set; then :
24525  withval=$with_version_major; with_version_major_present=true
24526else
24527  with_version_major_present=false
24528fi
24529
24530
24531  if test "x$with_version_major_present" = xtrue; then
24532    if test "x$with_version_major" = xyes; then
24533      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24534    else
24535
24536  # Additional [] needed to keep m4 from mangling shell constructs.
24537  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24538    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24539  fi
24540  # Extract the version number without leading zeros.
24541  cleaned_value=${BASH_REMATCH[1]}
24542  if test "x$cleaned_value" = x; then
24543    # Special case for zero
24544    cleaned_value=${BASH_REMATCH[2]}
24545  fi
24546
24547  if test $cleaned_value -gt 255; then
24548    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24549  fi
24550  if test "x$cleaned_value" != "x$with_version_major"; then
24551    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24552$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24553  fi
24554  VERSION_MAJOR=$cleaned_value
24555
24556    fi
24557  else
24558    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24559      # Default is to get value from version-numbers
24560      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24561    fi
24562  fi
24563
24564
24565# Check whether --with-version-minor was given.
24566if test "${with_version_minor+set}" = set; then :
24567  withval=$with_version_minor; with_version_minor_present=true
24568else
24569  with_version_minor_present=false
24570fi
24571
24572
24573  if test "x$with_version_minor_present" = xtrue; then
24574    if test "x$with_version_minor" = xyes; then
24575      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24576    elif test "x$with_version_minor" = xno; then
24577      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24578      VERSION_MINOR=0
24579    elif test "x$with_version_minor" = x; then
24580      VERSION_MINOR=0
24581    else
24582
24583  # Additional [] needed to keep m4 from mangling shell constructs.
24584  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24585    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24586  fi
24587  # Extract the version number without leading zeros.
24588  cleaned_value=${BASH_REMATCH[1]}
24589  if test "x$cleaned_value" = x; then
24590    # Special case for zero
24591    cleaned_value=${BASH_REMATCH[2]}
24592  fi
24593
24594  if test $cleaned_value -gt 255; then
24595    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24596  fi
24597  if test "x$cleaned_value" != "x$with_version_minor"; then
24598    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24599$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24600  fi
24601  VERSION_MINOR=$cleaned_value
24602
24603    fi
24604  else
24605    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24606      # Default is 0, if unspecified
24607      VERSION_MINOR=0
24608    fi
24609  fi
24610
24611
24612# Check whether --with-version-security was given.
24613if test "${with_version_security+set}" = set; then :
24614  withval=$with_version_security; with_version_security_present=true
24615else
24616  with_version_security_present=false
24617fi
24618
24619
24620  if test "x$with_version_security_present" = xtrue; then
24621    if test "x$with_version_security" = xyes; then
24622      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24623    elif test "x$with_version_security" = xno; then
24624      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24625      VERSION_SECURITY=0
24626    elif test "x$with_version_security" = x; then
24627      VERSION_SECURITY=0
24628    else
24629
24630  # Additional [] needed to keep m4 from mangling shell constructs.
24631  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24632    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24633  fi
24634  # Extract the version number without leading zeros.
24635  cleaned_value=${BASH_REMATCH[1]}
24636  if test "x$cleaned_value" = x; then
24637    # Special case for zero
24638    cleaned_value=${BASH_REMATCH[2]}
24639  fi
24640
24641  if test $cleaned_value -gt 255; then
24642    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24643  fi
24644  if test "x$cleaned_value" != "x$with_version_security"; then
24645    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24646$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24647  fi
24648  VERSION_SECURITY=$cleaned_value
24649
24650    fi
24651  else
24652    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24653      # Default is 0, if unspecified
24654      VERSION_SECURITY=0
24655    fi
24656  fi
24657
24658
24659# Check whether --with-version-patch was given.
24660if test "${with_version_patch+set}" = set; then :
24661  withval=$with_version_patch; with_version_patch_present=true
24662else
24663  with_version_patch_present=false
24664fi
24665
24666
24667  if test "x$with_version_patch_present" = xtrue; then
24668    if test "x$with_version_patch" = xyes; then
24669      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24670    elif test "x$with_version_patch" = xno; then
24671      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24672      VERSION_PATCH=0
24673    elif test "x$with_version_patch" = x; then
24674      VERSION_PATCH=0
24675    else
24676
24677  # Additional [] needed to keep m4 from mangling shell constructs.
24678  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24679    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24680  fi
24681  # Extract the version number without leading zeros.
24682  cleaned_value=${BASH_REMATCH[1]}
24683  if test "x$cleaned_value" = x; then
24684    # Special case for zero
24685    cleaned_value=${BASH_REMATCH[2]}
24686  fi
24687
24688  if test $cleaned_value -gt 255; then
24689    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24690  fi
24691  if test "x$cleaned_value" != "x$with_version_patch"; then
24692    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24693$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24694  fi
24695  VERSION_PATCH=$cleaned_value
24696
24697    fi
24698  else
24699    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24700      # Default is 0, if unspecified
24701      VERSION_PATCH=0
24702    fi
24703  fi
24704
24705  # Calculate derived version properties
24706
24707  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24708  if test "x$VERSION_PRE" = x; then
24709    VERSION_IS_GA=true
24710  else
24711    VERSION_IS_GA=false
24712  fi
24713
24714  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24715  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24716
24717  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24718  # Strip trailing zeroes from stripped_version_number
24719  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24720  VERSION_NUMBER=$stripped_version_number
24721
24722  # The complete version string, with additional build information
24723  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24724    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24725  else
24726    # If either build or opt is set, we need a + separator
24727    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24728  fi
24729
24730  # The short version string, just VERSION_NUMBER and PRE, if present.
24731  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24732
24733  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24734$as_echo_n "checking for version string... " >&6; }
24735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24736$as_echo "$VERSION_STRING" >&6; }
24737
24738
24739
24740
24741
24742
24743
24744
24745
24746
24747
24748
24749
24750
24751
24752###############################################################################
24753#
24754# Setup BootJDK, used to bootstrap the build.
24755#
24756###############################################################################
24757
24758
24759  BOOT_JDK_FOUND=no
24760
24761# Check whether --with-boot-jdk was given.
24762if test "${with_boot_jdk+set}" = set; then :
24763  withval=$with_boot_jdk;
24764fi
24765
24766
24767  # We look for the Boot JDK through various means, going from more certain to
24768  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24769  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24770  # must check if this is indeed valid; otherwise we'll continue looking.
24771
24772  # Test: Is bootjdk explicitely set by command line arguments?
24773
24774  if test "x$BOOT_JDK_FOUND" = xno; then
24775    # Now execute the test
24776
24777  if test "x$with_boot_jdk" != x; then
24778    BOOT_JDK=$with_boot_jdk
24779    BOOT_JDK_FOUND=maybe
24780    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24781$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24782  fi
24783
24784
24785    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24786    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24787      # Do we have a bin/java?
24788      if test ! -x "$BOOT_JDK/bin/java"; then
24789        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24790$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24791        BOOT_JDK_FOUND=no
24792      else
24793        # Do we have a bin/javac?
24794        if test ! -x "$BOOT_JDK/bin/javac"; then
24795          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24796$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24797          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24798$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24799          BOOT_JDK_FOUND=no
24800        else
24801          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24802          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24803
24804          # Extra M4 quote needed to protect [] in grep expression.
24805          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24806          if test "x$FOUND_CORRECT_VERSION" = x; then
24807            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24808$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24809            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24810$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24811            BOOT_JDK_FOUND=no
24812          else
24813            # We're done! :-)
24814            BOOT_JDK_FOUND=yes
24815
24816  # Only process if variable expands to non-empty
24817
24818  if test "x$BOOT_JDK" != x; then
24819    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24820
24821  # Input might be given as Windows format, start by converting to
24822  # unix format.
24823  path="$BOOT_JDK"
24824  new_path=`$CYGPATH -u "$path"`
24825
24826  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24827  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24828  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24829  # "foo.exe" is OK but "foo" is an error.
24830  #
24831  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24832  # It is also a way to make sure we got the proper file name for the real test later on.
24833  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24834  if test "x$test_shortpath" = x; then
24835    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24836$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24837    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24838  fi
24839
24840  # Call helper function which possibly converts this using DOS-style short mode.
24841  # If so, the updated path is stored in $new_path.
24842
24843  input_path="$new_path"
24844  # Check if we need to convert this using DOS-style short mode. If the path
24845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24846  # take no chances and rewrite it.
24847  # Note: m4 eats our [], so we need to use [ and ] instead.
24848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24849  if test "x$has_forbidden_chars" != x; then
24850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24851    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24852    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24853    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24854      # Going to short mode and back again did indeed matter. Since short mode is
24855      # case insensitive, let's make it lowercase to improve readability.
24856      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24857      # Now convert it back to Unix-style (cygpath)
24858      input_path=`$CYGPATH -u "$shortmode_path"`
24859      new_path="$input_path"
24860    fi
24861  fi
24862
24863  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24864  if test "x$test_cygdrive_prefix" = x; then
24865    # As a simple fix, exclude /usr/bin since it's not a real path.
24866    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24867      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24868      # a path prefixed by /cygdrive for fixpath to work.
24869      new_path="$CYGWIN_ROOT_PATH$input_path"
24870    fi
24871  fi
24872
24873
24874  if test "x$path" != "x$new_path"; then
24875    BOOT_JDK="$new_path"
24876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24877$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24878  fi
24879
24880    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24881
24882  path="$BOOT_JDK"
24883  has_colon=`$ECHO $path | $GREP ^.:`
24884  new_path="$path"
24885  if test "x$has_colon" = x; then
24886    # Not in mixed or Windows style, start by that.
24887    new_path=`cmd //c echo $path`
24888  fi
24889
24890
24891  input_path="$new_path"
24892  # Check if we need to convert this using DOS-style short mode. If the path
24893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24894  # take no chances and rewrite it.
24895  # Note: m4 eats our [], so we need to use [ and ] instead.
24896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24897  if test "x$has_forbidden_chars" != x; then
24898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24899    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24900  fi
24901
24902
24903  windows_path="$new_path"
24904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24905    unix_path=`$CYGPATH -u "$windows_path"`
24906    new_path="$unix_path"
24907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24909    new_path="$unix_path"
24910  fi
24911
24912  if test "x$path" != "x$new_path"; then
24913    BOOT_JDK="$new_path"
24914    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24915$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24916  fi
24917
24918  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24919  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24920
24921    else
24922      # We're on a unix platform. Hooray! :)
24923      path="$BOOT_JDK"
24924      has_space=`$ECHO "$path" | $GREP " "`
24925      if test "x$has_space" != x; then
24926        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24927$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24928        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24929      fi
24930
24931      # Use eval to expand a potential ~
24932      eval path="$path"
24933      if test ! -f "$path" && test ! -d "$path"; then
24934        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24935      fi
24936
24937      if test -d "$path"; then
24938        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24939      else
24940        dir="`$DIRNAME "$path"`"
24941        base="`$BASENAME "$path"`"
24942        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24943      fi
24944    fi
24945  fi
24946
24947            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24948$as_echo_n "checking for Boot JDK... " >&6; }
24949            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24950$as_echo "$BOOT_JDK" >&6; }
24951            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24952$as_echo_n "checking Boot JDK version... " >&6; }
24953            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24954            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24955$as_echo "$BOOT_JDK_VERSION" >&6; }
24956          fi # end check jdk version
24957        fi # end check javac
24958      fi # end check java
24959    fi # end check boot jdk found
24960  fi
24961
24962  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24963    # Having specified an argument which is incorrect will produce an instant failure;
24964    # we should not go on looking
24965    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24966  fi
24967
24968  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24969
24970  if test "x$BOOT_JDK_FOUND" = xno; then
24971    # Now execute the test
24972
24973  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24974    # First check at user selected default
24975
24976  if test "x$BOOT_JDK_FOUND" = xno; then
24977    # Now execute the test
24978
24979  if test -x /usr/libexec/java_home; then
24980    BOOT_JDK=`/usr/libexec/java_home `
24981    BOOT_JDK_FOUND=maybe
24982    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24983$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24984  fi
24985
24986
24987    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24988    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24989      # Do we have a bin/java?
24990      if test ! -x "$BOOT_JDK/bin/java"; then
24991        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24992$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24993        BOOT_JDK_FOUND=no
24994      else
24995        # Do we have a bin/javac?
24996        if test ! -x "$BOOT_JDK/bin/javac"; then
24997          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24998$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24999          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25000$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25001          BOOT_JDK_FOUND=no
25002        else
25003          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25004          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25005
25006          # Extra M4 quote needed to protect [] in grep expression.
25007          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25008          if test "x$FOUND_CORRECT_VERSION" = x; then
25009            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25010$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25011            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25012$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25013            BOOT_JDK_FOUND=no
25014          else
25015            # We're done! :-)
25016            BOOT_JDK_FOUND=yes
25017
25018  # Only process if variable expands to non-empty
25019
25020  if test "x$BOOT_JDK" != x; then
25021    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25022
25023  # Input might be given as Windows format, start by converting to
25024  # unix format.
25025  path="$BOOT_JDK"
25026  new_path=`$CYGPATH -u "$path"`
25027
25028  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25029  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25030  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25031  # "foo.exe" is OK but "foo" is an error.
25032  #
25033  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25034  # It is also a way to make sure we got the proper file name for the real test later on.
25035  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25036  if test "x$test_shortpath" = x; then
25037    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25038$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25039    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25040  fi
25041
25042  # Call helper function which possibly converts this using DOS-style short mode.
25043  # If so, the updated path is stored in $new_path.
25044
25045  input_path="$new_path"
25046  # Check if we need to convert this using DOS-style short mode. If the path
25047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25048  # take no chances and rewrite it.
25049  # Note: m4 eats our [], so we need to use [ and ] instead.
25050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25051  if test "x$has_forbidden_chars" != x; then
25052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25053    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25054    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25055    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25056      # Going to short mode and back again did indeed matter. Since short mode is
25057      # case insensitive, let's make it lowercase to improve readability.
25058      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25059      # Now convert it back to Unix-style (cygpath)
25060      input_path=`$CYGPATH -u "$shortmode_path"`
25061      new_path="$input_path"
25062    fi
25063  fi
25064
25065  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25066  if test "x$test_cygdrive_prefix" = x; then
25067    # As a simple fix, exclude /usr/bin since it's not a real path.
25068    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25069      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25070      # a path prefixed by /cygdrive for fixpath to work.
25071      new_path="$CYGWIN_ROOT_PATH$input_path"
25072    fi
25073  fi
25074
25075
25076  if test "x$path" != "x$new_path"; then
25077    BOOT_JDK="$new_path"
25078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25079$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25080  fi
25081
25082    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25083
25084  path="$BOOT_JDK"
25085  has_colon=`$ECHO $path | $GREP ^.:`
25086  new_path="$path"
25087  if test "x$has_colon" = x; then
25088    # Not in mixed or Windows style, start by that.
25089    new_path=`cmd //c echo $path`
25090  fi
25091
25092
25093  input_path="$new_path"
25094  # Check if we need to convert this using DOS-style short mode. If the path
25095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25096  # take no chances and rewrite it.
25097  # Note: m4 eats our [], so we need to use [ and ] instead.
25098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25099  if test "x$has_forbidden_chars" != x; then
25100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25101    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25102  fi
25103
25104
25105  windows_path="$new_path"
25106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25107    unix_path=`$CYGPATH -u "$windows_path"`
25108    new_path="$unix_path"
25109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25111    new_path="$unix_path"
25112  fi
25113
25114  if test "x$path" != "x$new_path"; then
25115    BOOT_JDK="$new_path"
25116    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25117$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25118  fi
25119
25120  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25121  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25122
25123    else
25124      # We're on a unix platform. Hooray! :)
25125      path="$BOOT_JDK"
25126      has_space=`$ECHO "$path" | $GREP " "`
25127      if test "x$has_space" != x; then
25128        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25129$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25130        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25131      fi
25132
25133      # Use eval to expand a potential ~
25134      eval path="$path"
25135      if test ! -f "$path" && test ! -d "$path"; then
25136        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25137      fi
25138
25139      if test -d "$path"; then
25140        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25141      else
25142        dir="`$DIRNAME "$path"`"
25143        base="`$BASENAME "$path"`"
25144        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25145      fi
25146    fi
25147  fi
25148
25149            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25150$as_echo_n "checking for Boot JDK... " >&6; }
25151            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25152$as_echo "$BOOT_JDK" >&6; }
25153            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25154$as_echo_n "checking Boot JDK version... " >&6; }
25155            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25156            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25157$as_echo "$BOOT_JDK_VERSION" >&6; }
25158          fi # end check jdk version
25159        fi # end check javac
25160      fi # end check java
25161    fi # end check boot jdk found
25162  fi
25163
25164    # If that did not work out (e.g. too old), try explicit versions instead
25165
25166  if test "x$BOOT_JDK_FOUND" = xno; then
25167    # Now execute the test
25168
25169  if test -x /usr/libexec/java_home; then
25170    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25171    BOOT_JDK_FOUND=maybe
25172    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25173$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25174  fi
25175
25176
25177    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25178    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25179      # Do we have a bin/java?
25180      if test ! -x "$BOOT_JDK/bin/java"; then
25181        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25183        BOOT_JDK_FOUND=no
25184      else
25185        # Do we have a bin/javac?
25186        if test ! -x "$BOOT_JDK/bin/javac"; then
25187          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25188$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25189          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25190$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25191          BOOT_JDK_FOUND=no
25192        else
25193          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25194          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25195
25196          # Extra M4 quote needed to protect [] in grep expression.
25197          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25198          if test "x$FOUND_CORRECT_VERSION" = x; then
25199            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25200$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25201            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25202$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25203            BOOT_JDK_FOUND=no
25204          else
25205            # We're done! :-)
25206            BOOT_JDK_FOUND=yes
25207
25208  # Only process if variable expands to non-empty
25209
25210  if test "x$BOOT_JDK" != x; then
25211    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25212
25213  # Input might be given as Windows format, start by converting to
25214  # unix format.
25215  path="$BOOT_JDK"
25216  new_path=`$CYGPATH -u "$path"`
25217
25218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25221  # "foo.exe" is OK but "foo" is an error.
25222  #
25223  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25224  # It is also a way to make sure we got the proper file name for the real test later on.
25225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25226  if test "x$test_shortpath" = x; then
25227    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25228$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25229    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25230  fi
25231
25232  # Call helper function which possibly converts this using DOS-style short mode.
25233  # If so, the updated path is stored in $new_path.
25234
25235  input_path="$new_path"
25236  # Check if we need to convert this using DOS-style short mode. If the path
25237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25238  # take no chances and rewrite it.
25239  # Note: m4 eats our [], so we need to use [ and ] instead.
25240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25241  if test "x$has_forbidden_chars" != x; then
25242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25243    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25244    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25245    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25246      # Going to short mode and back again did indeed matter. Since short mode is
25247      # case insensitive, let's make it lowercase to improve readability.
25248      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25249      # Now convert it back to Unix-style (cygpath)
25250      input_path=`$CYGPATH -u "$shortmode_path"`
25251      new_path="$input_path"
25252    fi
25253  fi
25254
25255  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25256  if test "x$test_cygdrive_prefix" = x; then
25257    # As a simple fix, exclude /usr/bin since it's not a real path.
25258    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25259      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25260      # a path prefixed by /cygdrive for fixpath to work.
25261      new_path="$CYGWIN_ROOT_PATH$input_path"
25262    fi
25263  fi
25264
25265
25266  if test "x$path" != "x$new_path"; then
25267    BOOT_JDK="$new_path"
25268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25269$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25270  fi
25271
25272    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25273
25274  path="$BOOT_JDK"
25275  has_colon=`$ECHO $path | $GREP ^.:`
25276  new_path="$path"
25277  if test "x$has_colon" = x; then
25278    # Not in mixed or Windows style, start by that.
25279    new_path=`cmd //c echo $path`
25280  fi
25281
25282
25283  input_path="$new_path"
25284  # Check if we need to convert this using DOS-style short mode. If the path
25285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25286  # take no chances and rewrite it.
25287  # Note: m4 eats our [], so we need to use [ and ] instead.
25288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25289  if test "x$has_forbidden_chars" != x; then
25290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25291    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25292  fi
25293
25294
25295  windows_path="$new_path"
25296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25297    unix_path=`$CYGPATH -u "$windows_path"`
25298    new_path="$unix_path"
25299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25301    new_path="$unix_path"
25302  fi
25303
25304  if test "x$path" != "x$new_path"; then
25305    BOOT_JDK="$new_path"
25306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25307$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25308  fi
25309
25310  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25311  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25312
25313    else
25314      # We're on a unix platform. Hooray! :)
25315      path="$BOOT_JDK"
25316      has_space=`$ECHO "$path" | $GREP " "`
25317      if test "x$has_space" != x; then
25318        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25319$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25320        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25321      fi
25322
25323      # Use eval to expand a potential ~
25324      eval path="$path"
25325      if test ! -f "$path" && test ! -d "$path"; then
25326        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25327      fi
25328
25329      if test -d "$path"; then
25330        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25331      else
25332        dir="`$DIRNAME "$path"`"
25333        base="`$BASENAME "$path"`"
25334        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25335      fi
25336    fi
25337  fi
25338
25339            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25340$as_echo_n "checking for Boot JDK... " >&6; }
25341            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25342$as_echo "$BOOT_JDK" >&6; }
25343            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25344$as_echo_n "checking Boot JDK version... " >&6; }
25345            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25346            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25347$as_echo "$BOOT_JDK_VERSION" >&6; }
25348          fi # end check jdk version
25349        fi # end check javac
25350      fi # end check java
25351    fi # end check boot jdk found
25352  fi
25353
25354
25355  if test "x$BOOT_JDK_FOUND" = xno; then
25356    # Now execute the test
25357
25358  if test -x /usr/libexec/java_home; then
25359    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25360    BOOT_JDK_FOUND=maybe
25361    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25362$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25363  fi
25364
25365
25366    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25367    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25368      # Do we have a bin/java?
25369      if test ! -x "$BOOT_JDK/bin/java"; then
25370        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25371$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25372        BOOT_JDK_FOUND=no
25373      else
25374        # Do we have a bin/javac?
25375        if test ! -x "$BOOT_JDK/bin/javac"; then
25376          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25378          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25379$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25380          BOOT_JDK_FOUND=no
25381        else
25382          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25383          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25384
25385          # Extra M4 quote needed to protect [] in grep expression.
25386          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25387          if test "x$FOUND_CORRECT_VERSION" = x; then
25388            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25389$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25390            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25391$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25392            BOOT_JDK_FOUND=no
25393          else
25394            # We're done! :-)
25395            BOOT_JDK_FOUND=yes
25396
25397  # Only process if variable expands to non-empty
25398
25399  if test "x$BOOT_JDK" != x; then
25400    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25401
25402  # Input might be given as Windows format, start by converting to
25403  # unix format.
25404  path="$BOOT_JDK"
25405  new_path=`$CYGPATH -u "$path"`
25406
25407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25410  # "foo.exe" is OK but "foo" is an error.
25411  #
25412  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25413  # It is also a way to make sure we got the proper file name for the real test later on.
25414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25415  if test "x$test_shortpath" = x; then
25416    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25417$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25418    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25419  fi
25420
25421  # Call helper function which possibly converts this using DOS-style short mode.
25422  # If so, the updated path is stored in $new_path.
25423
25424  input_path="$new_path"
25425  # Check if we need to convert this using DOS-style short mode. If the path
25426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25427  # take no chances and rewrite it.
25428  # Note: m4 eats our [], so we need to use [ and ] instead.
25429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25430  if test "x$has_forbidden_chars" != x; then
25431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25435      # Going to short mode and back again did indeed matter. Since short mode is
25436      # case insensitive, let's make it lowercase to improve readability.
25437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25438      # Now convert it back to Unix-style (cygpath)
25439      input_path=`$CYGPATH -u "$shortmode_path"`
25440      new_path="$input_path"
25441    fi
25442  fi
25443
25444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25445  if test "x$test_cygdrive_prefix" = x; then
25446    # As a simple fix, exclude /usr/bin since it's not a real path.
25447    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25449      # a path prefixed by /cygdrive for fixpath to work.
25450      new_path="$CYGWIN_ROOT_PATH$input_path"
25451    fi
25452  fi
25453
25454
25455  if test "x$path" != "x$new_path"; then
25456    BOOT_JDK="$new_path"
25457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25458$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25459  fi
25460
25461    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25462
25463  path="$BOOT_JDK"
25464  has_colon=`$ECHO $path | $GREP ^.:`
25465  new_path="$path"
25466  if test "x$has_colon" = x; then
25467    # Not in mixed or Windows style, start by that.
25468    new_path=`cmd //c echo $path`
25469  fi
25470
25471
25472  input_path="$new_path"
25473  # Check if we need to convert this using DOS-style short mode. If the path
25474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25475  # take no chances and rewrite it.
25476  # Note: m4 eats our [], so we need to use [ and ] instead.
25477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25478  if test "x$has_forbidden_chars" != x; then
25479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25481  fi
25482
25483
25484  windows_path="$new_path"
25485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25486    unix_path=`$CYGPATH -u "$windows_path"`
25487    new_path="$unix_path"
25488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25490    new_path="$unix_path"
25491  fi
25492
25493  if test "x$path" != "x$new_path"; then
25494    BOOT_JDK="$new_path"
25495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25496$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25497  fi
25498
25499  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25500  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25501
25502    else
25503      # We're on a unix platform. Hooray! :)
25504      path="$BOOT_JDK"
25505      has_space=`$ECHO "$path" | $GREP " "`
25506      if test "x$has_space" != x; then
25507        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25508$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25509        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25510      fi
25511
25512      # Use eval to expand a potential ~
25513      eval path="$path"
25514      if test ! -f "$path" && test ! -d "$path"; then
25515        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25516      fi
25517
25518      if test -d "$path"; then
25519        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25520      else
25521        dir="`$DIRNAME "$path"`"
25522        base="`$BASENAME "$path"`"
25523        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25524      fi
25525    fi
25526  fi
25527
25528            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25529$as_echo_n "checking for Boot JDK... " >&6; }
25530            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25531$as_echo "$BOOT_JDK" >&6; }
25532            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25533$as_echo_n "checking Boot JDK version... " >&6; }
25534            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25535            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25536$as_echo "$BOOT_JDK_VERSION" >&6; }
25537          fi # end check jdk version
25538        fi # end check javac
25539      fi # end check java
25540    fi # end check boot jdk found
25541  fi
25542
25543
25544  if test "x$BOOT_JDK_FOUND" = xno; then
25545    # Now execute the test
25546
25547  if test -x /usr/libexec/java_home; then
25548    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25549    BOOT_JDK_FOUND=maybe
25550    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25551$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25552  fi
25553
25554
25555    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25556    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25557      # Do we have a bin/java?
25558      if test ! -x "$BOOT_JDK/bin/java"; then
25559        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25560$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25561        BOOT_JDK_FOUND=no
25562      else
25563        # Do we have a bin/javac?
25564        if test ! -x "$BOOT_JDK/bin/javac"; then
25565          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25567          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25568$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25569          BOOT_JDK_FOUND=no
25570        else
25571          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25572          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25573
25574          # Extra M4 quote needed to protect [] in grep expression.
25575          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25576          if test "x$FOUND_CORRECT_VERSION" = x; then
25577            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25578$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25579            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25580$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25581            BOOT_JDK_FOUND=no
25582          else
25583            # We're done! :-)
25584            BOOT_JDK_FOUND=yes
25585
25586  # Only process if variable expands to non-empty
25587
25588  if test "x$BOOT_JDK" != x; then
25589    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25590
25591  # Input might be given as Windows format, start by converting to
25592  # unix format.
25593  path="$BOOT_JDK"
25594  new_path=`$CYGPATH -u "$path"`
25595
25596  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25597  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25598  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25599  # "foo.exe" is OK but "foo" is an error.
25600  #
25601  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25602  # It is also a way to make sure we got the proper file name for the real test later on.
25603  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25604  if test "x$test_shortpath" = x; then
25605    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25606$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25607    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25608  fi
25609
25610  # Call helper function which possibly converts this using DOS-style short mode.
25611  # If so, the updated path is stored in $new_path.
25612
25613  input_path="$new_path"
25614  # Check if we need to convert this using DOS-style short mode. If the path
25615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25616  # take no chances and rewrite it.
25617  # Note: m4 eats our [], so we need to use [ and ] instead.
25618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25619  if test "x$has_forbidden_chars" != x; then
25620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25624      # Going to short mode and back again did indeed matter. Since short mode is
25625      # case insensitive, let's make it lowercase to improve readability.
25626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25627      # Now convert it back to Unix-style (cygpath)
25628      input_path=`$CYGPATH -u "$shortmode_path"`
25629      new_path="$input_path"
25630    fi
25631  fi
25632
25633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25634  if test "x$test_cygdrive_prefix" = x; then
25635    # As a simple fix, exclude /usr/bin since it's not a real path.
25636    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25638      # a path prefixed by /cygdrive for fixpath to work.
25639      new_path="$CYGWIN_ROOT_PATH$input_path"
25640    fi
25641  fi
25642
25643
25644  if test "x$path" != "x$new_path"; then
25645    BOOT_JDK="$new_path"
25646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25647$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25648  fi
25649
25650    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25651
25652  path="$BOOT_JDK"
25653  has_colon=`$ECHO $path | $GREP ^.:`
25654  new_path="$path"
25655  if test "x$has_colon" = x; then
25656    # Not in mixed or Windows style, start by that.
25657    new_path=`cmd //c echo $path`
25658  fi
25659
25660
25661  input_path="$new_path"
25662  # Check if we need to convert this using DOS-style short mode. If the path
25663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25664  # take no chances and rewrite it.
25665  # Note: m4 eats our [], so we need to use [ and ] instead.
25666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25667  if test "x$has_forbidden_chars" != x; then
25668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25669    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25670  fi
25671
25672
25673  windows_path="$new_path"
25674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25675    unix_path=`$CYGPATH -u "$windows_path"`
25676    new_path="$unix_path"
25677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25679    new_path="$unix_path"
25680  fi
25681
25682  if test "x$path" != "x$new_path"; then
25683    BOOT_JDK="$new_path"
25684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25685$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25686  fi
25687
25688  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25689  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25690
25691    else
25692      # We're on a unix platform. Hooray! :)
25693      path="$BOOT_JDK"
25694      has_space=`$ECHO "$path" | $GREP " "`
25695      if test "x$has_space" != x; then
25696        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25697$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25698        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25699      fi
25700
25701      # Use eval to expand a potential ~
25702      eval path="$path"
25703      if test ! -f "$path" && test ! -d "$path"; then
25704        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25705      fi
25706
25707      if test -d "$path"; then
25708        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25709      else
25710        dir="`$DIRNAME "$path"`"
25711        base="`$BASENAME "$path"`"
25712        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25713      fi
25714    fi
25715  fi
25716
25717            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25718$as_echo_n "checking for Boot JDK... " >&6; }
25719            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25720$as_echo "$BOOT_JDK" >&6; }
25721            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25722$as_echo_n "checking Boot JDK version... " >&6; }
25723            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25725$as_echo "$BOOT_JDK_VERSION" >&6; }
25726          fi # end check jdk version
25727        fi # end check javac
25728      fi # end check java
25729    fi # end check boot jdk found
25730  fi
25731
25732  fi
25733
25734
25735    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25736    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25737      # Do we have a bin/java?
25738      if test ! -x "$BOOT_JDK/bin/java"; then
25739        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25740$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25741        BOOT_JDK_FOUND=no
25742      else
25743        # Do we have a bin/javac?
25744        if test ! -x "$BOOT_JDK/bin/javac"; then
25745          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25746$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25747          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25748$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25749          BOOT_JDK_FOUND=no
25750        else
25751          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25752          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25753
25754          # Extra M4 quote needed to protect [] in grep expression.
25755          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25756          if test "x$FOUND_CORRECT_VERSION" = x; then
25757            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25758$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25759            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25760$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25761            BOOT_JDK_FOUND=no
25762          else
25763            # We're done! :-)
25764            BOOT_JDK_FOUND=yes
25765
25766  # Only process if variable expands to non-empty
25767
25768  if test "x$BOOT_JDK" != x; then
25769    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25770
25771  # Input might be given as Windows format, start by converting to
25772  # unix format.
25773  path="$BOOT_JDK"
25774  new_path=`$CYGPATH -u "$path"`
25775
25776  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25777  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25778  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25779  # "foo.exe" is OK but "foo" is an error.
25780  #
25781  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25782  # It is also a way to make sure we got the proper file name for the real test later on.
25783  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25784  if test "x$test_shortpath" = x; then
25785    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25786$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25787    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25788  fi
25789
25790  # Call helper function which possibly converts this using DOS-style short mode.
25791  # If so, the updated path is stored in $new_path.
25792
25793  input_path="$new_path"
25794  # Check if we need to convert this using DOS-style short mode. If the path
25795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25796  # take no chances and rewrite it.
25797  # Note: m4 eats our [], so we need to use [ and ] instead.
25798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25799  if test "x$has_forbidden_chars" != x; then
25800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25801    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25802    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25803    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25804      # Going to short mode and back again did indeed matter. Since short mode is
25805      # case insensitive, let's make it lowercase to improve readability.
25806      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25807      # Now convert it back to Unix-style (cygpath)
25808      input_path=`$CYGPATH -u "$shortmode_path"`
25809      new_path="$input_path"
25810    fi
25811  fi
25812
25813  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25814  if test "x$test_cygdrive_prefix" = x; then
25815    # As a simple fix, exclude /usr/bin since it's not a real path.
25816    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25817      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25818      # a path prefixed by /cygdrive for fixpath to work.
25819      new_path="$CYGWIN_ROOT_PATH$input_path"
25820    fi
25821  fi
25822
25823
25824  if test "x$path" != "x$new_path"; then
25825    BOOT_JDK="$new_path"
25826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25827$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25828  fi
25829
25830    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25831
25832  path="$BOOT_JDK"
25833  has_colon=`$ECHO $path | $GREP ^.:`
25834  new_path="$path"
25835  if test "x$has_colon" = x; then
25836    # Not in mixed or Windows style, start by that.
25837    new_path=`cmd //c echo $path`
25838  fi
25839
25840
25841  input_path="$new_path"
25842  # Check if we need to convert this using DOS-style short mode. If the path
25843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25844  # take no chances and rewrite it.
25845  # Note: m4 eats our [], so we need to use [ and ] instead.
25846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25847  if test "x$has_forbidden_chars" != x; then
25848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25849    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25850  fi
25851
25852
25853  windows_path="$new_path"
25854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25855    unix_path=`$CYGPATH -u "$windows_path"`
25856    new_path="$unix_path"
25857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25859    new_path="$unix_path"
25860  fi
25861
25862  if test "x$path" != "x$new_path"; then
25863    BOOT_JDK="$new_path"
25864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25865$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25866  fi
25867
25868  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25869  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25870
25871    else
25872      # We're on a unix platform. Hooray! :)
25873      path="$BOOT_JDK"
25874      has_space=`$ECHO "$path" | $GREP " "`
25875      if test "x$has_space" != x; then
25876        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25877$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25878        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25879      fi
25880
25881      # Use eval to expand a potential ~
25882      eval path="$path"
25883      if test ! -f "$path" && test ! -d "$path"; then
25884        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25885      fi
25886
25887      if test -d "$path"; then
25888        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25889      else
25890        dir="`$DIRNAME "$path"`"
25891        base="`$BASENAME "$path"`"
25892        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25893      fi
25894    fi
25895  fi
25896
25897            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25898$as_echo_n "checking for Boot JDK... " >&6; }
25899            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25900$as_echo "$BOOT_JDK" >&6; }
25901            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25902$as_echo_n "checking Boot JDK version... " >&6; }
25903            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25904            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25905$as_echo "$BOOT_JDK_VERSION" >&6; }
25906          fi # end check jdk version
25907        fi # end check javac
25908      fi # end check java
25909    fi # end check boot jdk found
25910  fi
25911
25912
25913  # Test: Is $JAVA_HOME set?
25914
25915  if test "x$BOOT_JDK_FOUND" = xno; then
25916    # Now execute the test
25917
25918  if test "x$JAVA_HOME" != x; then
25919    JAVA_HOME_PROCESSED="$JAVA_HOME"
25920
25921  # Only process if variable expands to non-empty
25922
25923  if test "x$JAVA_HOME_PROCESSED" != x; then
25924    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25925
25926  # Input might be given as Windows format, start by converting to
25927  # unix format.
25928  path="$JAVA_HOME_PROCESSED"
25929  new_path=`$CYGPATH -u "$path"`
25930
25931  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25932  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25933  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25934  # "foo.exe" is OK but "foo" is an error.
25935  #
25936  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25937  # It is also a way to make sure we got the proper file name for the real test later on.
25938  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25939  if test "x$test_shortpath" = x; then
25940    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25941$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25942    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25943  fi
25944
25945  # Call helper function which possibly converts this using DOS-style short mode.
25946  # If so, the updated path is stored in $new_path.
25947
25948  input_path="$new_path"
25949  # Check if we need to convert this using DOS-style short mode. If the path
25950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25951  # take no chances and rewrite it.
25952  # Note: m4 eats our [], so we need to use [ and ] instead.
25953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25954  if test "x$has_forbidden_chars" != x; then
25955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25956    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25957    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25958    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25959      # Going to short mode and back again did indeed matter. Since short mode is
25960      # case insensitive, let's make it lowercase to improve readability.
25961      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25962      # Now convert it back to Unix-style (cygpath)
25963      input_path=`$CYGPATH -u "$shortmode_path"`
25964      new_path="$input_path"
25965    fi
25966  fi
25967
25968  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25969  if test "x$test_cygdrive_prefix" = x; then
25970    # As a simple fix, exclude /usr/bin since it's not a real path.
25971    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25972      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25973      # a path prefixed by /cygdrive for fixpath to work.
25974      new_path="$CYGWIN_ROOT_PATH$input_path"
25975    fi
25976  fi
25977
25978
25979  if test "x$path" != "x$new_path"; then
25980    JAVA_HOME_PROCESSED="$new_path"
25981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25982$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25983  fi
25984
25985    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25986
25987  path="$JAVA_HOME_PROCESSED"
25988  has_colon=`$ECHO $path | $GREP ^.:`
25989  new_path="$path"
25990  if test "x$has_colon" = x; then
25991    # Not in mixed or Windows style, start by that.
25992    new_path=`cmd //c echo $path`
25993  fi
25994
25995
25996  input_path="$new_path"
25997  # Check if we need to convert this using DOS-style short mode. If the path
25998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25999  # take no chances and rewrite it.
26000  # Note: m4 eats our [], so we need to use [ and ] instead.
26001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26002  if test "x$has_forbidden_chars" != x; then
26003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26004    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26005  fi
26006
26007
26008  windows_path="$new_path"
26009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26010    unix_path=`$CYGPATH -u "$windows_path"`
26011    new_path="$unix_path"
26012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26014    new_path="$unix_path"
26015  fi
26016
26017  if test "x$path" != "x$new_path"; then
26018    JAVA_HOME_PROCESSED="$new_path"
26019    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26020$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26021  fi
26022
26023  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26024  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26025
26026    else
26027      # We're on a unix platform. Hooray! :)
26028      path="$JAVA_HOME_PROCESSED"
26029      has_space=`$ECHO "$path" | $GREP " "`
26030      if test "x$has_space" != x; then
26031        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26032$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26033        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26034      fi
26035
26036      # Use eval to expand a potential ~
26037      eval path="$path"
26038      if test ! -f "$path" && test ! -d "$path"; then
26039        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26040      fi
26041
26042      if test -d "$path"; then
26043        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26044      else
26045        dir="`$DIRNAME "$path"`"
26046        base="`$BASENAME "$path"`"
26047        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26048      fi
26049    fi
26050  fi
26051
26052    if test ! -d "$JAVA_HOME_PROCESSED"; then
26053      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26054$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26055    else
26056      # Aha, the user has set a JAVA_HOME
26057      # let us use that as the Boot JDK.
26058      BOOT_JDK="$JAVA_HOME_PROCESSED"
26059      BOOT_JDK_FOUND=maybe
26060      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26061$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26062    fi
26063  fi
26064
26065
26066    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26067    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26068      # Do we have a bin/java?
26069      if test ! -x "$BOOT_JDK/bin/java"; then
26070        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26071$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26072        BOOT_JDK_FOUND=no
26073      else
26074        # Do we have a bin/javac?
26075        if test ! -x "$BOOT_JDK/bin/javac"; then
26076          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26077$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26078          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26079$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26080          BOOT_JDK_FOUND=no
26081        else
26082          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26083          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26084
26085          # Extra M4 quote needed to protect [] in grep expression.
26086          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26087          if test "x$FOUND_CORRECT_VERSION" = x; then
26088            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26089$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26090            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26091$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26092            BOOT_JDK_FOUND=no
26093          else
26094            # We're done! :-)
26095            BOOT_JDK_FOUND=yes
26096
26097  # Only process if variable expands to non-empty
26098
26099  if test "x$BOOT_JDK" != x; then
26100    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26101
26102  # Input might be given as Windows format, start by converting to
26103  # unix format.
26104  path="$BOOT_JDK"
26105  new_path=`$CYGPATH -u "$path"`
26106
26107  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26108  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26109  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26110  # "foo.exe" is OK but "foo" is an error.
26111  #
26112  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26113  # It is also a way to make sure we got the proper file name for the real test later on.
26114  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26115  if test "x$test_shortpath" = x; then
26116    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26117$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26118    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26119  fi
26120
26121  # Call helper function which possibly converts this using DOS-style short mode.
26122  # If so, the updated path is stored in $new_path.
26123
26124  input_path="$new_path"
26125  # Check if we need to convert this using DOS-style short mode. If the path
26126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26127  # take no chances and rewrite it.
26128  # Note: m4 eats our [], so we need to use [ and ] instead.
26129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26130  if test "x$has_forbidden_chars" != x; then
26131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26132    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26133    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26134    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26135      # Going to short mode and back again did indeed matter. Since short mode is
26136      # case insensitive, let's make it lowercase to improve readability.
26137      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26138      # Now convert it back to Unix-style (cygpath)
26139      input_path=`$CYGPATH -u "$shortmode_path"`
26140      new_path="$input_path"
26141    fi
26142  fi
26143
26144  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26145  if test "x$test_cygdrive_prefix" = x; then
26146    # As a simple fix, exclude /usr/bin since it's not a real path.
26147    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26148      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26149      # a path prefixed by /cygdrive for fixpath to work.
26150      new_path="$CYGWIN_ROOT_PATH$input_path"
26151    fi
26152  fi
26153
26154
26155  if test "x$path" != "x$new_path"; then
26156    BOOT_JDK="$new_path"
26157    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26158$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26159  fi
26160
26161    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26162
26163  path="$BOOT_JDK"
26164  has_colon=`$ECHO $path | $GREP ^.:`
26165  new_path="$path"
26166  if test "x$has_colon" = x; then
26167    # Not in mixed or Windows style, start by that.
26168    new_path=`cmd //c echo $path`
26169  fi
26170
26171
26172  input_path="$new_path"
26173  # Check if we need to convert this using DOS-style short mode. If the path
26174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26175  # take no chances and rewrite it.
26176  # Note: m4 eats our [], so we need to use [ and ] instead.
26177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26178  if test "x$has_forbidden_chars" != x; then
26179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26180    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26181  fi
26182
26183
26184  windows_path="$new_path"
26185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26186    unix_path=`$CYGPATH -u "$windows_path"`
26187    new_path="$unix_path"
26188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26190    new_path="$unix_path"
26191  fi
26192
26193  if test "x$path" != "x$new_path"; then
26194    BOOT_JDK="$new_path"
26195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26196$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26197  fi
26198
26199  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26200  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26201
26202    else
26203      # We're on a unix platform. Hooray! :)
26204      path="$BOOT_JDK"
26205      has_space=`$ECHO "$path" | $GREP " "`
26206      if test "x$has_space" != x; then
26207        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26208$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26209        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26210      fi
26211
26212      # Use eval to expand a potential ~
26213      eval path="$path"
26214      if test ! -f "$path" && test ! -d "$path"; then
26215        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26216      fi
26217
26218      if test -d "$path"; then
26219        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26220      else
26221        dir="`$DIRNAME "$path"`"
26222        base="`$BASENAME "$path"`"
26223        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26224      fi
26225    fi
26226  fi
26227
26228            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26229$as_echo_n "checking for Boot JDK... " >&6; }
26230            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26231$as_echo "$BOOT_JDK" >&6; }
26232            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26233$as_echo_n "checking Boot JDK version... " >&6; }
26234            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26235            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26236$as_echo "$BOOT_JDK_VERSION" >&6; }
26237          fi # end check jdk version
26238        fi # end check javac
26239      fi # end check java
26240    fi # end check boot jdk found
26241  fi
26242
26243
26244  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26245
26246  if test "x$BOOT_JDK_FOUND" = xno; then
26247    # Now execute the test
26248
26249  # Extract the first word of "javac", so it can be a program name with args.
26250set dummy javac; ac_word=$2
26251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26252$as_echo_n "checking for $ac_word... " >&6; }
26253if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26254  $as_echo_n "(cached) " >&6
26255else
26256  case $JAVAC_CHECK in
26257  [\\/]* | ?:[\\/]*)
26258  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26259  ;;
26260  *)
26261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26262for as_dir in $PATH
26263do
26264  IFS=$as_save_IFS
26265  test -z "$as_dir" && as_dir=.
26266    for ac_exec_ext in '' $ac_executable_extensions; do
26267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26268    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26270    break 2
26271  fi
26272done
26273  done
26274IFS=$as_save_IFS
26275
26276  ;;
26277esac
26278fi
26279JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26280if test -n "$JAVAC_CHECK"; then
26281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26282$as_echo "$JAVAC_CHECK" >&6; }
26283else
26284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26285$as_echo "no" >&6; }
26286fi
26287
26288
26289  # Extract the first word of "java", so it can be a program name with args.
26290set dummy java; ac_word=$2
26291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26292$as_echo_n "checking for $ac_word... " >&6; }
26293if ${ac_cv_path_JAVA_CHECK+:} false; then :
26294  $as_echo_n "(cached) " >&6
26295else
26296  case $JAVA_CHECK in
26297  [\\/]* | ?:[\\/]*)
26298  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26299  ;;
26300  *)
26301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26302for as_dir in $PATH
26303do
26304  IFS=$as_save_IFS
26305  test -z "$as_dir" && as_dir=.
26306    for ac_exec_ext in '' $ac_executable_extensions; do
26307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26308    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26310    break 2
26311  fi
26312done
26313  done
26314IFS=$as_save_IFS
26315
26316  ;;
26317esac
26318fi
26319JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26320if test -n "$JAVA_CHECK"; then
26321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26322$as_echo "$JAVA_CHECK" >&6; }
26323else
26324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26325$as_echo "no" >&6; }
26326fi
26327
26328
26329  BINARY="$JAVAC_CHECK"
26330  if test "x$JAVAC_CHECK" = x; then
26331    BINARY="$JAVA_CHECK"
26332  fi
26333  if test "x$BINARY" != x; then
26334    # So there is a java(c) binary, it might be part of a JDK.
26335    # Lets find the JDK/JRE directory by following symbolic links.
26336    # Linux/GNU systems often have links from /usr/bin/java to
26337    # /etc/alternatives/java to the real JDK binary.
26338
26339  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26340    # Follow a chain of symbolic links. Use readlink
26341    # where it exists, else fall back to horribly
26342    # complicated shell code.
26343    if test "x$READLINK_TESTED" != yes; then
26344      # On MacOSX there is a readlink tool with a different
26345      # purpose than the GNU readlink tool. Check the found readlink.
26346      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26347      if test "x$ISGNU" = x; then
26348        # A readlink that we do not know how to use.
26349        # Are there other non-GNU readlinks out there?
26350        READLINK_TESTED=yes
26351        READLINK=
26352      fi
26353    fi
26354
26355    if test "x$READLINK" != x; then
26356      BINARY=`$READLINK -f $BINARY`
26357    else
26358      # Save the current directory for restoring afterwards
26359      STARTDIR=$PWD
26360      COUNTER=0
26361      sym_link_dir=`$DIRNAME $BINARY`
26362      sym_link_file=`$BASENAME $BINARY`
26363      cd $sym_link_dir
26364      # Use -P flag to resolve symlinks in directories.
26365      cd `$THEPWDCMD -P`
26366      sym_link_dir=`$THEPWDCMD -P`
26367      # Resolve file symlinks
26368      while test $COUNTER -lt 20; do
26369        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26370        if test "x$ISLINK" == x; then
26371          # This is not a symbolic link! We are done!
26372          break
26373        fi
26374        # Again resolve directory symlinks since the target of the just found
26375        # link could be in a different directory
26376        cd `$DIRNAME $ISLINK`
26377        sym_link_dir=`$THEPWDCMD -P`
26378        sym_link_file=`$BASENAME $ISLINK`
26379        let COUNTER=COUNTER+1
26380      done
26381      cd $STARTDIR
26382      BINARY=$sym_link_dir/$sym_link_file
26383    fi
26384  fi
26385
26386    BOOT_JDK=`dirname "$BINARY"`
26387    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26388    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26389      # Looks like we found ourselves an JDK
26390      BOOT_JDK_FOUND=maybe
26391      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26392$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26393    fi
26394  fi
26395
26396
26397    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26398    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26399      # Do we have a bin/java?
26400      if test ! -x "$BOOT_JDK/bin/java"; then
26401        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26402$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26403        BOOT_JDK_FOUND=no
26404      else
26405        # Do we have a bin/javac?
26406        if test ! -x "$BOOT_JDK/bin/javac"; then
26407          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26408$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26409          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26410$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26411          BOOT_JDK_FOUND=no
26412        else
26413          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26414          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26415
26416          # Extra M4 quote needed to protect [] in grep expression.
26417          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26418          if test "x$FOUND_CORRECT_VERSION" = x; then
26419            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26420$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26421            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26422$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26423            BOOT_JDK_FOUND=no
26424          else
26425            # We're done! :-)
26426            BOOT_JDK_FOUND=yes
26427
26428  # Only process if variable expands to non-empty
26429
26430  if test "x$BOOT_JDK" != x; then
26431    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26432
26433  # Input might be given as Windows format, start by converting to
26434  # unix format.
26435  path="$BOOT_JDK"
26436  new_path=`$CYGPATH -u "$path"`
26437
26438  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26439  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26440  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26441  # "foo.exe" is OK but "foo" is an error.
26442  #
26443  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26444  # It is also a way to make sure we got the proper file name for the real test later on.
26445  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26446  if test "x$test_shortpath" = x; then
26447    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26448$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26449    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26450  fi
26451
26452  # Call helper function which possibly converts this using DOS-style short mode.
26453  # If so, the updated path is stored in $new_path.
26454
26455  input_path="$new_path"
26456  # Check if we need to convert this using DOS-style short mode. If the path
26457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26458  # take no chances and rewrite it.
26459  # Note: m4 eats our [], so we need to use [ and ] instead.
26460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26461  if test "x$has_forbidden_chars" != x; then
26462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26466      # Going to short mode and back again did indeed matter. Since short mode is
26467      # case insensitive, let's make it lowercase to improve readability.
26468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26469      # Now convert it back to Unix-style (cygpath)
26470      input_path=`$CYGPATH -u "$shortmode_path"`
26471      new_path="$input_path"
26472    fi
26473  fi
26474
26475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26476  if test "x$test_cygdrive_prefix" = x; then
26477    # As a simple fix, exclude /usr/bin since it's not a real path.
26478    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26480      # a path prefixed by /cygdrive for fixpath to work.
26481      new_path="$CYGWIN_ROOT_PATH$input_path"
26482    fi
26483  fi
26484
26485
26486  if test "x$path" != "x$new_path"; then
26487    BOOT_JDK="$new_path"
26488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26489$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26490  fi
26491
26492    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26493
26494  path="$BOOT_JDK"
26495  has_colon=`$ECHO $path | $GREP ^.:`
26496  new_path="$path"
26497  if test "x$has_colon" = x; then
26498    # Not in mixed or Windows style, start by that.
26499    new_path=`cmd //c echo $path`
26500  fi
26501
26502
26503  input_path="$new_path"
26504  # Check if we need to convert this using DOS-style short mode. If the path
26505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26506  # take no chances and rewrite it.
26507  # Note: m4 eats our [], so we need to use [ and ] instead.
26508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26509  if test "x$has_forbidden_chars" != x; then
26510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26511    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26512  fi
26513
26514
26515  windows_path="$new_path"
26516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26517    unix_path=`$CYGPATH -u "$windows_path"`
26518    new_path="$unix_path"
26519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26521    new_path="$unix_path"
26522  fi
26523
26524  if test "x$path" != "x$new_path"; then
26525    BOOT_JDK="$new_path"
26526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26527$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26528  fi
26529
26530  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26531  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26532
26533    else
26534      # We're on a unix platform. Hooray! :)
26535      path="$BOOT_JDK"
26536      has_space=`$ECHO "$path" | $GREP " "`
26537      if test "x$has_space" != x; then
26538        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26539$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26540        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26541      fi
26542
26543      # Use eval to expand a potential ~
26544      eval path="$path"
26545      if test ! -f "$path" && test ! -d "$path"; then
26546        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26547      fi
26548
26549      if test -d "$path"; then
26550        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26551      else
26552        dir="`$DIRNAME "$path"`"
26553        base="`$BASENAME "$path"`"
26554        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26555      fi
26556    fi
26557  fi
26558
26559            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26560$as_echo_n "checking for Boot JDK... " >&6; }
26561            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26562$as_echo "$BOOT_JDK" >&6; }
26563            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26564$as_echo_n "checking Boot JDK version... " >&6; }
26565            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26566            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26567$as_echo "$BOOT_JDK_VERSION" >&6; }
26568          fi # end check jdk version
26569        fi # end check javac
26570      fi # end check java
26571    fi # end check boot jdk found
26572  fi
26573
26574
26575  # Test: Is there a JDK installed in default, well-known locations?
26576
26577  if test "x$BOOT_JDK_FOUND" = xno; then
26578    # Now execute the test
26579
26580  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26581
26582  if test "x$BOOT_JDK_FOUND" = xno; then
26583    # Now execute the test
26584
26585  if test "x$ProgramW6432" != x; then
26586    VIRTUAL_DIR="$ProgramW6432/Java"
26587
26588  windows_path="$VIRTUAL_DIR"
26589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26590    unix_path=`$CYGPATH -u "$windows_path"`
26591    VIRTUAL_DIR="$unix_path"
26592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26594    VIRTUAL_DIR="$unix_path"
26595  fi
26596
26597
26598  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26599  BOOT_JDK_SUFFIX=""
26600  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26601  if test "x$ALL_JDKS_FOUND" != x; then
26602    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26603
26604  if test "x$BOOT_JDK_FOUND" = xno; then
26605    # Now execute the test
26606
26607        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26608        if test -d "$BOOT_JDK"; then
26609          BOOT_JDK_FOUND=maybe
26610          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26611$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26612        fi
26613
26614
26615    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26616    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26617      # Do we have a bin/java?
26618      if test ! -x "$BOOT_JDK/bin/java"; then
26619        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26620$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26621        BOOT_JDK_FOUND=no
26622      else
26623        # Do we have a bin/javac?
26624        if test ! -x "$BOOT_JDK/bin/javac"; then
26625          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26626$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26627          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26628$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26629          BOOT_JDK_FOUND=no
26630        else
26631          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26632          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26633
26634          # Extra M4 quote needed to protect [] in grep expression.
26635          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26636          if test "x$FOUND_CORRECT_VERSION" = x; then
26637            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26638$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26639            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26640$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26641            BOOT_JDK_FOUND=no
26642          else
26643            # We're done! :-)
26644            BOOT_JDK_FOUND=yes
26645
26646  # Only process if variable expands to non-empty
26647
26648  if test "x$BOOT_JDK" != x; then
26649    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26650
26651  # Input might be given as Windows format, start by converting to
26652  # unix format.
26653  path="$BOOT_JDK"
26654  new_path=`$CYGPATH -u "$path"`
26655
26656  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26657  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26658  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26659  # "foo.exe" is OK but "foo" is an error.
26660  #
26661  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26662  # It is also a way to make sure we got the proper file name for the real test later on.
26663  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26664  if test "x$test_shortpath" = x; then
26665    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26666$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26667    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26668  fi
26669
26670  # Call helper function which possibly converts this using DOS-style short mode.
26671  # If so, the updated path is stored in $new_path.
26672
26673  input_path="$new_path"
26674  # Check if we need to convert this using DOS-style short mode. If the path
26675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26676  # take no chances and rewrite it.
26677  # Note: m4 eats our [], so we need to use [ and ] instead.
26678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26679  if test "x$has_forbidden_chars" != x; then
26680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26681    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26682    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26683    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26684      # Going to short mode and back again did indeed matter. Since short mode is
26685      # case insensitive, let's make it lowercase to improve readability.
26686      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26687      # Now convert it back to Unix-style (cygpath)
26688      input_path=`$CYGPATH -u "$shortmode_path"`
26689      new_path="$input_path"
26690    fi
26691  fi
26692
26693  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26694  if test "x$test_cygdrive_prefix" = x; then
26695    # As a simple fix, exclude /usr/bin since it's not a real path.
26696    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26697      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26698      # a path prefixed by /cygdrive for fixpath to work.
26699      new_path="$CYGWIN_ROOT_PATH$input_path"
26700    fi
26701  fi
26702
26703
26704  if test "x$path" != "x$new_path"; then
26705    BOOT_JDK="$new_path"
26706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26707$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26708  fi
26709
26710    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26711
26712  path="$BOOT_JDK"
26713  has_colon=`$ECHO $path | $GREP ^.:`
26714  new_path="$path"
26715  if test "x$has_colon" = x; then
26716    # Not in mixed or Windows style, start by that.
26717    new_path=`cmd //c echo $path`
26718  fi
26719
26720
26721  input_path="$new_path"
26722  # Check if we need to convert this using DOS-style short mode. If the path
26723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26724  # take no chances and rewrite it.
26725  # Note: m4 eats our [], so we need to use [ and ] instead.
26726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26727  if test "x$has_forbidden_chars" != x; then
26728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26730  fi
26731
26732
26733  windows_path="$new_path"
26734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26735    unix_path=`$CYGPATH -u "$windows_path"`
26736    new_path="$unix_path"
26737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26739    new_path="$unix_path"
26740  fi
26741
26742  if test "x$path" != "x$new_path"; then
26743    BOOT_JDK="$new_path"
26744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26745$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26746  fi
26747
26748  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26749  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26750
26751    else
26752      # We're on a unix platform. Hooray! :)
26753      path="$BOOT_JDK"
26754      has_space=`$ECHO "$path" | $GREP " "`
26755      if test "x$has_space" != x; then
26756        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26757$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26758        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26759      fi
26760
26761      # Use eval to expand a potential ~
26762      eval path="$path"
26763      if test ! -f "$path" && test ! -d "$path"; then
26764        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26765      fi
26766
26767      if test -d "$path"; then
26768        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26769      else
26770        dir="`$DIRNAME "$path"`"
26771        base="`$BASENAME "$path"`"
26772        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26773      fi
26774    fi
26775  fi
26776
26777            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26778$as_echo_n "checking for Boot JDK... " >&6; }
26779            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26780$as_echo "$BOOT_JDK" >&6; }
26781            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26782$as_echo_n "checking Boot JDK version... " >&6; }
26783            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26784            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26785$as_echo "$BOOT_JDK_VERSION" >&6; }
26786          fi # end check jdk version
26787        fi # end check javac
26788      fi # end check java
26789    fi # end check boot jdk found
26790  fi
26791
26792    done
26793  fi
26794
26795  fi
26796
26797
26798    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26799    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26800      # Do we have a bin/java?
26801      if test ! -x "$BOOT_JDK/bin/java"; then
26802        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26803$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26804        BOOT_JDK_FOUND=no
26805      else
26806        # Do we have a bin/javac?
26807        if test ! -x "$BOOT_JDK/bin/javac"; then
26808          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26810          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26811$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26812          BOOT_JDK_FOUND=no
26813        else
26814          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26815          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26816
26817          # Extra M4 quote needed to protect [] in grep expression.
26818          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26819          if test "x$FOUND_CORRECT_VERSION" = x; then
26820            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26821$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26822            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26823$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26824            BOOT_JDK_FOUND=no
26825          else
26826            # We're done! :-)
26827            BOOT_JDK_FOUND=yes
26828
26829  # Only process if variable expands to non-empty
26830
26831  if test "x$BOOT_JDK" != x; then
26832    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26833
26834  # Input might be given as Windows format, start by converting to
26835  # unix format.
26836  path="$BOOT_JDK"
26837  new_path=`$CYGPATH -u "$path"`
26838
26839  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26840  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26841  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26842  # "foo.exe" is OK but "foo" is an error.
26843  #
26844  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26845  # It is also a way to make sure we got the proper file name for the real test later on.
26846  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26847  if test "x$test_shortpath" = x; then
26848    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26849$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26850    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26851  fi
26852
26853  # Call helper function which possibly converts this using DOS-style short mode.
26854  # If so, the updated path is stored in $new_path.
26855
26856  input_path="$new_path"
26857  # Check if we need to convert this using DOS-style short mode. If the path
26858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26859  # take no chances and rewrite it.
26860  # Note: m4 eats our [], so we need to use [ and ] instead.
26861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26862  if test "x$has_forbidden_chars" != x; then
26863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26864    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26865    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26866    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26867      # Going to short mode and back again did indeed matter. Since short mode is
26868      # case insensitive, let's make it lowercase to improve readability.
26869      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26870      # Now convert it back to Unix-style (cygpath)
26871      input_path=`$CYGPATH -u "$shortmode_path"`
26872      new_path="$input_path"
26873    fi
26874  fi
26875
26876  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26877  if test "x$test_cygdrive_prefix" = x; then
26878    # As a simple fix, exclude /usr/bin since it's not a real path.
26879    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26880      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26881      # a path prefixed by /cygdrive for fixpath to work.
26882      new_path="$CYGWIN_ROOT_PATH$input_path"
26883    fi
26884  fi
26885
26886
26887  if test "x$path" != "x$new_path"; then
26888    BOOT_JDK="$new_path"
26889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26890$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26891  fi
26892
26893    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26894
26895  path="$BOOT_JDK"
26896  has_colon=`$ECHO $path | $GREP ^.:`
26897  new_path="$path"
26898  if test "x$has_colon" = x; then
26899    # Not in mixed or Windows style, start by that.
26900    new_path=`cmd //c echo $path`
26901  fi
26902
26903
26904  input_path="$new_path"
26905  # Check if we need to convert this using DOS-style short mode. If the path
26906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26907  # take no chances and rewrite it.
26908  # Note: m4 eats our [], so we need to use [ and ] instead.
26909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26910  if test "x$has_forbidden_chars" != x; then
26911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26912    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26913  fi
26914
26915
26916  windows_path="$new_path"
26917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26918    unix_path=`$CYGPATH -u "$windows_path"`
26919    new_path="$unix_path"
26920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26922    new_path="$unix_path"
26923  fi
26924
26925  if test "x$path" != "x$new_path"; then
26926    BOOT_JDK="$new_path"
26927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26928$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26929  fi
26930
26931  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26932  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26933
26934    else
26935      # We're on a unix platform. Hooray! :)
26936      path="$BOOT_JDK"
26937      has_space=`$ECHO "$path" | $GREP " "`
26938      if test "x$has_space" != x; then
26939        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26940$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26941        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26942      fi
26943
26944      # Use eval to expand a potential ~
26945      eval path="$path"
26946      if test ! -f "$path" && test ! -d "$path"; then
26947        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26948      fi
26949
26950      if test -d "$path"; then
26951        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26952      else
26953        dir="`$DIRNAME "$path"`"
26954        base="`$BASENAME "$path"`"
26955        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26956      fi
26957    fi
26958  fi
26959
26960            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26961$as_echo_n "checking for Boot JDK... " >&6; }
26962            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26963$as_echo "$BOOT_JDK" >&6; }
26964            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26965$as_echo_n "checking Boot JDK version... " >&6; }
26966            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26967            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26968$as_echo "$BOOT_JDK_VERSION" >&6; }
26969          fi # end check jdk version
26970        fi # end check javac
26971      fi # end check java
26972    fi # end check boot jdk found
26973  fi
26974
26975
26976  if test "x$BOOT_JDK_FOUND" = xno; then
26977    # Now execute the test
26978
26979  if test "x$PROGRAMW6432" != x; then
26980    VIRTUAL_DIR="$PROGRAMW6432/Java"
26981
26982  windows_path="$VIRTUAL_DIR"
26983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26984    unix_path=`$CYGPATH -u "$windows_path"`
26985    VIRTUAL_DIR="$unix_path"
26986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26988    VIRTUAL_DIR="$unix_path"
26989  fi
26990
26991
26992  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26993  BOOT_JDK_SUFFIX=""
26994  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26995  if test "x$ALL_JDKS_FOUND" != x; then
26996    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26997
26998  if test "x$BOOT_JDK_FOUND" = xno; then
26999    # Now execute the test
27000
27001        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27002        if test -d "$BOOT_JDK"; then
27003          BOOT_JDK_FOUND=maybe
27004          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27005$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27006        fi
27007
27008
27009    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27010    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27011      # Do we have a bin/java?
27012      if test ! -x "$BOOT_JDK/bin/java"; then
27013        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27014$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27015        BOOT_JDK_FOUND=no
27016      else
27017        # Do we have a bin/javac?
27018        if test ! -x "$BOOT_JDK/bin/javac"; then
27019          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27020$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27021          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27022$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27023          BOOT_JDK_FOUND=no
27024        else
27025          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27026          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27027
27028          # Extra M4 quote needed to protect [] in grep expression.
27029          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27030          if test "x$FOUND_CORRECT_VERSION" = x; then
27031            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27032$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27033            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27034$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27035            BOOT_JDK_FOUND=no
27036          else
27037            # We're done! :-)
27038            BOOT_JDK_FOUND=yes
27039
27040  # Only process if variable expands to non-empty
27041
27042  if test "x$BOOT_JDK" != x; then
27043    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27044
27045  # Input might be given as Windows format, start by converting to
27046  # unix format.
27047  path="$BOOT_JDK"
27048  new_path=`$CYGPATH -u "$path"`
27049
27050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27053  # "foo.exe" is OK but "foo" is an error.
27054  #
27055  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27056  # It is also a way to make sure we got the proper file name for the real test later on.
27057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27058  if test "x$test_shortpath" = x; then
27059    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27060$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27061    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27062  fi
27063
27064  # Call helper function which possibly converts this using DOS-style short mode.
27065  # If so, the updated path is stored in $new_path.
27066
27067  input_path="$new_path"
27068  # Check if we need to convert this using DOS-style short mode. If the path
27069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27070  # take no chances and rewrite it.
27071  # Note: m4 eats our [], so we need to use [ and ] instead.
27072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27073  if test "x$has_forbidden_chars" != x; then
27074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27078      # Going to short mode and back again did indeed matter. Since short mode is
27079      # case insensitive, let's make it lowercase to improve readability.
27080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27081      # Now convert it back to Unix-style (cygpath)
27082      input_path=`$CYGPATH -u "$shortmode_path"`
27083      new_path="$input_path"
27084    fi
27085  fi
27086
27087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27088  if test "x$test_cygdrive_prefix" = x; then
27089    # As a simple fix, exclude /usr/bin since it's not a real path.
27090    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27092      # a path prefixed by /cygdrive for fixpath to work.
27093      new_path="$CYGWIN_ROOT_PATH$input_path"
27094    fi
27095  fi
27096
27097
27098  if test "x$path" != "x$new_path"; then
27099    BOOT_JDK="$new_path"
27100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27101$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27102  fi
27103
27104    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27105
27106  path="$BOOT_JDK"
27107  has_colon=`$ECHO $path | $GREP ^.:`
27108  new_path="$path"
27109  if test "x$has_colon" = x; then
27110    # Not in mixed or Windows style, start by that.
27111    new_path=`cmd //c echo $path`
27112  fi
27113
27114
27115  input_path="$new_path"
27116  # Check if we need to convert this using DOS-style short mode. If the path
27117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27118  # take no chances and rewrite it.
27119  # Note: m4 eats our [], so we need to use [ and ] instead.
27120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27121  if test "x$has_forbidden_chars" != x; then
27122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27124  fi
27125
27126
27127  windows_path="$new_path"
27128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27129    unix_path=`$CYGPATH -u "$windows_path"`
27130    new_path="$unix_path"
27131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27133    new_path="$unix_path"
27134  fi
27135
27136  if test "x$path" != "x$new_path"; then
27137    BOOT_JDK="$new_path"
27138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27139$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27140  fi
27141
27142  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27143  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27144
27145    else
27146      # We're on a unix platform. Hooray! :)
27147      path="$BOOT_JDK"
27148      has_space=`$ECHO "$path" | $GREP " "`
27149      if test "x$has_space" != x; then
27150        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27151$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27152        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27153      fi
27154
27155      # Use eval to expand a potential ~
27156      eval path="$path"
27157      if test ! -f "$path" && test ! -d "$path"; then
27158        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27159      fi
27160
27161      if test -d "$path"; then
27162        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27163      else
27164        dir="`$DIRNAME "$path"`"
27165        base="`$BASENAME "$path"`"
27166        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27167      fi
27168    fi
27169  fi
27170
27171            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27172$as_echo_n "checking for Boot JDK... " >&6; }
27173            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27174$as_echo "$BOOT_JDK" >&6; }
27175            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27176$as_echo_n "checking Boot JDK version... " >&6; }
27177            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27178            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27179$as_echo "$BOOT_JDK_VERSION" >&6; }
27180          fi # end check jdk version
27181        fi # end check javac
27182      fi # end check java
27183    fi # end check boot jdk found
27184  fi
27185
27186    done
27187  fi
27188
27189  fi
27190
27191
27192    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27193    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27194      # Do we have a bin/java?
27195      if test ! -x "$BOOT_JDK/bin/java"; then
27196        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27198        BOOT_JDK_FOUND=no
27199      else
27200        # Do we have a bin/javac?
27201        if test ! -x "$BOOT_JDK/bin/javac"; then
27202          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27203$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27204          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27205$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27206          BOOT_JDK_FOUND=no
27207        else
27208          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27209          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27210
27211          # Extra M4 quote needed to protect [] in grep expression.
27212          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27213          if test "x$FOUND_CORRECT_VERSION" = x; then
27214            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27215$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27216            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27217$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27218            BOOT_JDK_FOUND=no
27219          else
27220            # We're done! :-)
27221            BOOT_JDK_FOUND=yes
27222
27223  # Only process if variable expands to non-empty
27224
27225  if test "x$BOOT_JDK" != x; then
27226    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27227
27228  # Input might be given as Windows format, start by converting to
27229  # unix format.
27230  path="$BOOT_JDK"
27231  new_path=`$CYGPATH -u "$path"`
27232
27233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27236  # "foo.exe" is OK but "foo" is an error.
27237  #
27238  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27239  # It is also a way to make sure we got the proper file name for the real test later on.
27240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27241  if test "x$test_shortpath" = x; then
27242    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27243$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27244    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27245  fi
27246
27247  # Call helper function which possibly converts this using DOS-style short mode.
27248  # If so, the updated path is stored in $new_path.
27249
27250  input_path="$new_path"
27251  # Check if we need to convert this using DOS-style short mode. If the path
27252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27253  # take no chances and rewrite it.
27254  # Note: m4 eats our [], so we need to use [ and ] instead.
27255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27256  if test "x$has_forbidden_chars" != x; then
27257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27258    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27259    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27260    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27261      # Going to short mode and back again did indeed matter. Since short mode is
27262      # case insensitive, let's make it lowercase to improve readability.
27263      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27264      # Now convert it back to Unix-style (cygpath)
27265      input_path=`$CYGPATH -u "$shortmode_path"`
27266      new_path="$input_path"
27267    fi
27268  fi
27269
27270  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27271  if test "x$test_cygdrive_prefix" = x; then
27272    # As a simple fix, exclude /usr/bin since it's not a real path.
27273    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27274      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27275      # a path prefixed by /cygdrive for fixpath to work.
27276      new_path="$CYGWIN_ROOT_PATH$input_path"
27277    fi
27278  fi
27279
27280
27281  if test "x$path" != "x$new_path"; then
27282    BOOT_JDK="$new_path"
27283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27284$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27285  fi
27286
27287    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27288
27289  path="$BOOT_JDK"
27290  has_colon=`$ECHO $path | $GREP ^.:`
27291  new_path="$path"
27292  if test "x$has_colon" = x; then
27293    # Not in mixed or Windows style, start by that.
27294    new_path=`cmd //c echo $path`
27295  fi
27296
27297
27298  input_path="$new_path"
27299  # Check if we need to convert this using DOS-style short mode. If the path
27300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27301  # take no chances and rewrite it.
27302  # Note: m4 eats our [], so we need to use [ and ] instead.
27303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27304  if test "x$has_forbidden_chars" != x; then
27305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27306    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27307  fi
27308
27309
27310  windows_path="$new_path"
27311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27312    unix_path=`$CYGPATH -u "$windows_path"`
27313    new_path="$unix_path"
27314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27316    new_path="$unix_path"
27317  fi
27318
27319  if test "x$path" != "x$new_path"; then
27320    BOOT_JDK="$new_path"
27321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27322$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27323  fi
27324
27325  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27326  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27327
27328    else
27329      # We're on a unix platform. Hooray! :)
27330      path="$BOOT_JDK"
27331      has_space=`$ECHO "$path" | $GREP " "`
27332      if test "x$has_space" != x; then
27333        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27334$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27335        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27336      fi
27337
27338      # Use eval to expand a potential ~
27339      eval path="$path"
27340      if test ! -f "$path" && test ! -d "$path"; then
27341        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27342      fi
27343
27344      if test -d "$path"; then
27345        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27346      else
27347        dir="`$DIRNAME "$path"`"
27348        base="`$BASENAME "$path"`"
27349        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27350      fi
27351    fi
27352  fi
27353
27354            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27355$as_echo_n "checking for Boot JDK... " >&6; }
27356            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27357$as_echo "$BOOT_JDK" >&6; }
27358            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27359$as_echo_n "checking Boot JDK version... " >&6; }
27360            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27361            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27362$as_echo "$BOOT_JDK_VERSION" >&6; }
27363          fi # end check jdk version
27364        fi # end check javac
27365      fi # end check java
27366    fi # end check boot jdk found
27367  fi
27368
27369
27370  if test "x$BOOT_JDK_FOUND" = xno; then
27371    # Now execute the test
27372
27373  if test "x$PROGRAMFILES" != x; then
27374    VIRTUAL_DIR="$PROGRAMFILES/Java"
27375
27376  windows_path="$VIRTUAL_DIR"
27377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27378    unix_path=`$CYGPATH -u "$windows_path"`
27379    VIRTUAL_DIR="$unix_path"
27380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27382    VIRTUAL_DIR="$unix_path"
27383  fi
27384
27385
27386  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27387  BOOT_JDK_SUFFIX=""
27388  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27389  if test "x$ALL_JDKS_FOUND" != x; then
27390    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27391
27392  if test "x$BOOT_JDK_FOUND" = xno; then
27393    # Now execute the test
27394
27395        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27396        if test -d "$BOOT_JDK"; then
27397          BOOT_JDK_FOUND=maybe
27398          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27399$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27400        fi
27401
27402
27403    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27404    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27405      # Do we have a bin/java?
27406      if test ! -x "$BOOT_JDK/bin/java"; then
27407        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27408$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27409        BOOT_JDK_FOUND=no
27410      else
27411        # Do we have a bin/javac?
27412        if test ! -x "$BOOT_JDK/bin/javac"; then
27413          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27414$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27415          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27416$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27417          BOOT_JDK_FOUND=no
27418        else
27419          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27420          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27421
27422          # Extra M4 quote needed to protect [] in grep expression.
27423          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27424          if test "x$FOUND_CORRECT_VERSION" = x; then
27425            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27426$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27427            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27428$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27429            BOOT_JDK_FOUND=no
27430          else
27431            # We're done! :-)
27432            BOOT_JDK_FOUND=yes
27433
27434  # Only process if variable expands to non-empty
27435
27436  if test "x$BOOT_JDK" != x; then
27437    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27438
27439  # Input might be given as Windows format, start by converting to
27440  # unix format.
27441  path="$BOOT_JDK"
27442  new_path=`$CYGPATH -u "$path"`
27443
27444  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27445  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27446  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27447  # "foo.exe" is OK but "foo" is an error.
27448  #
27449  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27450  # It is also a way to make sure we got the proper file name for the real test later on.
27451  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27452  if test "x$test_shortpath" = x; then
27453    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27454$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27455    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27456  fi
27457
27458  # Call helper function which possibly converts this using DOS-style short mode.
27459  # If so, the updated path is stored in $new_path.
27460
27461  input_path="$new_path"
27462  # Check if we need to convert this using DOS-style short mode. If the path
27463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27464  # take no chances and rewrite it.
27465  # Note: m4 eats our [], so we need to use [ and ] instead.
27466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27467  if test "x$has_forbidden_chars" != x; then
27468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27469    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27470    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27471    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27472      # Going to short mode and back again did indeed matter. Since short mode is
27473      # case insensitive, let's make it lowercase to improve readability.
27474      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27475      # Now convert it back to Unix-style (cygpath)
27476      input_path=`$CYGPATH -u "$shortmode_path"`
27477      new_path="$input_path"
27478    fi
27479  fi
27480
27481  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27482  if test "x$test_cygdrive_prefix" = x; then
27483    # As a simple fix, exclude /usr/bin since it's not a real path.
27484    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27485      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27486      # a path prefixed by /cygdrive for fixpath to work.
27487      new_path="$CYGWIN_ROOT_PATH$input_path"
27488    fi
27489  fi
27490
27491
27492  if test "x$path" != "x$new_path"; then
27493    BOOT_JDK="$new_path"
27494    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27495$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27496  fi
27497
27498    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27499
27500  path="$BOOT_JDK"
27501  has_colon=`$ECHO $path | $GREP ^.:`
27502  new_path="$path"
27503  if test "x$has_colon" = x; then
27504    # Not in mixed or Windows style, start by that.
27505    new_path=`cmd //c echo $path`
27506  fi
27507
27508
27509  input_path="$new_path"
27510  # Check if we need to convert this using DOS-style short mode. If the path
27511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27512  # take no chances and rewrite it.
27513  # Note: m4 eats our [], so we need to use [ and ] instead.
27514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27515  if test "x$has_forbidden_chars" != x; then
27516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27517    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27518  fi
27519
27520
27521  windows_path="$new_path"
27522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27523    unix_path=`$CYGPATH -u "$windows_path"`
27524    new_path="$unix_path"
27525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27527    new_path="$unix_path"
27528  fi
27529
27530  if test "x$path" != "x$new_path"; then
27531    BOOT_JDK="$new_path"
27532    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27533$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27534  fi
27535
27536  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27537  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27538
27539    else
27540      # We're on a unix platform. Hooray! :)
27541      path="$BOOT_JDK"
27542      has_space=`$ECHO "$path" | $GREP " "`
27543      if test "x$has_space" != x; then
27544        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27545$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27546        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27547      fi
27548
27549      # Use eval to expand a potential ~
27550      eval path="$path"
27551      if test ! -f "$path" && test ! -d "$path"; then
27552        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27553      fi
27554
27555      if test -d "$path"; then
27556        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27557      else
27558        dir="`$DIRNAME "$path"`"
27559        base="`$BASENAME "$path"`"
27560        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27561      fi
27562    fi
27563  fi
27564
27565            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27566$as_echo_n "checking for Boot JDK... " >&6; }
27567            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27568$as_echo "$BOOT_JDK" >&6; }
27569            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27570$as_echo_n "checking Boot JDK version... " >&6; }
27571            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27572            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27573$as_echo "$BOOT_JDK_VERSION" >&6; }
27574          fi # end check jdk version
27575        fi # end check javac
27576      fi # end check java
27577    fi # end check boot jdk found
27578  fi
27579
27580    done
27581  fi
27582
27583  fi
27584
27585
27586    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27587    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27588      # Do we have a bin/java?
27589      if test ! -x "$BOOT_JDK/bin/java"; then
27590        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27591$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27592        BOOT_JDK_FOUND=no
27593      else
27594        # Do we have a bin/javac?
27595        if test ! -x "$BOOT_JDK/bin/javac"; then
27596          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27597$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27598          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27599$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27600          BOOT_JDK_FOUND=no
27601        else
27602          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27603          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27604
27605          # Extra M4 quote needed to protect [] in grep expression.
27606          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27607          if test "x$FOUND_CORRECT_VERSION" = x; then
27608            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27609$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27610            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27611$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27612            BOOT_JDK_FOUND=no
27613          else
27614            # We're done! :-)
27615            BOOT_JDK_FOUND=yes
27616
27617  # Only process if variable expands to non-empty
27618
27619  if test "x$BOOT_JDK" != x; then
27620    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27621
27622  # Input might be given as Windows format, start by converting to
27623  # unix format.
27624  path="$BOOT_JDK"
27625  new_path=`$CYGPATH -u "$path"`
27626
27627  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27628  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27629  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27630  # "foo.exe" is OK but "foo" is an error.
27631  #
27632  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27633  # It is also a way to make sure we got the proper file name for the real test later on.
27634  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27635  if test "x$test_shortpath" = x; then
27636    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27637$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27638    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27639  fi
27640
27641  # Call helper function which possibly converts this using DOS-style short mode.
27642  # If so, the updated path is stored in $new_path.
27643
27644  input_path="$new_path"
27645  # Check if we need to convert this using DOS-style short mode. If the path
27646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27647  # take no chances and rewrite it.
27648  # Note: m4 eats our [], so we need to use [ and ] instead.
27649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27650  if test "x$has_forbidden_chars" != x; then
27651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27652    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27653    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27654    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27655      # Going to short mode and back again did indeed matter. Since short mode is
27656      # case insensitive, let's make it lowercase to improve readability.
27657      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27658      # Now convert it back to Unix-style (cygpath)
27659      input_path=`$CYGPATH -u "$shortmode_path"`
27660      new_path="$input_path"
27661    fi
27662  fi
27663
27664  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27665  if test "x$test_cygdrive_prefix" = x; then
27666    # As a simple fix, exclude /usr/bin since it's not a real path.
27667    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27668      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27669      # a path prefixed by /cygdrive for fixpath to work.
27670      new_path="$CYGWIN_ROOT_PATH$input_path"
27671    fi
27672  fi
27673
27674
27675  if test "x$path" != "x$new_path"; then
27676    BOOT_JDK="$new_path"
27677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27678$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27679  fi
27680
27681    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27682
27683  path="$BOOT_JDK"
27684  has_colon=`$ECHO $path | $GREP ^.:`
27685  new_path="$path"
27686  if test "x$has_colon" = x; then
27687    # Not in mixed or Windows style, start by that.
27688    new_path=`cmd //c echo $path`
27689  fi
27690
27691
27692  input_path="$new_path"
27693  # Check if we need to convert this using DOS-style short mode. If the path
27694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27695  # take no chances and rewrite it.
27696  # Note: m4 eats our [], so we need to use [ and ] instead.
27697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27698  if test "x$has_forbidden_chars" != x; then
27699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27700    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27701  fi
27702
27703
27704  windows_path="$new_path"
27705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27706    unix_path=`$CYGPATH -u "$windows_path"`
27707    new_path="$unix_path"
27708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27710    new_path="$unix_path"
27711  fi
27712
27713  if test "x$path" != "x$new_path"; then
27714    BOOT_JDK="$new_path"
27715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27716$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27717  fi
27718
27719  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27720  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27721
27722    else
27723      # We're on a unix platform. Hooray! :)
27724      path="$BOOT_JDK"
27725      has_space=`$ECHO "$path" | $GREP " "`
27726      if test "x$has_space" != x; then
27727        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27728$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27729        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27730      fi
27731
27732      # Use eval to expand a potential ~
27733      eval path="$path"
27734      if test ! -f "$path" && test ! -d "$path"; then
27735        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27736      fi
27737
27738      if test -d "$path"; then
27739        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27740      else
27741        dir="`$DIRNAME "$path"`"
27742        base="`$BASENAME "$path"`"
27743        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27744      fi
27745    fi
27746  fi
27747
27748            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27749$as_echo_n "checking for Boot JDK... " >&6; }
27750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27751$as_echo "$BOOT_JDK" >&6; }
27752            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27753$as_echo_n "checking Boot JDK version... " >&6; }
27754            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27755            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27756$as_echo "$BOOT_JDK_VERSION" >&6; }
27757          fi # end check jdk version
27758        fi # end check javac
27759      fi # end check java
27760    fi # end check boot jdk found
27761  fi
27762
27763
27764  if test "x$BOOT_JDK_FOUND" = xno; then
27765    # Now execute the test
27766
27767  if test "x$ProgramFiles" != x; then
27768    VIRTUAL_DIR="$ProgramFiles/Java"
27769
27770  windows_path="$VIRTUAL_DIR"
27771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27772    unix_path=`$CYGPATH -u "$windows_path"`
27773    VIRTUAL_DIR="$unix_path"
27774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27776    VIRTUAL_DIR="$unix_path"
27777  fi
27778
27779
27780  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27781  BOOT_JDK_SUFFIX=""
27782  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27783  if test "x$ALL_JDKS_FOUND" != x; then
27784    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27785
27786  if test "x$BOOT_JDK_FOUND" = xno; then
27787    # Now execute the test
27788
27789        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27790        if test -d "$BOOT_JDK"; then
27791          BOOT_JDK_FOUND=maybe
27792          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27793$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27794        fi
27795
27796
27797    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27798    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27799      # Do we have a bin/java?
27800      if test ! -x "$BOOT_JDK/bin/java"; then
27801        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27803        BOOT_JDK_FOUND=no
27804      else
27805        # Do we have a bin/javac?
27806        if test ! -x "$BOOT_JDK/bin/javac"; then
27807          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27808$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27809          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27810$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27811          BOOT_JDK_FOUND=no
27812        else
27813          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27814          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27815
27816          # Extra M4 quote needed to protect [] in grep expression.
27817          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27818          if test "x$FOUND_CORRECT_VERSION" = x; then
27819            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27820$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27821            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27822$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27823            BOOT_JDK_FOUND=no
27824          else
27825            # We're done! :-)
27826            BOOT_JDK_FOUND=yes
27827
27828  # Only process if variable expands to non-empty
27829
27830  if test "x$BOOT_JDK" != x; then
27831    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27832
27833  # Input might be given as Windows format, start by converting to
27834  # unix format.
27835  path="$BOOT_JDK"
27836  new_path=`$CYGPATH -u "$path"`
27837
27838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27841  # "foo.exe" is OK but "foo" is an error.
27842  #
27843  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27844  # It is also a way to make sure we got the proper file name for the real test later on.
27845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27846  if test "x$test_shortpath" = x; then
27847    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27848$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27849    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27850  fi
27851
27852  # Call helper function which possibly converts this using DOS-style short mode.
27853  # If so, the updated path is stored in $new_path.
27854
27855  input_path="$new_path"
27856  # Check if we need to convert this using DOS-style short mode. If the path
27857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27858  # take no chances and rewrite it.
27859  # Note: m4 eats our [], so we need to use [ and ] instead.
27860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27861  if test "x$has_forbidden_chars" != x; then
27862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27866      # Going to short mode and back again did indeed matter. Since short mode is
27867      # case insensitive, let's make it lowercase to improve readability.
27868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27869      # Now convert it back to Unix-style (cygpath)
27870      input_path=`$CYGPATH -u "$shortmode_path"`
27871      new_path="$input_path"
27872    fi
27873  fi
27874
27875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27876  if test "x$test_cygdrive_prefix" = x; then
27877    # As a simple fix, exclude /usr/bin since it's not a real path.
27878    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27880      # a path prefixed by /cygdrive for fixpath to work.
27881      new_path="$CYGWIN_ROOT_PATH$input_path"
27882    fi
27883  fi
27884
27885
27886  if test "x$path" != "x$new_path"; then
27887    BOOT_JDK="$new_path"
27888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27889$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27890  fi
27891
27892    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27893
27894  path="$BOOT_JDK"
27895  has_colon=`$ECHO $path | $GREP ^.:`
27896  new_path="$path"
27897  if test "x$has_colon" = x; then
27898    # Not in mixed or Windows style, start by that.
27899    new_path=`cmd //c echo $path`
27900  fi
27901
27902
27903  input_path="$new_path"
27904  # Check if we need to convert this using DOS-style short mode. If the path
27905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27906  # take no chances and rewrite it.
27907  # Note: m4 eats our [], so we need to use [ and ] instead.
27908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27909  if test "x$has_forbidden_chars" != x; then
27910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27912  fi
27913
27914
27915  windows_path="$new_path"
27916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27917    unix_path=`$CYGPATH -u "$windows_path"`
27918    new_path="$unix_path"
27919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27921    new_path="$unix_path"
27922  fi
27923
27924  if test "x$path" != "x$new_path"; then
27925    BOOT_JDK="$new_path"
27926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27927$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27928  fi
27929
27930  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27931  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27932
27933    else
27934      # We're on a unix platform. Hooray! :)
27935      path="$BOOT_JDK"
27936      has_space=`$ECHO "$path" | $GREP " "`
27937      if test "x$has_space" != x; then
27938        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27939$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27940        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27941      fi
27942
27943      # Use eval to expand a potential ~
27944      eval path="$path"
27945      if test ! -f "$path" && test ! -d "$path"; then
27946        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27947      fi
27948
27949      if test -d "$path"; then
27950        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27951      else
27952        dir="`$DIRNAME "$path"`"
27953        base="`$BASENAME "$path"`"
27954        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27955      fi
27956    fi
27957  fi
27958
27959            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27960$as_echo_n "checking for Boot JDK... " >&6; }
27961            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27962$as_echo "$BOOT_JDK" >&6; }
27963            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27964$as_echo_n "checking Boot JDK version... " >&6; }
27965            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27966            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27967$as_echo "$BOOT_JDK_VERSION" >&6; }
27968          fi # end check jdk version
27969        fi # end check javac
27970      fi # end check java
27971    fi # end check boot jdk found
27972  fi
27973
27974    done
27975  fi
27976
27977  fi
27978
27979
27980    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27981    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27982      # Do we have a bin/java?
27983      if test ! -x "$BOOT_JDK/bin/java"; then
27984        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27985$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27986        BOOT_JDK_FOUND=no
27987      else
27988        # Do we have a bin/javac?
27989        if test ! -x "$BOOT_JDK/bin/javac"; then
27990          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27991$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27992          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27993$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27994          BOOT_JDK_FOUND=no
27995        else
27996          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27997          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27998
27999          # Extra M4 quote needed to protect [] in grep expression.
28000          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28001          if test "x$FOUND_CORRECT_VERSION" = x; then
28002            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28003$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28004            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28005$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28006            BOOT_JDK_FOUND=no
28007          else
28008            # We're done! :-)
28009            BOOT_JDK_FOUND=yes
28010
28011  # Only process if variable expands to non-empty
28012
28013  if test "x$BOOT_JDK" != x; then
28014    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28015
28016  # Input might be given as Windows format, start by converting to
28017  # unix format.
28018  path="$BOOT_JDK"
28019  new_path=`$CYGPATH -u "$path"`
28020
28021  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28022  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28023  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28024  # "foo.exe" is OK but "foo" is an error.
28025  #
28026  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28027  # It is also a way to make sure we got the proper file name for the real test later on.
28028  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28029  if test "x$test_shortpath" = x; then
28030    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28031$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28032    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28033  fi
28034
28035  # Call helper function which possibly converts this using DOS-style short mode.
28036  # If so, the updated path is stored in $new_path.
28037
28038  input_path="$new_path"
28039  # Check if we need to convert this using DOS-style short mode. If the path
28040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28041  # take no chances and rewrite it.
28042  # Note: m4 eats our [], so we need to use [ and ] instead.
28043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28044  if test "x$has_forbidden_chars" != x; then
28045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28046    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28047    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28048    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28049      # Going to short mode and back again did indeed matter. Since short mode is
28050      # case insensitive, let's make it lowercase to improve readability.
28051      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28052      # Now convert it back to Unix-style (cygpath)
28053      input_path=`$CYGPATH -u "$shortmode_path"`
28054      new_path="$input_path"
28055    fi
28056  fi
28057
28058  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28059  if test "x$test_cygdrive_prefix" = x; then
28060    # As a simple fix, exclude /usr/bin since it's not a real path.
28061    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28062      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28063      # a path prefixed by /cygdrive for fixpath to work.
28064      new_path="$CYGWIN_ROOT_PATH$input_path"
28065    fi
28066  fi
28067
28068
28069  if test "x$path" != "x$new_path"; then
28070    BOOT_JDK="$new_path"
28071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28072$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28073  fi
28074
28075    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28076
28077  path="$BOOT_JDK"
28078  has_colon=`$ECHO $path | $GREP ^.:`
28079  new_path="$path"
28080  if test "x$has_colon" = x; then
28081    # Not in mixed or Windows style, start by that.
28082    new_path=`cmd //c echo $path`
28083  fi
28084
28085
28086  input_path="$new_path"
28087  # Check if we need to convert this using DOS-style short mode. If the path
28088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28089  # take no chances and rewrite it.
28090  # Note: m4 eats our [], so we need to use [ and ] instead.
28091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28092  if test "x$has_forbidden_chars" != x; then
28093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28094    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28095  fi
28096
28097
28098  windows_path="$new_path"
28099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28100    unix_path=`$CYGPATH -u "$windows_path"`
28101    new_path="$unix_path"
28102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28104    new_path="$unix_path"
28105  fi
28106
28107  if test "x$path" != "x$new_path"; then
28108    BOOT_JDK="$new_path"
28109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28110$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28111  fi
28112
28113  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28114  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28115
28116    else
28117      # We're on a unix platform. Hooray! :)
28118      path="$BOOT_JDK"
28119      has_space=`$ECHO "$path" | $GREP " "`
28120      if test "x$has_space" != x; then
28121        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28122$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28123        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28124      fi
28125
28126      # Use eval to expand a potential ~
28127      eval path="$path"
28128      if test ! -f "$path" && test ! -d "$path"; then
28129        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28130      fi
28131
28132      if test -d "$path"; then
28133        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28134      else
28135        dir="`$DIRNAME "$path"`"
28136        base="`$BASENAME "$path"`"
28137        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28138      fi
28139    fi
28140  fi
28141
28142            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28143$as_echo_n "checking for Boot JDK... " >&6; }
28144            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28145$as_echo "$BOOT_JDK" >&6; }
28146            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28147$as_echo_n "checking Boot JDK version... " >&6; }
28148            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28149            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28150$as_echo "$BOOT_JDK_VERSION" >&6; }
28151          fi # end check jdk version
28152        fi # end check javac
28153      fi # end check java
28154    fi # end check boot jdk found
28155  fi
28156
28157
28158  if test "x$BOOT_JDK_FOUND" = xno; then
28159    # Now execute the test
28160
28161  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28162  BOOT_JDK_SUFFIX=""
28163  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28164  if test "x$ALL_JDKS_FOUND" != x; then
28165    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28166
28167  if test "x$BOOT_JDK_FOUND" = xno; then
28168    # Now execute the test
28169
28170        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28171        if test -d "$BOOT_JDK"; then
28172          BOOT_JDK_FOUND=maybe
28173          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28174$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28175        fi
28176
28177
28178    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28179    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28180      # Do we have a bin/java?
28181      if test ! -x "$BOOT_JDK/bin/java"; then
28182        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28183$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28184        BOOT_JDK_FOUND=no
28185      else
28186        # Do we have a bin/javac?
28187        if test ! -x "$BOOT_JDK/bin/javac"; then
28188          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28190          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28191$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28192          BOOT_JDK_FOUND=no
28193        else
28194          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28195          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28196
28197          # Extra M4 quote needed to protect [] in grep expression.
28198          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28199          if test "x$FOUND_CORRECT_VERSION" = x; then
28200            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28201$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28202            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28203$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28204            BOOT_JDK_FOUND=no
28205          else
28206            # We're done! :-)
28207            BOOT_JDK_FOUND=yes
28208
28209  # Only process if variable expands to non-empty
28210
28211  if test "x$BOOT_JDK" != x; then
28212    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28213
28214  # Input might be given as Windows format, start by converting to
28215  # unix format.
28216  path="$BOOT_JDK"
28217  new_path=`$CYGPATH -u "$path"`
28218
28219  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28220  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28221  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28222  # "foo.exe" is OK but "foo" is an error.
28223  #
28224  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28225  # It is also a way to make sure we got the proper file name for the real test later on.
28226  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28227  if test "x$test_shortpath" = x; then
28228    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28229$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28230    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28231  fi
28232
28233  # Call helper function which possibly converts this using DOS-style short mode.
28234  # If so, the updated path is stored in $new_path.
28235
28236  input_path="$new_path"
28237  # Check if we need to convert this using DOS-style short mode. If the path
28238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28239  # take no chances and rewrite it.
28240  # Note: m4 eats our [], so we need to use [ and ] instead.
28241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28242  if test "x$has_forbidden_chars" != x; then
28243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28244    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28245    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28246    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28247      # Going to short mode and back again did indeed matter. Since short mode is
28248      # case insensitive, let's make it lowercase to improve readability.
28249      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28250      # Now convert it back to Unix-style (cygpath)
28251      input_path=`$CYGPATH -u "$shortmode_path"`
28252      new_path="$input_path"
28253    fi
28254  fi
28255
28256  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28257  if test "x$test_cygdrive_prefix" = x; then
28258    # As a simple fix, exclude /usr/bin since it's not a real path.
28259    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28260      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28261      # a path prefixed by /cygdrive for fixpath to work.
28262      new_path="$CYGWIN_ROOT_PATH$input_path"
28263    fi
28264  fi
28265
28266
28267  if test "x$path" != "x$new_path"; then
28268    BOOT_JDK="$new_path"
28269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28270$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28271  fi
28272
28273    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28274
28275  path="$BOOT_JDK"
28276  has_colon=`$ECHO $path | $GREP ^.:`
28277  new_path="$path"
28278  if test "x$has_colon" = x; then
28279    # Not in mixed or Windows style, start by that.
28280    new_path=`cmd //c echo $path`
28281  fi
28282
28283
28284  input_path="$new_path"
28285  # Check if we need to convert this using DOS-style short mode. If the path
28286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28287  # take no chances and rewrite it.
28288  # Note: m4 eats our [], so we need to use [ and ] instead.
28289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28290  if test "x$has_forbidden_chars" != x; then
28291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28292    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28293  fi
28294
28295
28296  windows_path="$new_path"
28297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28298    unix_path=`$CYGPATH -u "$windows_path"`
28299    new_path="$unix_path"
28300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28302    new_path="$unix_path"
28303  fi
28304
28305  if test "x$path" != "x$new_path"; then
28306    BOOT_JDK="$new_path"
28307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28308$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28309  fi
28310
28311  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28312  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28313
28314    else
28315      # We're on a unix platform. Hooray! :)
28316      path="$BOOT_JDK"
28317      has_space=`$ECHO "$path" | $GREP " "`
28318      if test "x$has_space" != x; then
28319        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28320$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28321        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28322      fi
28323
28324      # Use eval to expand a potential ~
28325      eval path="$path"
28326      if test ! -f "$path" && test ! -d "$path"; then
28327        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28328      fi
28329
28330      if test -d "$path"; then
28331        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28332      else
28333        dir="`$DIRNAME "$path"`"
28334        base="`$BASENAME "$path"`"
28335        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28336      fi
28337    fi
28338  fi
28339
28340            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28341$as_echo_n "checking for Boot JDK... " >&6; }
28342            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28343$as_echo "$BOOT_JDK" >&6; }
28344            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28345$as_echo_n "checking Boot JDK version... " >&6; }
28346            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28347            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28348$as_echo "$BOOT_JDK_VERSION" >&6; }
28349          fi # end check jdk version
28350        fi # end check javac
28351      fi # end check java
28352    fi # end check boot jdk found
28353  fi
28354
28355    done
28356  fi
28357
28358
28359    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28360    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28361      # Do we have a bin/java?
28362      if test ! -x "$BOOT_JDK/bin/java"; then
28363        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28364$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28365        BOOT_JDK_FOUND=no
28366      else
28367        # Do we have a bin/javac?
28368        if test ! -x "$BOOT_JDK/bin/javac"; then
28369          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28370$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28371          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28372$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28373          BOOT_JDK_FOUND=no
28374        else
28375          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28376          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28377
28378          # Extra M4 quote needed to protect [] in grep expression.
28379          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28380          if test "x$FOUND_CORRECT_VERSION" = x; then
28381            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28382$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28383            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28384$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28385            BOOT_JDK_FOUND=no
28386          else
28387            # We're done! :-)
28388            BOOT_JDK_FOUND=yes
28389
28390  # Only process if variable expands to non-empty
28391
28392  if test "x$BOOT_JDK" != x; then
28393    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28394
28395  # Input might be given as Windows format, start by converting to
28396  # unix format.
28397  path="$BOOT_JDK"
28398  new_path=`$CYGPATH -u "$path"`
28399
28400  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28401  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28402  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28403  # "foo.exe" is OK but "foo" is an error.
28404  #
28405  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28406  # It is also a way to make sure we got the proper file name for the real test later on.
28407  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28408  if test "x$test_shortpath" = x; then
28409    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28410$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28411    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28412  fi
28413
28414  # Call helper function which possibly converts this using DOS-style short mode.
28415  # If so, the updated path is stored in $new_path.
28416
28417  input_path="$new_path"
28418  # Check if we need to convert this using DOS-style short mode. If the path
28419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28420  # take no chances and rewrite it.
28421  # Note: m4 eats our [], so we need to use [ and ] instead.
28422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28423  if test "x$has_forbidden_chars" != x; then
28424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28425    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28426    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28427    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28428      # Going to short mode and back again did indeed matter. Since short mode is
28429      # case insensitive, let's make it lowercase to improve readability.
28430      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28431      # Now convert it back to Unix-style (cygpath)
28432      input_path=`$CYGPATH -u "$shortmode_path"`
28433      new_path="$input_path"
28434    fi
28435  fi
28436
28437  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28438  if test "x$test_cygdrive_prefix" = x; then
28439    # As a simple fix, exclude /usr/bin since it's not a real path.
28440    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28441      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28442      # a path prefixed by /cygdrive for fixpath to work.
28443      new_path="$CYGWIN_ROOT_PATH$input_path"
28444    fi
28445  fi
28446
28447
28448  if test "x$path" != "x$new_path"; then
28449    BOOT_JDK="$new_path"
28450    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28451$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28452  fi
28453
28454    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28455
28456  path="$BOOT_JDK"
28457  has_colon=`$ECHO $path | $GREP ^.:`
28458  new_path="$path"
28459  if test "x$has_colon" = x; then
28460    # Not in mixed or Windows style, start by that.
28461    new_path=`cmd //c echo $path`
28462  fi
28463
28464
28465  input_path="$new_path"
28466  # Check if we need to convert this using DOS-style short mode. If the path
28467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28468  # take no chances and rewrite it.
28469  # Note: m4 eats our [], so we need to use [ and ] instead.
28470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28471  if test "x$has_forbidden_chars" != x; then
28472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28473    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28474  fi
28475
28476
28477  windows_path="$new_path"
28478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28479    unix_path=`$CYGPATH -u "$windows_path"`
28480    new_path="$unix_path"
28481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28483    new_path="$unix_path"
28484  fi
28485
28486  if test "x$path" != "x$new_path"; then
28487    BOOT_JDK="$new_path"
28488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28489$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28490  fi
28491
28492  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28493  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28494
28495    else
28496      # We're on a unix platform. Hooray! :)
28497      path="$BOOT_JDK"
28498      has_space=`$ECHO "$path" | $GREP " "`
28499      if test "x$has_space" != x; then
28500        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28501$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28502        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28503      fi
28504
28505      # Use eval to expand a potential ~
28506      eval path="$path"
28507      if test ! -f "$path" && test ! -d "$path"; then
28508        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28509      fi
28510
28511      if test -d "$path"; then
28512        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28513      else
28514        dir="`$DIRNAME "$path"`"
28515        base="`$BASENAME "$path"`"
28516        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28517      fi
28518    fi
28519  fi
28520
28521            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28522$as_echo_n "checking for Boot JDK... " >&6; }
28523            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28524$as_echo "$BOOT_JDK" >&6; }
28525            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28526$as_echo_n "checking Boot JDK version... " >&6; }
28527            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28528            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28529$as_echo "$BOOT_JDK_VERSION" >&6; }
28530          fi # end check jdk version
28531        fi # end check javac
28532      fi # end check java
28533    fi # end check boot jdk found
28534  fi
28535
28536  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28537
28538  if test "x$BOOT_JDK_FOUND" = xno; then
28539    # Now execute the test
28540
28541  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28542  BOOT_JDK_SUFFIX="/Contents/Home"
28543  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28544  if test "x$ALL_JDKS_FOUND" != x; then
28545    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28546
28547  if test "x$BOOT_JDK_FOUND" = xno; then
28548    # Now execute the test
28549
28550        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28551        if test -d "$BOOT_JDK"; then
28552          BOOT_JDK_FOUND=maybe
28553          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28554$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28555        fi
28556
28557
28558    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28559    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28560      # Do we have a bin/java?
28561      if test ! -x "$BOOT_JDK/bin/java"; then
28562        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28563$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28564        BOOT_JDK_FOUND=no
28565      else
28566        # Do we have a bin/javac?
28567        if test ! -x "$BOOT_JDK/bin/javac"; then
28568          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28569$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28570          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28571$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28572          BOOT_JDK_FOUND=no
28573        else
28574          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28575          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28576
28577          # Extra M4 quote needed to protect [] in grep expression.
28578          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28579          if test "x$FOUND_CORRECT_VERSION" = x; then
28580            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28581$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28582            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28583$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28584            BOOT_JDK_FOUND=no
28585          else
28586            # We're done! :-)
28587            BOOT_JDK_FOUND=yes
28588
28589  # Only process if variable expands to non-empty
28590
28591  if test "x$BOOT_JDK" != x; then
28592    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28593
28594  # Input might be given as Windows format, start by converting to
28595  # unix format.
28596  path="$BOOT_JDK"
28597  new_path=`$CYGPATH -u "$path"`
28598
28599  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28600  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28601  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28602  # "foo.exe" is OK but "foo" is an error.
28603  #
28604  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28605  # It is also a way to make sure we got the proper file name for the real test later on.
28606  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28607  if test "x$test_shortpath" = x; then
28608    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28609$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28610    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28611  fi
28612
28613  # Call helper function which possibly converts this using DOS-style short mode.
28614  # If so, the updated path is stored in $new_path.
28615
28616  input_path="$new_path"
28617  # Check if we need to convert this using DOS-style short mode. If the path
28618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28619  # take no chances and rewrite it.
28620  # Note: m4 eats our [], so we need to use [ and ] instead.
28621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28622  if test "x$has_forbidden_chars" != x; then
28623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28624    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28625    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28626    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28627      # Going to short mode and back again did indeed matter. Since short mode is
28628      # case insensitive, let's make it lowercase to improve readability.
28629      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28630      # Now convert it back to Unix-style (cygpath)
28631      input_path=`$CYGPATH -u "$shortmode_path"`
28632      new_path="$input_path"
28633    fi
28634  fi
28635
28636  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28637  if test "x$test_cygdrive_prefix" = x; then
28638    # As a simple fix, exclude /usr/bin since it's not a real path.
28639    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28640      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28641      # a path prefixed by /cygdrive for fixpath to work.
28642      new_path="$CYGWIN_ROOT_PATH$input_path"
28643    fi
28644  fi
28645
28646
28647  if test "x$path" != "x$new_path"; then
28648    BOOT_JDK="$new_path"
28649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28650$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28651  fi
28652
28653    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28654
28655  path="$BOOT_JDK"
28656  has_colon=`$ECHO $path | $GREP ^.:`
28657  new_path="$path"
28658  if test "x$has_colon" = x; then
28659    # Not in mixed or Windows style, start by that.
28660    new_path=`cmd //c echo $path`
28661  fi
28662
28663
28664  input_path="$new_path"
28665  # Check if we need to convert this using DOS-style short mode. If the path
28666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28667  # take no chances and rewrite it.
28668  # Note: m4 eats our [], so we need to use [ and ] instead.
28669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28670  if test "x$has_forbidden_chars" != x; then
28671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28672    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28673  fi
28674
28675
28676  windows_path="$new_path"
28677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28678    unix_path=`$CYGPATH -u "$windows_path"`
28679    new_path="$unix_path"
28680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28682    new_path="$unix_path"
28683  fi
28684
28685  if test "x$path" != "x$new_path"; then
28686    BOOT_JDK="$new_path"
28687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28688$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28689  fi
28690
28691  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28692  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28693
28694    else
28695      # We're on a unix platform. Hooray! :)
28696      path="$BOOT_JDK"
28697      has_space=`$ECHO "$path" | $GREP " "`
28698      if test "x$has_space" != x; then
28699        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28700$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28701        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28702      fi
28703
28704      # Use eval to expand a potential ~
28705      eval path="$path"
28706      if test ! -f "$path" && test ! -d "$path"; then
28707        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28708      fi
28709
28710      if test -d "$path"; then
28711        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28712      else
28713        dir="`$DIRNAME "$path"`"
28714        base="`$BASENAME "$path"`"
28715        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28716      fi
28717    fi
28718  fi
28719
28720            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28721$as_echo_n "checking for Boot JDK... " >&6; }
28722            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28723$as_echo "$BOOT_JDK" >&6; }
28724            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28725$as_echo_n "checking Boot JDK version... " >&6; }
28726            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28727            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28728$as_echo "$BOOT_JDK_VERSION" >&6; }
28729          fi # end check jdk version
28730        fi # end check javac
28731      fi # end check java
28732    fi # end check boot jdk found
28733  fi
28734
28735    done
28736  fi
28737
28738
28739    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28740    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28741      # Do we have a bin/java?
28742      if test ! -x "$BOOT_JDK/bin/java"; then
28743        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28744$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28745        BOOT_JDK_FOUND=no
28746      else
28747        # Do we have a bin/javac?
28748        if test ! -x "$BOOT_JDK/bin/javac"; then
28749          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28750$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28751          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28752$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28753          BOOT_JDK_FOUND=no
28754        else
28755          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28756          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28757
28758          # Extra M4 quote needed to protect [] in grep expression.
28759          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28760          if test "x$FOUND_CORRECT_VERSION" = x; then
28761            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28762$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28763            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28764$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28765            BOOT_JDK_FOUND=no
28766          else
28767            # We're done! :-)
28768            BOOT_JDK_FOUND=yes
28769
28770  # Only process if variable expands to non-empty
28771
28772  if test "x$BOOT_JDK" != x; then
28773    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28774
28775  # Input might be given as Windows format, start by converting to
28776  # unix format.
28777  path="$BOOT_JDK"
28778  new_path=`$CYGPATH -u "$path"`
28779
28780  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28781  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28782  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28783  # "foo.exe" is OK but "foo" is an error.
28784  #
28785  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28786  # It is also a way to make sure we got the proper file name for the real test later on.
28787  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28788  if test "x$test_shortpath" = x; then
28789    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28790$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28791    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28792  fi
28793
28794  # Call helper function which possibly converts this using DOS-style short mode.
28795  # If so, the updated path is stored in $new_path.
28796
28797  input_path="$new_path"
28798  # Check if we need to convert this using DOS-style short mode. If the path
28799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28800  # take no chances and rewrite it.
28801  # Note: m4 eats our [], so we need to use [ and ] instead.
28802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28803  if test "x$has_forbidden_chars" != x; then
28804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28805    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28806    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28807    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28808      # Going to short mode and back again did indeed matter. Since short mode is
28809      # case insensitive, let's make it lowercase to improve readability.
28810      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28811      # Now convert it back to Unix-style (cygpath)
28812      input_path=`$CYGPATH -u "$shortmode_path"`
28813      new_path="$input_path"
28814    fi
28815  fi
28816
28817  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28818  if test "x$test_cygdrive_prefix" = x; then
28819    # As a simple fix, exclude /usr/bin since it's not a real path.
28820    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28821      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28822      # a path prefixed by /cygdrive for fixpath to work.
28823      new_path="$CYGWIN_ROOT_PATH$input_path"
28824    fi
28825  fi
28826
28827
28828  if test "x$path" != "x$new_path"; then
28829    BOOT_JDK="$new_path"
28830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28831$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28832  fi
28833
28834    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28835
28836  path="$BOOT_JDK"
28837  has_colon=`$ECHO $path | $GREP ^.:`
28838  new_path="$path"
28839  if test "x$has_colon" = x; then
28840    # Not in mixed or Windows style, start by that.
28841    new_path=`cmd //c echo $path`
28842  fi
28843
28844
28845  input_path="$new_path"
28846  # Check if we need to convert this using DOS-style short mode. If the path
28847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28848  # take no chances and rewrite it.
28849  # Note: m4 eats our [], so we need to use [ and ] instead.
28850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28851  if test "x$has_forbidden_chars" != x; then
28852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28853    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28854  fi
28855
28856
28857  windows_path="$new_path"
28858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28859    unix_path=`$CYGPATH -u "$windows_path"`
28860    new_path="$unix_path"
28861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28863    new_path="$unix_path"
28864  fi
28865
28866  if test "x$path" != "x$new_path"; then
28867    BOOT_JDK="$new_path"
28868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28869$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28870  fi
28871
28872  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28873  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28874
28875    else
28876      # We're on a unix platform. Hooray! :)
28877      path="$BOOT_JDK"
28878      has_space=`$ECHO "$path" | $GREP " "`
28879      if test "x$has_space" != x; then
28880        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28881$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28882        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28883      fi
28884
28885      # Use eval to expand a potential ~
28886      eval path="$path"
28887      if test ! -f "$path" && test ! -d "$path"; then
28888        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28889      fi
28890
28891      if test -d "$path"; then
28892        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28893      else
28894        dir="`$DIRNAME "$path"`"
28895        base="`$BASENAME "$path"`"
28896        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28897      fi
28898    fi
28899  fi
28900
28901            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28902$as_echo_n "checking for Boot JDK... " >&6; }
28903            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28904$as_echo "$BOOT_JDK" >&6; }
28905            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28906$as_echo_n "checking Boot JDK version... " >&6; }
28907            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28908            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28909$as_echo "$BOOT_JDK_VERSION" >&6; }
28910          fi # end check jdk version
28911        fi # end check javac
28912      fi # end check java
28913    fi # end check boot jdk found
28914  fi
28915
28916
28917  if test "x$BOOT_JDK_FOUND" = xno; then
28918    # Now execute the test
28919
28920  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28921  BOOT_JDK_SUFFIX="/Contents/Home"
28922  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28923  if test "x$ALL_JDKS_FOUND" != x; then
28924    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28925
28926  if test "x$BOOT_JDK_FOUND" = xno; then
28927    # Now execute the test
28928
28929        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28930        if test -d "$BOOT_JDK"; then
28931          BOOT_JDK_FOUND=maybe
28932          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28933$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28934        fi
28935
28936
28937    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28938    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28939      # Do we have a bin/java?
28940      if test ! -x "$BOOT_JDK/bin/java"; then
28941        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28942$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28943        BOOT_JDK_FOUND=no
28944      else
28945        # Do we have a bin/javac?
28946        if test ! -x "$BOOT_JDK/bin/javac"; then
28947          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28948$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28949          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28950$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28951          BOOT_JDK_FOUND=no
28952        else
28953          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28954          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28955
28956          # Extra M4 quote needed to protect [] in grep expression.
28957          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28958          if test "x$FOUND_CORRECT_VERSION" = x; then
28959            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28960$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28961            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28962$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28963            BOOT_JDK_FOUND=no
28964          else
28965            # We're done! :-)
28966            BOOT_JDK_FOUND=yes
28967
28968  # Only process if variable expands to non-empty
28969
28970  if test "x$BOOT_JDK" != x; then
28971    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28972
28973  # Input might be given as Windows format, start by converting to
28974  # unix format.
28975  path="$BOOT_JDK"
28976  new_path=`$CYGPATH -u "$path"`
28977
28978  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28979  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28980  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28981  # "foo.exe" is OK but "foo" is an error.
28982  #
28983  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28984  # It is also a way to make sure we got the proper file name for the real test later on.
28985  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28986  if test "x$test_shortpath" = x; then
28987    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28988$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28989    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28990  fi
28991
28992  # Call helper function which possibly converts this using DOS-style short mode.
28993  # If so, the updated path is stored in $new_path.
28994
28995  input_path="$new_path"
28996  # Check if we need to convert this using DOS-style short mode. If the path
28997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28998  # take no chances and rewrite it.
28999  # Note: m4 eats our [], so we need to use [ and ] instead.
29000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29001  if test "x$has_forbidden_chars" != x; then
29002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29003    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29004    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29005    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29006      # Going to short mode and back again did indeed matter. Since short mode is
29007      # case insensitive, let's make it lowercase to improve readability.
29008      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29009      # Now convert it back to Unix-style (cygpath)
29010      input_path=`$CYGPATH -u "$shortmode_path"`
29011      new_path="$input_path"
29012    fi
29013  fi
29014
29015  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29016  if test "x$test_cygdrive_prefix" = x; then
29017    # As a simple fix, exclude /usr/bin since it's not a real path.
29018    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29019      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29020      # a path prefixed by /cygdrive for fixpath to work.
29021      new_path="$CYGWIN_ROOT_PATH$input_path"
29022    fi
29023  fi
29024
29025
29026  if test "x$path" != "x$new_path"; then
29027    BOOT_JDK="$new_path"
29028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29029$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29030  fi
29031
29032    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29033
29034  path="$BOOT_JDK"
29035  has_colon=`$ECHO $path | $GREP ^.:`
29036  new_path="$path"
29037  if test "x$has_colon" = x; then
29038    # Not in mixed or Windows style, start by that.
29039    new_path=`cmd //c echo $path`
29040  fi
29041
29042
29043  input_path="$new_path"
29044  # Check if we need to convert this using DOS-style short mode. If the path
29045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29046  # take no chances and rewrite it.
29047  # Note: m4 eats our [], so we need to use [ and ] instead.
29048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29049  if test "x$has_forbidden_chars" != x; then
29050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29051    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29052  fi
29053
29054
29055  windows_path="$new_path"
29056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29057    unix_path=`$CYGPATH -u "$windows_path"`
29058    new_path="$unix_path"
29059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29061    new_path="$unix_path"
29062  fi
29063
29064  if test "x$path" != "x$new_path"; then
29065    BOOT_JDK="$new_path"
29066    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29067$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29068  fi
29069
29070  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29071  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29072
29073    else
29074      # We're on a unix platform. Hooray! :)
29075      path="$BOOT_JDK"
29076      has_space=`$ECHO "$path" | $GREP " "`
29077      if test "x$has_space" != x; then
29078        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29079$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29080        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29081      fi
29082
29083      # Use eval to expand a potential ~
29084      eval path="$path"
29085      if test ! -f "$path" && test ! -d "$path"; then
29086        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29087      fi
29088
29089      if test -d "$path"; then
29090        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29091      else
29092        dir="`$DIRNAME "$path"`"
29093        base="`$BASENAME "$path"`"
29094        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29095      fi
29096    fi
29097  fi
29098
29099            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29100$as_echo_n "checking for Boot JDK... " >&6; }
29101            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29102$as_echo "$BOOT_JDK" >&6; }
29103            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29104$as_echo_n "checking Boot JDK version... " >&6; }
29105            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29106            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29107$as_echo "$BOOT_JDK_VERSION" >&6; }
29108          fi # end check jdk version
29109        fi # end check javac
29110      fi # end check java
29111    fi # end check boot jdk found
29112  fi
29113
29114    done
29115  fi
29116
29117
29118    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29119    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29120      # Do we have a bin/java?
29121      if test ! -x "$BOOT_JDK/bin/java"; then
29122        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29123$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29124        BOOT_JDK_FOUND=no
29125      else
29126        # Do we have a bin/javac?
29127        if test ! -x "$BOOT_JDK/bin/javac"; then
29128          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29129$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29130          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29131$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29132          BOOT_JDK_FOUND=no
29133        else
29134          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29135          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29136
29137          # Extra M4 quote needed to protect [] in grep expression.
29138          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29139          if test "x$FOUND_CORRECT_VERSION" = x; then
29140            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29141$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29142            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29143$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29144            BOOT_JDK_FOUND=no
29145          else
29146            # We're done! :-)
29147            BOOT_JDK_FOUND=yes
29148
29149  # Only process if variable expands to non-empty
29150
29151  if test "x$BOOT_JDK" != x; then
29152    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29153
29154  # Input might be given as Windows format, start by converting to
29155  # unix format.
29156  path="$BOOT_JDK"
29157  new_path=`$CYGPATH -u "$path"`
29158
29159  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29160  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29161  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29162  # "foo.exe" is OK but "foo" is an error.
29163  #
29164  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29165  # It is also a way to make sure we got the proper file name for the real test later on.
29166  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29167  if test "x$test_shortpath" = x; then
29168    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29169$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29170    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29171  fi
29172
29173  # Call helper function which possibly converts this using DOS-style short mode.
29174  # If so, the updated path is stored in $new_path.
29175
29176  input_path="$new_path"
29177  # Check if we need to convert this using DOS-style short mode. If the path
29178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29179  # take no chances and rewrite it.
29180  # Note: m4 eats our [], so we need to use [ and ] instead.
29181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29182  if test "x$has_forbidden_chars" != x; then
29183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29184    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29185    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29186    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29187      # Going to short mode and back again did indeed matter. Since short mode is
29188      # case insensitive, let's make it lowercase to improve readability.
29189      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29190      # Now convert it back to Unix-style (cygpath)
29191      input_path=`$CYGPATH -u "$shortmode_path"`
29192      new_path="$input_path"
29193    fi
29194  fi
29195
29196  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29197  if test "x$test_cygdrive_prefix" = x; then
29198    # As a simple fix, exclude /usr/bin since it's not a real path.
29199    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29200      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29201      # a path prefixed by /cygdrive for fixpath to work.
29202      new_path="$CYGWIN_ROOT_PATH$input_path"
29203    fi
29204  fi
29205
29206
29207  if test "x$path" != "x$new_path"; then
29208    BOOT_JDK="$new_path"
29209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29210$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29211  fi
29212
29213    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29214
29215  path="$BOOT_JDK"
29216  has_colon=`$ECHO $path | $GREP ^.:`
29217  new_path="$path"
29218  if test "x$has_colon" = x; then
29219    # Not in mixed or Windows style, start by that.
29220    new_path=`cmd //c echo $path`
29221  fi
29222
29223
29224  input_path="$new_path"
29225  # Check if we need to convert this using DOS-style short mode. If the path
29226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29227  # take no chances and rewrite it.
29228  # Note: m4 eats our [], so we need to use [ and ] instead.
29229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29230  if test "x$has_forbidden_chars" != x; then
29231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29232    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29233  fi
29234
29235
29236  windows_path="$new_path"
29237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29238    unix_path=`$CYGPATH -u "$windows_path"`
29239    new_path="$unix_path"
29240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29242    new_path="$unix_path"
29243  fi
29244
29245  if test "x$path" != "x$new_path"; then
29246    BOOT_JDK="$new_path"
29247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29248$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29249  fi
29250
29251  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29252  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29253
29254    else
29255      # We're on a unix platform. Hooray! :)
29256      path="$BOOT_JDK"
29257      has_space=`$ECHO "$path" | $GREP " "`
29258      if test "x$has_space" != x; then
29259        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29260$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29261        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29262      fi
29263
29264      # Use eval to expand a potential ~
29265      eval path="$path"
29266      if test ! -f "$path" && test ! -d "$path"; then
29267        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29268      fi
29269
29270      if test -d "$path"; then
29271        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29272      else
29273        dir="`$DIRNAME "$path"`"
29274        base="`$BASENAME "$path"`"
29275        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29276      fi
29277    fi
29278  fi
29279
29280            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29281$as_echo_n "checking for Boot JDK... " >&6; }
29282            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29283$as_echo "$BOOT_JDK" >&6; }
29284            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29285$as_echo_n "checking Boot JDK version... " >&6; }
29286            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29287            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29288$as_echo "$BOOT_JDK_VERSION" >&6; }
29289          fi # end check jdk version
29290        fi # end check javac
29291      fi # end check java
29292    fi # end check boot jdk found
29293  fi
29294
29295  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29296
29297  if test "x$BOOT_JDK_FOUND" = xno; then
29298    # Now execute the test
29299
29300  BOOT_JDK_PREFIX="/usr/lib/jvm"
29301  BOOT_JDK_SUFFIX=""
29302  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29303  if test "x$ALL_JDKS_FOUND" != x; then
29304    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29305
29306  if test "x$BOOT_JDK_FOUND" = xno; then
29307    # Now execute the test
29308
29309        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29310        if test -d "$BOOT_JDK"; then
29311          BOOT_JDK_FOUND=maybe
29312          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29313$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29314        fi
29315
29316
29317    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29318    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29319      # Do we have a bin/java?
29320      if test ! -x "$BOOT_JDK/bin/java"; then
29321        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29322$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29323        BOOT_JDK_FOUND=no
29324      else
29325        # Do we have a bin/javac?
29326        if test ! -x "$BOOT_JDK/bin/javac"; then
29327          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29328$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29329          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29330$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29331          BOOT_JDK_FOUND=no
29332        else
29333          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29334          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29335
29336          # Extra M4 quote needed to protect [] in grep expression.
29337          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29338          if test "x$FOUND_CORRECT_VERSION" = x; then
29339            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29340$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29341            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29342$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29343            BOOT_JDK_FOUND=no
29344          else
29345            # We're done! :-)
29346            BOOT_JDK_FOUND=yes
29347
29348  # Only process if variable expands to non-empty
29349
29350  if test "x$BOOT_JDK" != x; then
29351    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29352
29353  # Input might be given as Windows format, start by converting to
29354  # unix format.
29355  path="$BOOT_JDK"
29356  new_path=`$CYGPATH -u "$path"`
29357
29358  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29359  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29360  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29361  # "foo.exe" is OK but "foo" is an error.
29362  #
29363  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29364  # It is also a way to make sure we got the proper file name for the real test later on.
29365  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29366  if test "x$test_shortpath" = x; then
29367    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29368$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29369    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29370  fi
29371
29372  # Call helper function which possibly converts this using DOS-style short mode.
29373  # If so, the updated path is stored in $new_path.
29374
29375  input_path="$new_path"
29376  # Check if we need to convert this using DOS-style short mode. If the path
29377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29378  # take no chances and rewrite it.
29379  # Note: m4 eats our [], so we need to use [ and ] instead.
29380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29381  if test "x$has_forbidden_chars" != x; then
29382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29383    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29384    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29385    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29386      # Going to short mode and back again did indeed matter. Since short mode is
29387      # case insensitive, let's make it lowercase to improve readability.
29388      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29389      # Now convert it back to Unix-style (cygpath)
29390      input_path=`$CYGPATH -u "$shortmode_path"`
29391      new_path="$input_path"
29392    fi
29393  fi
29394
29395  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29396  if test "x$test_cygdrive_prefix" = x; then
29397    # As a simple fix, exclude /usr/bin since it's not a real path.
29398    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29399      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29400      # a path prefixed by /cygdrive for fixpath to work.
29401      new_path="$CYGWIN_ROOT_PATH$input_path"
29402    fi
29403  fi
29404
29405
29406  if test "x$path" != "x$new_path"; then
29407    BOOT_JDK="$new_path"
29408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29409$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29410  fi
29411
29412    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29413
29414  path="$BOOT_JDK"
29415  has_colon=`$ECHO $path | $GREP ^.:`
29416  new_path="$path"
29417  if test "x$has_colon" = x; then
29418    # Not in mixed or Windows style, start by that.
29419    new_path=`cmd //c echo $path`
29420  fi
29421
29422
29423  input_path="$new_path"
29424  # Check if we need to convert this using DOS-style short mode. If the path
29425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29426  # take no chances and rewrite it.
29427  # Note: m4 eats our [], so we need to use [ and ] instead.
29428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29429  if test "x$has_forbidden_chars" != x; then
29430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29431    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29432  fi
29433
29434
29435  windows_path="$new_path"
29436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29437    unix_path=`$CYGPATH -u "$windows_path"`
29438    new_path="$unix_path"
29439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29441    new_path="$unix_path"
29442  fi
29443
29444  if test "x$path" != "x$new_path"; then
29445    BOOT_JDK="$new_path"
29446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29447$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29448  fi
29449
29450  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29451  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29452
29453    else
29454      # We're on a unix platform. Hooray! :)
29455      path="$BOOT_JDK"
29456      has_space=`$ECHO "$path" | $GREP " "`
29457      if test "x$has_space" != x; then
29458        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29459$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29460        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29461      fi
29462
29463      # Use eval to expand a potential ~
29464      eval path="$path"
29465      if test ! -f "$path" && test ! -d "$path"; then
29466        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29467      fi
29468
29469      if test -d "$path"; then
29470        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29471      else
29472        dir="`$DIRNAME "$path"`"
29473        base="`$BASENAME "$path"`"
29474        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29475      fi
29476    fi
29477  fi
29478
29479            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29480$as_echo_n "checking for Boot JDK... " >&6; }
29481            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29482$as_echo "$BOOT_JDK" >&6; }
29483            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29484$as_echo_n "checking Boot JDK version... " >&6; }
29485            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29486            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29487$as_echo "$BOOT_JDK_VERSION" >&6; }
29488          fi # end check jdk version
29489        fi # end check javac
29490      fi # end check java
29491    fi # end check boot jdk found
29492  fi
29493
29494    done
29495  fi
29496
29497
29498    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29499    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29500      # Do we have a bin/java?
29501      if test ! -x "$BOOT_JDK/bin/java"; then
29502        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29503$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29504        BOOT_JDK_FOUND=no
29505      else
29506        # Do we have a bin/javac?
29507        if test ! -x "$BOOT_JDK/bin/javac"; then
29508          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29509$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29510          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29511$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29512          BOOT_JDK_FOUND=no
29513        else
29514          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29515          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29516
29517          # Extra M4 quote needed to protect [] in grep expression.
29518          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29519          if test "x$FOUND_CORRECT_VERSION" = x; then
29520            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29521$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29522            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29523$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29524            BOOT_JDK_FOUND=no
29525          else
29526            # We're done! :-)
29527            BOOT_JDK_FOUND=yes
29528
29529  # Only process if variable expands to non-empty
29530
29531  if test "x$BOOT_JDK" != x; then
29532    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29533
29534  # Input might be given as Windows format, start by converting to
29535  # unix format.
29536  path="$BOOT_JDK"
29537  new_path=`$CYGPATH -u "$path"`
29538
29539  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29540  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29541  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29542  # "foo.exe" is OK but "foo" is an error.
29543  #
29544  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29545  # It is also a way to make sure we got the proper file name for the real test later on.
29546  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29547  if test "x$test_shortpath" = x; then
29548    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29549$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29550    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29551  fi
29552
29553  # Call helper function which possibly converts this using DOS-style short mode.
29554  # If so, the updated path is stored in $new_path.
29555
29556  input_path="$new_path"
29557  # Check if we need to convert this using DOS-style short mode. If the path
29558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29559  # take no chances and rewrite it.
29560  # Note: m4 eats our [], so we need to use [ and ] instead.
29561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29562  if test "x$has_forbidden_chars" != x; then
29563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29564    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29567      # Going to short mode and back again did indeed matter. Since short mode is
29568      # case insensitive, let's make it lowercase to improve readability.
29569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29570      # Now convert it back to Unix-style (cygpath)
29571      input_path=`$CYGPATH -u "$shortmode_path"`
29572      new_path="$input_path"
29573    fi
29574  fi
29575
29576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29577  if test "x$test_cygdrive_prefix" = x; then
29578    # As a simple fix, exclude /usr/bin since it's not a real path.
29579    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29581      # a path prefixed by /cygdrive for fixpath to work.
29582      new_path="$CYGWIN_ROOT_PATH$input_path"
29583    fi
29584  fi
29585
29586
29587  if test "x$path" != "x$new_path"; then
29588    BOOT_JDK="$new_path"
29589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29590$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29591  fi
29592
29593    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29594
29595  path="$BOOT_JDK"
29596  has_colon=`$ECHO $path | $GREP ^.:`
29597  new_path="$path"
29598  if test "x$has_colon" = x; then
29599    # Not in mixed or Windows style, start by that.
29600    new_path=`cmd //c echo $path`
29601  fi
29602
29603
29604  input_path="$new_path"
29605  # Check if we need to convert this using DOS-style short mode. If the path
29606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29607  # take no chances and rewrite it.
29608  # Note: m4 eats our [], so we need to use [ and ] instead.
29609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29610  if test "x$has_forbidden_chars" != x; then
29611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29612    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29613  fi
29614
29615
29616  windows_path="$new_path"
29617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29618    unix_path=`$CYGPATH -u "$windows_path"`
29619    new_path="$unix_path"
29620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29622    new_path="$unix_path"
29623  fi
29624
29625  if test "x$path" != "x$new_path"; then
29626    BOOT_JDK="$new_path"
29627    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29628$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29629  fi
29630
29631  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29632  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29633
29634    else
29635      # We're on a unix platform. Hooray! :)
29636      path="$BOOT_JDK"
29637      has_space=`$ECHO "$path" | $GREP " "`
29638      if test "x$has_space" != x; then
29639        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29640$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29641        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29642      fi
29643
29644      # Use eval to expand a potential ~
29645      eval path="$path"
29646      if test ! -f "$path" && test ! -d "$path"; then
29647        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29648      fi
29649
29650      if test -d "$path"; then
29651        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29652      else
29653        dir="`$DIRNAME "$path"`"
29654        base="`$BASENAME "$path"`"
29655        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29656      fi
29657    fi
29658  fi
29659
29660            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29661$as_echo_n "checking for Boot JDK... " >&6; }
29662            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29663$as_echo "$BOOT_JDK" >&6; }
29664            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29665$as_echo_n "checking Boot JDK version... " >&6; }
29666            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29667            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29668$as_echo "$BOOT_JDK_VERSION" >&6; }
29669          fi # end check jdk version
29670        fi # end check javac
29671      fi # end check java
29672    fi # end check boot jdk found
29673  fi
29674
29675  fi
29676
29677
29678    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29679    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29680      # Do we have a bin/java?
29681      if test ! -x "$BOOT_JDK/bin/java"; then
29682        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29683$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29684        BOOT_JDK_FOUND=no
29685      else
29686        # Do we have a bin/javac?
29687        if test ! -x "$BOOT_JDK/bin/javac"; then
29688          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29689$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29690          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29691$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29692          BOOT_JDK_FOUND=no
29693        else
29694          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29695          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29696
29697          # Extra M4 quote needed to protect [] in grep expression.
29698          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29699          if test "x$FOUND_CORRECT_VERSION" = x; then
29700            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29701$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29702            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29703$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29704            BOOT_JDK_FOUND=no
29705          else
29706            # We're done! :-)
29707            BOOT_JDK_FOUND=yes
29708
29709  # Only process if variable expands to non-empty
29710
29711  if test "x$BOOT_JDK" != x; then
29712    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29713
29714  # Input might be given as Windows format, start by converting to
29715  # unix format.
29716  path="$BOOT_JDK"
29717  new_path=`$CYGPATH -u "$path"`
29718
29719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29722  # "foo.exe" is OK but "foo" is an error.
29723  #
29724  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29725  # It is also a way to make sure we got the proper file name for the real test later on.
29726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29727  if test "x$test_shortpath" = x; then
29728    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29729$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29730    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29731  fi
29732
29733  # Call helper function which possibly converts this using DOS-style short mode.
29734  # If so, the updated path is stored in $new_path.
29735
29736  input_path="$new_path"
29737  # Check if we need to convert this using DOS-style short mode. If the path
29738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29739  # take no chances and rewrite it.
29740  # Note: m4 eats our [], so we need to use [ and ] instead.
29741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29742  if test "x$has_forbidden_chars" != x; then
29743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29747      # Going to short mode and back again did indeed matter. Since short mode is
29748      # case insensitive, let's make it lowercase to improve readability.
29749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29750      # Now convert it back to Unix-style (cygpath)
29751      input_path=`$CYGPATH -u "$shortmode_path"`
29752      new_path="$input_path"
29753    fi
29754  fi
29755
29756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29757  if test "x$test_cygdrive_prefix" = x; then
29758    # As a simple fix, exclude /usr/bin since it's not a real path.
29759    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29761      # a path prefixed by /cygdrive for fixpath to work.
29762      new_path="$CYGWIN_ROOT_PATH$input_path"
29763    fi
29764  fi
29765
29766
29767  if test "x$path" != "x$new_path"; then
29768    BOOT_JDK="$new_path"
29769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29770$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29771  fi
29772
29773    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29774
29775  path="$BOOT_JDK"
29776  has_colon=`$ECHO $path | $GREP ^.:`
29777  new_path="$path"
29778  if test "x$has_colon" = x; then
29779    # Not in mixed or Windows style, start by that.
29780    new_path=`cmd //c echo $path`
29781  fi
29782
29783
29784  input_path="$new_path"
29785  # Check if we need to convert this using DOS-style short mode. If the path
29786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29787  # take no chances and rewrite it.
29788  # Note: m4 eats our [], so we need to use [ and ] instead.
29789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29790  if test "x$has_forbidden_chars" != x; then
29791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29793  fi
29794
29795
29796  windows_path="$new_path"
29797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29798    unix_path=`$CYGPATH -u "$windows_path"`
29799    new_path="$unix_path"
29800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29802    new_path="$unix_path"
29803  fi
29804
29805  if test "x$path" != "x$new_path"; then
29806    BOOT_JDK="$new_path"
29807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29808$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29809  fi
29810
29811  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29812  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29813
29814    else
29815      # We're on a unix platform. Hooray! :)
29816      path="$BOOT_JDK"
29817      has_space=`$ECHO "$path" | $GREP " "`
29818      if test "x$has_space" != x; then
29819        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29820$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29821        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29822      fi
29823
29824      # Use eval to expand a potential ~
29825      eval path="$path"
29826      if test ! -f "$path" && test ! -d "$path"; then
29827        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29828      fi
29829
29830      if test -d "$path"; then
29831        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29832      else
29833        dir="`$DIRNAME "$path"`"
29834        base="`$BASENAME "$path"`"
29835        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29836      fi
29837    fi
29838  fi
29839
29840            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29841$as_echo_n "checking for Boot JDK... " >&6; }
29842            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29843$as_echo "$BOOT_JDK" >&6; }
29844            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29845$as_echo_n "checking Boot JDK version... " >&6; }
29846            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29847            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29848$as_echo "$BOOT_JDK_VERSION" >&6; }
29849          fi # end check jdk version
29850        fi # end check javac
29851      fi # end check java
29852    fi # end check boot jdk found
29853  fi
29854
29855
29856  # If we haven't found anything yet, we've truly lost. Give up.
29857  if test "x$BOOT_JDK_FOUND" = xno; then
29858
29859  # Print a helpful message on how to acquire the necessary build dependency.
29860  # openjdk is the help tag: freetype, cups, alsa etc
29861  MISSING_DEPENDENCY=openjdk
29862
29863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29864    cygwin_help $MISSING_DEPENDENCY
29865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29866    msys_help $MISSING_DEPENDENCY
29867  else
29868    PKGHANDLER_COMMAND=
29869
29870    case $PKGHANDLER in
29871      apt-get)
29872        apt_help     $MISSING_DEPENDENCY ;;
29873      yum)
29874        yum_help     $MISSING_DEPENDENCY ;;
29875      port)
29876        port_help    $MISSING_DEPENDENCY ;;
29877      pkgutil)
29878        pkgutil_help $MISSING_DEPENDENCY ;;
29879      pkgadd)
29880        pkgadd_help  $MISSING_DEPENDENCY ;;
29881    esac
29882
29883    if test "x$PKGHANDLER_COMMAND" != x; then
29884      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29885    fi
29886  fi
29887
29888    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29889$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29890    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29891$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29892    as_fn_error $? "Cannot continue" "$LINENO" 5
29893  fi
29894
29895
29896
29897  # Setup tools from the Boot JDK.
29898
29899  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29900
29901  # Publish this variable in the help.
29902
29903
29904  if [ -z "${JAVA+x}" ]; then
29905    # The variable is not set by user, try to locate tool using the code snippet
29906
29907      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29908$as_echo_n "checking for java in Boot JDK... " >&6; }
29909      JAVA=$BOOT_JDK/bin/java
29910      if test ! -x $JAVA; then
29911        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29912$as_echo "not found" >&6; }
29913        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29914$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29915        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29916      fi
29917      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29918$as_echo "ok" >&6; }
29919
29920
29921  else
29922    # The variable is set, but is it from the command line or the environment?
29923
29924    # Try to remove the string !JAVA! from our list.
29925    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29926    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29927      # If it failed, the variable was not from the command line. Ignore it,
29928      # but warn the user (except for BASH, which is always set by the calling BASH).
29929      if test "xJAVA" != xBASH; then
29930        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29931$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29932      fi
29933      # Try to locate tool using the code snippet
29934
29935      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29936$as_echo_n "checking for java in Boot JDK... " >&6; }
29937      JAVA=$BOOT_JDK/bin/java
29938      if test ! -x $JAVA; then
29939        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29940$as_echo "not found" >&6; }
29941        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29942$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29943        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29944      fi
29945      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29946$as_echo "ok" >&6; }
29947
29948
29949    else
29950      # If it succeeded, then it was overridden by the user. We will use it
29951      # for the tool.
29952
29953      # First remove it from the list of overridden variables, so we can test
29954      # for unknown variables in the end.
29955      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29956
29957      # Check if we try to supply an empty value
29958      if test "x$JAVA" = x; then
29959        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29960$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29961        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29962$as_echo_n "checking for JAVA... " >&6; }
29963        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29964$as_echo "disabled" >&6; }
29965      else
29966        # Check if the provided tool contains a complete path.
29967        tool_specified="$JAVA"
29968        tool_basename="${tool_specified##*/}"
29969        if test "x$tool_basename" = "x$tool_specified"; then
29970          # A command without a complete path is provided, search $PATH.
29971          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29972$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29973          # Extract the first word of "$tool_basename", so it can be a program name with args.
29974set dummy $tool_basename; ac_word=$2
29975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29976$as_echo_n "checking for $ac_word... " >&6; }
29977if ${ac_cv_path_JAVA+:} false; then :
29978  $as_echo_n "(cached) " >&6
29979else
29980  case $JAVA in
29981  [\\/]* | ?:[\\/]*)
29982  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29983  ;;
29984  *)
29985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29986for as_dir in $PATH
29987do
29988  IFS=$as_save_IFS
29989  test -z "$as_dir" && as_dir=.
29990    for ac_exec_ext in '' $ac_executable_extensions; do
29991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29992    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29994    break 2
29995  fi
29996done
29997  done
29998IFS=$as_save_IFS
29999
30000  ;;
30001esac
30002fi
30003JAVA=$ac_cv_path_JAVA
30004if test -n "$JAVA"; then
30005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30006$as_echo "$JAVA" >&6; }
30007else
30008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30009$as_echo "no" >&6; }
30010fi
30011
30012
30013          if test "x$JAVA" = x; then
30014            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30015          fi
30016        else
30017          # Otherwise we believe it is a complete path. Use it as it is.
30018          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30019$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30020          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30021$as_echo_n "checking for JAVA... " >&6; }
30022          if test ! -x "$tool_specified"; then
30023            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30024$as_echo "not found" >&6; }
30025            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30026          fi
30027          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30028$as_echo "$tool_specified" >&6; }
30029        fi
30030      fi
30031    fi
30032
30033  fi
30034
30035
30036
30037  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30038
30039  # Publish this variable in the help.
30040
30041
30042  if [ -z "${JAVAC+x}" ]; then
30043    # The variable is not set by user, try to locate tool using the code snippet
30044
30045      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30046$as_echo_n "checking for javac in Boot JDK... " >&6; }
30047      JAVAC=$BOOT_JDK/bin/javac
30048      if test ! -x $JAVAC; then
30049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30050$as_echo "not found" >&6; }
30051        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30052$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30053        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30054      fi
30055      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30056$as_echo "ok" >&6; }
30057
30058
30059  else
30060    # The variable is set, but is it from the command line or the environment?
30061
30062    # Try to remove the string !JAVAC! from our list.
30063    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30064    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30065      # If it failed, the variable was not from the command line. Ignore it,
30066      # but warn the user (except for BASH, which is always set by the calling BASH).
30067      if test "xJAVAC" != xBASH; then
30068        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30069$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30070      fi
30071      # Try to locate tool using the code snippet
30072
30073      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30074$as_echo_n "checking for javac in Boot JDK... " >&6; }
30075      JAVAC=$BOOT_JDK/bin/javac
30076      if test ! -x $JAVAC; then
30077        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30078$as_echo "not found" >&6; }
30079        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30080$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30081        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30082      fi
30083      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30084$as_echo "ok" >&6; }
30085
30086
30087    else
30088      # If it succeeded, then it was overridden by the user. We will use it
30089      # for the tool.
30090
30091      # First remove it from the list of overridden variables, so we can test
30092      # for unknown variables in the end.
30093      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30094
30095      # Check if we try to supply an empty value
30096      if test "x$JAVAC" = x; then
30097        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30098$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30099        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30100$as_echo_n "checking for JAVAC... " >&6; }
30101        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30102$as_echo "disabled" >&6; }
30103      else
30104        # Check if the provided tool contains a complete path.
30105        tool_specified="$JAVAC"
30106        tool_basename="${tool_specified##*/}"
30107        if test "x$tool_basename" = "x$tool_specified"; then
30108          # A command without a complete path is provided, search $PATH.
30109          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30110$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30111          # Extract the first word of "$tool_basename", so it can be a program name with args.
30112set dummy $tool_basename; ac_word=$2
30113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30114$as_echo_n "checking for $ac_word... " >&6; }
30115if ${ac_cv_path_JAVAC+:} false; then :
30116  $as_echo_n "(cached) " >&6
30117else
30118  case $JAVAC in
30119  [\\/]* | ?:[\\/]*)
30120  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30121  ;;
30122  *)
30123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30124for as_dir in $PATH
30125do
30126  IFS=$as_save_IFS
30127  test -z "$as_dir" && as_dir=.
30128    for ac_exec_ext in '' $ac_executable_extensions; do
30129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30130    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30132    break 2
30133  fi
30134done
30135  done
30136IFS=$as_save_IFS
30137
30138  ;;
30139esac
30140fi
30141JAVAC=$ac_cv_path_JAVAC
30142if test -n "$JAVAC"; then
30143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30144$as_echo "$JAVAC" >&6; }
30145else
30146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30147$as_echo "no" >&6; }
30148fi
30149
30150
30151          if test "x$JAVAC" = x; then
30152            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30153          fi
30154        else
30155          # Otherwise we believe it is a complete path. Use it as it is.
30156          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30157$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30158          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30159$as_echo_n "checking for JAVAC... " >&6; }
30160          if test ! -x "$tool_specified"; then
30161            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30162$as_echo "not found" >&6; }
30163            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30164          fi
30165          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30166$as_echo "$tool_specified" >&6; }
30167        fi
30168      fi
30169    fi
30170
30171  fi
30172
30173
30174
30175  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30176
30177  # Publish this variable in the help.
30178
30179
30180  if [ -z "${JAVAH+x}" ]; then
30181    # The variable is not set by user, try to locate tool using the code snippet
30182
30183      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30184$as_echo_n "checking for javah in Boot JDK... " >&6; }
30185      JAVAH=$BOOT_JDK/bin/javah
30186      if test ! -x $JAVAH; then
30187        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30188$as_echo "not found" >&6; }
30189        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30190$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30191        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30192      fi
30193      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30194$as_echo "ok" >&6; }
30195
30196
30197  else
30198    # The variable is set, but is it from the command line or the environment?
30199
30200    # Try to remove the string !JAVAH! from our list.
30201    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30202    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30203      # If it failed, the variable was not from the command line. Ignore it,
30204      # but warn the user (except for BASH, which is always set by the calling BASH).
30205      if test "xJAVAH" != xBASH; then
30206        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30207$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30208      fi
30209      # Try to locate tool using the code snippet
30210
30211      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30212$as_echo_n "checking for javah in Boot JDK... " >&6; }
30213      JAVAH=$BOOT_JDK/bin/javah
30214      if test ! -x $JAVAH; then
30215        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30216$as_echo "not found" >&6; }
30217        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30218$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30219        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30220      fi
30221      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30222$as_echo "ok" >&6; }
30223
30224
30225    else
30226      # If it succeeded, then it was overridden by the user. We will use it
30227      # for the tool.
30228
30229      # First remove it from the list of overridden variables, so we can test
30230      # for unknown variables in the end.
30231      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30232
30233      # Check if we try to supply an empty value
30234      if test "x$JAVAH" = x; then
30235        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30236$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30237        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30238$as_echo_n "checking for JAVAH... " >&6; }
30239        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30240$as_echo "disabled" >&6; }
30241      else
30242        # Check if the provided tool contains a complete path.
30243        tool_specified="$JAVAH"
30244        tool_basename="${tool_specified##*/}"
30245        if test "x$tool_basename" = "x$tool_specified"; then
30246          # A command without a complete path is provided, search $PATH.
30247          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30248$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30249          # Extract the first word of "$tool_basename", so it can be a program name with args.
30250set dummy $tool_basename; ac_word=$2
30251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30252$as_echo_n "checking for $ac_word... " >&6; }
30253if ${ac_cv_path_JAVAH+:} false; then :
30254  $as_echo_n "(cached) " >&6
30255else
30256  case $JAVAH in
30257  [\\/]* | ?:[\\/]*)
30258  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30259  ;;
30260  *)
30261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30262for as_dir in $PATH
30263do
30264  IFS=$as_save_IFS
30265  test -z "$as_dir" && as_dir=.
30266    for ac_exec_ext in '' $ac_executable_extensions; do
30267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30268    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30270    break 2
30271  fi
30272done
30273  done
30274IFS=$as_save_IFS
30275
30276  ;;
30277esac
30278fi
30279JAVAH=$ac_cv_path_JAVAH
30280if test -n "$JAVAH"; then
30281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30282$as_echo "$JAVAH" >&6; }
30283else
30284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30285$as_echo "no" >&6; }
30286fi
30287
30288
30289          if test "x$JAVAH" = x; then
30290            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30291          fi
30292        else
30293          # Otherwise we believe it is a complete path. Use it as it is.
30294          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30295$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30296          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30297$as_echo_n "checking for JAVAH... " >&6; }
30298          if test ! -x "$tool_specified"; then
30299            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30300$as_echo "not found" >&6; }
30301            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30302          fi
30303          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30304$as_echo "$tool_specified" >&6; }
30305        fi
30306      fi
30307    fi
30308
30309  fi
30310
30311
30312
30313  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30314
30315  # Publish this variable in the help.
30316
30317
30318  if [ -z "${JAR+x}" ]; then
30319    # The variable is not set by user, try to locate tool using the code snippet
30320
30321      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30322$as_echo_n "checking for jar in Boot JDK... " >&6; }
30323      JAR=$BOOT_JDK/bin/jar
30324      if test ! -x $JAR; then
30325        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30326$as_echo "not found" >&6; }
30327        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30328$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30329        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30330      fi
30331      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30332$as_echo "ok" >&6; }
30333
30334
30335  else
30336    # The variable is set, but is it from the command line or the environment?
30337
30338    # Try to remove the string !JAR! from our list.
30339    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30340    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30341      # If it failed, the variable was not from the command line. Ignore it,
30342      # but warn the user (except for BASH, which is always set by the calling BASH).
30343      if test "xJAR" != xBASH; then
30344        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30345$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30346      fi
30347      # Try to locate tool using the code snippet
30348
30349      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30350$as_echo_n "checking for jar in Boot JDK... " >&6; }
30351      JAR=$BOOT_JDK/bin/jar
30352      if test ! -x $JAR; then
30353        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30354$as_echo "not found" >&6; }
30355        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30356$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30357        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30358      fi
30359      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30360$as_echo "ok" >&6; }
30361
30362
30363    else
30364      # If it succeeded, then it was overridden by the user. We will use it
30365      # for the tool.
30366
30367      # First remove it from the list of overridden variables, so we can test
30368      # for unknown variables in the end.
30369      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30370
30371      # Check if we try to supply an empty value
30372      if test "x$JAR" = x; then
30373        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30374$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30375        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30376$as_echo_n "checking for JAR... " >&6; }
30377        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30378$as_echo "disabled" >&6; }
30379      else
30380        # Check if the provided tool contains a complete path.
30381        tool_specified="$JAR"
30382        tool_basename="${tool_specified##*/}"
30383        if test "x$tool_basename" = "x$tool_specified"; then
30384          # A command without a complete path is provided, search $PATH.
30385          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30386$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30387          # Extract the first word of "$tool_basename", so it can be a program name with args.
30388set dummy $tool_basename; ac_word=$2
30389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30390$as_echo_n "checking for $ac_word... " >&6; }
30391if ${ac_cv_path_JAR+:} false; then :
30392  $as_echo_n "(cached) " >&6
30393else
30394  case $JAR in
30395  [\\/]* | ?:[\\/]*)
30396  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30397  ;;
30398  *)
30399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30400for as_dir in $PATH
30401do
30402  IFS=$as_save_IFS
30403  test -z "$as_dir" && as_dir=.
30404    for ac_exec_ext in '' $ac_executable_extensions; do
30405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30406    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30408    break 2
30409  fi
30410done
30411  done
30412IFS=$as_save_IFS
30413
30414  ;;
30415esac
30416fi
30417JAR=$ac_cv_path_JAR
30418if test -n "$JAR"; then
30419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30420$as_echo "$JAR" >&6; }
30421else
30422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30423$as_echo "no" >&6; }
30424fi
30425
30426
30427          if test "x$JAR" = x; then
30428            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30429          fi
30430        else
30431          # Otherwise we believe it is a complete path. Use it as it is.
30432          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30433$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30434          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30435$as_echo_n "checking for JAR... " >&6; }
30436          if test ! -x "$tool_specified"; then
30437            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30438$as_echo "not found" >&6; }
30439            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30440          fi
30441          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30442$as_echo "$tool_specified" >&6; }
30443        fi
30444      fi
30445    fi
30446
30447  fi
30448
30449
30450
30451  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30452
30453  # Publish this variable in the help.
30454
30455
30456  if [ -z "${JARSIGNER+x}" ]; then
30457    # The variable is not set by user, try to locate tool using the code snippet
30458
30459      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30460$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30461      JARSIGNER=$BOOT_JDK/bin/jarsigner
30462      if test ! -x $JARSIGNER; then
30463        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30464$as_echo "not found" >&6; }
30465        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30466$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30467        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30468      fi
30469      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30470$as_echo "ok" >&6; }
30471
30472
30473  else
30474    # The variable is set, but is it from the command line or the environment?
30475
30476    # Try to remove the string !JARSIGNER! from our list.
30477    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30478    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30479      # If it failed, the variable was not from the command line. Ignore it,
30480      # but warn the user (except for BASH, which is always set by the calling BASH).
30481      if test "xJARSIGNER" != xBASH; then
30482        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30483$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30484      fi
30485      # Try to locate tool using the code snippet
30486
30487      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30488$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30489      JARSIGNER=$BOOT_JDK/bin/jarsigner
30490      if test ! -x $JARSIGNER; then
30491        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30492$as_echo "not found" >&6; }
30493        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30494$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30495        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30496      fi
30497      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30498$as_echo "ok" >&6; }
30499
30500
30501    else
30502      # If it succeeded, then it was overridden by the user. We will use it
30503      # for the tool.
30504
30505      # First remove it from the list of overridden variables, so we can test
30506      # for unknown variables in the end.
30507      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30508
30509      # Check if we try to supply an empty value
30510      if test "x$JARSIGNER" = x; then
30511        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30512$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30513        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30514$as_echo_n "checking for JARSIGNER... " >&6; }
30515        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30516$as_echo "disabled" >&6; }
30517      else
30518        # Check if the provided tool contains a complete path.
30519        tool_specified="$JARSIGNER"
30520        tool_basename="${tool_specified##*/}"
30521        if test "x$tool_basename" = "x$tool_specified"; then
30522          # A command without a complete path is provided, search $PATH.
30523          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30524$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30525          # Extract the first word of "$tool_basename", so it can be a program name with args.
30526set dummy $tool_basename; ac_word=$2
30527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30528$as_echo_n "checking for $ac_word... " >&6; }
30529if ${ac_cv_path_JARSIGNER+:} false; then :
30530  $as_echo_n "(cached) " >&6
30531else
30532  case $JARSIGNER in
30533  [\\/]* | ?:[\\/]*)
30534  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30535  ;;
30536  *)
30537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30538for as_dir in $PATH
30539do
30540  IFS=$as_save_IFS
30541  test -z "$as_dir" && as_dir=.
30542    for ac_exec_ext in '' $ac_executable_extensions; do
30543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30544    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30546    break 2
30547  fi
30548done
30549  done
30550IFS=$as_save_IFS
30551
30552  ;;
30553esac
30554fi
30555JARSIGNER=$ac_cv_path_JARSIGNER
30556if test -n "$JARSIGNER"; then
30557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30558$as_echo "$JARSIGNER" >&6; }
30559else
30560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30561$as_echo "no" >&6; }
30562fi
30563
30564
30565          if test "x$JARSIGNER" = x; then
30566            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30567          fi
30568        else
30569          # Otherwise we believe it is a complete path. Use it as it is.
30570          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30571$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30572          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30573$as_echo_n "checking for JARSIGNER... " >&6; }
30574          if test ! -x "$tool_specified"; then
30575            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30576$as_echo "not found" >&6; }
30577            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30578          fi
30579          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30580$as_echo "$tool_specified" >&6; }
30581        fi
30582      fi
30583    fi
30584
30585  fi
30586
30587
30588
30589  # Finally, set some other options...
30590
30591  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30592  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30593
30594
30595
30596  $ECHO "Check if jvm arg is ok: --patch-module foo=bar" >&5
30597  $ECHO "Command: $JAVA --patch-module foo=bar -version" >&5
30598  OUTPUT=`$JAVA --patch-module foo=bar -version 2>&1`
30599  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30600  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30601  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30602    dummy="$dummy --patch-module foo=bar"
30603    JVM_ARG_OK=true
30604  else
30605    $ECHO "Arg failed:" >&5
30606    $ECHO "$OUTPUT" >&5
30607    JVM_ARG_OK=false
30608  fi
30609
30610  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30611$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30612  if test "x$JVM_ARG_OK" = "xtrue"; then
30613    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30614$as_echo "yes" >&6; }
30615    BOOT_JDK_MODULAR="true"
30616  else
30617    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30618$as_echo "no" >&6; }
30619    BOOT_JDK_MODULAR="false"
30620  fi
30621
30622
30623
30624
30625  # Check if the boot jdk is 32 or 64 bit
30626  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30627    BOOT_JDK_BITS="64"
30628  else
30629    BOOT_JDK_BITS="32"
30630  fi
30631  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30632$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30634$as_echo "$BOOT_JDK_BITS" >&6; }
30635
30636
30637
30638
30639# Check whether --with-build-jdk was given.
30640if test "${with_build_jdk+set}" = set; then :
30641  withval=$with_build_jdk;
30642fi
30643
30644
30645  CREATE_BUILDJDK=false
30646  EXTERNAL_BUILDJDK=false
30647  BUILD_JDK_FOUND="no"
30648  if test "x$with_build_jdk" != "x"; then
30649
30650  if test "x$BUILD_JDK_FOUND" = xno; then
30651    # Execute the test
30652
30653       if test "x$with_build_jdk" != x; then
30654         BUILD_JDK=$with_build_jdk
30655         BUILD_JDK_FOUND=maybe
30656         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30657$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30658       fi
30659
30660    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30661    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30662      # Do we have a bin/java?
30663      if test ! -x "$BUILD_JDK/bin/java"; then
30664        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30665$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30666        BUILD_JDK_FOUND=no
30667      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30668        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30669$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30670        BUILD_JDK_FOUND=no
30671      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30672        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30673$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30674        BUILD_JDK_FOUND=no
30675      elif test ! -x "$BUILD_JDK/bin/javac"; then
30676        # Do we have a bin/javac?
30677        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30678$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30679        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30680$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30681        BUILD_JDK_FOUND=no
30682      else
30683        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30684        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30685
30686        # Extra M4 quote needed to protect [] in grep expression.
30687        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30688        if test "x$FOUND_CORRECT_VERSION" = x; then
30689          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30690$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30691          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30692$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30693          BUILD_JDK_FOUND=no
30694        else
30695          # We're done!
30696          BUILD_JDK_FOUND=yes
30697
30698  # Only process if variable expands to non-empty
30699
30700  if test "x$BUILD_JDK" != x; then
30701    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30702
30703  # Input might be given as Windows format, start by converting to
30704  # unix format.
30705  path="$BUILD_JDK"
30706  new_path=`$CYGPATH -u "$path"`
30707
30708  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30709  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30710  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30711  # "foo.exe" is OK but "foo" is an error.
30712  #
30713  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30714  # It is also a way to make sure we got the proper file name for the real test later on.
30715  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30716  if test "x$test_shortpath" = x; then
30717    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30718$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30719    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30720  fi
30721
30722  # Call helper function which possibly converts this using DOS-style short mode.
30723  # If so, the updated path is stored in $new_path.
30724
30725  input_path="$new_path"
30726  # Check if we need to convert this using DOS-style short mode. If the path
30727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30728  # take no chances and rewrite it.
30729  # Note: m4 eats our [], so we need to use [ and ] instead.
30730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30731  if test "x$has_forbidden_chars" != x; then
30732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30733    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30734    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30735    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30736      # Going to short mode and back again did indeed matter. Since short mode is
30737      # case insensitive, let's make it lowercase to improve readability.
30738      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30739      # Now convert it back to Unix-style (cygpath)
30740      input_path=`$CYGPATH -u "$shortmode_path"`
30741      new_path="$input_path"
30742    fi
30743  fi
30744
30745  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30746  if test "x$test_cygdrive_prefix" = x; then
30747    # As a simple fix, exclude /usr/bin since it's not a real path.
30748    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30749      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30750      # a path prefixed by /cygdrive for fixpath to work.
30751      new_path="$CYGWIN_ROOT_PATH$input_path"
30752    fi
30753  fi
30754
30755
30756  if test "x$path" != "x$new_path"; then
30757    BUILD_JDK="$new_path"
30758    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30759$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30760  fi
30761
30762    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30763
30764  path="$BUILD_JDK"
30765  has_colon=`$ECHO $path | $GREP ^.:`
30766  new_path="$path"
30767  if test "x$has_colon" = x; then
30768    # Not in mixed or Windows style, start by that.
30769    new_path=`cmd //c echo $path`
30770  fi
30771
30772
30773  input_path="$new_path"
30774  # Check if we need to convert this using DOS-style short mode. If the path
30775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30776  # take no chances and rewrite it.
30777  # Note: m4 eats our [], so we need to use [ and ] instead.
30778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30779  if test "x$has_forbidden_chars" != x; then
30780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30781    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30782  fi
30783
30784
30785  windows_path="$new_path"
30786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30787    unix_path=`$CYGPATH -u "$windows_path"`
30788    new_path="$unix_path"
30789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30791    new_path="$unix_path"
30792  fi
30793
30794  if test "x$path" != "x$new_path"; then
30795    BUILD_JDK="$new_path"
30796    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30797$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30798  fi
30799
30800  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30801  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30802
30803    else
30804      # We're on a unix platform. Hooray! :)
30805      path="$BUILD_JDK"
30806      has_space=`$ECHO "$path" | $GREP " "`
30807      if test "x$has_space" != x; then
30808        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30809$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30810        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30811      fi
30812
30813      # Use eval to expand a potential ~
30814      eval path="$path"
30815      if test ! -f "$path" && test ! -d "$path"; then
30816        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30817      fi
30818
30819      if test -d "$path"; then
30820        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30821      else
30822        dir="`$DIRNAME "$path"`"
30823        base="`$BASENAME "$path"`"
30824        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30825      fi
30826    fi
30827  fi
30828
30829          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30830$as_echo_n "checking for Build JDK... " >&6; }
30831          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30832$as_echo "$BUILD_JDK" >&6; }
30833          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30834$as_echo_n "checking Build JDK version... " >&6; }
30835          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30836          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30837$as_echo "$BUILD_JDK_VERSION" >&6; }
30838        fi # end check jdk version
30839      fi # end check java
30840    fi # end check build jdk found
30841  fi
30842
30843    EXTERNAL_BUILDJDK=true
30844  else
30845    if test "x$COMPILE_TYPE" = "xcross"; then
30846      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30847      BUILD_JDK_FOUND=yes
30848      CREATE_BUILDJDK=true
30849      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30850$as_echo_n "checking for Build JDK... " >&6; }
30851      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30852$as_echo "yes, will build it for the host platform" >&6; }
30853    else
30854      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30855      BUILD_JDK_FOUND=yes
30856      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30857$as_echo_n "checking for Build JDK... " >&6; }
30858      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30859$as_echo "yes, will use output dir" >&6; }
30860    fi
30861  fi
30862
30863  JMOD="$BUILD_JDK/bin/jmod"
30864  JLINK="$BUILD_JDK/bin/jlink"
30865
30866
30867
30868  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30869    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30870$as_echo_n "checking for Build JDK... " >&6; }
30871    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30872$as_echo "no" >&6; }
30873    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30874  fi
30875
30876
30877
30878
30879
30880
30881###############################################################################
30882#
30883# Configure the sources to use. We can add or override individual directories.
30884#
30885###############################################################################
30886
30887
30888  # Where are the sources.
30889  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30890  CORBA_TOPDIR="$SRC_ROOT/corba"
30891  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30892  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30893  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30894  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30895  JDK_TOPDIR="$SRC_ROOT/jdk"
30896
30897
30898
30899
30900
30901
30902
30903
30904
30905  # This feature is no longer supported.
30906
30907
30908
30909# Check whether --with-add-source-root was given.
30910if test "${with_add_source_root+set}" = set; then :
30911  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
30912$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30913fi
30914
30915
30916
30917
30918# Check whether --with-override-source-root was given.
30919if test "${with_override_source_root+set}" = set; then :
30920  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
30921$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30922fi
30923
30924
30925
30926
30927# Check whether --with-adds-and-overrides was given.
30928if test "${with_adds_and_overrides+set}" = set; then :
30929  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
30930$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30931fi
30932
30933
30934
30935
30936# Check whether --with-override-langtools was given.
30937if test "${with_override_langtools+set}" = set; then :
30938  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30939$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30940fi
30941
30942
30943
30944
30945# Check whether --with-override-corba was given.
30946if test "${with_override_corba+set}" = set; then :
30947  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30948$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30949fi
30950
30951
30952
30953
30954# Check whether --with-override-jaxp was given.
30955if test "${with_override_jaxp+set}" = set; then :
30956  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30957$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30958fi
30959
30960
30961
30962
30963# Check whether --with-override-jaxws was given.
30964if test "${with_override_jaxws+set}" = set; then :
30965  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30966$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30967fi
30968
30969
30970
30971
30972# Check whether --with-override-hotspot was given.
30973if test "${with_override_hotspot+set}" = set; then :
30974  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30975$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30976fi
30977
30978
30979
30980
30981# Check whether --with-override-nashorn was given.
30982if test "${with_override_nashorn+set}" = set; then :
30983  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30984$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30985fi
30986
30987
30988
30989
30990# Check whether --with-override-jdk was given.
30991if test "${with_override_jdk+set}" = set; then :
30992  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30993$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30994fi
30995
30996
30997
30998
30999  BUILD_OUTPUT="$OUTPUT_ROOT"
31000
31001
31002  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
31003  BUILD_HOTSPOT=true
31004
31005
31006
31007# Check whether --with-import-hotspot was given.
31008if test "${with_import_hotspot+set}" = set; then :
31009  withval=$with_import_hotspot;
31010fi
31011
31012  if test "x$with_import_hotspot" != x; then
31013    CURDIR="$PWD"
31014    cd "$with_import_hotspot"
31015    HOTSPOT_DIST="`pwd`"
31016    cd "$CURDIR"
31017    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
31018      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
31019    fi
31020    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
31021$as_echo_n "checking if hotspot should be imported... " >&6; }
31022    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
31023$as_echo "yes from $HOTSPOT_DIST" >&6; }
31024    BUILD_HOTSPOT=false
31025  fi
31026
31027  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31028
31029
31030
31031
31032# Check whether --with-import-modules was given.
31033if test "${with_import_modules+set}" = set; then :
31034  withval=$with_import_modules;
31035fi
31036
31037
31038  if test "x$with_import_modules" != x \
31039      && test "x$with_import_modules" != "xno"; then
31040    if test -d "$with_import_modules"; then
31041      IMPORT_MODULES_TOPDIR="$with_import_modules"
31042
31043  # Only process if variable expands to non-empty
31044
31045  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31046    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31047
31048  # Input might be given as Windows format, start by converting to
31049  # unix format.
31050  path="$IMPORT_MODULES_TOPDIR"
31051  new_path=`$CYGPATH -u "$path"`
31052
31053  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31054  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31055  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31056  # "foo.exe" is OK but "foo" is an error.
31057  #
31058  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31059  # It is also a way to make sure we got the proper file name for the real test later on.
31060  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31061  if test "x$test_shortpath" = x; then
31062    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31063$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31064    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31065  fi
31066
31067  # Call helper function which possibly converts this using DOS-style short mode.
31068  # If so, the updated path is stored in $new_path.
31069
31070  input_path="$new_path"
31071  # Check if we need to convert this using DOS-style short mode. If the path
31072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31073  # take no chances and rewrite it.
31074  # Note: m4 eats our [], so we need to use [ and ] instead.
31075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31076  if test "x$has_forbidden_chars" != x; then
31077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31078    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31079    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31080    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31081      # Going to short mode and back again did indeed matter. Since short mode is
31082      # case insensitive, let's make it lowercase to improve readability.
31083      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31084      # Now convert it back to Unix-style (cygpath)
31085      input_path=`$CYGPATH -u "$shortmode_path"`
31086      new_path="$input_path"
31087    fi
31088  fi
31089
31090  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31091  if test "x$test_cygdrive_prefix" = x; then
31092    # As a simple fix, exclude /usr/bin since it's not a real path.
31093    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31094      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31095      # a path prefixed by /cygdrive for fixpath to work.
31096      new_path="$CYGWIN_ROOT_PATH$input_path"
31097    fi
31098  fi
31099
31100
31101  if test "x$path" != "x$new_path"; then
31102    IMPORT_MODULES_TOPDIR="$new_path"
31103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31104$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31105  fi
31106
31107    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31108
31109  path="$IMPORT_MODULES_TOPDIR"
31110  has_colon=`$ECHO $path | $GREP ^.:`
31111  new_path="$path"
31112  if test "x$has_colon" = x; then
31113    # Not in mixed or Windows style, start by that.
31114    new_path=`cmd //c echo $path`
31115  fi
31116
31117
31118  input_path="$new_path"
31119  # Check if we need to convert this using DOS-style short mode. If the path
31120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31121  # take no chances and rewrite it.
31122  # Note: m4 eats our [], so we need to use [ and ] instead.
31123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31124  if test "x$has_forbidden_chars" != x; then
31125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31126    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31127  fi
31128
31129
31130  windows_path="$new_path"
31131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31132    unix_path=`$CYGPATH -u "$windows_path"`
31133    new_path="$unix_path"
31134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31136    new_path="$unix_path"
31137  fi
31138
31139  if test "x$path" != "x$new_path"; then
31140    IMPORT_MODULES_TOPDIR="$new_path"
31141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31142$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31143  fi
31144
31145  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31146  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31147
31148    else
31149      # We're on a unix platform. Hooray! :)
31150      path="$IMPORT_MODULES_TOPDIR"
31151      has_space=`$ECHO "$path" | $GREP " "`
31152      if test "x$has_space" != x; then
31153        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31154$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31155        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31156      fi
31157
31158      # Use eval to expand a potential ~
31159      eval path="$path"
31160      if test ! -f "$path" && test ! -d "$path"; then
31161        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31162      fi
31163
31164      if test -d "$path"; then
31165        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31166      else
31167        dir="`$DIRNAME "$path"`"
31168        base="`$BASENAME "$path"`"
31169        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31170      fi
31171    fi
31172  fi
31173
31174    elif test -e "$with_import_modules"; then
31175      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31176      $RM -rf "$IMPORT_MODULES_TOPDIR"
31177      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31178      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31179        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31180      fi
31181    else
31182      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31183    fi
31184  fi
31185
31186  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31187    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31188  fi
31189  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31190    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31191  fi
31192  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31193    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31194  fi
31195  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31196    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31197  fi
31198  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31199    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31200  fi
31201  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31202    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31203  fi
31204
31205
31206
31207
31208
31209
31210
31211
31212
31213###############################################################################
31214#
31215# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31216# native code.
31217#
31218###############################################################################
31219
31220# See if we are doing a complete static build or not
31221
31222  # Check whether --enable-static-build was given.
31223if test "${enable_static_build+set}" = set; then :
31224  enableval=$enable_static_build;
31225fi
31226
31227  STATIC_BUILD=false
31228  if test "x$enable_static_build" = "xyes"; then
31229    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31230$as_echo_n "checking if static build is enabled... " >&6; }
31231    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31232$as_echo "yes" >&6; }
31233    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31234      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31235    fi
31236    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31237    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31238    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31239    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31240    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31241    STATIC_BUILD=true
31242  elif test "x$enable_static_build" = "xno"; then
31243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31244$as_echo_n "checking if static build is enabled... " >&6; }
31245    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31246$as_echo "no" >&6; }
31247  elif test "x$enable_static_build" != "x"; then
31248    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31249  fi
31250
31251
31252
31253
31254# First determine the toolchain type (compiler family)
31255
31256
31257# Check whether --with-toolchain-type was given.
31258if test "${with_toolchain_type+set}" = set; then :
31259  withval=$with_toolchain_type;
31260fi
31261
31262
31263  # Use indirect variable referencing
31264  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31265  VALID_TOOLCHAINS=${!toolchain_var_name}
31266
31267  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31268    if test -n "$XCODEBUILD"; then
31269      # On Mac OS X, default toolchain to clang after Xcode 5
31270      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31271      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31272      if test $? -ne 0; then
31273        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31274      fi
31275      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31276          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31277          $CUT -f 1 -d .`
31278      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31279$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31280      if test $XCODE_MAJOR_VERSION -ge 5; then
31281          DEFAULT_TOOLCHAIN="clang"
31282      else
31283          DEFAULT_TOOLCHAIN="gcc"
31284      fi
31285    else
31286      # If Xcode is not installed, but the command line tools are
31287      # then we can't run xcodebuild. On these systems we should
31288      # default to clang
31289      DEFAULT_TOOLCHAIN="clang"
31290    fi
31291  else
31292    # First toolchain type in the list is the default
31293    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31294  fi
31295
31296  if test "x$with_toolchain_type" = xlist; then
31297    # List all toolchains
31298    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31299$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31300    for toolchain in $VALID_TOOLCHAINS; do
31301      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31302      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31303      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31304    done
31305
31306    exit 0
31307  elif test "x$with_toolchain_type" != x; then
31308    # User override; check that it is valid
31309    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31310      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31311$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31312      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31313$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31314      as_fn_error $? "Cannot continue." "$LINENO" 5
31315    fi
31316    TOOLCHAIN_TYPE=$with_toolchain_type
31317  else
31318    # No flag given, use default
31319    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31320  fi
31321
31322
31323  TOOLCHAIN_CC_BINARY_clang="clang"
31324  TOOLCHAIN_CC_BINARY_gcc="gcc"
31325  TOOLCHAIN_CC_BINARY_microsoft="cl"
31326  TOOLCHAIN_CC_BINARY_solstudio="cc"
31327  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31328
31329  TOOLCHAIN_CXX_BINARY_clang="clang++"
31330  TOOLCHAIN_CXX_BINARY_gcc="g++"
31331  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31332  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31333  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31334
31335  # Use indirect variable referencing
31336  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31337  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31338  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31339  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31340  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31341  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31342  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31343  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31344
31345
31346  # Define filename patterns
31347  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31348    LIBRARY_PREFIX=
31349    SHARED_LIBRARY_SUFFIX='.dll'
31350    STATIC_LIBRARY_SUFFIX='.lib'
31351    SHARED_LIBRARY='$1.dll'
31352    STATIC_LIBRARY='$1.lib'
31353    OBJ_SUFFIX='.obj'
31354    EXE_SUFFIX='.exe'
31355  else
31356    LIBRARY_PREFIX=lib
31357    SHARED_LIBRARY_SUFFIX='.so'
31358    STATIC_LIBRARY_SUFFIX='.a'
31359    SHARED_LIBRARY='lib$1.so'
31360    STATIC_LIBRARY='lib$1.a'
31361    OBJ_SUFFIX='.o'
31362    EXE_SUFFIX=''
31363    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31364      # For full static builds, we're overloading the SHARED_LIBRARY
31365      # variables in order to limit the amount of changes required.
31366      # It would be better to remove SHARED and just use LIBRARY and
31367      # LIBRARY_SUFFIX for libraries that can be built either
31368      # shared or static and use STATIC_* for libraries that are
31369      # always built statically.
31370      if test "x$STATIC_BUILD" = xtrue; then
31371        SHARED_LIBRARY='lib$1.a'
31372        SHARED_LIBRARY_SUFFIX='.a'
31373      else
31374        SHARED_LIBRARY='lib$1.dylib'
31375        SHARED_LIBRARY_SUFFIX='.dylib'
31376      fi
31377    fi
31378  fi
31379
31380
31381
31382
31383
31384
31385
31386
31387
31388
31389  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31390    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31391$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31392  else
31393    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31394$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31395  fi
31396
31397
31398# User supplied flags should be used when configure detects compilers
31399
31400  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31401    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31402$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31403  fi
31404
31405  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31406    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31407$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31408  fi
31409
31410  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31411    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31412$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31413  fi
31414
31415
31416# Check whether --with-extra-cflags was given.
31417if test "${with_extra_cflags+set}" = set; then :
31418  withval=$with_extra_cflags;
31419fi
31420
31421
31422
31423# Check whether --with-extra-cxxflags was given.
31424if test "${with_extra_cxxflags+set}" = set; then :
31425  withval=$with_extra_cxxflags;
31426fi
31427
31428
31429
31430# Check whether --with-extra-ldflags was given.
31431if test "${with_extra_ldflags+set}" = set; then :
31432  withval=$with_extra_ldflags;
31433fi
31434
31435
31436  EXTRA_CFLAGS="$with_extra_cflags"
31437  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31438  EXTRA_LDFLAGS="$with_extra_ldflags"
31439
31440  # Hotspot needs these set in their legacy form
31441  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31442  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31443  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31444
31445
31446
31447
31448
31449
31450
31451
31452
31453  # The global CFLAGS and LDLAGS variables are used by configure tests and
31454  # should include the extra parameters
31455  CFLAGS="$EXTRA_CFLAGS"
31456  CXXFLAGS="$EXTRA_CXXFLAGS"
31457  LDFLAGS="$EXTRA_LDFLAGS"
31458  CPPFLAGS=""
31459
31460# The sysroot cflags are needed for configure to be able to run the compilers
31461
31462  if test "x$SYSROOT" != "x"; then
31463    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31464      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31465        # Solaris Studio does not have a concept of sysroot. Instead we must
31466        # make sure the default include and lib dirs are appended to each
31467        # compile and link command line. Must also add -I-xbuiltin to enable
31468        # inlining of system functions and intrinsics.
31469        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31470        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31471            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31472      fi
31473    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31474      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31475      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31476    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31477      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31478      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31479    fi
31480    # Propagate the sysroot args to hotspot
31481    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31482    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31483    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31484    # The global CFLAGS and LDFLAGS variables need these for configure to function
31485    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31486    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31487    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31488    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31489  fi
31490
31491  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31492    # We also need -iframework<path>/System/Library/Frameworks
31493    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31494    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31495    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31496    # set this here so it doesn't have to be peppered throughout the forest
31497    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31498    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31499  fi
31500
31501
31502
31503
31504
31505# Then detect the actual binaries needed
31506
31507  # FIXME: Is this needed?
31508  ac_ext=cpp
31509ac_cpp='$CXXCPP $CPPFLAGS'
31510ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31511ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31512ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31513
31514
31515  # Store the CFLAGS etc passed to the configure script.
31516  ORG_CFLAGS="$CFLAGS"
31517  ORG_CXXFLAGS="$CXXFLAGS"
31518
31519  # autoconf magic only relies on PATH, so update it if tools dir is specified
31520  OLD_PATH="$PATH"
31521
31522  # On Windows, we need to detect the visual studio installation first.
31523  # This will change the PATH, but we need to keep that new PATH even
31524  # after toolchain detection is done, since the compiler (on x86) uses
31525  # it for DLL resolution in runtime.
31526  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31527      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31528
31529  # Store path to cygwin link.exe to help excluding it when searching for
31530  # VS linker. This must be done before changing the PATH when looking for VS.
31531  # Extract the first word of "link", so it can be a program name with args.
31532set dummy link; ac_word=$2
31533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31534$as_echo_n "checking for $ac_word... " >&6; }
31535if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31536  $as_echo_n "(cached) " >&6
31537else
31538  case $CYGWIN_LINK in
31539  [\\/]* | ?:[\\/]*)
31540  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31541  ;;
31542  *)
31543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31544for as_dir in $PATH
31545do
31546  IFS=$as_save_IFS
31547  test -z "$as_dir" && as_dir=.
31548    for ac_exec_ext in '' $ac_executable_extensions; do
31549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31550    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31552    break 2
31553  fi
31554done
31555  done
31556IFS=$as_save_IFS
31557
31558  ;;
31559esac
31560fi
31561CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31562if test -n "$CYGWIN_LINK"; then
31563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31564$as_echo "$CYGWIN_LINK" >&6; }
31565else
31566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31567$as_echo "no" >&6; }
31568fi
31569
31570
31571  if test "x$CYGWIN_LINK" != x; then
31572    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31573$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31574    "$CYGWIN_LINK" --version > /dev/null
31575    if test $? -eq 0 ; then
31576      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31577$as_echo "yes" >&6; }
31578    else
31579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31580$as_echo "no" >&6; }
31581      # This might be the VS linker. Don't exclude it later on.
31582      CYGWIN_LINK=""
31583    fi
31584  fi
31585
31586  # First-hand choice is to locate and run the vsvars bat file.
31587
31588
31589# Check whether --with-toolchain-version was given.
31590if test "${with_toolchain_version+set}" = set; then :
31591  withval=$with_toolchain_version;
31592fi
31593
31594
31595  if test "x$with_toolchain_version" = xlist; then
31596    # List all toolchains
31597    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31598$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31599    for version in $VALID_VS_VERSIONS; do
31600      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31601      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31602    done
31603
31604    exit 0
31605  elif test "x$DEVKIT_VS_VERSION" != x; then
31606    VS_VERSION=$DEVKIT_VS_VERSION
31607    TOOLCHAIN_VERSION=$VS_VERSION
31608    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31609    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31610    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31611    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31612    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31613    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31614
31615    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31616    # can still be exported as INCLUDE for compiler invocations without
31617    # SYSROOT_CFLAGS
31618    OLDIFS="$IFS"
31619    IFS=";"
31620    for i in $DEVKIT_VS_INCLUDE; do
31621      ipath=$i
31622
31623  unix_path="$ipath"
31624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31625    windows_path=`$CYGPATH -m "$unix_path"`
31626    ipath="$windows_path"
31627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31628    windows_path=`cmd //c echo $unix_path`
31629    ipath="$windows_path"
31630  fi
31631
31632      VS_INCLUDE="$VS_INCLUDE;$ipath"
31633    done
31634    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31635    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31636    for i in $DEVKIT_VS_LIB; do
31637      libpath=$i
31638
31639  unix_path="$libpath"
31640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31641    windows_path=`$CYGPATH -m "$unix_path"`
31642    libpath="$windows_path"
31643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31644    windows_path=`cmd //c echo $unix_path`
31645    libpath="$windows_path"
31646  fi
31647
31648      VS_LIB="$VS_LIB;$libpath"
31649    done
31650    IFS="$OLDIFS"
31651
31652    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31653$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31654
31655  elif test "x$with_toolchain_version" != x; then
31656    # User override; check that it is valid
31657    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31658      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31659$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31660      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31661$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31662      as_fn_error $? "Cannot continue." "$LINENO" 5
31663    fi
31664    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31665  else
31666    # No flag given, use default
31667    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31668  fi
31669
31670  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31671
31672  VS_VERSION="$VS_VERSION"
31673  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31674  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31675  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31676  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31677
31678  # When using --with-tools-dir, assume it points to the correct and default
31679  # version of Visual Studio or that --with-toolchain-version was also set.
31680  if test "x$with_tools_dir" != x; then
31681
31682  if test "x$VS_ENV_CMD" = x; then
31683    VS_VERSION="${VS_VERSION}"
31684    VS_BASE="$with_tools_dir/../.."
31685    METHOD="--with-tools-dir"
31686
31687    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31688      VCVARSFILE="vc/bin/vcvars32.bat"
31689    else
31690      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31691    fi
31692
31693
31694  windows_path="$VS_BASE"
31695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31696    unix_path=`$CYGPATH -u "$windows_path"`
31697    VS_BASE="$unix_path"
31698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31700    VS_BASE="$unix_path"
31701  fi
31702
31703    if test -d "$VS_BASE"; then
31704      if test -f "$VS_BASE/$VCVARSFILE"; then
31705        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31706$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31707        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31708        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31709        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31710        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31711      else
31712        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31713$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31714        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31715$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31716      fi
31717    fi
31718  fi
31719
31720
31721  if test "x$VS_ENV_CMD" = x; then
31722    VS_VERSION="${VS_VERSION}"
31723    VS_BASE="$with_tools_dir/../../.."
31724    METHOD="--with-tools-dir"
31725
31726    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31727      VCVARSFILE="vc/bin/vcvars32.bat"
31728    else
31729      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31730    fi
31731
31732
31733  windows_path="$VS_BASE"
31734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31735    unix_path=`$CYGPATH -u "$windows_path"`
31736    VS_BASE="$unix_path"
31737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31739    VS_BASE="$unix_path"
31740  fi
31741
31742    if test -d "$VS_BASE"; then
31743      if test -f "$VS_BASE/$VCVARSFILE"; then
31744        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31745$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31746        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31747        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31748        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31749        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31750      else
31751        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31752$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31753        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31754$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31755      fi
31756    fi
31757  fi
31758
31759    if test "x$VS_ENV_CMD" = x; then
31760      # Having specified an argument which is incorrect will produce an instant failure;
31761      # we should not go on looking
31762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31763$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31764      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31765$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31766      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31767$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31768      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31769    fi
31770  fi
31771
31772  VS_ENV_CMD=""
31773  VS_ENV_ARGS=""
31774
31775  if test "x$VS_COMNTOOLS" != x; then
31776
31777  if test "x$VS_ENV_CMD" = x; then
31778    VS_VERSION="${VS_VERSION}"
31779    VS_BASE="$VS_COMNTOOLS/../.."
31780    METHOD="$VS_COMNTOOLS_VAR variable"
31781
31782    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31783      VCVARSFILE="vc/bin/vcvars32.bat"
31784    else
31785      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31786    fi
31787
31788
31789  windows_path="$VS_BASE"
31790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31791    unix_path=`$CYGPATH -u "$windows_path"`
31792    VS_BASE="$unix_path"
31793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31795    VS_BASE="$unix_path"
31796  fi
31797
31798    if test -d "$VS_BASE"; then
31799      if test -f "$VS_BASE/$VCVARSFILE"; then
31800        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31801$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31802        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31803        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31804        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31805        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31806      else
31807        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31808$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31809        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31810$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31811      fi
31812    fi
31813  fi
31814
31815  fi
31816  if test "x$PROGRAMFILES" != x; then
31817
31818  if test "x$VS_ENV_CMD" = x; then
31819    VS_VERSION="${VS_VERSION}"
31820    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31821    METHOD="well-known name"
31822
31823    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31824      VCVARSFILE="vc/bin/vcvars32.bat"
31825    else
31826      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31827    fi
31828
31829
31830  windows_path="$VS_BASE"
31831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31832    unix_path=`$CYGPATH -u "$windows_path"`
31833    VS_BASE="$unix_path"
31834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31836    VS_BASE="$unix_path"
31837  fi
31838
31839    if test -d "$VS_BASE"; then
31840      if test -f "$VS_BASE/$VCVARSFILE"; then
31841        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31842$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31843        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31844        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31845        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31846        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31847      else
31848        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31849$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31850        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31851$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31852      fi
31853    fi
31854  fi
31855
31856  fi
31857  # Work around the insanely named ProgramFiles(x86) env variable
31858  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31859  if test "x$PROGRAMFILES_X86" != x; then
31860
31861  if test "x$VS_ENV_CMD" = x; then
31862    VS_VERSION="${VS_VERSION}"
31863    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31864    METHOD="well-known name"
31865
31866    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31867      VCVARSFILE="vc/bin/vcvars32.bat"
31868    else
31869      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31870    fi
31871
31872
31873  windows_path="$VS_BASE"
31874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31875    unix_path=`$CYGPATH -u "$windows_path"`
31876    VS_BASE="$unix_path"
31877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31879    VS_BASE="$unix_path"
31880  fi
31881
31882    if test -d "$VS_BASE"; then
31883      if test -f "$VS_BASE/$VCVARSFILE"; then
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        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31887        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31888        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31889        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31890      else
31891        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31892$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31893        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31894$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31895      fi
31896    fi
31897  fi
31898
31899  fi
31900
31901  if test "x$VS_ENV_CMD" = x; then
31902    VS_VERSION="${VS_VERSION}"
31903    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31904    METHOD="well-known name"
31905
31906    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31907      VCVARSFILE="vc/bin/vcvars32.bat"
31908    else
31909      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31910    fi
31911
31912
31913  windows_path="$VS_BASE"
31914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31915    unix_path=`$CYGPATH -u "$windows_path"`
31916    VS_BASE="$unix_path"
31917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31919    VS_BASE="$unix_path"
31920  fi
31921
31922    if test -d "$VS_BASE"; then
31923      if test -f "$VS_BASE/$VCVARSFILE"; then
31924        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31925$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31926        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31927        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31928        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31929        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31930      else
31931        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31932$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31933        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31934$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31935      fi
31936    fi
31937  fi
31938
31939
31940  if test "x$VS_ENV_CMD" = x; then
31941    VS_VERSION="${VS_VERSION}"
31942    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31943    METHOD="well-known name"
31944
31945    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31946      VCVARSFILE="vc/bin/vcvars32.bat"
31947    else
31948      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31949    fi
31950
31951
31952  windows_path="$VS_BASE"
31953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31954    unix_path=`$CYGPATH -u "$windows_path"`
31955    VS_BASE="$unix_path"
31956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31958    VS_BASE="$unix_path"
31959  fi
31960
31961    if test -d "$VS_BASE"; then
31962      if test -f "$VS_BASE/$VCVARSFILE"; then
31963        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31964$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31965        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31966        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31967        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31968        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31969      else
31970        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31971$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31972        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31973$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31974      fi
31975    fi
31976  fi
31977
31978
31979  if test "x$SDK_INSTALL_DIR" != x; then
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$PROGRAMW6432" != x; then
32028
32029  if test "x$VS_ENV_CMD" = x; then
32030    VS_VERSION="${VS_VERSION}"
32031    WIN_SDK_BASE="$PROGRAMW6432/$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    if test "x$PROGRAMFILES" != x; then
32075
32076  if test "x$VS_ENV_CMD" = x; then
32077    VS_VERSION="${VS_VERSION}"
32078    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32079    METHOD="well-known name"
32080
32081  windows_path="$WIN_SDK_BASE"
32082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32083    unix_path=`$CYGPATH -u "$windows_path"`
32084    WIN_SDK_BASE="$unix_path"
32085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32087    WIN_SDK_BASE="$unix_path"
32088  fi
32089
32090    if test -d "$WIN_SDK_BASE"; then
32091      # There have been cases of partial or broken SDK installations. A missing
32092      # lib dir is not going to work.
32093      if test ! -d "$WIN_SDK_BASE/lib"; then
32094        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32095$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32096        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32097$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32098      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32099        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32100$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32101        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32102        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32103          VS_ENV_ARGS="/x86"
32104        else
32105          VS_ENV_ARGS="/x64"
32106        fi
32107        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32108        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32109        # TODO: improve detection for other versions of SDK
32110        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32111      else
32112        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32113$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32114        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32115$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32116      fi
32117    fi
32118  fi
32119
32120    fi
32121
32122  if test "x$VS_ENV_CMD" = x; then
32123    VS_VERSION="${VS_VERSION}"
32124    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32125    METHOD="well-known name"
32126
32127  windows_path="$WIN_SDK_BASE"
32128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32129    unix_path=`$CYGPATH -u "$windows_path"`
32130    WIN_SDK_BASE="$unix_path"
32131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32133    WIN_SDK_BASE="$unix_path"
32134  fi
32135
32136    if test -d "$WIN_SDK_BASE"; then
32137      # There have been cases of partial or broken SDK installations. A missing
32138      # lib dir is not going to work.
32139      if test ! -d "$WIN_SDK_BASE/lib"; then
32140        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32141$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32142        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32143$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32144      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32145        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32146$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32147        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32148        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32149          VS_ENV_ARGS="/x86"
32150        else
32151          VS_ENV_ARGS="/x64"
32152        fi
32153        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32154        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32155        # TODO: improve detection for other versions of SDK
32156        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32157      else
32158        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32159$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32160        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32161$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32162      fi
32163    fi
32164  fi
32165
32166
32167  if test "x$VS_ENV_CMD" = x; then
32168    VS_VERSION="${VS_VERSION}"
32169    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32170    METHOD="well-known name"
32171
32172  windows_path="$WIN_SDK_BASE"
32173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32174    unix_path=`$CYGPATH -u "$windows_path"`
32175    WIN_SDK_BASE="$unix_path"
32176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32178    WIN_SDK_BASE="$unix_path"
32179  fi
32180
32181    if test -d "$WIN_SDK_BASE"; then
32182      # There have been cases of partial or broken SDK installations. A missing
32183      # lib dir is not going to work.
32184      if test ! -d "$WIN_SDK_BASE/lib"; then
32185        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32186$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32187        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32188$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32189      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32190        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32191$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32192        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32193        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32194          VS_ENV_ARGS="/x86"
32195        else
32196          VS_ENV_ARGS="/x64"
32197        fi
32198        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32199        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32200        # TODO: improve detection for other versions of SDK
32201        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32202      else
32203        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32204$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32205        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32206$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32207      fi
32208    fi
32209  fi
32210
32211  fi
32212
32213    if test "x$VS_ENV_CMD" != x; then
32214      TOOLCHAIN_VERSION=$VS_VERSION
32215      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32216      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32217      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32218      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32219      # The rest of the variables are already evaled while probing
32220      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32221$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32222      break
32223    fi
32224  done
32225
32226
32227  # If we have a devkit, skip all of the below.
32228  if test "x$DEVKIT_VS_VERSION" = x; then
32229    if test "x$VS_ENV_CMD" != x; then
32230      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32231
32232  # Only process if variable expands to non-empty
32233
32234  if test "x$VS_ENV_CMD" != x; then
32235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32236
32237  # First separate the path from the arguments. This will split at the first
32238  # space.
32239  complete="$VS_ENV_CMD"
32240  path="${complete%% *}"
32241  tmp="$complete EOL"
32242  arguments="${tmp#* }"
32243
32244  # Input might be given as Windows format, start by converting to
32245  # unix format.
32246  new_path=`$CYGPATH -u "$path"`
32247
32248  # Now try to locate executable using which
32249  new_path=`$WHICH "$new_path" 2> /dev/null`
32250  # bat and cmd files are not always considered executable in cygwin causing which
32251  # to not find them
32252  if test "x$new_path" = x \
32253      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32254      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32255    new_path=`$CYGPATH -u "$path"`
32256  fi
32257  if test "x$new_path" = x; then
32258    # Oops. Which didn't find the executable.
32259    # The splitting of arguments from the executable at a space might have been incorrect,
32260    # since paths with space are more likely in Windows. Give it another try with the whole
32261    # argument.
32262    path="$complete"
32263    arguments="EOL"
32264    new_path=`$CYGPATH -u "$path"`
32265    new_path=`$WHICH "$new_path" 2> /dev/null`
32266    # bat and cmd files are not always considered executable in cygwin causing which
32267    # to not find them
32268    if test "x$new_path" = x \
32269        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32270        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32271      new_path=`$CYGPATH -u "$path"`
32272    fi
32273    if test "x$new_path" = x; then
32274      # It's still not found. Now this is an unrecoverable error.
32275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32276$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32277      has_space=`$ECHO "$complete" | $GREP " "`
32278      if test "x$has_space" != x; then
32279        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32280$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32281      fi
32282      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32283    fi
32284  fi
32285
32286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32289  # "foo.exe" is OK but "foo" is an error.
32290  #
32291  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32292  # It is also a way to make sure we got the proper file name for the real test later on.
32293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32294  if test "x$test_shortpath" = x; then
32295    # Short path failed, file does not exist as specified.
32296    # Try adding .exe or .cmd
32297    if test -f "${new_path}.exe"; then
32298      input_to_shortpath="${new_path}.exe"
32299    elif test -f "${new_path}.cmd"; then
32300      input_to_shortpath="${new_path}.cmd"
32301    else
32302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32303$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32304      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32305$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32306      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32307    fi
32308  else
32309    input_to_shortpath="$new_path"
32310  fi
32311
32312  # Call helper function which possibly converts this using DOS-style short mode.
32313  # If so, the updated path is stored in $new_path.
32314  new_path="$input_to_shortpath"
32315
32316  input_path="$input_to_shortpath"
32317  # Check if we need to convert this using DOS-style short mode. If the path
32318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32319  # take no chances and rewrite it.
32320  # Note: m4 eats our [], so we need to use [ and ] instead.
32321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32322  if test "x$has_forbidden_chars" != x; then
32323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32327      # Going to short mode and back again did indeed matter. Since short mode is
32328      # case insensitive, let's make it lowercase to improve readability.
32329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32330      # Now convert it back to Unix-style (cygpath)
32331      input_path=`$CYGPATH -u "$shortmode_path"`
32332      new_path="$input_path"
32333    fi
32334  fi
32335
32336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32337  if test "x$test_cygdrive_prefix" = x; then
32338    # As a simple fix, exclude /usr/bin since it's not a real path.
32339    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32341      # a path prefixed by /cygdrive for fixpath to work.
32342      new_path="$CYGWIN_ROOT_PATH$input_path"
32343    fi
32344  fi
32345
32346  # remove trailing .exe if any
32347  new_path="${new_path/%.exe/}"
32348
32349    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32350
32351  # First separate the path from the arguments. This will split at the first
32352  # space.
32353  complete="$VS_ENV_CMD"
32354  path="${complete%% *}"
32355  tmp="$complete EOL"
32356  arguments="${tmp#* }"
32357
32358  # Input might be given as Windows format, start by converting to
32359  # unix format.
32360  new_path="$path"
32361
32362  windows_path="$new_path"
32363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32364    unix_path=`$CYGPATH -u "$windows_path"`
32365    new_path="$unix_path"
32366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32368    new_path="$unix_path"
32369  fi
32370
32371
32372  # Now try to locate executable using which
32373  new_path=`$WHICH "$new_path" 2> /dev/null`
32374
32375  if test "x$new_path" = x; then
32376    # Oops. Which didn't find the executable.
32377    # The splitting of arguments from the executable at a space might have been incorrect,
32378    # since paths with space are more likely in Windows. Give it another try with the whole
32379    # argument.
32380    path="$complete"
32381    arguments="EOL"
32382    new_path="$path"
32383
32384  windows_path="$new_path"
32385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32386    unix_path=`$CYGPATH -u "$windows_path"`
32387    new_path="$unix_path"
32388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32390    new_path="$unix_path"
32391  fi
32392
32393
32394    new_path=`$WHICH "$new_path" 2> /dev/null`
32395    # bat and cmd files are not always considered executable in MSYS causing which
32396    # to not find them
32397    if test "x$new_path" = x \
32398        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32399        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32400      new_path="$path"
32401
32402  windows_path="$new_path"
32403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32404    unix_path=`$CYGPATH -u "$windows_path"`
32405    new_path="$unix_path"
32406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32408    new_path="$unix_path"
32409  fi
32410
32411    fi
32412
32413    if test "x$new_path" = x; then
32414      # It's still not found. Now this is an unrecoverable error.
32415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32416$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32417      has_space=`$ECHO "$complete" | $GREP " "`
32418      if test "x$has_space" != x; then
32419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32421      fi
32422      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32423    fi
32424  fi
32425
32426  # Now new_path has a complete unix path to the binary
32427  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32428    # Keep paths in /bin as-is, but remove trailing .exe if any
32429    new_path="${new_path/%.exe/}"
32430    # Do not save /bin paths to all_fixpath_prefixes!
32431  else
32432    # Not in mixed or Windows style, start by that.
32433    new_path=`cmd //c echo $new_path`
32434
32435  input_path="$new_path"
32436  # Check if we need to convert this using DOS-style short mode. If the path
32437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32438  # take no chances and rewrite it.
32439  # Note: m4 eats our [], so we need to use [ and ] instead.
32440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32441  if test "x$has_forbidden_chars" != x; then
32442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32444  fi
32445
32446    # Output is in $new_path
32447
32448  windows_path="$new_path"
32449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32450    unix_path=`$CYGPATH -u "$windows_path"`
32451    new_path="$unix_path"
32452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32454    new_path="$unix_path"
32455  fi
32456
32457    # remove trailing .exe if any
32458    new_path="${new_path/%.exe/}"
32459
32460    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32461    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32462  fi
32463
32464    else
32465      # We're on a unix platform. Hooray! :)
32466      # First separate the path from the arguments. This will split at the first
32467      # space.
32468      complete="$VS_ENV_CMD"
32469      path="${complete%% *}"
32470      tmp="$complete EOL"
32471      arguments="${tmp#* }"
32472
32473      # Cannot rely on the command "which" here since it doesn't always work.
32474      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32475      if test -z "$is_absolute_path"; then
32476        # Path to executable is not absolute. Find it.
32477        IFS_save="$IFS"
32478        IFS=:
32479        for p in $PATH; do
32480          if test -f "$p/$path" && test -x "$p/$path"; then
32481            new_path="$p/$path"
32482            break
32483          fi
32484        done
32485        IFS="$IFS_save"
32486      else
32487        # This is an absolute path, we can use it without further modifications.
32488        new_path="$path"
32489      fi
32490
32491      if test "x$new_path" = x; then
32492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32493$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32494        has_space=`$ECHO "$complete" | $GREP " "`
32495        if test "x$has_space" != x; then
32496          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32497$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32498        fi
32499        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32500      fi
32501    fi
32502
32503    # Now join together the path and the arguments once again
32504    if test "x$arguments" != xEOL; then
32505      new_complete="$new_path ${arguments% *}"
32506    else
32507      new_complete="$new_path"
32508    fi
32509
32510    if test "x$complete" != "x$new_complete"; then
32511      VS_ENV_CMD="$new_complete"
32512      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32513$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32514    fi
32515  fi
32516
32517
32518      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32519      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32520$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32521
32522      # We need to create a couple of temporary files.
32523      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32524      $MKDIR -p $VS_ENV_TMP_DIR
32525
32526      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32527      # Instead create a shell script which will set the relevant variables when run.
32528      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32529
32530  unix_path="$WINPATH_VS_ENV_CMD"
32531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32532    windows_path=`$CYGPATH -m "$unix_path"`
32533    WINPATH_VS_ENV_CMD="$windows_path"
32534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32535    windows_path=`cmd //c echo $unix_path`
32536    WINPATH_VS_ENV_CMD="$windows_path"
32537  fi
32538
32539      WINPATH_BASH="$BASH"
32540
32541  unix_path="$WINPATH_BASH"
32542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32543    windows_path=`$CYGPATH -m "$unix_path"`
32544    WINPATH_BASH="$windows_path"
32545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32546    windows_path=`cmd //c echo $unix_path`
32547    WINPATH_BASH="$windows_path"
32548  fi
32549
32550
32551      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32552      # script (executable by bash) that will setup the important variables.
32553      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32554      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32555      # This will end up something like:
32556      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32557      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32558      # These will end up something like:
32559      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32560      # The trailing space for everyone except PATH is no typo, but is needed due
32561      # to trailing \ in the Windows paths. These will be stripped later.
32562      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32563          >> $EXTRACT_VC_ENV_BAT_FILE
32564      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32565          >> $EXTRACT_VC_ENV_BAT_FILE
32566      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32567          >> $EXTRACT_VC_ENV_BAT_FILE
32568      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32569          >> $EXTRACT_VC_ENV_BAT_FILE
32570      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32571          >> $EXTRACT_VC_ENV_BAT_FILE
32572      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32573          >> $EXTRACT_VC_ENV_BAT_FILE
32574
32575      # Now execute the newly created bat file.
32576      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32577      # Change directory so we don't need to mess with Windows paths in redirects.
32578      cd $VS_ENV_TMP_DIR
32579      cmd /c extract-vs-env.bat | $CAT
32580      cd $CURDIR
32581
32582      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32583        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32584$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32585        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32586$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32587        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32588$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32589        as_fn_error $? "Cannot continue" "$LINENO" 5
32590      fi
32591
32592      # Now set all paths and other env variables. This will allow the rest of
32593      # the configure script to find and run the compiler in the proper way.
32594      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32595$as_echo "$as_me: Setting extracted environment variables" >&6;}
32596      . $VS_ENV_TMP_DIR/set-vs-env.sh
32597      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32598      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32599    else
32600      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32601      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32602$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32603    fi
32604  fi
32605
32606  # At this point, we should have correct variables in the environment, or we can't continue.
32607  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32608$as_echo_n "checking for Visual Studio variables... " >&6; }
32609
32610  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32611      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32612    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32613      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32614$as_echo "present but broken" >&6; }
32615      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32616    else
32617      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32618$as_echo "ok" >&6; }
32619      # Remove any trailing "\" ";" and " " from the variables.
32620      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32621      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32622      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32623      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32624      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32625      # Remove any paths containing # (typically F#) as that messes up make. This
32626      # is needed if visual studio was installed with F# support.
32627      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32628
32629
32630
32631
32632
32633      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32634      OLDIFS="$IFS"
32635      IFS=";"
32636      for i in $VS_INCLUDE; do
32637        ipath=$i
32638        # Only process non-empty elements
32639        if test "x$ipath" != x; then
32640          IFS="$OLDIFS"
32641          # Check that directory exists before calling fixup_path
32642          testpath=$ipath
32643
32644  windows_path="$testpath"
32645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32646    unix_path=`$CYGPATH -u "$windows_path"`
32647    testpath="$unix_path"
32648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32650    testpath="$unix_path"
32651  fi
32652
32653          if test -d "$testpath"; then
32654
32655  # Only process if variable expands to non-empty
32656
32657  if test "x$ipath" != x; then
32658    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32659
32660  # Input might be given as Windows format, start by converting to
32661  # unix format.
32662  path="$ipath"
32663  new_path=`$CYGPATH -u "$path"`
32664
32665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32668  # "foo.exe" is OK but "foo" is an error.
32669  #
32670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32671  # It is also a way to make sure we got the proper file name for the real test later on.
32672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32673  if test "x$test_shortpath" = x; then
32674    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32675$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32676    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32677  fi
32678
32679  # Call helper function which possibly converts this using DOS-style short mode.
32680  # If so, the updated path is stored in $new_path.
32681
32682  input_path="$new_path"
32683  # Check if we need to convert this using DOS-style short mode. If the path
32684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32685  # take no chances and rewrite it.
32686  # Note: m4 eats our [], so we need to use [ and ] instead.
32687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32688  if test "x$has_forbidden_chars" != x; then
32689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32693      # Going to short mode and back again did indeed matter. Since short mode is
32694      # case insensitive, let's make it lowercase to improve readability.
32695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32696      # Now convert it back to Unix-style (cygpath)
32697      input_path=`$CYGPATH -u "$shortmode_path"`
32698      new_path="$input_path"
32699    fi
32700  fi
32701
32702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32703  if test "x$test_cygdrive_prefix" = x; then
32704    # As a simple fix, exclude /usr/bin since it's not a real path.
32705    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32707      # a path prefixed by /cygdrive for fixpath to work.
32708      new_path="$CYGWIN_ROOT_PATH$input_path"
32709    fi
32710  fi
32711
32712
32713  if test "x$path" != "x$new_path"; then
32714    ipath="$new_path"
32715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32716$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32717  fi
32718
32719    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32720
32721  path="$ipath"
32722  has_colon=`$ECHO $path | $GREP ^.:`
32723  new_path="$path"
32724  if test "x$has_colon" = x; then
32725    # Not in mixed or Windows style, start by that.
32726    new_path=`cmd //c echo $path`
32727  fi
32728
32729
32730  input_path="$new_path"
32731  # Check if we need to convert this using DOS-style short mode. If the path
32732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32733  # take no chances and rewrite it.
32734  # Note: m4 eats our [], so we need to use [ and ] instead.
32735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32736  if test "x$has_forbidden_chars" != x; then
32737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32739  fi
32740
32741
32742  windows_path="$new_path"
32743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32744    unix_path=`$CYGPATH -u "$windows_path"`
32745    new_path="$unix_path"
32746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32748    new_path="$unix_path"
32749  fi
32750
32751  if test "x$path" != "x$new_path"; then
32752    ipath="$new_path"
32753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32754$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32755  fi
32756
32757  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32758  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32759
32760    else
32761      # We're on a unix platform. Hooray! :)
32762      path="$ipath"
32763      has_space=`$ECHO "$path" | $GREP " "`
32764      if test "x$has_space" != x; then
32765        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32766$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32767        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32768      fi
32769
32770      # Use eval to expand a potential ~
32771      eval path="$path"
32772      if test ! -f "$path" && test ! -d "$path"; then
32773        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32774      fi
32775
32776      if test -d "$path"; then
32777        ipath="`cd "$path"; $THEPWDCMD -L`"
32778      else
32779        dir="`$DIRNAME "$path"`"
32780        base="`$BASENAME "$path"`"
32781        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32782      fi
32783    fi
32784  fi
32785
32786            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32787          fi
32788          IFS=";"
32789        fi
32790      done
32791      # Convert VS_LIB into SYSROOT_LDFLAGS
32792      for i in $VS_LIB; do
32793        libpath=$i
32794        # Only process non-empty elements
32795        if test "x$libpath" != x; then
32796          IFS="$OLDIFS"
32797          # Check that directory exists before calling fixup_path
32798          testpath=$libpath
32799
32800  windows_path="$testpath"
32801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32802    unix_path=`$CYGPATH -u "$windows_path"`
32803    testpath="$unix_path"
32804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32806    testpath="$unix_path"
32807  fi
32808
32809          if test -d "$testpath"; then
32810
32811  # Only process if variable expands to non-empty
32812
32813  if test "x$libpath" != x; then
32814    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32815
32816  # Input might be given as Windows format, start by converting to
32817  # unix format.
32818  path="$libpath"
32819  new_path=`$CYGPATH -u "$path"`
32820
32821  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32822  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32823  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32824  # "foo.exe" is OK but "foo" is an error.
32825  #
32826  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32827  # It is also a way to make sure we got the proper file name for the real test later on.
32828  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32829  if test "x$test_shortpath" = x; then
32830    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32831$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32832    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32833  fi
32834
32835  # Call helper function which possibly converts this using DOS-style short mode.
32836  # If so, the updated path is stored in $new_path.
32837
32838  input_path="$new_path"
32839  # Check if we need to convert this using DOS-style short mode. If the path
32840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32841  # take no chances and rewrite it.
32842  # Note: m4 eats our [], so we need to use [ and ] instead.
32843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32844  if test "x$has_forbidden_chars" != x; then
32845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32846    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32847    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32848    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32849      # Going to short mode and back again did indeed matter. Since short mode is
32850      # case insensitive, let's make it lowercase to improve readability.
32851      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32852      # Now convert it back to Unix-style (cygpath)
32853      input_path=`$CYGPATH -u "$shortmode_path"`
32854      new_path="$input_path"
32855    fi
32856  fi
32857
32858  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32859  if test "x$test_cygdrive_prefix" = x; then
32860    # As a simple fix, exclude /usr/bin since it's not a real path.
32861    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32862      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32863      # a path prefixed by /cygdrive for fixpath to work.
32864      new_path="$CYGWIN_ROOT_PATH$input_path"
32865    fi
32866  fi
32867
32868
32869  if test "x$path" != "x$new_path"; then
32870    libpath="$new_path"
32871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32872$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32873  fi
32874
32875    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32876
32877  path="$libpath"
32878  has_colon=`$ECHO $path | $GREP ^.:`
32879  new_path="$path"
32880  if test "x$has_colon" = x; then
32881    # Not in mixed or Windows style, start by that.
32882    new_path=`cmd //c echo $path`
32883  fi
32884
32885
32886  input_path="$new_path"
32887  # Check if we need to convert this using DOS-style short mode. If the path
32888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32889  # take no chances and rewrite it.
32890  # Note: m4 eats our [], so we need to use [ and ] instead.
32891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32892  if test "x$has_forbidden_chars" != x; then
32893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32894    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32895  fi
32896
32897
32898  windows_path="$new_path"
32899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32900    unix_path=`$CYGPATH -u "$windows_path"`
32901    new_path="$unix_path"
32902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32904    new_path="$unix_path"
32905  fi
32906
32907  if test "x$path" != "x$new_path"; then
32908    libpath="$new_path"
32909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32910$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32911  fi
32912
32913  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32914  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32915
32916    else
32917      # We're on a unix platform. Hooray! :)
32918      path="$libpath"
32919      has_space=`$ECHO "$path" | $GREP " "`
32920      if test "x$has_space" != x; then
32921        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32922$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32923        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32924      fi
32925
32926      # Use eval to expand a potential ~
32927      eval path="$path"
32928      if test ! -f "$path" && test ! -d "$path"; then
32929        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32930      fi
32931
32932      if test -d "$path"; then
32933        libpath="`cd "$path"; $THEPWDCMD -L`"
32934      else
32935        dir="`$DIRNAME "$path"`"
32936        base="`$BASENAME "$path"`"
32937        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32938      fi
32939    fi
32940  fi
32941
32942            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32943          fi
32944          IFS=";"
32945        fi
32946      done
32947      IFS="$OLDIFS"
32948    fi
32949  else
32950    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32951$as_echo "not found" >&6; }
32952
32953    if test "x$VS_ENV_CMD" = x; then
32954      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32955$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32956      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32957$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32958    else
32959      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32960$as_echo "$as_me: Running the extraction script failed." >&6;}
32961    fi
32962    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32963$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32964    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32965$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32966    as_fn_error $? "Cannot continue" "$LINENO" 5
32967  fi
32968
32969    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32970    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32971    PATH="$VS_PATH"
32972    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32973    export INCLUDE="$VS_INCLUDE"
32974    export LIB="$VS_LIB"
32975  else
32976    if test "x$XCODE_VERSION_OUTPUT" != x; then
32977      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32978      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32979      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32980    else
32981      # Currently we do not define this for other toolchains. This might change as the need arise.
32982      TOOLCHAIN_VERSION=
32983    fi
32984  fi
32985
32986
32987  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32988  # override all other locations.
32989  if test "x$TOOLCHAIN_PATH" != x; then
32990    PATH=$TOOLCHAIN_PATH:$PATH
32991  fi
32992
32993
32994  #
32995  # Setup the compilers (CC and CXX)
32996  #
32997
32998  COMPILER_NAME=C
32999  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33000
33001  if test "x$CC" != x; then
33002    # User has supplied compiler name already, always let that override.
33003    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33004$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33005    if test "x`basename $CC`" = "x$CC"; then
33006      # A command without a complete path is provided, search $PATH.
33007
33008      for ac_prog in $CC
33009do
33010  # Extract the first word of "$ac_prog", so it can be a program name with args.
33011set dummy $ac_prog; ac_word=$2
33012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33013$as_echo_n "checking for $ac_word... " >&6; }
33014if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33015  $as_echo_n "(cached) " >&6
33016else
33017  case $POTENTIAL_CC in
33018  [\\/]* | ?:[\\/]*)
33019  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33020  ;;
33021  *)
33022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33023for as_dir in $PATH
33024do
33025  IFS=$as_save_IFS
33026  test -z "$as_dir" && as_dir=.
33027    for ac_exec_ext in '' $ac_executable_extensions; do
33028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33029    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33031    break 2
33032  fi
33033done
33034  done
33035IFS=$as_save_IFS
33036
33037  ;;
33038esac
33039fi
33040POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33041if test -n "$POTENTIAL_CC"; then
33042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33043$as_echo "$POTENTIAL_CC" >&6; }
33044else
33045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33046$as_echo "no" >&6; }
33047fi
33048
33049
33050  test -n "$POTENTIAL_CC" && break
33051done
33052
33053      if test "x$POTENTIAL_CC" != x; then
33054        CC=$POTENTIAL_CC
33055      else
33056        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33057      fi
33058    else
33059      # Otherwise it might already be a complete path
33060      if test ! -x "$CC"; then
33061        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33062      fi
33063    fi
33064  else
33065    # No user supplied value. Locate compiler ourselves.
33066
33067    # If we are cross compiling, assume cross compilation tools follows the
33068    # cross compilation standard where they are prefixed with the autoconf
33069    # standard name for the target. For example the binary
33070    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33071    # If we are not cross compiling, then the default compiler name will be
33072    # used.
33073
33074    CC=
33075    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33076    # before checking the rest of the PATH.
33077    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33078    # step, this should not be necessary.
33079    if test -n "$TOOLCHAIN_PATH"; then
33080      PATH_save="$PATH"
33081      PATH="$TOOLCHAIN_PATH"
33082      for ac_prog in $SEARCH_LIST
33083do
33084  # Extract the first word of "$ac_prog", so it can be a program name with args.
33085set dummy $ac_prog; ac_word=$2
33086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33087$as_echo_n "checking for $ac_word... " >&6; }
33088if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33089  $as_echo_n "(cached) " >&6
33090else
33091  case $TOOLCHAIN_PATH_CC in
33092  [\\/]* | ?:[\\/]*)
33093  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33094  ;;
33095  *)
33096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33097for as_dir in $PATH
33098do
33099  IFS=$as_save_IFS
33100  test -z "$as_dir" && as_dir=.
33101    for ac_exec_ext in '' $ac_executable_extensions; do
33102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33103    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33105    break 2
33106  fi
33107done
33108  done
33109IFS=$as_save_IFS
33110
33111  ;;
33112esac
33113fi
33114TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33115if test -n "$TOOLCHAIN_PATH_CC"; then
33116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33117$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33118else
33119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33120$as_echo "no" >&6; }
33121fi
33122
33123
33124  test -n "$TOOLCHAIN_PATH_CC" && break
33125done
33126
33127      CC=$TOOLCHAIN_PATH_CC
33128      PATH="$PATH_save"
33129    fi
33130
33131    # AC_PATH_PROGS can't be run multiple times with the same variable,
33132    # so create a new name for this run.
33133    if test "x$CC" = x; then
33134      for ac_prog in $SEARCH_LIST
33135do
33136  # Extract the first word of "$ac_prog", so it can be a program name with args.
33137set dummy $ac_prog; ac_word=$2
33138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33139$as_echo_n "checking for $ac_word... " >&6; }
33140if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33141  $as_echo_n "(cached) " >&6
33142else
33143  case $POTENTIAL_CC in
33144  [\\/]* | ?:[\\/]*)
33145  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33146  ;;
33147  *)
33148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33149for as_dir in $PATH
33150do
33151  IFS=$as_save_IFS
33152  test -z "$as_dir" && as_dir=.
33153    for ac_exec_ext in '' $ac_executable_extensions; do
33154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33155    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33157    break 2
33158  fi
33159done
33160  done
33161IFS=$as_save_IFS
33162
33163  ;;
33164esac
33165fi
33166POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33167if test -n "$POTENTIAL_CC"; then
33168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33169$as_echo "$POTENTIAL_CC" >&6; }
33170else
33171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33172$as_echo "no" >&6; }
33173fi
33174
33175
33176  test -n "$POTENTIAL_CC" && break
33177done
33178
33179      CC=$POTENTIAL_CC
33180    fi
33181
33182    if test "x$CC" = x; then
33183
33184  # Print a helpful message on how to acquire the necessary build dependency.
33185  # devkit is the help tag: freetype, cups, alsa etc
33186  MISSING_DEPENDENCY=devkit
33187
33188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33189    cygwin_help $MISSING_DEPENDENCY
33190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33191    msys_help $MISSING_DEPENDENCY
33192  else
33193    PKGHANDLER_COMMAND=
33194
33195    case $PKGHANDLER in
33196      apt-get)
33197        apt_help     $MISSING_DEPENDENCY ;;
33198      yum)
33199        yum_help     $MISSING_DEPENDENCY ;;
33200      port)
33201        port_help    $MISSING_DEPENDENCY ;;
33202      pkgutil)
33203        pkgutil_help $MISSING_DEPENDENCY ;;
33204      pkgadd)
33205        pkgadd_help  $MISSING_DEPENDENCY ;;
33206    esac
33207
33208    if test "x$PKGHANDLER_COMMAND" != x; then
33209      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33210    fi
33211  fi
33212
33213      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33214    fi
33215  fi
33216
33217  # Now we have a compiler binary in CC. Make sure it's okay.
33218
33219  # Only process if variable expands to non-empty
33220
33221  if test "x$CC" != x; then
33222    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33223
33224  # First separate the path from the arguments. This will split at the first
33225  # space.
33226  complete="$CC"
33227  path="${complete%% *}"
33228  tmp="$complete EOL"
33229  arguments="${tmp#* }"
33230
33231  # Input might be given as Windows format, start by converting to
33232  # unix format.
33233  new_path=`$CYGPATH -u "$path"`
33234
33235  # Now try to locate executable using which
33236  new_path=`$WHICH "$new_path" 2> /dev/null`
33237  # bat and cmd files are not always considered executable in cygwin causing which
33238  # to not find them
33239  if test "x$new_path" = x \
33240      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33241      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33242    new_path=`$CYGPATH -u "$path"`
33243  fi
33244  if test "x$new_path" = x; then
33245    # Oops. Which didn't find the executable.
33246    # The splitting of arguments from the executable at a space might have been incorrect,
33247    # since paths with space are more likely in Windows. Give it another try with the whole
33248    # argument.
33249    path="$complete"
33250    arguments="EOL"
33251    new_path=`$CYGPATH -u "$path"`
33252    new_path=`$WHICH "$new_path" 2> /dev/null`
33253    # bat and cmd files are not always considered executable in cygwin causing which
33254    # to not find them
33255    if test "x$new_path" = x \
33256        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33257        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33258      new_path=`$CYGPATH -u "$path"`
33259    fi
33260    if test "x$new_path" = x; then
33261      # It's still not found. Now this is an unrecoverable error.
33262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33263$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33264      has_space=`$ECHO "$complete" | $GREP " "`
33265      if test "x$has_space" != x; then
33266        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33267$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33268      fi
33269      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33270    fi
33271  fi
33272
33273  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33274  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33275  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33276  # "foo.exe" is OK but "foo" is an error.
33277  #
33278  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33279  # It is also a way to make sure we got the proper file name for the real test later on.
33280  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33281  if test "x$test_shortpath" = x; then
33282    # Short path failed, file does not exist as specified.
33283    # Try adding .exe or .cmd
33284    if test -f "${new_path}.exe"; then
33285      input_to_shortpath="${new_path}.exe"
33286    elif test -f "${new_path}.cmd"; then
33287      input_to_shortpath="${new_path}.cmd"
33288    else
33289      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33290$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33291      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33292$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33293      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33294    fi
33295  else
33296    input_to_shortpath="$new_path"
33297  fi
33298
33299  # Call helper function which possibly converts this using DOS-style short mode.
33300  # If so, the updated path is stored in $new_path.
33301  new_path="$input_to_shortpath"
33302
33303  input_path="$input_to_shortpath"
33304  # Check if we need to convert this using DOS-style short mode. If the path
33305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33306  # take no chances and rewrite it.
33307  # Note: m4 eats our [], so we need to use [ and ] instead.
33308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33309  if test "x$has_forbidden_chars" != x; then
33310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33311    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33312    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33313    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33314      # Going to short mode and back again did indeed matter. Since short mode is
33315      # case insensitive, let's make it lowercase to improve readability.
33316      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33317      # Now convert it back to Unix-style (cygpath)
33318      input_path=`$CYGPATH -u "$shortmode_path"`
33319      new_path="$input_path"
33320    fi
33321  fi
33322
33323  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33324  if test "x$test_cygdrive_prefix" = x; then
33325    # As a simple fix, exclude /usr/bin since it's not a real path.
33326    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33327      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33328      # a path prefixed by /cygdrive for fixpath to work.
33329      new_path="$CYGWIN_ROOT_PATH$input_path"
33330    fi
33331  fi
33332
33333  # remove trailing .exe if any
33334  new_path="${new_path/%.exe/}"
33335
33336    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33337
33338  # First separate the path from the arguments. This will split at the first
33339  # space.
33340  complete="$CC"
33341  path="${complete%% *}"
33342  tmp="$complete EOL"
33343  arguments="${tmp#* }"
33344
33345  # Input might be given as Windows format, start by converting to
33346  # unix format.
33347  new_path="$path"
33348
33349  windows_path="$new_path"
33350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33351    unix_path=`$CYGPATH -u "$windows_path"`
33352    new_path="$unix_path"
33353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33355    new_path="$unix_path"
33356  fi
33357
33358
33359  # Now try to locate executable using which
33360  new_path=`$WHICH "$new_path" 2> /dev/null`
33361
33362  if test "x$new_path" = x; then
33363    # Oops. Which didn't find the executable.
33364    # The splitting of arguments from the executable at a space might have been incorrect,
33365    # since paths with space are more likely in Windows. Give it another try with the whole
33366    # argument.
33367    path="$complete"
33368    arguments="EOL"
33369    new_path="$path"
33370
33371  windows_path="$new_path"
33372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33373    unix_path=`$CYGPATH -u "$windows_path"`
33374    new_path="$unix_path"
33375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33377    new_path="$unix_path"
33378  fi
33379
33380
33381    new_path=`$WHICH "$new_path" 2> /dev/null`
33382    # bat and cmd files are not always considered executable in MSYS causing which
33383    # to not find them
33384    if test "x$new_path" = x \
33385        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33386        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33387      new_path="$path"
33388
33389  windows_path="$new_path"
33390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33391    unix_path=`$CYGPATH -u "$windows_path"`
33392    new_path="$unix_path"
33393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33395    new_path="$unix_path"
33396  fi
33397
33398    fi
33399
33400    if test "x$new_path" = x; then
33401      # It's still not found. Now this is an unrecoverable error.
33402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33403$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33404      has_space=`$ECHO "$complete" | $GREP " "`
33405      if test "x$has_space" != x; then
33406        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33407$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33408      fi
33409      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33410    fi
33411  fi
33412
33413  # Now new_path has a complete unix path to the binary
33414  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33415    # Keep paths in /bin as-is, but remove trailing .exe if any
33416    new_path="${new_path/%.exe/}"
33417    # Do not save /bin paths to all_fixpath_prefixes!
33418  else
33419    # Not in mixed or Windows style, start by that.
33420    new_path=`cmd //c echo $new_path`
33421
33422  input_path="$new_path"
33423  # Check if we need to convert this using DOS-style short mode. If the path
33424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33425  # take no chances and rewrite it.
33426  # Note: m4 eats our [], so we need to use [ and ] instead.
33427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33428  if test "x$has_forbidden_chars" != x; then
33429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33430    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33431  fi
33432
33433    # Output is in $new_path
33434
33435  windows_path="$new_path"
33436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33437    unix_path=`$CYGPATH -u "$windows_path"`
33438    new_path="$unix_path"
33439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33441    new_path="$unix_path"
33442  fi
33443
33444    # remove trailing .exe if any
33445    new_path="${new_path/%.exe/}"
33446
33447    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33448    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33449  fi
33450
33451    else
33452      # We're on a unix platform. Hooray! :)
33453      # First separate the path from the arguments. This will split at the first
33454      # space.
33455      complete="$CC"
33456      path="${complete%% *}"
33457      tmp="$complete EOL"
33458      arguments="${tmp#* }"
33459
33460      # Cannot rely on the command "which" here since it doesn't always work.
33461      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33462      if test -z "$is_absolute_path"; then
33463        # Path to executable is not absolute. Find it.
33464        IFS_save="$IFS"
33465        IFS=:
33466        for p in $PATH; do
33467          if test -f "$p/$path" && test -x "$p/$path"; then
33468            new_path="$p/$path"
33469            break
33470          fi
33471        done
33472        IFS="$IFS_save"
33473      else
33474        # This is an absolute path, we can use it without further modifications.
33475        new_path="$path"
33476      fi
33477
33478      if test "x$new_path" = x; then
33479        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33480$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33481        has_space=`$ECHO "$complete" | $GREP " "`
33482        if test "x$has_space" != x; then
33483          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33484$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33485        fi
33486        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33487      fi
33488    fi
33489
33490    # Now join together the path and the arguments once again
33491    if test "x$arguments" != xEOL; then
33492      new_complete="$new_path ${arguments% *}"
33493    else
33494      new_complete="$new_path"
33495    fi
33496
33497    if test "x$complete" != "x$new_complete"; then
33498      CC="$new_complete"
33499      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33500$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33501    fi
33502  fi
33503
33504  TEST_COMPILER="$CC"
33505
33506  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33507$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33508  SYMLINK_ORIGINAL="$TEST_COMPILER"
33509
33510  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33511    # Follow a chain of symbolic links. Use readlink
33512    # where it exists, else fall back to horribly
33513    # complicated shell code.
33514    if test "x$READLINK_TESTED" != yes; then
33515      # On MacOSX there is a readlink tool with a different
33516      # purpose than the GNU readlink tool. Check the found readlink.
33517      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33518      if test "x$ISGNU" = x; then
33519        # A readlink that we do not know how to use.
33520        # Are there other non-GNU readlinks out there?
33521        READLINK_TESTED=yes
33522        READLINK=
33523      fi
33524    fi
33525
33526    if test "x$READLINK" != x; then
33527      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33528    else
33529      # Save the current directory for restoring afterwards
33530      STARTDIR=$PWD
33531      COUNTER=0
33532      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33533      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33534      cd $sym_link_dir
33535      # Use -P flag to resolve symlinks in directories.
33536      cd `$THEPWDCMD -P`
33537      sym_link_dir=`$THEPWDCMD -P`
33538      # Resolve file symlinks
33539      while test $COUNTER -lt 20; do
33540        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33541        if test "x$ISLINK" == x; then
33542          # This is not a symbolic link! We are done!
33543          break
33544        fi
33545        # Again resolve directory symlinks since the target of the just found
33546        # link could be in a different directory
33547        cd `$DIRNAME $ISLINK`
33548        sym_link_dir=`$THEPWDCMD -P`
33549        sym_link_file=`$BASENAME $ISLINK`
33550        let COUNTER=COUNTER+1
33551      done
33552      cd $STARTDIR
33553      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33554    fi
33555  fi
33556
33557  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33558    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33559$as_echo "no symlink" >&6; }
33560  else
33561    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33562$as_echo "$SYMLINK_ORIGINAL" >&6; }
33563
33564    # We can't handle ccache by gcc wrappers, since we need to know if we're
33565    # using ccache. Instead ccache usage must be controlled by a configure option.
33566    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33567    if test "x$COMPILER_BASENAME" = "xccache"; then
33568      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33569$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33570      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33571    fi
33572  fi
33573
33574
33575  COMPILER=$CC
33576  COMPILER_NAME=$COMPILER_NAME
33577
33578  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33579    # cc -V output typically looks like
33580    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33581    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33582    # Check that this is likely to be the Solaris Studio cc.
33583    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33584    if test $? -ne 0; then
33585      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33586      { $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
33587$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33588      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33589$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33590      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33591$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33592      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33593    fi
33594    # Remove usage instructions (if present), and
33595    # collapse compiler output into a single line
33596    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33597        $SED -e 's/ *[Uu]sage:.*//'`
33598    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33599        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33600  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33601    # xlc -qversion output typically looks like
33602    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33603    #     Version: 11.01.0000.0015
33604    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33605    # Check that this is likely to be the IBM XL C compiler.
33606    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33607    if test $? -ne 0; then
33608      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33609      { $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
33610$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33611      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33612$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33613      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33614$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33615      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33616    fi
33617    # Collapse compiler output into a single line
33618    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33619    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33620        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33621  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33622    # There is no specific version flag, but all output starts with a version string.
33623    # First line typically looks something like:
33624    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33625    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33626    # Check that this is likely to be Microsoft CL.EXE.
33627    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33628    if test $? -ne 0; then
33629      { $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
33630$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33631      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33632$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33633      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33634    fi
33635    # Collapse compiler output into a single line
33636    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33637    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33638        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33639  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33640    # gcc --version output typically looks like
33641    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33642    #     Copyright (C) 2013 Free Software Foundation, Inc.
33643    #     This is free software; see the source for copying conditions.  There is NO
33644    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33645    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33646    # Check that this is likely to be GCC.
33647    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33648    if test $? -ne 0; then
33649      { $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
33650$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33651      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33652$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33653      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33654    fi
33655    # Remove Copyright and legalese from version string, and
33656    # collapse into a single line
33657    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33658        $SED -e 's/ *Copyright .*//'`
33659    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33660        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33661  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33662    # clang --version output typically looks like
33663    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33664    #    clang version 3.3 (tags/RELEASE_33/final)
33665    # or
33666    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33667    #    Target: x86_64-pc-linux-gnu
33668    #    Thread model: posix
33669    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33670    # Check that this is likely to be clang
33671    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33672    if test $? -ne 0; then
33673      { $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
33674$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33675      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33676$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33677      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33678    fi
33679    # Collapse compiler output into a single line
33680    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33681    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33682        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33683  else
33684      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33685  fi
33686  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33687  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33688  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33689  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33690
33691  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33692$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33693
33694
33695  # Now that we have resolved CC ourself, let autoconf have its go at it
33696  ac_ext=c
33697ac_cpp='$CPP $CPPFLAGS'
33698ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33699ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33700ac_compiler_gnu=$ac_cv_c_compiler_gnu
33701if test -n "$ac_tool_prefix"; then
33702  for ac_prog in $CC
33703  do
33704    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33705set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33707$as_echo_n "checking for $ac_word... " >&6; }
33708if ${ac_cv_prog_CC+:} false; then :
33709  $as_echo_n "(cached) " >&6
33710else
33711  if test -n "$CC"; then
33712  ac_cv_prog_CC="$CC" # Let the user override the test.
33713else
33714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33715for as_dir in $PATH
33716do
33717  IFS=$as_save_IFS
33718  test -z "$as_dir" && as_dir=.
33719    for ac_exec_ext in '' $ac_executable_extensions; do
33720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33721    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33723    break 2
33724  fi
33725done
33726  done
33727IFS=$as_save_IFS
33728
33729fi
33730fi
33731CC=$ac_cv_prog_CC
33732if test -n "$CC"; then
33733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33734$as_echo "$CC" >&6; }
33735else
33736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33737$as_echo "no" >&6; }
33738fi
33739
33740
33741    test -n "$CC" && break
33742  done
33743fi
33744if test -z "$CC"; then
33745  ac_ct_CC=$CC
33746  for ac_prog in $CC
33747do
33748  # Extract the first word of "$ac_prog", so it can be a program name with args.
33749set dummy $ac_prog; ac_word=$2
33750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33751$as_echo_n "checking for $ac_word... " >&6; }
33752if ${ac_cv_prog_ac_ct_CC+:} false; then :
33753  $as_echo_n "(cached) " >&6
33754else
33755  if test -n "$ac_ct_CC"; then
33756  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33757else
33758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33759for as_dir in $PATH
33760do
33761  IFS=$as_save_IFS
33762  test -z "$as_dir" && as_dir=.
33763    for ac_exec_ext in '' $ac_executable_extensions; do
33764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33765    ac_cv_prog_ac_ct_CC="$ac_prog"
33766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33767    break 2
33768  fi
33769done
33770  done
33771IFS=$as_save_IFS
33772
33773fi
33774fi
33775ac_ct_CC=$ac_cv_prog_ac_ct_CC
33776if test -n "$ac_ct_CC"; then
33777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33778$as_echo "$ac_ct_CC" >&6; }
33779else
33780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33781$as_echo "no" >&6; }
33782fi
33783
33784
33785  test -n "$ac_ct_CC" && break
33786done
33787
33788  if test "x$ac_ct_CC" = x; then
33789    CC=""
33790  else
33791    case $cross_compiling:$ac_tool_warned in
33792yes:)
33793{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33794$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33795ac_tool_warned=yes ;;
33796esac
33797    CC=$ac_ct_CC
33798  fi
33799fi
33800
33801
33802test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33803$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33804as_fn_error $? "no acceptable C compiler found in \$PATH
33805See \`config.log' for more details" "$LINENO" 5; }
33806
33807# Provide some information about the compiler.
33808$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33809set X $ac_compile
33810ac_compiler=$2
33811for ac_option in --version -v -V -qversion; do
33812  { { ac_try="$ac_compiler $ac_option >&5"
33813case "(($ac_try" in
33814  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33815  *) ac_try_echo=$ac_try;;
33816esac
33817eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33818$as_echo "$ac_try_echo"; } >&5
33819  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33820  ac_status=$?
33821  if test -s conftest.err; then
33822    sed '10a\
33823... rest of stderr output deleted ...
33824         10q' conftest.err >conftest.er1
33825    cat conftest.er1 >&5
33826  fi
33827  rm -f conftest.er1 conftest.err
33828  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33829  test $ac_status = 0; }
33830done
33831
33832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33833/* end confdefs.h.  */
33834
33835int
33836main ()
33837{
33838
33839  ;
33840  return 0;
33841}
33842_ACEOF
33843ac_clean_files_save=$ac_clean_files
33844ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33845# Try to create an executable without -o first, disregard a.out.
33846# It will help us diagnose broken compilers, and finding out an intuition
33847# of exeext.
33848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33849$as_echo_n "checking whether the C compiler works... " >&6; }
33850ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33851
33852# The possible output files:
33853ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33854
33855ac_rmfiles=
33856for ac_file in $ac_files
33857do
33858  case $ac_file in
33859    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33860    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33861  esac
33862done
33863rm -f $ac_rmfiles
33864
33865if { { ac_try="$ac_link_default"
33866case "(($ac_try" in
33867  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33868  *) ac_try_echo=$ac_try;;
33869esac
33870eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33871$as_echo "$ac_try_echo"; } >&5
33872  (eval "$ac_link_default") 2>&5
33873  ac_status=$?
33874  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33875  test $ac_status = 0; }; then :
33876  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33877# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33878# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33879# so that the user can short-circuit this test for compilers unknown to
33880# Autoconf.
33881for ac_file in $ac_files ''
33882do
33883  test -f "$ac_file" || continue
33884  case $ac_file in
33885    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33886	;;
33887    [ab].out )
33888	# We found the default executable, but exeext='' is most
33889	# certainly right.
33890	break;;
33891    *.* )
33892	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33893	then :; else
33894	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33895	fi
33896	# We set ac_cv_exeext here because the later test for it is not
33897	# safe: cross compilers may not add the suffix if given an `-o'
33898	# argument, so we may need to know it at that point already.
33899	# Even if this section looks crufty: it has the advantage of
33900	# actually working.
33901	break;;
33902    * )
33903	break;;
33904  esac
33905done
33906test "$ac_cv_exeext" = no && ac_cv_exeext=
33907
33908else
33909  ac_file=''
33910fi
33911if test -z "$ac_file"; then :
33912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33913$as_echo "no" >&6; }
33914$as_echo "$as_me: failed program was:" >&5
33915sed 's/^/| /' conftest.$ac_ext >&5
33916
33917{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33918$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33919as_fn_error 77 "C compiler cannot create executables
33920See \`config.log' for more details" "$LINENO" 5; }
33921else
33922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33923$as_echo "yes" >&6; }
33924fi
33925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33926$as_echo_n "checking for C compiler default output file name... " >&6; }
33927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33928$as_echo "$ac_file" >&6; }
33929ac_exeext=$ac_cv_exeext
33930
33931rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33932ac_clean_files=$ac_clean_files_save
33933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33934$as_echo_n "checking for suffix of executables... " >&6; }
33935if { { ac_try="$ac_link"
33936case "(($ac_try" in
33937  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33938  *) ac_try_echo=$ac_try;;
33939esac
33940eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33941$as_echo "$ac_try_echo"; } >&5
33942  (eval "$ac_link") 2>&5
33943  ac_status=$?
33944  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33945  test $ac_status = 0; }; then :
33946  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33947# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33948# work properly (i.e., refer to `conftest.exe'), while it won't with
33949# `rm'.
33950for ac_file in conftest.exe conftest conftest.*; do
33951  test -f "$ac_file" || continue
33952  case $ac_file in
33953    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33954    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33955	  break;;
33956    * ) break;;
33957  esac
33958done
33959else
33960  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33961$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33962as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33963See \`config.log' for more details" "$LINENO" 5; }
33964fi
33965rm -f conftest conftest$ac_cv_exeext
33966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33967$as_echo "$ac_cv_exeext" >&6; }
33968
33969rm -f conftest.$ac_ext
33970EXEEXT=$ac_cv_exeext
33971ac_exeext=$EXEEXT
33972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33973/* end confdefs.h.  */
33974#include <stdio.h>
33975int
33976main ()
33977{
33978FILE *f = fopen ("conftest.out", "w");
33979 return ferror (f) || fclose (f) != 0;
33980
33981  ;
33982  return 0;
33983}
33984_ACEOF
33985ac_clean_files="$ac_clean_files conftest.out"
33986# Check that the compiler produces executables we can run.  If not, either
33987# the compiler is broken, or we cross compile.
33988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33989$as_echo_n "checking whether we are cross compiling... " >&6; }
33990if test "$cross_compiling" != yes; then
33991  { { ac_try="$ac_link"
33992case "(($ac_try" in
33993  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33994  *) ac_try_echo=$ac_try;;
33995esac
33996eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33997$as_echo "$ac_try_echo"; } >&5
33998  (eval "$ac_link") 2>&5
33999  ac_status=$?
34000  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34001  test $ac_status = 0; }
34002  if { ac_try='./conftest$ac_cv_exeext'
34003  { { case "(($ac_try" in
34004  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34005  *) ac_try_echo=$ac_try;;
34006esac
34007eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34008$as_echo "$ac_try_echo"; } >&5
34009  (eval "$ac_try") 2>&5
34010  ac_status=$?
34011  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34012  test $ac_status = 0; }; }; then
34013    cross_compiling=no
34014  else
34015    if test "$cross_compiling" = maybe; then
34016	cross_compiling=yes
34017    else
34018	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34020as_fn_error $? "cannot run C compiled programs.
34021If you meant to cross compile, use \`--host'.
34022See \`config.log' for more details" "$LINENO" 5; }
34023    fi
34024  fi
34025fi
34026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34027$as_echo "$cross_compiling" >&6; }
34028
34029rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34030ac_clean_files=$ac_clean_files_save
34031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34032$as_echo_n "checking for suffix of object files... " >&6; }
34033if ${ac_cv_objext+:} false; then :
34034  $as_echo_n "(cached) " >&6
34035else
34036  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34037/* end confdefs.h.  */
34038
34039int
34040main ()
34041{
34042
34043  ;
34044  return 0;
34045}
34046_ACEOF
34047rm -f conftest.o conftest.obj
34048if { { ac_try="$ac_compile"
34049case "(($ac_try" in
34050  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34051  *) ac_try_echo=$ac_try;;
34052esac
34053eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34054$as_echo "$ac_try_echo"; } >&5
34055  (eval "$ac_compile") 2>&5
34056  ac_status=$?
34057  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34058  test $ac_status = 0; }; then :
34059  for ac_file in conftest.o conftest.obj conftest.*; do
34060  test -f "$ac_file" || continue;
34061  case $ac_file in
34062    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34063    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34064       break;;
34065  esac
34066done
34067else
34068  $as_echo "$as_me: failed program was:" >&5
34069sed 's/^/| /' conftest.$ac_ext >&5
34070
34071{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34072$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34073as_fn_error $? "cannot compute suffix of object files: cannot compile
34074See \`config.log' for more details" "$LINENO" 5; }
34075fi
34076rm -f conftest.$ac_cv_objext conftest.$ac_ext
34077fi
34078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34079$as_echo "$ac_cv_objext" >&6; }
34080OBJEXT=$ac_cv_objext
34081ac_objext=$OBJEXT
34082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34083$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34084if ${ac_cv_c_compiler_gnu+:} false; then :
34085  $as_echo_n "(cached) " >&6
34086else
34087  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34088/* end confdefs.h.  */
34089
34090int
34091main ()
34092{
34093#ifndef __GNUC__
34094       choke me
34095#endif
34096
34097  ;
34098  return 0;
34099}
34100_ACEOF
34101if ac_fn_c_try_compile "$LINENO"; then :
34102  ac_compiler_gnu=yes
34103else
34104  ac_compiler_gnu=no
34105fi
34106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34107ac_cv_c_compiler_gnu=$ac_compiler_gnu
34108
34109fi
34110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34111$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34112if test $ac_compiler_gnu = yes; then
34113  GCC=yes
34114else
34115  GCC=
34116fi
34117ac_test_CFLAGS=${CFLAGS+set}
34118ac_save_CFLAGS=$CFLAGS
34119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34120$as_echo_n "checking whether $CC accepts -g... " >&6; }
34121if ${ac_cv_prog_cc_g+:} false; then :
34122  $as_echo_n "(cached) " >&6
34123else
34124  ac_save_c_werror_flag=$ac_c_werror_flag
34125   ac_c_werror_flag=yes
34126   ac_cv_prog_cc_g=no
34127   CFLAGS="-g"
34128   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34129/* end confdefs.h.  */
34130
34131int
34132main ()
34133{
34134
34135  ;
34136  return 0;
34137}
34138_ACEOF
34139if ac_fn_c_try_compile "$LINENO"; then :
34140  ac_cv_prog_cc_g=yes
34141else
34142  CFLAGS=""
34143      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34144/* end confdefs.h.  */
34145
34146int
34147main ()
34148{
34149
34150  ;
34151  return 0;
34152}
34153_ACEOF
34154if ac_fn_c_try_compile "$LINENO"; then :
34155
34156else
34157  ac_c_werror_flag=$ac_save_c_werror_flag
34158	 CFLAGS="-g"
34159	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34160/* end confdefs.h.  */
34161
34162int
34163main ()
34164{
34165
34166  ;
34167  return 0;
34168}
34169_ACEOF
34170if ac_fn_c_try_compile "$LINENO"; then :
34171  ac_cv_prog_cc_g=yes
34172fi
34173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34174fi
34175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34176fi
34177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34178   ac_c_werror_flag=$ac_save_c_werror_flag
34179fi
34180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34181$as_echo "$ac_cv_prog_cc_g" >&6; }
34182if test "$ac_test_CFLAGS" = set; then
34183  CFLAGS=$ac_save_CFLAGS
34184elif test $ac_cv_prog_cc_g = yes; then
34185  if test "$GCC" = yes; then
34186    CFLAGS="-g -O2"
34187  else
34188    CFLAGS="-g"
34189  fi
34190else
34191  if test "$GCC" = yes; then
34192    CFLAGS="-O2"
34193  else
34194    CFLAGS=
34195  fi
34196fi
34197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34198$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34199if ${ac_cv_prog_cc_c89+:} false; then :
34200  $as_echo_n "(cached) " >&6
34201else
34202  ac_cv_prog_cc_c89=no
34203ac_save_CC=$CC
34204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34205/* end confdefs.h.  */
34206#include <stdarg.h>
34207#include <stdio.h>
34208struct stat;
34209/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34210struct buf { int x; };
34211FILE * (*rcsopen) (struct buf *, struct stat *, int);
34212static char *e (p, i)
34213     char **p;
34214     int i;
34215{
34216  return p[i];
34217}
34218static char *f (char * (*g) (char **, int), char **p, ...)
34219{
34220  char *s;
34221  va_list v;
34222  va_start (v,p);
34223  s = g (p, va_arg (v,int));
34224  va_end (v);
34225  return s;
34226}
34227
34228/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34229   function prototypes and stuff, but not '\xHH' hex character constants.
34230   These don't provoke an error unfortunately, instead are silently treated
34231   as 'x'.  The following induces an error, until -std is added to get
34232   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34233   array size at least.  It's necessary to write '\x00'==0 to get something
34234   that's true only with -std.  */
34235int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34236
34237/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34238   inside strings and character constants.  */
34239#define FOO(x) 'x'
34240int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34241
34242int test (int i, double x);
34243struct s1 {int (*f) (int a);};
34244struct s2 {int (*f) (double a);};
34245int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34246int argc;
34247char **argv;
34248int
34249main ()
34250{
34251return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34252  ;
34253  return 0;
34254}
34255_ACEOF
34256for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34257	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34258do
34259  CC="$ac_save_CC $ac_arg"
34260  if ac_fn_c_try_compile "$LINENO"; then :
34261  ac_cv_prog_cc_c89=$ac_arg
34262fi
34263rm -f core conftest.err conftest.$ac_objext
34264  test "x$ac_cv_prog_cc_c89" != "xno" && break
34265done
34266rm -f conftest.$ac_ext
34267CC=$ac_save_CC
34268
34269fi
34270# AC_CACHE_VAL
34271case "x$ac_cv_prog_cc_c89" in
34272  x)
34273    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34274$as_echo "none needed" >&6; } ;;
34275  xno)
34276    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34277$as_echo "unsupported" >&6; } ;;
34278  *)
34279    CC="$CC $ac_cv_prog_cc_c89"
34280    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34281$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34282esac
34283if test "x$ac_cv_prog_cc_c89" != xno; then :
34284
34285fi
34286
34287ac_ext=cpp
34288ac_cpp='$CXXCPP $CPPFLAGS'
34289ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34290ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34291ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34292
34293
34294
34295  COMPILER_NAME=C++
34296  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34297
34298  if test "x$CXX" != x; then
34299    # User has supplied compiler name already, always let that override.
34300    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34301$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34302    if test "x`basename $CXX`" = "x$CXX"; then
34303      # A command without a complete path is provided, search $PATH.
34304
34305      for ac_prog in $CXX
34306do
34307  # Extract the first word of "$ac_prog", so it can be a program name with args.
34308set dummy $ac_prog; ac_word=$2
34309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34310$as_echo_n "checking for $ac_word... " >&6; }
34311if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34312  $as_echo_n "(cached) " >&6
34313else
34314  case $POTENTIAL_CXX in
34315  [\\/]* | ?:[\\/]*)
34316  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34317  ;;
34318  *)
34319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34320for as_dir in $PATH
34321do
34322  IFS=$as_save_IFS
34323  test -z "$as_dir" && as_dir=.
34324    for ac_exec_ext in '' $ac_executable_extensions; do
34325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34326    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34328    break 2
34329  fi
34330done
34331  done
34332IFS=$as_save_IFS
34333
34334  ;;
34335esac
34336fi
34337POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34338if test -n "$POTENTIAL_CXX"; then
34339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34340$as_echo "$POTENTIAL_CXX" >&6; }
34341else
34342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34343$as_echo "no" >&6; }
34344fi
34345
34346
34347  test -n "$POTENTIAL_CXX" && break
34348done
34349
34350      if test "x$POTENTIAL_CXX" != x; then
34351        CXX=$POTENTIAL_CXX
34352      else
34353        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34354      fi
34355    else
34356      # Otherwise it might already be a complete path
34357      if test ! -x "$CXX"; then
34358        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34359      fi
34360    fi
34361  else
34362    # No user supplied value. Locate compiler ourselves.
34363
34364    # If we are cross compiling, assume cross compilation tools follows the
34365    # cross compilation standard where they are prefixed with the autoconf
34366    # standard name for the target. For example the binary
34367    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34368    # If we are not cross compiling, then the default compiler name will be
34369    # used.
34370
34371    CXX=
34372    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34373    # before checking the rest of the PATH.
34374    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34375    # step, this should not be necessary.
34376    if test -n "$TOOLCHAIN_PATH"; then
34377      PATH_save="$PATH"
34378      PATH="$TOOLCHAIN_PATH"
34379      for ac_prog in $SEARCH_LIST
34380do
34381  # Extract the first word of "$ac_prog", so it can be a program name with args.
34382set dummy $ac_prog; ac_word=$2
34383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34384$as_echo_n "checking for $ac_word... " >&6; }
34385if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34386  $as_echo_n "(cached) " >&6
34387else
34388  case $TOOLCHAIN_PATH_CXX in
34389  [\\/]* | ?:[\\/]*)
34390  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34391  ;;
34392  *)
34393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34394for as_dir in $PATH
34395do
34396  IFS=$as_save_IFS
34397  test -z "$as_dir" && as_dir=.
34398    for ac_exec_ext in '' $ac_executable_extensions; do
34399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34400    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34402    break 2
34403  fi
34404done
34405  done
34406IFS=$as_save_IFS
34407
34408  ;;
34409esac
34410fi
34411TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34412if test -n "$TOOLCHAIN_PATH_CXX"; then
34413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34414$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34415else
34416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34417$as_echo "no" >&6; }
34418fi
34419
34420
34421  test -n "$TOOLCHAIN_PATH_CXX" && break
34422done
34423
34424      CXX=$TOOLCHAIN_PATH_CXX
34425      PATH="$PATH_save"
34426    fi
34427
34428    # AC_PATH_PROGS can't be run multiple times with the same variable,
34429    # so create a new name for this run.
34430    if test "x$CXX" = x; then
34431      for ac_prog in $SEARCH_LIST
34432do
34433  # Extract the first word of "$ac_prog", so it can be a program name with args.
34434set dummy $ac_prog; ac_word=$2
34435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34436$as_echo_n "checking for $ac_word... " >&6; }
34437if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34438  $as_echo_n "(cached) " >&6
34439else
34440  case $POTENTIAL_CXX in
34441  [\\/]* | ?:[\\/]*)
34442  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34443  ;;
34444  *)
34445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34446for as_dir in $PATH
34447do
34448  IFS=$as_save_IFS
34449  test -z "$as_dir" && as_dir=.
34450    for ac_exec_ext in '' $ac_executable_extensions; do
34451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34452    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34454    break 2
34455  fi
34456done
34457  done
34458IFS=$as_save_IFS
34459
34460  ;;
34461esac
34462fi
34463POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34464if test -n "$POTENTIAL_CXX"; then
34465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34466$as_echo "$POTENTIAL_CXX" >&6; }
34467else
34468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34469$as_echo "no" >&6; }
34470fi
34471
34472
34473  test -n "$POTENTIAL_CXX" && break
34474done
34475
34476      CXX=$POTENTIAL_CXX
34477    fi
34478
34479    if test "x$CXX" = x; then
34480
34481  # Print a helpful message on how to acquire the necessary build dependency.
34482  # devkit is the help tag: freetype, cups, alsa etc
34483  MISSING_DEPENDENCY=devkit
34484
34485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34486    cygwin_help $MISSING_DEPENDENCY
34487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34488    msys_help $MISSING_DEPENDENCY
34489  else
34490    PKGHANDLER_COMMAND=
34491
34492    case $PKGHANDLER in
34493      apt-get)
34494        apt_help     $MISSING_DEPENDENCY ;;
34495      yum)
34496        yum_help     $MISSING_DEPENDENCY ;;
34497      port)
34498        port_help    $MISSING_DEPENDENCY ;;
34499      pkgutil)
34500        pkgutil_help $MISSING_DEPENDENCY ;;
34501      pkgadd)
34502        pkgadd_help  $MISSING_DEPENDENCY ;;
34503    esac
34504
34505    if test "x$PKGHANDLER_COMMAND" != x; then
34506      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34507    fi
34508  fi
34509
34510      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34511    fi
34512  fi
34513
34514  # Now we have a compiler binary in CXX. Make sure it's okay.
34515
34516  # Only process if variable expands to non-empty
34517
34518  if test "x$CXX" != x; then
34519    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34520
34521  # First separate the path from the arguments. This will split at the first
34522  # space.
34523  complete="$CXX"
34524  path="${complete%% *}"
34525  tmp="$complete EOL"
34526  arguments="${tmp#* }"
34527
34528  # Input might be given as Windows format, start by converting to
34529  # unix format.
34530  new_path=`$CYGPATH -u "$path"`
34531
34532  # Now try to locate executable using which
34533  new_path=`$WHICH "$new_path" 2> /dev/null`
34534  # bat and cmd files are not always considered executable in cygwin causing which
34535  # to not find them
34536  if test "x$new_path" = x \
34537      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34538      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34539    new_path=`$CYGPATH -u "$path"`
34540  fi
34541  if test "x$new_path" = x; then
34542    # Oops. Which didn't find the executable.
34543    # The splitting of arguments from the executable at a space might have been incorrect,
34544    # since paths with space are more likely in Windows. Give it another try with the whole
34545    # argument.
34546    path="$complete"
34547    arguments="EOL"
34548    new_path=`$CYGPATH -u "$path"`
34549    new_path=`$WHICH "$new_path" 2> /dev/null`
34550    # bat and cmd files are not always considered executable in cygwin causing which
34551    # to not find them
34552    if test "x$new_path" = x \
34553        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34554        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34555      new_path=`$CYGPATH -u "$path"`
34556    fi
34557    if test "x$new_path" = x; then
34558      # It's still not found. Now this is an unrecoverable error.
34559      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34560$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34561      has_space=`$ECHO "$complete" | $GREP " "`
34562      if test "x$has_space" != x; then
34563        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34564$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34565      fi
34566      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34567    fi
34568  fi
34569
34570  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34571  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34572  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34573  # "foo.exe" is OK but "foo" is an error.
34574  #
34575  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34576  # It is also a way to make sure we got the proper file name for the real test later on.
34577  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34578  if test "x$test_shortpath" = x; then
34579    # Short path failed, file does not exist as specified.
34580    # Try adding .exe or .cmd
34581    if test -f "${new_path}.exe"; then
34582      input_to_shortpath="${new_path}.exe"
34583    elif test -f "${new_path}.cmd"; then
34584      input_to_shortpath="${new_path}.cmd"
34585    else
34586      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34587$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34588      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34589$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34590      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34591    fi
34592  else
34593    input_to_shortpath="$new_path"
34594  fi
34595
34596  # Call helper function which possibly converts this using DOS-style short mode.
34597  # If so, the updated path is stored in $new_path.
34598  new_path="$input_to_shortpath"
34599
34600  input_path="$input_to_shortpath"
34601  # Check if we need to convert this using DOS-style short mode. If the path
34602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34603  # take no chances and rewrite it.
34604  # Note: m4 eats our [], so we need to use [ and ] instead.
34605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34606  if test "x$has_forbidden_chars" != x; then
34607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34608    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34609    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34610    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34611      # Going to short mode and back again did indeed matter. Since short mode is
34612      # case insensitive, let's make it lowercase to improve readability.
34613      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34614      # Now convert it back to Unix-style (cygpath)
34615      input_path=`$CYGPATH -u "$shortmode_path"`
34616      new_path="$input_path"
34617    fi
34618  fi
34619
34620  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34621  if test "x$test_cygdrive_prefix" = x; then
34622    # As a simple fix, exclude /usr/bin since it's not a real path.
34623    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34624      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34625      # a path prefixed by /cygdrive for fixpath to work.
34626      new_path="$CYGWIN_ROOT_PATH$input_path"
34627    fi
34628  fi
34629
34630  # remove trailing .exe if any
34631  new_path="${new_path/%.exe/}"
34632
34633    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34634
34635  # First separate the path from the arguments. This will split at the first
34636  # space.
34637  complete="$CXX"
34638  path="${complete%% *}"
34639  tmp="$complete EOL"
34640  arguments="${tmp#* }"
34641
34642  # Input might be given as Windows format, start by converting to
34643  # unix format.
34644  new_path="$path"
34645
34646  windows_path="$new_path"
34647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34648    unix_path=`$CYGPATH -u "$windows_path"`
34649    new_path="$unix_path"
34650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34652    new_path="$unix_path"
34653  fi
34654
34655
34656  # Now try to locate executable using which
34657  new_path=`$WHICH "$new_path" 2> /dev/null`
34658
34659  if test "x$new_path" = x; then
34660    # Oops. Which didn't find the executable.
34661    # The splitting of arguments from the executable at a space might have been incorrect,
34662    # since paths with space are more likely in Windows. Give it another try with the whole
34663    # argument.
34664    path="$complete"
34665    arguments="EOL"
34666    new_path="$path"
34667
34668  windows_path="$new_path"
34669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34670    unix_path=`$CYGPATH -u "$windows_path"`
34671    new_path="$unix_path"
34672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34674    new_path="$unix_path"
34675  fi
34676
34677
34678    new_path=`$WHICH "$new_path" 2> /dev/null`
34679    # bat and cmd files are not always considered executable in MSYS causing which
34680    # to not find them
34681    if test "x$new_path" = x \
34682        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34683        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34684      new_path="$path"
34685
34686  windows_path="$new_path"
34687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34688    unix_path=`$CYGPATH -u "$windows_path"`
34689    new_path="$unix_path"
34690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34692    new_path="$unix_path"
34693  fi
34694
34695    fi
34696
34697    if test "x$new_path" = x; then
34698      # It's still not found. Now this is an unrecoverable error.
34699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34700$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34701      has_space=`$ECHO "$complete" | $GREP " "`
34702      if test "x$has_space" != x; then
34703        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34704$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34705      fi
34706      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34707    fi
34708  fi
34709
34710  # Now new_path has a complete unix path to the binary
34711  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34712    # Keep paths in /bin as-is, but remove trailing .exe if any
34713    new_path="${new_path/%.exe/}"
34714    # Do not save /bin paths to all_fixpath_prefixes!
34715  else
34716    # Not in mixed or Windows style, start by that.
34717    new_path=`cmd //c echo $new_path`
34718
34719  input_path="$new_path"
34720  # Check if we need to convert this using DOS-style short mode. If the path
34721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34722  # take no chances and rewrite it.
34723  # Note: m4 eats our [], so we need to use [ and ] instead.
34724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34725  if test "x$has_forbidden_chars" != x; then
34726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34727    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34728  fi
34729
34730    # Output is in $new_path
34731
34732  windows_path="$new_path"
34733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34734    unix_path=`$CYGPATH -u "$windows_path"`
34735    new_path="$unix_path"
34736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34738    new_path="$unix_path"
34739  fi
34740
34741    # remove trailing .exe if any
34742    new_path="${new_path/%.exe/}"
34743
34744    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34745    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34746  fi
34747
34748    else
34749      # We're on a unix platform. Hooray! :)
34750      # First separate the path from the arguments. This will split at the first
34751      # space.
34752      complete="$CXX"
34753      path="${complete%% *}"
34754      tmp="$complete EOL"
34755      arguments="${tmp#* }"
34756
34757      # Cannot rely on the command "which" here since it doesn't always work.
34758      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34759      if test -z "$is_absolute_path"; then
34760        # Path to executable is not absolute. Find it.
34761        IFS_save="$IFS"
34762        IFS=:
34763        for p in $PATH; do
34764          if test -f "$p/$path" && test -x "$p/$path"; then
34765            new_path="$p/$path"
34766            break
34767          fi
34768        done
34769        IFS="$IFS_save"
34770      else
34771        # This is an absolute path, we can use it without further modifications.
34772        new_path="$path"
34773      fi
34774
34775      if test "x$new_path" = x; then
34776        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34777$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34778        has_space=`$ECHO "$complete" | $GREP " "`
34779        if test "x$has_space" != x; then
34780          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34781$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34782        fi
34783        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34784      fi
34785    fi
34786
34787    # Now join together the path and the arguments once again
34788    if test "x$arguments" != xEOL; then
34789      new_complete="$new_path ${arguments% *}"
34790    else
34791      new_complete="$new_path"
34792    fi
34793
34794    if test "x$complete" != "x$new_complete"; then
34795      CXX="$new_complete"
34796      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34797$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34798    fi
34799  fi
34800
34801  TEST_COMPILER="$CXX"
34802
34803  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34804$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34805  SYMLINK_ORIGINAL="$TEST_COMPILER"
34806
34807  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34808    # Follow a chain of symbolic links. Use readlink
34809    # where it exists, else fall back to horribly
34810    # complicated shell code.
34811    if test "x$READLINK_TESTED" != yes; then
34812      # On MacOSX there is a readlink tool with a different
34813      # purpose than the GNU readlink tool. Check the found readlink.
34814      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34815      if test "x$ISGNU" = x; then
34816        # A readlink that we do not know how to use.
34817        # Are there other non-GNU readlinks out there?
34818        READLINK_TESTED=yes
34819        READLINK=
34820      fi
34821    fi
34822
34823    if test "x$READLINK" != x; then
34824      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34825    else
34826      # Save the current directory for restoring afterwards
34827      STARTDIR=$PWD
34828      COUNTER=0
34829      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34830      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34831      cd $sym_link_dir
34832      # Use -P flag to resolve symlinks in directories.
34833      cd `$THEPWDCMD -P`
34834      sym_link_dir=`$THEPWDCMD -P`
34835      # Resolve file symlinks
34836      while test $COUNTER -lt 20; do
34837        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34838        if test "x$ISLINK" == x; then
34839          # This is not a symbolic link! We are done!
34840          break
34841        fi
34842        # Again resolve directory symlinks since the target of the just found
34843        # link could be in a different directory
34844        cd `$DIRNAME $ISLINK`
34845        sym_link_dir=`$THEPWDCMD -P`
34846        sym_link_file=`$BASENAME $ISLINK`
34847        let COUNTER=COUNTER+1
34848      done
34849      cd $STARTDIR
34850      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34851    fi
34852  fi
34853
34854  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34855    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34856$as_echo "no symlink" >&6; }
34857  else
34858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34859$as_echo "$SYMLINK_ORIGINAL" >&6; }
34860
34861    # We can't handle ccache by gcc wrappers, since we need to know if we're
34862    # using ccache. Instead ccache usage must be controlled by a configure option.
34863    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34864    if test "x$COMPILER_BASENAME" = "xccache"; then
34865      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34866$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34867      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34868    fi
34869  fi
34870
34871
34872  COMPILER=$CXX
34873  COMPILER_NAME=$COMPILER_NAME
34874
34875  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34876    # cc -V output typically looks like
34877    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34878    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34879    # Check that this is likely to be the Solaris Studio cc.
34880    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34881    if test $? -ne 0; then
34882      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34883      { $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
34884$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34885      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34886$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34887      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34888$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34889      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34890    fi
34891    # Remove usage instructions (if present), and
34892    # collapse compiler output into a single line
34893    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34894        $SED -e 's/ *[Uu]sage:.*//'`
34895    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34896        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34897  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34898    # xlc -qversion output typically looks like
34899    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34900    #     Version: 11.01.0000.0015
34901    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34902    # Check that this is likely to be the IBM XL C compiler.
34903    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34904    if test $? -ne 0; then
34905      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34906      { $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
34907$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34908      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34909$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34910      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34911$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34912      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34913    fi
34914    # Collapse compiler output into a single line
34915    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34916    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34917        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34918  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34919    # There is no specific version flag, but all output starts with a version string.
34920    # First line typically looks something like:
34921    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34922    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34923    # Check that this is likely to be Microsoft CL.EXE.
34924    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34925    if test $? -ne 0; then
34926      { $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
34927$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34928      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34929$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34930      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34931    fi
34932    # Collapse compiler output into a single line
34933    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34934    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34935        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34936  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34937    # gcc --version output typically looks like
34938    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34939    #     Copyright (C) 2013 Free Software Foundation, Inc.
34940    #     This is free software; see the source for copying conditions.  There is NO
34941    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34942    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34943    # Check that this is likely to be GCC.
34944    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34945    if test $? -ne 0; then
34946      { $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
34947$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34948      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34949$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34950      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34951    fi
34952    # Remove Copyright and legalese from version string, and
34953    # collapse into a single line
34954    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34955        $SED -e 's/ *Copyright .*//'`
34956    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34957        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34958  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34959    # clang --version output typically looks like
34960    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34961    #    clang version 3.3 (tags/RELEASE_33/final)
34962    # or
34963    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34964    #    Target: x86_64-pc-linux-gnu
34965    #    Thread model: posix
34966    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34967    # Check that this is likely to be clang
34968    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34969    if test $? -ne 0; then
34970      { $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
34971$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34972      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34973$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34974      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34975    fi
34976    # Collapse compiler output into a single line
34977    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34978    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34979        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34980  else
34981      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34982  fi
34983  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34984  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34985  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34986  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34987
34988  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34989$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34990
34991
34992  # Now that we have resolved CXX ourself, let autoconf have its go at it
34993  ac_ext=cpp
34994ac_cpp='$CXXCPP $CPPFLAGS'
34995ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34996ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34997ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34998if test -z "$CXX"; then
34999  if test -n "$CCC"; then
35000    CXX=$CCC
35001  else
35002    if test -n "$ac_tool_prefix"; then
35003  for ac_prog in $CXX
35004  do
35005    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35006set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35008$as_echo_n "checking for $ac_word... " >&6; }
35009if ${ac_cv_prog_CXX+:} false; then :
35010  $as_echo_n "(cached) " >&6
35011else
35012  if test -n "$CXX"; then
35013  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35014else
35015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35016for as_dir in $PATH
35017do
35018  IFS=$as_save_IFS
35019  test -z "$as_dir" && as_dir=.
35020    for ac_exec_ext in '' $ac_executable_extensions; do
35021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35022    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35024    break 2
35025  fi
35026done
35027  done
35028IFS=$as_save_IFS
35029
35030fi
35031fi
35032CXX=$ac_cv_prog_CXX
35033if test -n "$CXX"; then
35034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35035$as_echo "$CXX" >&6; }
35036else
35037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35038$as_echo "no" >&6; }
35039fi
35040
35041
35042    test -n "$CXX" && break
35043  done
35044fi
35045if test -z "$CXX"; then
35046  ac_ct_CXX=$CXX
35047  for ac_prog in $CXX
35048do
35049  # Extract the first word of "$ac_prog", so it can be a program name with args.
35050set dummy $ac_prog; ac_word=$2
35051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35052$as_echo_n "checking for $ac_word... " >&6; }
35053if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35054  $as_echo_n "(cached) " >&6
35055else
35056  if test -n "$ac_ct_CXX"; then
35057  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35058else
35059as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35060for as_dir in $PATH
35061do
35062  IFS=$as_save_IFS
35063  test -z "$as_dir" && as_dir=.
35064    for ac_exec_ext in '' $ac_executable_extensions; do
35065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35066    ac_cv_prog_ac_ct_CXX="$ac_prog"
35067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35068    break 2
35069  fi
35070done
35071  done
35072IFS=$as_save_IFS
35073
35074fi
35075fi
35076ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35077if test -n "$ac_ct_CXX"; then
35078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35079$as_echo "$ac_ct_CXX" >&6; }
35080else
35081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35082$as_echo "no" >&6; }
35083fi
35084
35085
35086  test -n "$ac_ct_CXX" && break
35087done
35088
35089  if test "x$ac_ct_CXX" = x; then
35090    CXX="g++"
35091  else
35092    case $cross_compiling:$ac_tool_warned in
35093yes:)
35094{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35095$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35096ac_tool_warned=yes ;;
35097esac
35098    CXX=$ac_ct_CXX
35099  fi
35100fi
35101
35102  fi
35103fi
35104# Provide some information about the compiler.
35105$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35106set X $ac_compile
35107ac_compiler=$2
35108for ac_option in --version -v -V -qversion; do
35109  { { ac_try="$ac_compiler $ac_option >&5"
35110case "(($ac_try" in
35111  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35112  *) ac_try_echo=$ac_try;;
35113esac
35114eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35115$as_echo "$ac_try_echo"; } >&5
35116  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35117  ac_status=$?
35118  if test -s conftest.err; then
35119    sed '10a\
35120... rest of stderr output deleted ...
35121         10q' conftest.err >conftest.er1
35122    cat conftest.er1 >&5
35123  fi
35124  rm -f conftest.er1 conftest.err
35125  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35126  test $ac_status = 0; }
35127done
35128
35129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35130$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35131if ${ac_cv_cxx_compiler_gnu+:} false; then :
35132  $as_echo_n "(cached) " >&6
35133else
35134  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35135/* end confdefs.h.  */
35136
35137int
35138main ()
35139{
35140#ifndef __GNUC__
35141       choke me
35142#endif
35143
35144  ;
35145  return 0;
35146}
35147_ACEOF
35148if ac_fn_cxx_try_compile "$LINENO"; then :
35149  ac_compiler_gnu=yes
35150else
35151  ac_compiler_gnu=no
35152fi
35153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35154ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35155
35156fi
35157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35158$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35159if test $ac_compiler_gnu = yes; then
35160  GXX=yes
35161else
35162  GXX=
35163fi
35164ac_test_CXXFLAGS=${CXXFLAGS+set}
35165ac_save_CXXFLAGS=$CXXFLAGS
35166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35167$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35168if ${ac_cv_prog_cxx_g+:} false; then :
35169  $as_echo_n "(cached) " >&6
35170else
35171  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35172   ac_cxx_werror_flag=yes
35173   ac_cv_prog_cxx_g=no
35174   CXXFLAGS="-g"
35175   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35176/* end confdefs.h.  */
35177
35178int
35179main ()
35180{
35181
35182  ;
35183  return 0;
35184}
35185_ACEOF
35186if ac_fn_cxx_try_compile "$LINENO"; then :
35187  ac_cv_prog_cxx_g=yes
35188else
35189  CXXFLAGS=""
35190      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35191/* end confdefs.h.  */
35192
35193int
35194main ()
35195{
35196
35197  ;
35198  return 0;
35199}
35200_ACEOF
35201if ac_fn_cxx_try_compile "$LINENO"; then :
35202
35203else
35204  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35205	 CXXFLAGS="-g"
35206	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35207/* end confdefs.h.  */
35208
35209int
35210main ()
35211{
35212
35213  ;
35214  return 0;
35215}
35216_ACEOF
35217if ac_fn_cxx_try_compile "$LINENO"; then :
35218  ac_cv_prog_cxx_g=yes
35219fi
35220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35221fi
35222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35223fi
35224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35225   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35226fi
35227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35228$as_echo "$ac_cv_prog_cxx_g" >&6; }
35229if test "$ac_test_CXXFLAGS" = set; then
35230  CXXFLAGS=$ac_save_CXXFLAGS
35231elif test $ac_cv_prog_cxx_g = yes; then
35232  if test "$GXX" = yes; then
35233    CXXFLAGS="-g -O2"
35234  else
35235    CXXFLAGS="-g"
35236  fi
35237else
35238  if test "$GXX" = yes; then
35239    CXXFLAGS="-O2"
35240  else
35241    CXXFLAGS=
35242  fi
35243fi
35244ac_ext=cpp
35245ac_cpp='$CXXCPP $CPPFLAGS'
35246ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35247ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35248ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35249
35250
35251  # This is the compiler version number on the form X.Y[.Z]
35252
35253
35254
35255
35256  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35257    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35258$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35259    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35260$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35261  fi
35262
35263  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35264  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
35265    { $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
35266$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;}
35267  fi
35268
35269  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35270    { $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
35271$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35272  fi
35273
35274  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
35275
35276
35277  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35278
35279
35280
35281
35282
35283
35284
35285
35286
35287
35288
35289
35290
35291
35292
35293
35294
35295
35296
35297
35298
35299
35300
35301
35302
35303
35304
35305
35306
35307
35308
35309
35310
35311
35312
35313
35314
35315
35316
35317
35318
35319
35320
35321
35322
35323
35324
35325
35326
35327    # Execute function body
35328
35329  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35330  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35331
35332  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
35333    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
35334  fi
35335
35336  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35337    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35338  fi
35339
35340  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35341  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
35342
35343  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35344    :
35345
35346  else
35347    :
35348
35349          { $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
35350$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35351
35352
35353  fi
35354
35355
35356
35357
35358
35359
35360
35361
35362
35363
35364
35365
35366
35367
35368  fi
35369
35370  #
35371  # Setup the preprocessor (CPP and CXXCPP)
35372  #
35373  ac_ext=c
35374ac_cpp='$CPP $CPPFLAGS'
35375ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35376ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35377ac_compiler_gnu=$ac_cv_c_compiler_gnu
35378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35379$as_echo_n "checking how to run the C preprocessor... " >&6; }
35380# On Suns, sometimes $CPP names a directory.
35381if test -n "$CPP" && test -d "$CPP"; then
35382  CPP=
35383fi
35384if test -z "$CPP"; then
35385  if ${ac_cv_prog_CPP+:} false; then :
35386  $as_echo_n "(cached) " >&6
35387else
35388      # Double quotes because CPP needs to be expanded
35389    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35390    do
35391      ac_preproc_ok=false
35392for ac_c_preproc_warn_flag in '' yes
35393do
35394  # Use a header file that comes with gcc, so configuring glibc
35395  # with a fresh cross-compiler works.
35396  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35397  # <limits.h> exists even on freestanding compilers.
35398  # On the NeXT, cc -E runs the code through the compiler's parser,
35399  # not just through cpp. "Syntax error" is here to catch this case.
35400  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35401/* end confdefs.h.  */
35402#ifdef __STDC__
35403# include <limits.h>
35404#else
35405# include <assert.h>
35406#endif
35407		     Syntax error
35408_ACEOF
35409if ac_fn_c_try_cpp "$LINENO"; then :
35410
35411else
35412  # Broken: fails on valid input.
35413continue
35414fi
35415rm -f conftest.err conftest.i conftest.$ac_ext
35416
35417  # OK, works on sane cases.  Now check whether nonexistent headers
35418  # can be detected and how.
35419  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35420/* end confdefs.h.  */
35421#include <ac_nonexistent.h>
35422_ACEOF
35423if ac_fn_c_try_cpp "$LINENO"; then :
35424  # Broken: success on invalid input.
35425continue
35426else
35427  # Passes both tests.
35428ac_preproc_ok=:
35429break
35430fi
35431rm -f conftest.err conftest.i conftest.$ac_ext
35432
35433done
35434# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35435rm -f conftest.i conftest.err conftest.$ac_ext
35436if $ac_preproc_ok; then :
35437  break
35438fi
35439
35440    done
35441    ac_cv_prog_CPP=$CPP
35442
35443fi
35444  CPP=$ac_cv_prog_CPP
35445else
35446  ac_cv_prog_CPP=$CPP
35447fi
35448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35449$as_echo "$CPP" >&6; }
35450ac_preproc_ok=false
35451for ac_c_preproc_warn_flag in '' yes
35452do
35453  # Use a header file that comes with gcc, so configuring glibc
35454  # with a fresh cross-compiler works.
35455  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35456  # <limits.h> exists even on freestanding compilers.
35457  # On the NeXT, cc -E runs the code through the compiler's parser,
35458  # not just through cpp. "Syntax error" is here to catch this case.
35459  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35460/* end confdefs.h.  */
35461#ifdef __STDC__
35462# include <limits.h>
35463#else
35464# include <assert.h>
35465#endif
35466		     Syntax error
35467_ACEOF
35468if ac_fn_c_try_cpp "$LINENO"; then :
35469
35470else
35471  # Broken: fails on valid input.
35472continue
35473fi
35474rm -f conftest.err conftest.i conftest.$ac_ext
35475
35476  # OK, works on sane cases.  Now check whether nonexistent headers
35477  # can be detected and how.
35478  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35479/* end confdefs.h.  */
35480#include <ac_nonexistent.h>
35481_ACEOF
35482if ac_fn_c_try_cpp "$LINENO"; then :
35483  # Broken: success on invalid input.
35484continue
35485else
35486  # Passes both tests.
35487ac_preproc_ok=:
35488break
35489fi
35490rm -f conftest.err conftest.i conftest.$ac_ext
35491
35492done
35493# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35494rm -f conftest.i conftest.err conftest.$ac_ext
35495if $ac_preproc_ok; then :
35496
35497else
35498  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35499$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35500as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35501See \`config.log' for more details" "$LINENO" 5; }
35502fi
35503
35504ac_ext=cpp
35505ac_cpp='$CXXCPP $CPPFLAGS'
35506ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35507ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35508ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35509
35510
35511  # Only process if variable expands to non-empty
35512
35513  if test "x$CPP" != x; then
35514    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35515
35516  # First separate the path from the arguments. This will split at the first
35517  # space.
35518  complete="$CPP"
35519  path="${complete%% *}"
35520  tmp="$complete EOL"
35521  arguments="${tmp#* }"
35522
35523  # Input might be given as Windows format, start by converting to
35524  # unix format.
35525  new_path=`$CYGPATH -u "$path"`
35526
35527  # Now try to locate executable using which
35528  new_path=`$WHICH "$new_path" 2> /dev/null`
35529  # bat and cmd files are not always considered executable in cygwin causing which
35530  # to not find them
35531  if test "x$new_path" = x \
35532      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35533      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35534    new_path=`$CYGPATH -u "$path"`
35535  fi
35536  if test "x$new_path" = x; then
35537    # Oops. Which didn't find the executable.
35538    # The splitting of arguments from the executable at a space might have been incorrect,
35539    # since paths with space are more likely in Windows. Give it another try with the whole
35540    # argument.
35541    path="$complete"
35542    arguments="EOL"
35543    new_path=`$CYGPATH -u "$path"`
35544    new_path=`$WHICH "$new_path" 2> /dev/null`
35545    # bat and cmd files are not always considered executable in cygwin causing which
35546    # to not find them
35547    if test "x$new_path" = x \
35548        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35549        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35550      new_path=`$CYGPATH -u "$path"`
35551    fi
35552    if test "x$new_path" = x; then
35553      # It's still not found. Now this is an unrecoverable error.
35554      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35555$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35556      has_space=`$ECHO "$complete" | $GREP " "`
35557      if test "x$has_space" != x; then
35558        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35559$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35560      fi
35561      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35562    fi
35563  fi
35564
35565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35568  # "foo.exe" is OK but "foo" is an error.
35569  #
35570  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35571  # It is also a way to make sure we got the proper file name for the real test later on.
35572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35573  if test "x$test_shortpath" = x; then
35574    # Short path failed, file does not exist as specified.
35575    # Try adding .exe or .cmd
35576    if test -f "${new_path}.exe"; then
35577      input_to_shortpath="${new_path}.exe"
35578    elif test -f "${new_path}.cmd"; then
35579      input_to_shortpath="${new_path}.cmd"
35580    else
35581      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35582$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35583      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35584$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35585      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35586    fi
35587  else
35588    input_to_shortpath="$new_path"
35589  fi
35590
35591  # Call helper function which possibly converts this using DOS-style short mode.
35592  # If so, the updated path is stored in $new_path.
35593  new_path="$input_to_shortpath"
35594
35595  input_path="$input_to_shortpath"
35596  # Check if we need to convert this using DOS-style short mode. If the path
35597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35598  # take no chances and rewrite it.
35599  # Note: m4 eats our [], so we need to use [ and ] instead.
35600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35601  if test "x$has_forbidden_chars" != x; then
35602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35603    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35604    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35605    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35606      # Going to short mode and back again did indeed matter. Since short mode is
35607      # case insensitive, let's make it lowercase to improve readability.
35608      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35609      # Now convert it back to Unix-style (cygpath)
35610      input_path=`$CYGPATH -u "$shortmode_path"`
35611      new_path="$input_path"
35612    fi
35613  fi
35614
35615  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35616  if test "x$test_cygdrive_prefix" = x; then
35617    # As a simple fix, exclude /usr/bin since it's not a real path.
35618    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35619      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35620      # a path prefixed by /cygdrive for fixpath to work.
35621      new_path="$CYGWIN_ROOT_PATH$input_path"
35622    fi
35623  fi
35624
35625  # remove trailing .exe if any
35626  new_path="${new_path/%.exe/}"
35627
35628    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35629
35630  # First separate the path from the arguments. This will split at the first
35631  # space.
35632  complete="$CPP"
35633  path="${complete%% *}"
35634  tmp="$complete EOL"
35635  arguments="${tmp#* }"
35636
35637  # Input might be given as Windows format, start by converting to
35638  # unix format.
35639  new_path="$path"
35640
35641  windows_path="$new_path"
35642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35643    unix_path=`$CYGPATH -u "$windows_path"`
35644    new_path="$unix_path"
35645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35647    new_path="$unix_path"
35648  fi
35649
35650
35651  # Now try to locate executable using which
35652  new_path=`$WHICH "$new_path" 2> /dev/null`
35653
35654  if test "x$new_path" = x; then
35655    # Oops. Which didn't find the executable.
35656    # The splitting of arguments from the executable at a space might have been incorrect,
35657    # since paths with space are more likely in Windows. Give it another try with the whole
35658    # argument.
35659    path="$complete"
35660    arguments="EOL"
35661    new_path="$path"
35662
35663  windows_path="$new_path"
35664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35665    unix_path=`$CYGPATH -u "$windows_path"`
35666    new_path="$unix_path"
35667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35669    new_path="$unix_path"
35670  fi
35671
35672
35673    new_path=`$WHICH "$new_path" 2> /dev/null`
35674    # bat and cmd files are not always considered executable in MSYS causing which
35675    # to not find them
35676    if test "x$new_path" = x \
35677        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35678        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35679      new_path="$path"
35680
35681  windows_path="$new_path"
35682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35683    unix_path=`$CYGPATH -u "$windows_path"`
35684    new_path="$unix_path"
35685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35687    new_path="$unix_path"
35688  fi
35689
35690    fi
35691
35692    if test "x$new_path" = x; then
35693      # It's still not found. Now this is an unrecoverable error.
35694      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35695$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35696      has_space=`$ECHO "$complete" | $GREP " "`
35697      if test "x$has_space" != x; then
35698        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35699$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35700      fi
35701      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35702    fi
35703  fi
35704
35705  # Now new_path has a complete unix path to the binary
35706  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35707    # Keep paths in /bin as-is, but remove trailing .exe if any
35708    new_path="${new_path/%.exe/}"
35709    # Do not save /bin paths to all_fixpath_prefixes!
35710  else
35711    # Not in mixed or Windows style, start by that.
35712    new_path=`cmd //c echo $new_path`
35713
35714  input_path="$new_path"
35715  # Check if we need to convert this using DOS-style short mode. If the path
35716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35717  # take no chances and rewrite it.
35718  # Note: m4 eats our [], so we need to use [ and ] instead.
35719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35720  if test "x$has_forbidden_chars" != x; then
35721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35722    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35723  fi
35724
35725    # Output is in $new_path
35726
35727  windows_path="$new_path"
35728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35729    unix_path=`$CYGPATH -u "$windows_path"`
35730    new_path="$unix_path"
35731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35733    new_path="$unix_path"
35734  fi
35735
35736    # remove trailing .exe if any
35737    new_path="${new_path/%.exe/}"
35738
35739    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35740    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35741  fi
35742
35743    else
35744      # We're on a unix platform. Hooray! :)
35745      # First separate the path from the arguments. This will split at the first
35746      # space.
35747      complete="$CPP"
35748      path="${complete%% *}"
35749      tmp="$complete EOL"
35750      arguments="${tmp#* }"
35751
35752      # Cannot rely on the command "which" here since it doesn't always work.
35753      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35754      if test -z "$is_absolute_path"; then
35755        # Path to executable is not absolute. Find it.
35756        IFS_save="$IFS"
35757        IFS=:
35758        for p in $PATH; do
35759          if test -f "$p/$path" && test -x "$p/$path"; then
35760            new_path="$p/$path"
35761            break
35762          fi
35763        done
35764        IFS="$IFS_save"
35765      else
35766        # This is an absolute path, we can use it without further modifications.
35767        new_path="$path"
35768      fi
35769
35770      if test "x$new_path" = x; then
35771        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35772$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35773        has_space=`$ECHO "$complete" | $GREP " "`
35774        if test "x$has_space" != x; then
35775          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35776$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35777        fi
35778        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35779      fi
35780    fi
35781
35782    # Now join together the path and the arguments once again
35783    if test "x$arguments" != xEOL; then
35784      new_complete="$new_path ${arguments% *}"
35785    else
35786      new_complete="$new_path"
35787    fi
35788
35789    if test "x$complete" != "x$new_complete"; then
35790      CPP="$new_complete"
35791      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35792$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35793    fi
35794  fi
35795
35796  ac_ext=cpp
35797ac_cpp='$CXXCPP $CPPFLAGS'
35798ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35799ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35800ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35802$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35803if test -z "$CXXCPP"; then
35804  if ${ac_cv_prog_CXXCPP+:} false; then :
35805  $as_echo_n "(cached) " >&6
35806else
35807      # Double quotes because CXXCPP needs to be expanded
35808    for CXXCPP in "$CXX -E" "/lib/cpp"
35809    do
35810      ac_preproc_ok=false
35811for ac_cxx_preproc_warn_flag in '' yes
35812do
35813  # Use a header file that comes with gcc, so configuring glibc
35814  # with a fresh cross-compiler works.
35815  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35816  # <limits.h> exists even on freestanding compilers.
35817  # On the NeXT, cc -E runs the code through the compiler's parser,
35818  # not just through cpp. "Syntax error" is here to catch this case.
35819  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35820/* end confdefs.h.  */
35821#ifdef __STDC__
35822# include <limits.h>
35823#else
35824# include <assert.h>
35825#endif
35826		     Syntax error
35827_ACEOF
35828if ac_fn_cxx_try_cpp "$LINENO"; then :
35829
35830else
35831  # Broken: fails on valid input.
35832continue
35833fi
35834rm -f conftest.err conftest.i conftest.$ac_ext
35835
35836  # OK, works on sane cases.  Now check whether nonexistent headers
35837  # can be detected and how.
35838  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35839/* end confdefs.h.  */
35840#include <ac_nonexistent.h>
35841_ACEOF
35842if ac_fn_cxx_try_cpp "$LINENO"; then :
35843  # Broken: success on invalid input.
35844continue
35845else
35846  # Passes both tests.
35847ac_preproc_ok=:
35848break
35849fi
35850rm -f conftest.err conftest.i conftest.$ac_ext
35851
35852done
35853# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35854rm -f conftest.i conftest.err conftest.$ac_ext
35855if $ac_preproc_ok; then :
35856  break
35857fi
35858
35859    done
35860    ac_cv_prog_CXXCPP=$CXXCPP
35861
35862fi
35863  CXXCPP=$ac_cv_prog_CXXCPP
35864else
35865  ac_cv_prog_CXXCPP=$CXXCPP
35866fi
35867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35868$as_echo "$CXXCPP" >&6; }
35869ac_preproc_ok=false
35870for ac_cxx_preproc_warn_flag in '' yes
35871do
35872  # Use a header file that comes with gcc, so configuring glibc
35873  # with a fresh cross-compiler works.
35874  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35875  # <limits.h> exists even on freestanding compilers.
35876  # On the NeXT, cc -E runs the code through the compiler's parser,
35877  # not just through cpp. "Syntax error" is here to catch this case.
35878  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35879/* end confdefs.h.  */
35880#ifdef __STDC__
35881# include <limits.h>
35882#else
35883# include <assert.h>
35884#endif
35885		     Syntax error
35886_ACEOF
35887if ac_fn_cxx_try_cpp "$LINENO"; then :
35888
35889else
35890  # Broken: fails on valid input.
35891continue
35892fi
35893rm -f conftest.err conftest.i conftest.$ac_ext
35894
35895  # OK, works on sane cases.  Now check whether nonexistent headers
35896  # can be detected and how.
35897  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35898/* end confdefs.h.  */
35899#include <ac_nonexistent.h>
35900_ACEOF
35901if ac_fn_cxx_try_cpp "$LINENO"; then :
35902  # Broken: success on invalid input.
35903continue
35904else
35905  # Passes both tests.
35906ac_preproc_ok=:
35907break
35908fi
35909rm -f conftest.err conftest.i conftest.$ac_ext
35910
35911done
35912# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35913rm -f conftest.i conftest.err conftest.$ac_ext
35914if $ac_preproc_ok; then :
35915
35916else
35917  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35918$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35919as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35920See \`config.log' for more details" "$LINENO" 5; }
35921fi
35922
35923ac_ext=cpp
35924ac_cpp='$CXXCPP $CPPFLAGS'
35925ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35926ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35927ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35928
35929
35930  # Only process if variable expands to non-empty
35931
35932  if test "x$CXXCPP" != x; then
35933    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35934
35935  # First separate the path from the arguments. This will split at the first
35936  # space.
35937  complete="$CXXCPP"
35938  path="${complete%% *}"
35939  tmp="$complete EOL"
35940  arguments="${tmp#* }"
35941
35942  # Input might be given as Windows format, start by converting to
35943  # unix format.
35944  new_path=`$CYGPATH -u "$path"`
35945
35946  # Now try to locate executable using which
35947  new_path=`$WHICH "$new_path" 2> /dev/null`
35948  # bat and cmd files are not always considered executable in cygwin causing which
35949  # to not find them
35950  if test "x$new_path" = x \
35951      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35952      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35953    new_path=`$CYGPATH -u "$path"`
35954  fi
35955  if test "x$new_path" = x; then
35956    # Oops. Which didn't find the executable.
35957    # The splitting of arguments from the executable at a space might have been incorrect,
35958    # since paths with space are more likely in Windows. Give it another try with the whole
35959    # argument.
35960    path="$complete"
35961    arguments="EOL"
35962    new_path=`$CYGPATH -u "$path"`
35963    new_path=`$WHICH "$new_path" 2> /dev/null`
35964    # bat and cmd files are not always considered executable in cygwin causing which
35965    # to not find them
35966    if test "x$new_path" = x \
35967        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35968        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35969      new_path=`$CYGPATH -u "$path"`
35970    fi
35971    if test "x$new_path" = x; then
35972      # It's still not found. Now this is an unrecoverable error.
35973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35974$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35975      has_space=`$ECHO "$complete" | $GREP " "`
35976      if test "x$has_space" != x; then
35977        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35978$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35979      fi
35980      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35981    fi
35982  fi
35983
35984  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35985  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35986  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35987  # "foo.exe" is OK but "foo" is an error.
35988  #
35989  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35990  # It is also a way to make sure we got the proper file name for the real test later on.
35991  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35992  if test "x$test_shortpath" = x; then
35993    # Short path failed, file does not exist as specified.
35994    # Try adding .exe or .cmd
35995    if test -f "${new_path}.exe"; then
35996      input_to_shortpath="${new_path}.exe"
35997    elif test -f "${new_path}.cmd"; then
35998      input_to_shortpath="${new_path}.cmd"
35999    else
36000      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36001$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36002      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36003$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36004      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36005    fi
36006  else
36007    input_to_shortpath="$new_path"
36008  fi
36009
36010  # Call helper function which possibly converts this using DOS-style short mode.
36011  # If so, the updated path is stored in $new_path.
36012  new_path="$input_to_shortpath"
36013
36014  input_path="$input_to_shortpath"
36015  # Check if we need to convert this using DOS-style short mode. If the path
36016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36017  # take no chances and rewrite it.
36018  # Note: m4 eats our [], so we need to use [ and ] instead.
36019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36020  if test "x$has_forbidden_chars" != x; then
36021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36022    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36023    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36024    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36025      # Going to short mode and back again did indeed matter. Since short mode is
36026      # case insensitive, let's make it lowercase to improve readability.
36027      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36028      # Now convert it back to Unix-style (cygpath)
36029      input_path=`$CYGPATH -u "$shortmode_path"`
36030      new_path="$input_path"
36031    fi
36032  fi
36033
36034  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36035  if test "x$test_cygdrive_prefix" = x; then
36036    # As a simple fix, exclude /usr/bin since it's not a real path.
36037    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36038      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36039      # a path prefixed by /cygdrive for fixpath to work.
36040      new_path="$CYGWIN_ROOT_PATH$input_path"
36041    fi
36042  fi
36043
36044  # remove trailing .exe if any
36045  new_path="${new_path/%.exe/}"
36046
36047    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36048
36049  # First separate the path from the arguments. This will split at the first
36050  # space.
36051  complete="$CXXCPP"
36052  path="${complete%% *}"
36053  tmp="$complete EOL"
36054  arguments="${tmp#* }"
36055
36056  # Input might be given as Windows format, start by converting to
36057  # unix format.
36058  new_path="$path"
36059
36060  windows_path="$new_path"
36061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36062    unix_path=`$CYGPATH -u "$windows_path"`
36063    new_path="$unix_path"
36064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36066    new_path="$unix_path"
36067  fi
36068
36069
36070  # Now try to locate executable using which
36071  new_path=`$WHICH "$new_path" 2> /dev/null`
36072
36073  if test "x$new_path" = x; then
36074    # Oops. Which didn't find the executable.
36075    # The splitting of arguments from the executable at a space might have been incorrect,
36076    # since paths with space are more likely in Windows. Give it another try with the whole
36077    # argument.
36078    path="$complete"
36079    arguments="EOL"
36080    new_path="$path"
36081
36082  windows_path="$new_path"
36083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36084    unix_path=`$CYGPATH -u "$windows_path"`
36085    new_path="$unix_path"
36086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36088    new_path="$unix_path"
36089  fi
36090
36091
36092    new_path=`$WHICH "$new_path" 2> /dev/null`
36093    # bat and cmd files are not always considered executable in MSYS causing which
36094    # to not find them
36095    if test "x$new_path" = x \
36096        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36097        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36098      new_path="$path"
36099
36100  windows_path="$new_path"
36101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36102    unix_path=`$CYGPATH -u "$windows_path"`
36103    new_path="$unix_path"
36104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36106    new_path="$unix_path"
36107  fi
36108
36109    fi
36110
36111    if test "x$new_path" = x; then
36112      # It's still not found. Now this is an unrecoverable error.
36113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36114$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36115      has_space=`$ECHO "$complete" | $GREP " "`
36116      if test "x$has_space" != x; then
36117        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36118$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36119      fi
36120      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36121    fi
36122  fi
36123
36124  # Now new_path has a complete unix path to the binary
36125  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36126    # Keep paths in /bin as-is, but remove trailing .exe if any
36127    new_path="${new_path/%.exe/}"
36128    # Do not save /bin paths to all_fixpath_prefixes!
36129  else
36130    # Not in mixed or Windows style, start by that.
36131    new_path=`cmd //c echo $new_path`
36132
36133  input_path="$new_path"
36134  # Check if we need to convert this using DOS-style short mode. If the path
36135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36136  # take no chances and rewrite it.
36137  # Note: m4 eats our [], so we need to use [ and ] instead.
36138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36139  if test "x$has_forbidden_chars" != x; then
36140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36141    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36142  fi
36143
36144    # Output is in $new_path
36145
36146  windows_path="$new_path"
36147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36148    unix_path=`$CYGPATH -u "$windows_path"`
36149    new_path="$unix_path"
36150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36152    new_path="$unix_path"
36153  fi
36154
36155    # remove trailing .exe if any
36156    new_path="${new_path/%.exe/}"
36157
36158    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36159    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36160  fi
36161
36162    else
36163      # We're on a unix platform. Hooray! :)
36164      # First separate the path from the arguments. This will split at the first
36165      # space.
36166      complete="$CXXCPP"
36167      path="${complete%% *}"
36168      tmp="$complete EOL"
36169      arguments="${tmp#* }"
36170
36171      # Cannot rely on the command "which" here since it doesn't always work.
36172      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36173      if test -z "$is_absolute_path"; then
36174        # Path to executable is not absolute. Find it.
36175        IFS_save="$IFS"
36176        IFS=:
36177        for p in $PATH; do
36178          if test -f "$p/$path" && test -x "$p/$path"; then
36179            new_path="$p/$path"
36180            break
36181          fi
36182        done
36183        IFS="$IFS_save"
36184      else
36185        # This is an absolute path, we can use it without further modifications.
36186        new_path="$path"
36187      fi
36188
36189      if test "x$new_path" = x; then
36190        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36191$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36192        has_space=`$ECHO "$complete" | $GREP " "`
36193        if test "x$has_space" != x; then
36194          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36195$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36196        fi
36197        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36198      fi
36199    fi
36200
36201    # Now join together the path and the arguments once again
36202    if test "x$arguments" != xEOL; then
36203      new_complete="$new_path ${arguments% *}"
36204    else
36205      new_complete="$new_path"
36206    fi
36207
36208    if test "x$complete" != "x$new_complete"; then
36209      CXXCPP="$new_complete"
36210      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36211$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36212    fi
36213  fi
36214
36215
36216  #
36217  # Setup the linker (LD)
36218  #
36219  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36220    # In the Microsoft toolchain we have a separate LD command "link".
36221    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36222    # a cygwin program for something completely different.
36223    # Extract the first word of "link", so it can be a program name with args.
36224set dummy link; ac_word=$2
36225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36226$as_echo_n "checking for $ac_word... " >&6; }
36227if ${ac_cv_prog_LD+:} false; then :
36228  $as_echo_n "(cached) " >&6
36229else
36230  if test -n "$LD"; then
36231  ac_cv_prog_LD="$LD" # Let the user override the test.
36232else
36233  ac_prog_rejected=no
36234as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36235for as_dir in $PATH
36236do
36237  IFS=$as_save_IFS
36238  test -z "$as_dir" && as_dir=.
36239    for ac_exec_ext in '' $ac_executable_extensions; do
36240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36241    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36242       ac_prog_rejected=yes
36243       continue
36244     fi
36245    ac_cv_prog_LD="link"
36246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36247    break 2
36248  fi
36249done
36250  done
36251IFS=$as_save_IFS
36252
36253if test $ac_prog_rejected = yes; then
36254  # We found a bogon in the path, so make sure we never use it.
36255  set dummy $ac_cv_prog_LD
36256  shift
36257  if test $# != 0; then
36258    # We chose a different compiler from the bogus one.
36259    # However, it has the same basename, so the bogon will be chosen
36260    # first if we set LD to just the basename; use the full file name.
36261    shift
36262    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36263  fi
36264fi
36265fi
36266fi
36267LD=$ac_cv_prog_LD
36268if test -n "$LD"; then
36269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36270$as_echo "$LD" >&6; }
36271else
36272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36273$as_echo "no" >&6; }
36274fi
36275
36276
36277
36278  # Only process if variable expands to non-empty
36279
36280  if test "x$LD" != x; then
36281    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36282
36283  # First separate the path from the arguments. This will split at the first
36284  # space.
36285  complete="$LD"
36286  path="${complete%% *}"
36287  tmp="$complete EOL"
36288  arguments="${tmp#* }"
36289
36290  # Input might be given as Windows format, start by converting to
36291  # unix format.
36292  new_path=`$CYGPATH -u "$path"`
36293
36294  # Now try to locate executable using which
36295  new_path=`$WHICH "$new_path" 2> /dev/null`
36296  # bat and cmd files are not always considered executable in cygwin causing which
36297  # to not find them
36298  if test "x$new_path" = x \
36299      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36300      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36301    new_path=`$CYGPATH -u "$path"`
36302  fi
36303  if test "x$new_path" = x; then
36304    # Oops. Which didn't find the executable.
36305    # The splitting of arguments from the executable at a space might have been incorrect,
36306    # since paths with space are more likely in Windows. Give it another try with the whole
36307    # argument.
36308    path="$complete"
36309    arguments="EOL"
36310    new_path=`$CYGPATH -u "$path"`
36311    new_path=`$WHICH "$new_path" 2> /dev/null`
36312    # bat and cmd files are not always considered executable in cygwin causing which
36313    # to not find them
36314    if test "x$new_path" = x \
36315        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36316        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36317      new_path=`$CYGPATH -u "$path"`
36318    fi
36319    if test "x$new_path" = x; then
36320      # It's still not found. Now this is an unrecoverable error.
36321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36322$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36323      has_space=`$ECHO "$complete" | $GREP " "`
36324      if test "x$has_space" != x; then
36325        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36326$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36327      fi
36328      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36329    fi
36330  fi
36331
36332  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36333  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36334  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36335  # "foo.exe" is OK but "foo" is an error.
36336  #
36337  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36338  # It is also a way to make sure we got the proper file name for the real test later on.
36339  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36340  if test "x$test_shortpath" = x; then
36341    # Short path failed, file does not exist as specified.
36342    # Try adding .exe or .cmd
36343    if test -f "${new_path}.exe"; then
36344      input_to_shortpath="${new_path}.exe"
36345    elif test -f "${new_path}.cmd"; then
36346      input_to_shortpath="${new_path}.cmd"
36347    else
36348      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36349$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36350      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36351$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36352      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36353    fi
36354  else
36355    input_to_shortpath="$new_path"
36356  fi
36357
36358  # Call helper function which possibly converts this using DOS-style short mode.
36359  # If so, the updated path is stored in $new_path.
36360  new_path="$input_to_shortpath"
36361
36362  input_path="$input_to_shortpath"
36363  # Check if we need to convert this using DOS-style short mode. If the path
36364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36365  # take no chances and rewrite it.
36366  # Note: m4 eats our [], so we need to use [ and ] instead.
36367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36368  if test "x$has_forbidden_chars" != x; then
36369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36373      # Going to short mode and back again did indeed matter. Since short mode is
36374      # case insensitive, let's make it lowercase to improve readability.
36375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36376      # Now convert it back to Unix-style (cygpath)
36377      input_path=`$CYGPATH -u "$shortmode_path"`
36378      new_path="$input_path"
36379    fi
36380  fi
36381
36382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36383  if test "x$test_cygdrive_prefix" = x; then
36384    # As a simple fix, exclude /usr/bin since it's not a real path.
36385    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36387      # a path prefixed by /cygdrive for fixpath to work.
36388      new_path="$CYGWIN_ROOT_PATH$input_path"
36389    fi
36390  fi
36391
36392  # remove trailing .exe if any
36393  new_path="${new_path/%.exe/}"
36394
36395    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36396
36397  # First separate the path from the arguments. This will split at the first
36398  # space.
36399  complete="$LD"
36400  path="${complete%% *}"
36401  tmp="$complete EOL"
36402  arguments="${tmp#* }"
36403
36404  # Input might be given as Windows format, start by converting to
36405  # unix format.
36406  new_path="$path"
36407
36408  windows_path="$new_path"
36409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36410    unix_path=`$CYGPATH -u "$windows_path"`
36411    new_path="$unix_path"
36412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36414    new_path="$unix_path"
36415  fi
36416
36417
36418  # Now try to locate executable using which
36419  new_path=`$WHICH "$new_path" 2> /dev/null`
36420
36421  if test "x$new_path" = x; then
36422    # Oops. Which didn't find the executable.
36423    # The splitting of arguments from the executable at a space might have been incorrect,
36424    # since paths with space are more likely in Windows. Give it another try with the whole
36425    # argument.
36426    path="$complete"
36427    arguments="EOL"
36428    new_path="$path"
36429
36430  windows_path="$new_path"
36431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36432    unix_path=`$CYGPATH -u "$windows_path"`
36433    new_path="$unix_path"
36434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36436    new_path="$unix_path"
36437  fi
36438
36439
36440    new_path=`$WHICH "$new_path" 2> /dev/null`
36441    # bat and cmd files are not always considered executable in MSYS causing which
36442    # to not find them
36443    if test "x$new_path" = x \
36444        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36445        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36446      new_path="$path"
36447
36448  windows_path="$new_path"
36449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36450    unix_path=`$CYGPATH -u "$windows_path"`
36451    new_path="$unix_path"
36452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36454    new_path="$unix_path"
36455  fi
36456
36457    fi
36458
36459    if test "x$new_path" = x; then
36460      # It's still not found. Now this is an unrecoverable error.
36461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36462$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36463      has_space=`$ECHO "$complete" | $GREP " "`
36464      if test "x$has_space" != x; then
36465        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36466$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36467      fi
36468      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36469    fi
36470  fi
36471
36472  # Now new_path has a complete unix path to the binary
36473  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36474    # Keep paths in /bin as-is, but remove trailing .exe if any
36475    new_path="${new_path/%.exe/}"
36476    # Do not save /bin paths to all_fixpath_prefixes!
36477  else
36478    # Not in mixed or Windows style, start by that.
36479    new_path=`cmd //c echo $new_path`
36480
36481  input_path="$new_path"
36482  # Check if we need to convert this using DOS-style short mode. If the path
36483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36484  # take no chances and rewrite it.
36485  # Note: m4 eats our [], so we need to use [ and ] instead.
36486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36487  if test "x$has_forbidden_chars" != x; then
36488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36489    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36490  fi
36491
36492    # Output is in $new_path
36493
36494  windows_path="$new_path"
36495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36496    unix_path=`$CYGPATH -u "$windows_path"`
36497    new_path="$unix_path"
36498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36500    new_path="$unix_path"
36501  fi
36502
36503    # remove trailing .exe if any
36504    new_path="${new_path/%.exe/}"
36505
36506    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36507    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36508  fi
36509
36510    else
36511      # We're on a unix platform. Hooray! :)
36512      # First separate the path from the arguments. This will split at the first
36513      # space.
36514      complete="$LD"
36515      path="${complete%% *}"
36516      tmp="$complete EOL"
36517      arguments="${tmp#* }"
36518
36519      # Cannot rely on the command "which" here since it doesn't always work.
36520      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36521      if test -z "$is_absolute_path"; then
36522        # Path to executable is not absolute. Find it.
36523        IFS_save="$IFS"
36524        IFS=:
36525        for p in $PATH; do
36526          if test -f "$p/$path" && test -x "$p/$path"; then
36527            new_path="$p/$path"
36528            break
36529          fi
36530        done
36531        IFS="$IFS_save"
36532      else
36533        # This is an absolute path, we can use it without further modifications.
36534        new_path="$path"
36535      fi
36536
36537      if test "x$new_path" = x; then
36538        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36539$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36540        has_space=`$ECHO "$complete" | $GREP " "`
36541        if test "x$has_space" != x; then
36542          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36543$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36544        fi
36545        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36546      fi
36547    fi
36548
36549    # Now join together the path and the arguments once again
36550    if test "x$arguments" != xEOL; then
36551      new_complete="$new_path ${arguments% *}"
36552    else
36553      new_complete="$new_path"
36554    fi
36555
36556    if test "x$complete" != "x$new_complete"; then
36557      LD="$new_complete"
36558      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36559$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36560    fi
36561  fi
36562
36563    # Verify that we indeed succeeded with this trick.
36564    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36565$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36566    "$LD" --version > /dev/null
36567    if test $? -eq 0 ; then
36568      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36569$as_echo "no" >&6; }
36570      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36571    else
36572      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36573$as_echo "yes" >&6; }
36574    fi
36575    LDCXX="$LD"
36576  else
36577    # All other toolchains use the compiler to link.
36578    LD="$CC"
36579    LDCXX="$CXX"
36580  fi
36581
36582  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36583
36584
36585  #
36586  # Setup the assembler (AS)
36587  #
36588  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36589
36590
36591  # Publish this variable in the help.
36592
36593
36594  if [ -z "${AS+x}" ]; then
36595    # The variable is not set by user, try to locate tool using the code snippet
36596    for ac_prog in as
36597do
36598  # Extract the first word of "$ac_prog", so it can be a program name with args.
36599set dummy $ac_prog; ac_word=$2
36600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36601$as_echo_n "checking for $ac_word... " >&6; }
36602if ${ac_cv_path_AS+:} false; then :
36603  $as_echo_n "(cached) " >&6
36604else
36605  case $AS in
36606  [\\/]* | ?:[\\/]*)
36607  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36608  ;;
36609  *)
36610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36611for as_dir in $PATH
36612do
36613  IFS=$as_save_IFS
36614  test -z "$as_dir" && as_dir=.
36615    for ac_exec_ext in '' $ac_executable_extensions; do
36616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36617    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36619    break 2
36620  fi
36621done
36622  done
36623IFS=$as_save_IFS
36624
36625  ;;
36626esac
36627fi
36628AS=$ac_cv_path_AS
36629if test -n "$AS"; then
36630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36631$as_echo "$AS" >&6; }
36632else
36633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36634$as_echo "no" >&6; }
36635fi
36636
36637
36638  test -n "$AS" && break
36639done
36640
36641  else
36642    # The variable is set, but is it from the command line or the environment?
36643
36644    # Try to remove the string !AS! from our list.
36645    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36646    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36647      # If it failed, the variable was not from the command line. Ignore it,
36648      # but warn the user (except for BASH, which is always set by the calling BASH).
36649      if test "xAS" != xBASH; then
36650        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36651$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36652      fi
36653      # Try to locate tool using the code snippet
36654      for ac_prog in as
36655do
36656  # Extract the first word of "$ac_prog", so it can be a program name with args.
36657set dummy $ac_prog; ac_word=$2
36658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36659$as_echo_n "checking for $ac_word... " >&6; }
36660if ${ac_cv_path_AS+:} false; then :
36661  $as_echo_n "(cached) " >&6
36662else
36663  case $AS in
36664  [\\/]* | ?:[\\/]*)
36665  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36666  ;;
36667  *)
36668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36669for as_dir in $PATH
36670do
36671  IFS=$as_save_IFS
36672  test -z "$as_dir" && as_dir=.
36673    for ac_exec_ext in '' $ac_executable_extensions; do
36674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36675    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36677    break 2
36678  fi
36679done
36680  done
36681IFS=$as_save_IFS
36682
36683  ;;
36684esac
36685fi
36686AS=$ac_cv_path_AS
36687if test -n "$AS"; then
36688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36689$as_echo "$AS" >&6; }
36690else
36691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36692$as_echo "no" >&6; }
36693fi
36694
36695
36696  test -n "$AS" && break
36697done
36698
36699    else
36700      # If it succeeded, then it was overridden by the user. We will use it
36701      # for the tool.
36702
36703      # First remove it from the list of overridden variables, so we can test
36704      # for unknown variables in the end.
36705      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36706
36707      # Check if we try to supply an empty value
36708      if test "x$AS" = x; then
36709        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36710$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36711        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36712$as_echo_n "checking for AS... " >&6; }
36713        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36714$as_echo "disabled" >&6; }
36715      else
36716        # Check if the provided tool contains a complete path.
36717        tool_specified="$AS"
36718        tool_basename="${tool_specified##*/}"
36719        if test "x$tool_basename" = "x$tool_specified"; then
36720          # A command without a complete path is provided, search $PATH.
36721          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36722$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36723          # Extract the first word of "$tool_basename", so it can be a program name with args.
36724set dummy $tool_basename; ac_word=$2
36725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36726$as_echo_n "checking for $ac_word... " >&6; }
36727if ${ac_cv_path_AS+:} false; then :
36728  $as_echo_n "(cached) " >&6
36729else
36730  case $AS in
36731  [\\/]* | ?:[\\/]*)
36732  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36733  ;;
36734  *)
36735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36736for as_dir in $PATH
36737do
36738  IFS=$as_save_IFS
36739  test -z "$as_dir" && as_dir=.
36740    for ac_exec_ext in '' $ac_executable_extensions; do
36741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36742    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36744    break 2
36745  fi
36746done
36747  done
36748IFS=$as_save_IFS
36749
36750  ;;
36751esac
36752fi
36753AS=$ac_cv_path_AS
36754if test -n "$AS"; then
36755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36756$as_echo "$AS" >&6; }
36757else
36758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36759$as_echo "no" >&6; }
36760fi
36761
36762
36763          if test "x$AS" = x; then
36764            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36765          fi
36766        else
36767          # Otherwise we believe it is a complete path. Use it as it is.
36768          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36769$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36770          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36771$as_echo_n "checking for AS... " >&6; }
36772          if test ! -x "$tool_specified"; then
36773            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36774$as_echo "not found" >&6; }
36775            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36776          fi
36777          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36778$as_echo "$tool_specified" >&6; }
36779        fi
36780      fi
36781    fi
36782
36783  fi
36784
36785
36786
36787  # Only process if variable expands to non-empty
36788
36789  if test "x$AS" != x; then
36790    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36791
36792  # First separate the path from the arguments. This will split at the first
36793  # space.
36794  complete="$AS"
36795  path="${complete%% *}"
36796  tmp="$complete EOL"
36797  arguments="${tmp#* }"
36798
36799  # Input might be given as Windows format, start by converting to
36800  # unix format.
36801  new_path=`$CYGPATH -u "$path"`
36802
36803  # Now try to locate executable using which
36804  new_path=`$WHICH "$new_path" 2> /dev/null`
36805  # bat and cmd files are not always considered executable in cygwin causing which
36806  # to not find them
36807  if test "x$new_path" = x \
36808      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36809      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36810    new_path=`$CYGPATH -u "$path"`
36811  fi
36812  if test "x$new_path" = x; then
36813    # Oops. Which didn't find the executable.
36814    # The splitting of arguments from the executable at a space might have been incorrect,
36815    # since paths with space are more likely in Windows. Give it another try with the whole
36816    # argument.
36817    path="$complete"
36818    arguments="EOL"
36819    new_path=`$CYGPATH -u "$path"`
36820    new_path=`$WHICH "$new_path" 2> /dev/null`
36821    # bat and cmd files are not always considered executable in cygwin causing which
36822    # to not find them
36823    if test "x$new_path" = x \
36824        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36825        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36826      new_path=`$CYGPATH -u "$path"`
36827    fi
36828    if test "x$new_path" = x; then
36829      # It's still not found. Now this is an unrecoverable error.
36830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36831$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36832      has_space=`$ECHO "$complete" | $GREP " "`
36833      if test "x$has_space" != x; then
36834        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36835$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36836      fi
36837      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36838    fi
36839  fi
36840
36841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36844  # "foo.exe" is OK but "foo" is an error.
36845  #
36846  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36847  # It is also a way to make sure we got the proper file name for the real test later on.
36848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36849  if test "x$test_shortpath" = x; then
36850    # Short path failed, file does not exist as specified.
36851    # Try adding .exe or .cmd
36852    if test -f "${new_path}.exe"; then
36853      input_to_shortpath="${new_path}.exe"
36854    elif test -f "${new_path}.cmd"; then
36855      input_to_shortpath="${new_path}.cmd"
36856    else
36857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36858$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36859      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36860$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36861      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36862    fi
36863  else
36864    input_to_shortpath="$new_path"
36865  fi
36866
36867  # Call helper function which possibly converts this using DOS-style short mode.
36868  # If so, the updated path is stored in $new_path.
36869  new_path="$input_to_shortpath"
36870
36871  input_path="$input_to_shortpath"
36872  # Check if we need to convert this using DOS-style short mode. If the path
36873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36874  # take no chances and rewrite it.
36875  # Note: m4 eats our [], so we need to use [ and ] instead.
36876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36877  if test "x$has_forbidden_chars" != x; then
36878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36882      # Going to short mode and back again did indeed matter. Since short mode is
36883      # case insensitive, let's make it lowercase to improve readability.
36884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36885      # Now convert it back to Unix-style (cygpath)
36886      input_path=`$CYGPATH -u "$shortmode_path"`
36887      new_path="$input_path"
36888    fi
36889  fi
36890
36891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36892  if test "x$test_cygdrive_prefix" = x; then
36893    # As a simple fix, exclude /usr/bin since it's not a real path.
36894    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36896      # a path prefixed by /cygdrive for fixpath to work.
36897      new_path="$CYGWIN_ROOT_PATH$input_path"
36898    fi
36899  fi
36900
36901  # remove trailing .exe if any
36902  new_path="${new_path/%.exe/}"
36903
36904    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36905
36906  # First separate the path from the arguments. This will split at the first
36907  # space.
36908  complete="$AS"
36909  path="${complete%% *}"
36910  tmp="$complete EOL"
36911  arguments="${tmp#* }"
36912
36913  # Input might be given as Windows format, start by converting to
36914  # unix format.
36915  new_path="$path"
36916
36917  windows_path="$new_path"
36918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36919    unix_path=`$CYGPATH -u "$windows_path"`
36920    new_path="$unix_path"
36921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36923    new_path="$unix_path"
36924  fi
36925
36926
36927  # Now try to locate executable using which
36928  new_path=`$WHICH "$new_path" 2> /dev/null`
36929
36930  if test "x$new_path" = x; then
36931    # Oops. Which didn't find the executable.
36932    # The splitting of arguments from the executable at a space might have been incorrect,
36933    # since paths with space are more likely in Windows. Give it another try with the whole
36934    # argument.
36935    path="$complete"
36936    arguments="EOL"
36937    new_path="$path"
36938
36939  windows_path="$new_path"
36940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36941    unix_path=`$CYGPATH -u "$windows_path"`
36942    new_path="$unix_path"
36943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36945    new_path="$unix_path"
36946  fi
36947
36948
36949    new_path=`$WHICH "$new_path" 2> /dev/null`
36950    # bat and cmd files are not always considered executable in MSYS causing which
36951    # to not find them
36952    if test "x$new_path" = x \
36953        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36954        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36955      new_path="$path"
36956
36957  windows_path="$new_path"
36958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36959    unix_path=`$CYGPATH -u "$windows_path"`
36960    new_path="$unix_path"
36961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36963    new_path="$unix_path"
36964  fi
36965
36966    fi
36967
36968    if test "x$new_path" = x; then
36969      # It's still not found. Now this is an unrecoverable error.
36970      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36971$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36972      has_space=`$ECHO "$complete" | $GREP " "`
36973      if test "x$has_space" != x; then
36974        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36975$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36976      fi
36977      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36978    fi
36979  fi
36980
36981  # Now new_path has a complete unix path to the binary
36982  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36983    # Keep paths in /bin as-is, but remove trailing .exe if any
36984    new_path="${new_path/%.exe/}"
36985    # Do not save /bin paths to all_fixpath_prefixes!
36986  else
36987    # Not in mixed or Windows style, start by that.
36988    new_path=`cmd //c echo $new_path`
36989
36990  input_path="$new_path"
36991  # Check if we need to convert this using DOS-style short mode. If the path
36992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36993  # take no chances and rewrite it.
36994  # Note: m4 eats our [], so we need to use [ and ] instead.
36995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36996  if test "x$has_forbidden_chars" != x; then
36997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36998    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36999  fi
37000
37001    # Output is in $new_path
37002
37003  windows_path="$new_path"
37004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37005    unix_path=`$CYGPATH -u "$windows_path"`
37006    new_path="$unix_path"
37007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37009    new_path="$unix_path"
37010  fi
37011
37012    # remove trailing .exe if any
37013    new_path="${new_path/%.exe/}"
37014
37015    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37016    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37017  fi
37018
37019    else
37020      # We're on a unix platform. Hooray! :)
37021      # First separate the path from the arguments. This will split at the first
37022      # space.
37023      complete="$AS"
37024      path="${complete%% *}"
37025      tmp="$complete EOL"
37026      arguments="${tmp#* }"
37027
37028      # Cannot rely on the command "which" here since it doesn't always work.
37029      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37030      if test -z "$is_absolute_path"; then
37031        # Path to executable is not absolute. Find it.
37032        IFS_save="$IFS"
37033        IFS=:
37034        for p in $PATH; do
37035          if test -f "$p/$path" && test -x "$p/$path"; then
37036            new_path="$p/$path"
37037            break
37038          fi
37039        done
37040        IFS="$IFS_save"
37041      else
37042        # This is an absolute path, we can use it without further modifications.
37043        new_path="$path"
37044      fi
37045
37046      if test "x$new_path" = x; then
37047        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37048$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37049        has_space=`$ECHO "$complete" | $GREP " "`
37050        if test "x$has_space" != x; then
37051          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37052$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37053        fi
37054        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37055      fi
37056    fi
37057
37058    # Now join together the path and the arguments once again
37059    if test "x$arguments" != xEOL; then
37060      new_complete="$new_path ${arguments% *}"
37061    else
37062      new_complete="$new_path"
37063    fi
37064
37065    if test "x$complete" != "x$new_complete"; then
37066      AS="$new_complete"
37067      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37068$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37069    fi
37070  fi
37071
37072    if test "x$AS" = x; then
37073      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37074    fi
37075  else
37076    # FIXME: is this correct for microsoft?
37077    AS="$CC -c"
37078  fi
37079
37080
37081  #
37082  # Setup the archiver (AR)
37083  #
37084  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37085    # The corresponding ar tool is lib.exe (used to create static libraries)
37086    # Extract the first word of "lib", so it can be a program name with args.
37087set dummy lib; ac_word=$2
37088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37089$as_echo_n "checking for $ac_word... " >&6; }
37090if ${ac_cv_prog_AR+:} false; then :
37091  $as_echo_n "(cached) " >&6
37092else
37093  if test -n "$AR"; then
37094  ac_cv_prog_AR="$AR" # Let the user override the test.
37095else
37096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37097for as_dir in $PATH
37098do
37099  IFS=$as_save_IFS
37100  test -z "$as_dir" && as_dir=.
37101    for ac_exec_ext in '' $ac_executable_extensions; do
37102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37103    ac_cv_prog_AR="lib"
37104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37105    break 2
37106  fi
37107done
37108  done
37109IFS=$as_save_IFS
37110
37111fi
37112fi
37113AR=$ac_cv_prog_AR
37114if test -n "$AR"; then
37115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37116$as_echo "$AR" >&6; }
37117else
37118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37119$as_echo "no" >&6; }
37120fi
37121
37122
37123  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37124
37125
37126  # Publish this variable in the help.
37127
37128
37129  if [ -z "${AR+x}" ]; then
37130    # The variable is not set by user, try to locate tool using the code snippet
37131    if test -n "$ac_tool_prefix"; then
37132  for ac_prog in ar gcc-ar
37133  do
37134    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37135set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37137$as_echo_n "checking for $ac_word... " >&6; }
37138if ${ac_cv_prog_AR+:} false; then :
37139  $as_echo_n "(cached) " >&6
37140else
37141  if test -n "$AR"; then
37142  ac_cv_prog_AR="$AR" # Let the user override the test.
37143else
37144as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37145for as_dir in $PATH
37146do
37147  IFS=$as_save_IFS
37148  test -z "$as_dir" && as_dir=.
37149    for ac_exec_ext in '' $ac_executable_extensions; do
37150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37151    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37153    break 2
37154  fi
37155done
37156  done
37157IFS=$as_save_IFS
37158
37159fi
37160fi
37161AR=$ac_cv_prog_AR
37162if test -n "$AR"; then
37163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37164$as_echo "$AR" >&6; }
37165else
37166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37167$as_echo "no" >&6; }
37168fi
37169
37170
37171    test -n "$AR" && break
37172  done
37173fi
37174if test -z "$AR"; then
37175  ac_ct_AR=$AR
37176  for ac_prog in ar gcc-ar
37177do
37178  # Extract the first word of "$ac_prog", so it can be a program name with args.
37179set dummy $ac_prog; ac_word=$2
37180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37181$as_echo_n "checking for $ac_word... " >&6; }
37182if ${ac_cv_prog_ac_ct_AR+:} false; then :
37183  $as_echo_n "(cached) " >&6
37184else
37185  if test -n "$ac_ct_AR"; then
37186  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37187else
37188as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37189for as_dir in $PATH
37190do
37191  IFS=$as_save_IFS
37192  test -z "$as_dir" && as_dir=.
37193    for ac_exec_ext in '' $ac_executable_extensions; do
37194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37195    ac_cv_prog_ac_ct_AR="$ac_prog"
37196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37197    break 2
37198  fi
37199done
37200  done
37201IFS=$as_save_IFS
37202
37203fi
37204fi
37205ac_ct_AR=$ac_cv_prog_ac_ct_AR
37206if test -n "$ac_ct_AR"; then
37207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37208$as_echo "$ac_ct_AR" >&6; }
37209else
37210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37211$as_echo "no" >&6; }
37212fi
37213
37214
37215  test -n "$ac_ct_AR" && break
37216done
37217
37218  if test "x$ac_ct_AR" = x; then
37219    AR=""
37220  else
37221    case $cross_compiling:$ac_tool_warned in
37222yes:)
37223{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37224$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37225ac_tool_warned=yes ;;
37226esac
37227    AR=$ac_ct_AR
37228  fi
37229fi
37230
37231  else
37232    # The variable is set, but is it from the command line or the environment?
37233
37234    # Try to remove the string !AR! from our list.
37235    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37236    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37237      # If it failed, the variable was not from the command line. Ignore it,
37238      # but warn the user (except for BASH, which is always set by the calling BASH).
37239      if test "xAR" != xBASH; then
37240        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37241$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37242      fi
37243      # Try to locate tool using the code snippet
37244      if test -n "$ac_tool_prefix"; then
37245  for ac_prog in ar gcc-ar
37246  do
37247    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37248set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37250$as_echo_n "checking for $ac_word... " >&6; }
37251if ${ac_cv_prog_AR+:} false; then :
37252  $as_echo_n "(cached) " >&6
37253else
37254  if test -n "$AR"; then
37255  ac_cv_prog_AR="$AR" # Let the user override the test.
37256else
37257as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37258for as_dir in $PATH
37259do
37260  IFS=$as_save_IFS
37261  test -z "$as_dir" && as_dir=.
37262    for ac_exec_ext in '' $ac_executable_extensions; do
37263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37264    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37266    break 2
37267  fi
37268done
37269  done
37270IFS=$as_save_IFS
37271
37272fi
37273fi
37274AR=$ac_cv_prog_AR
37275if test -n "$AR"; then
37276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37277$as_echo "$AR" >&6; }
37278else
37279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37280$as_echo "no" >&6; }
37281fi
37282
37283
37284    test -n "$AR" && break
37285  done
37286fi
37287if test -z "$AR"; then
37288  ac_ct_AR=$AR
37289  for ac_prog in ar gcc-ar
37290do
37291  # Extract the first word of "$ac_prog", so it can be a program name with args.
37292set dummy $ac_prog; ac_word=$2
37293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37294$as_echo_n "checking for $ac_word... " >&6; }
37295if ${ac_cv_prog_ac_ct_AR+:} false; then :
37296  $as_echo_n "(cached) " >&6
37297else
37298  if test -n "$ac_ct_AR"; then
37299  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37300else
37301as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37302for as_dir in $PATH
37303do
37304  IFS=$as_save_IFS
37305  test -z "$as_dir" && as_dir=.
37306    for ac_exec_ext in '' $ac_executable_extensions; do
37307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37308    ac_cv_prog_ac_ct_AR="$ac_prog"
37309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37310    break 2
37311  fi
37312done
37313  done
37314IFS=$as_save_IFS
37315
37316fi
37317fi
37318ac_ct_AR=$ac_cv_prog_ac_ct_AR
37319if test -n "$ac_ct_AR"; then
37320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37321$as_echo "$ac_ct_AR" >&6; }
37322else
37323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37324$as_echo "no" >&6; }
37325fi
37326
37327
37328  test -n "$ac_ct_AR" && break
37329done
37330
37331  if test "x$ac_ct_AR" = x; then
37332    AR=""
37333  else
37334    case $cross_compiling:$ac_tool_warned in
37335yes:)
37336{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37337$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37338ac_tool_warned=yes ;;
37339esac
37340    AR=$ac_ct_AR
37341  fi
37342fi
37343
37344    else
37345      # If it succeeded, then it was overridden by the user. We will use it
37346      # for the tool.
37347
37348      # First remove it from the list of overridden variables, so we can test
37349      # for unknown variables in the end.
37350      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37351
37352      # Check if we try to supply an empty value
37353      if test "x$AR" = x; then
37354        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37355$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37356        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37357$as_echo_n "checking for AR... " >&6; }
37358        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37359$as_echo "disabled" >&6; }
37360      else
37361        # Check if the provided tool contains a complete path.
37362        tool_specified="$AR"
37363        tool_basename="${tool_specified##*/}"
37364        if test "x$tool_basename" = "x$tool_specified"; then
37365          # A command without a complete path is provided, search $PATH.
37366          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37367$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37368          # Extract the first word of "$tool_basename", so it can be a program name with args.
37369set dummy $tool_basename; ac_word=$2
37370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37371$as_echo_n "checking for $ac_word... " >&6; }
37372if ${ac_cv_path_AR+:} false; then :
37373  $as_echo_n "(cached) " >&6
37374else
37375  case $AR in
37376  [\\/]* | ?:[\\/]*)
37377  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37378  ;;
37379  *)
37380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37381for as_dir in $PATH
37382do
37383  IFS=$as_save_IFS
37384  test -z "$as_dir" && as_dir=.
37385    for ac_exec_ext in '' $ac_executable_extensions; do
37386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37387    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37389    break 2
37390  fi
37391done
37392  done
37393IFS=$as_save_IFS
37394
37395  ;;
37396esac
37397fi
37398AR=$ac_cv_path_AR
37399if test -n "$AR"; then
37400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37401$as_echo "$AR" >&6; }
37402else
37403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37404$as_echo "no" >&6; }
37405fi
37406
37407
37408          if test "x$AR" = x; then
37409            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37410          fi
37411        else
37412          # Otherwise we believe it is a complete path. Use it as it is.
37413          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37414$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37415          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37416$as_echo_n "checking for AR... " >&6; }
37417          if test ! -x "$tool_specified"; then
37418            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37419$as_echo "not found" >&6; }
37420            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37421          fi
37422          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37423$as_echo "$tool_specified" >&6; }
37424        fi
37425      fi
37426    fi
37427
37428  fi
37429
37430
37431  else
37432
37433
37434  # Publish this variable in the help.
37435
37436
37437  if [ -z "${AR+x}" ]; then
37438    # The variable is not set by user, try to locate tool using the code snippet
37439    if test -n "$ac_tool_prefix"; then
37440  for ac_prog in ar
37441  do
37442    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37443set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37445$as_echo_n "checking for $ac_word... " >&6; }
37446if ${ac_cv_prog_AR+:} false; then :
37447  $as_echo_n "(cached) " >&6
37448else
37449  if test -n "$AR"; then
37450  ac_cv_prog_AR="$AR" # Let the user override the test.
37451else
37452as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37453for as_dir in $PATH
37454do
37455  IFS=$as_save_IFS
37456  test -z "$as_dir" && as_dir=.
37457    for ac_exec_ext in '' $ac_executable_extensions; do
37458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37459    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37461    break 2
37462  fi
37463done
37464  done
37465IFS=$as_save_IFS
37466
37467fi
37468fi
37469AR=$ac_cv_prog_AR
37470if test -n "$AR"; then
37471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37472$as_echo "$AR" >&6; }
37473else
37474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37475$as_echo "no" >&6; }
37476fi
37477
37478
37479    test -n "$AR" && break
37480  done
37481fi
37482if test -z "$AR"; then
37483  ac_ct_AR=$AR
37484  for ac_prog in ar
37485do
37486  # Extract the first word of "$ac_prog", so it can be a program name with args.
37487set dummy $ac_prog; ac_word=$2
37488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37489$as_echo_n "checking for $ac_word... " >&6; }
37490if ${ac_cv_prog_ac_ct_AR+:} false; then :
37491  $as_echo_n "(cached) " >&6
37492else
37493  if test -n "$ac_ct_AR"; then
37494  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37495else
37496as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37497for as_dir in $PATH
37498do
37499  IFS=$as_save_IFS
37500  test -z "$as_dir" && as_dir=.
37501    for ac_exec_ext in '' $ac_executable_extensions; do
37502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37503    ac_cv_prog_ac_ct_AR="$ac_prog"
37504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37505    break 2
37506  fi
37507done
37508  done
37509IFS=$as_save_IFS
37510
37511fi
37512fi
37513ac_ct_AR=$ac_cv_prog_ac_ct_AR
37514if test -n "$ac_ct_AR"; then
37515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37516$as_echo "$ac_ct_AR" >&6; }
37517else
37518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37519$as_echo "no" >&6; }
37520fi
37521
37522
37523  test -n "$ac_ct_AR" && break
37524done
37525
37526  if test "x$ac_ct_AR" = x; then
37527    AR=""
37528  else
37529    case $cross_compiling:$ac_tool_warned in
37530yes:)
37531{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37532$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37533ac_tool_warned=yes ;;
37534esac
37535    AR=$ac_ct_AR
37536  fi
37537fi
37538
37539  else
37540    # The variable is set, but is it from the command line or the environment?
37541
37542    # Try to remove the string !AR! from our list.
37543    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37544    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37545      # If it failed, the variable was not from the command line. Ignore it,
37546      # but warn the user (except for BASH, which is always set by the calling BASH).
37547      if test "xAR" != xBASH; then
37548        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37549$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37550      fi
37551      # Try to locate tool using the code snippet
37552      if test -n "$ac_tool_prefix"; then
37553  for ac_prog in ar
37554  do
37555    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37556set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37558$as_echo_n "checking for $ac_word... " >&6; }
37559if ${ac_cv_prog_AR+:} false; then :
37560  $as_echo_n "(cached) " >&6
37561else
37562  if test -n "$AR"; then
37563  ac_cv_prog_AR="$AR" # Let the user override the test.
37564else
37565as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37566for as_dir in $PATH
37567do
37568  IFS=$as_save_IFS
37569  test -z "$as_dir" && as_dir=.
37570    for ac_exec_ext in '' $ac_executable_extensions; do
37571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37572    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37574    break 2
37575  fi
37576done
37577  done
37578IFS=$as_save_IFS
37579
37580fi
37581fi
37582AR=$ac_cv_prog_AR
37583if test -n "$AR"; then
37584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37585$as_echo "$AR" >&6; }
37586else
37587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37588$as_echo "no" >&6; }
37589fi
37590
37591
37592    test -n "$AR" && break
37593  done
37594fi
37595if test -z "$AR"; then
37596  ac_ct_AR=$AR
37597  for ac_prog in ar
37598do
37599  # Extract the first word of "$ac_prog", so it can be a program name with args.
37600set dummy $ac_prog; ac_word=$2
37601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37602$as_echo_n "checking for $ac_word... " >&6; }
37603if ${ac_cv_prog_ac_ct_AR+:} false; then :
37604  $as_echo_n "(cached) " >&6
37605else
37606  if test -n "$ac_ct_AR"; then
37607  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37608else
37609as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37610for as_dir in $PATH
37611do
37612  IFS=$as_save_IFS
37613  test -z "$as_dir" && as_dir=.
37614    for ac_exec_ext in '' $ac_executable_extensions; do
37615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37616    ac_cv_prog_ac_ct_AR="$ac_prog"
37617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37618    break 2
37619  fi
37620done
37621  done
37622IFS=$as_save_IFS
37623
37624fi
37625fi
37626ac_ct_AR=$ac_cv_prog_ac_ct_AR
37627if test -n "$ac_ct_AR"; then
37628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37629$as_echo "$ac_ct_AR" >&6; }
37630else
37631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37632$as_echo "no" >&6; }
37633fi
37634
37635
37636  test -n "$ac_ct_AR" && break
37637done
37638
37639  if test "x$ac_ct_AR" = x; then
37640    AR=""
37641  else
37642    case $cross_compiling:$ac_tool_warned in
37643yes:)
37644{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37645$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37646ac_tool_warned=yes ;;
37647esac
37648    AR=$ac_ct_AR
37649  fi
37650fi
37651
37652    else
37653      # If it succeeded, then it was overridden by the user. We will use it
37654      # for the tool.
37655
37656      # First remove it from the list of overridden variables, so we can test
37657      # for unknown variables in the end.
37658      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37659
37660      # Check if we try to supply an empty value
37661      if test "x$AR" = x; then
37662        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37663$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37664        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37665$as_echo_n "checking for AR... " >&6; }
37666        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37667$as_echo "disabled" >&6; }
37668      else
37669        # Check if the provided tool contains a complete path.
37670        tool_specified="$AR"
37671        tool_basename="${tool_specified##*/}"
37672        if test "x$tool_basename" = "x$tool_specified"; then
37673          # A command without a complete path is provided, search $PATH.
37674          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37675$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37676          # Extract the first word of "$tool_basename", so it can be a program name with args.
37677set dummy $tool_basename; ac_word=$2
37678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37679$as_echo_n "checking for $ac_word... " >&6; }
37680if ${ac_cv_path_AR+:} false; then :
37681  $as_echo_n "(cached) " >&6
37682else
37683  case $AR in
37684  [\\/]* | ?:[\\/]*)
37685  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37686  ;;
37687  *)
37688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37689for as_dir in $PATH
37690do
37691  IFS=$as_save_IFS
37692  test -z "$as_dir" && as_dir=.
37693    for ac_exec_ext in '' $ac_executable_extensions; do
37694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37695    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37697    break 2
37698  fi
37699done
37700  done
37701IFS=$as_save_IFS
37702
37703  ;;
37704esac
37705fi
37706AR=$ac_cv_path_AR
37707if test -n "$AR"; then
37708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37709$as_echo "$AR" >&6; }
37710else
37711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37712$as_echo "no" >&6; }
37713fi
37714
37715
37716          if test "x$AR" = x; then
37717            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37718          fi
37719        else
37720          # Otherwise we believe it is a complete path. Use it as it is.
37721          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37722$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37723          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37724$as_echo_n "checking for AR... " >&6; }
37725          if test ! -x "$tool_specified"; then
37726            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37727$as_echo "not found" >&6; }
37728            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37729          fi
37730          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37731$as_echo "$tool_specified" >&6; }
37732        fi
37733      fi
37734    fi
37735
37736  fi
37737
37738
37739  fi
37740
37741  # Only process if variable expands to non-empty
37742
37743  if test "x$AR" != x; then
37744    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37745
37746  # First separate the path from the arguments. This will split at the first
37747  # space.
37748  complete="$AR"
37749  path="${complete%% *}"
37750  tmp="$complete EOL"
37751  arguments="${tmp#* }"
37752
37753  # Input might be given as Windows format, start by converting to
37754  # unix format.
37755  new_path=`$CYGPATH -u "$path"`
37756
37757  # Now try to locate executable using which
37758  new_path=`$WHICH "$new_path" 2> /dev/null`
37759  # bat and cmd files are not always considered executable in cygwin causing which
37760  # to not find them
37761  if test "x$new_path" = x \
37762      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37763      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37764    new_path=`$CYGPATH -u "$path"`
37765  fi
37766  if test "x$new_path" = x; then
37767    # Oops. Which didn't find the executable.
37768    # The splitting of arguments from the executable at a space might have been incorrect,
37769    # since paths with space are more likely in Windows. Give it another try with the whole
37770    # argument.
37771    path="$complete"
37772    arguments="EOL"
37773    new_path=`$CYGPATH -u "$path"`
37774    new_path=`$WHICH "$new_path" 2> /dev/null`
37775    # bat and cmd files are not always considered executable in cygwin causing which
37776    # to not find them
37777    if test "x$new_path" = x \
37778        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37779        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37780      new_path=`$CYGPATH -u "$path"`
37781    fi
37782    if test "x$new_path" = x; then
37783      # It's still not found. Now this is an unrecoverable error.
37784      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37785$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37786      has_space=`$ECHO "$complete" | $GREP " "`
37787      if test "x$has_space" != x; then
37788        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37789$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37790      fi
37791      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37792    fi
37793  fi
37794
37795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37798  # "foo.exe" is OK but "foo" is an error.
37799  #
37800  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37801  # It is also a way to make sure we got the proper file name for the real test later on.
37802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37803  if test "x$test_shortpath" = x; then
37804    # Short path failed, file does not exist as specified.
37805    # Try adding .exe or .cmd
37806    if test -f "${new_path}.exe"; then
37807      input_to_shortpath="${new_path}.exe"
37808    elif test -f "${new_path}.cmd"; then
37809      input_to_shortpath="${new_path}.cmd"
37810    else
37811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37812$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37813      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37814$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37815      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37816    fi
37817  else
37818    input_to_shortpath="$new_path"
37819  fi
37820
37821  # Call helper function which possibly converts this using DOS-style short mode.
37822  # If so, the updated path is stored in $new_path.
37823  new_path="$input_to_shortpath"
37824
37825  input_path="$input_to_shortpath"
37826  # Check if we need to convert this using DOS-style short mode. If the path
37827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37828  # take no chances and rewrite it.
37829  # Note: m4 eats our [], so we need to use [ and ] instead.
37830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37831  if test "x$has_forbidden_chars" != x; then
37832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37836      # Going to short mode and back again did indeed matter. Since short mode is
37837      # case insensitive, let's make it lowercase to improve readability.
37838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37839      # Now convert it back to Unix-style (cygpath)
37840      input_path=`$CYGPATH -u "$shortmode_path"`
37841      new_path="$input_path"
37842    fi
37843  fi
37844
37845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37846  if test "x$test_cygdrive_prefix" = x; then
37847    # As a simple fix, exclude /usr/bin since it's not a real path.
37848    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37850      # a path prefixed by /cygdrive for fixpath to work.
37851      new_path="$CYGWIN_ROOT_PATH$input_path"
37852    fi
37853  fi
37854
37855  # remove trailing .exe if any
37856  new_path="${new_path/%.exe/}"
37857
37858    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37859
37860  # First separate the path from the arguments. This will split at the first
37861  # space.
37862  complete="$AR"
37863  path="${complete%% *}"
37864  tmp="$complete EOL"
37865  arguments="${tmp#* }"
37866
37867  # Input might be given as Windows format, start by converting to
37868  # unix format.
37869  new_path="$path"
37870
37871  windows_path="$new_path"
37872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37873    unix_path=`$CYGPATH -u "$windows_path"`
37874    new_path="$unix_path"
37875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37877    new_path="$unix_path"
37878  fi
37879
37880
37881  # Now try to locate executable using which
37882  new_path=`$WHICH "$new_path" 2> /dev/null`
37883
37884  if test "x$new_path" = x; then
37885    # Oops. Which didn't find the executable.
37886    # The splitting of arguments from the executable at a space might have been incorrect,
37887    # since paths with space are more likely in Windows. Give it another try with the whole
37888    # argument.
37889    path="$complete"
37890    arguments="EOL"
37891    new_path="$path"
37892
37893  windows_path="$new_path"
37894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37895    unix_path=`$CYGPATH -u "$windows_path"`
37896    new_path="$unix_path"
37897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37899    new_path="$unix_path"
37900  fi
37901
37902
37903    new_path=`$WHICH "$new_path" 2> /dev/null`
37904    # bat and cmd files are not always considered executable in MSYS causing which
37905    # to not find them
37906    if test "x$new_path" = x \
37907        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37908        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37909      new_path="$path"
37910
37911  windows_path="$new_path"
37912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37913    unix_path=`$CYGPATH -u "$windows_path"`
37914    new_path="$unix_path"
37915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37917    new_path="$unix_path"
37918  fi
37919
37920    fi
37921
37922    if test "x$new_path" = x; then
37923      # It's still not found. Now this is an unrecoverable error.
37924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37925$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37926      has_space=`$ECHO "$complete" | $GREP " "`
37927      if test "x$has_space" != x; then
37928        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37929$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37930      fi
37931      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37932    fi
37933  fi
37934
37935  # Now new_path has a complete unix path to the binary
37936  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37937    # Keep paths in /bin as-is, but remove trailing .exe if any
37938    new_path="${new_path/%.exe/}"
37939    # Do not save /bin paths to all_fixpath_prefixes!
37940  else
37941    # Not in mixed or Windows style, start by that.
37942    new_path=`cmd //c echo $new_path`
37943
37944  input_path="$new_path"
37945  # Check if we need to convert this using DOS-style short mode. If the path
37946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37947  # take no chances and rewrite it.
37948  # Note: m4 eats our [], so we need to use [ and ] instead.
37949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37950  if test "x$has_forbidden_chars" != x; then
37951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37952    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37953  fi
37954
37955    # Output is in $new_path
37956
37957  windows_path="$new_path"
37958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37959    unix_path=`$CYGPATH -u "$windows_path"`
37960    new_path="$unix_path"
37961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37963    new_path="$unix_path"
37964  fi
37965
37966    # remove trailing .exe if any
37967    new_path="${new_path/%.exe/}"
37968
37969    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37970    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37971  fi
37972
37973    else
37974      # We're on a unix platform. Hooray! :)
37975      # First separate the path from the arguments. This will split at the first
37976      # space.
37977      complete="$AR"
37978      path="${complete%% *}"
37979      tmp="$complete EOL"
37980      arguments="${tmp#* }"
37981
37982      # Cannot rely on the command "which" here since it doesn't always work.
37983      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37984      if test -z "$is_absolute_path"; then
37985        # Path to executable is not absolute. Find it.
37986        IFS_save="$IFS"
37987        IFS=:
37988        for p in $PATH; do
37989          if test -f "$p/$path" && test -x "$p/$path"; then
37990            new_path="$p/$path"
37991            break
37992          fi
37993        done
37994        IFS="$IFS_save"
37995      else
37996        # This is an absolute path, we can use it without further modifications.
37997        new_path="$path"
37998      fi
37999
38000      if test "x$new_path" = x; then
38001        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38002$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38003        has_space=`$ECHO "$complete" | $GREP " "`
38004        if test "x$has_space" != x; then
38005          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38006$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38007        fi
38008        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38009      fi
38010    fi
38011
38012    # Now join together the path and the arguments once again
38013    if test "x$arguments" != xEOL; then
38014      new_complete="$new_path ${arguments% *}"
38015    else
38016      new_complete="$new_path"
38017    fi
38018
38019    if test "x$complete" != "x$new_complete"; then
38020      AR="$new_complete"
38021      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38022$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38023    fi
38024  fi
38025
38026
38027
38028  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38029
38030
38031  # Publish this variable in the help.
38032
38033
38034  if [ -z "${LIPO+x}" ]; then
38035    # The variable is not set by user, try to locate tool using the code snippet
38036    for ac_prog in lipo
38037do
38038  # Extract the first word of "$ac_prog", so it can be a program name with args.
38039set dummy $ac_prog; ac_word=$2
38040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38041$as_echo_n "checking for $ac_word... " >&6; }
38042if ${ac_cv_path_LIPO+:} false; then :
38043  $as_echo_n "(cached) " >&6
38044else
38045  case $LIPO in
38046  [\\/]* | ?:[\\/]*)
38047  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38048  ;;
38049  *)
38050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38051for as_dir in $PATH
38052do
38053  IFS=$as_save_IFS
38054  test -z "$as_dir" && as_dir=.
38055    for ac_exec_ext in '' $ac_executable_extensions; do
38056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38057    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38059    break 2
38060  fi
38061done
38062  done
38063IFS=$as_save_IFS
38064
38065  ;;
38066esac
38067fi
38068LIPO=$ac_cv_path_LIPO
38069if test -n "$LIPO"; then
38070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38071$as_echo "$LIPO" >&6; }
38072else
38073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38074$as_echo "no" >&6; }
38075fi
38076
38077
38078  test -n "$LIPO" && break
38079done
38080
38081  else
38082    # The variable is set, but is it from the command line or the environment?
38083
38084    # Try to remove the string !LIPO! from our list.
38085    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38086    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38087      # If it failed, the variable was not from the command line. Ignore it,
38088      # but warn the user (except for BASH, which is always set by the calling BASH).
38089      if test "xLIPO" != xBASH; then
38090        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38091$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38092      fi
38093      # Try to locate tool using the code snippet
38094      for ac_prog in lipo
38095do
38096  # Extract the first word of "$ac_prog", so it can be a program name with args.
38097set dummy $ac_prog; ac_word=$2
38098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38099$as_echo_n "checking for $ac_word... " >&6; }
38100if ${ac_cv_path_LIPO+:} false; then :
38101  $as_echo_n "(cached) " >&6
38102else
38103  case $LIPO in
38104  [\\/]* | ?:[\\/]*)
38105  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38106  ;;
38107  *)
38108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38109for as_dir in $PATH
38110do
38111  IFS=$as_save_IFS
38112  test -z "$as_dir" && as_dir=.
38113    for ac_exec_ext in '' $ac_executable_extensions; do
38114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38115    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38117    break 2
38118  fi
38119done
38120  done
38121IFS=$as_save_IFS
38122
38123  ;;
38124esac
38125fi
38126LIPO=$ac_cv_path_LIPO
38127if test -n "$LIPO"; then
38128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38129$as_echo "$LIPO" >&6; }
38130else
38131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38132$as_echo "no" >&6; }
38133fi
38134
38135
38136  test -n "$LIPO" && break
38137done
38138
38139    else
38140      # If it succeeded, then it was overridden by the user. We will use it
38141      # for the tool.
38142
38143      # First remove it from the list of overridden variables, so we can test
38144      # for unknown variables in the end.
38145      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38146
38147      # Check if we try to supply an empty value
38148      if test "x$LIPO" = x; then
38149        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38150$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38151        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38152$as_echo_n "checking for LIPO... " >&6; }
38153        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38154$as_echo "disabled" >&6; }
38155      else
38156        # Check if the provided tool contains a complete path.
38157        tool_specified="$LIPO"
38158        tool_basename="${tool_specified##*/}"
38159        if test "x$tool_basename" = "x$tool_specified"; then
38160          # A command without a complete path is provided, search $PATH.
38161          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38162$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38163          # Extract the first word of "$tool_basename", so it can be a program name with args.
38164set dummy $tool_basename; ac_word=$2
38165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38166$as_echo_n "checking for $ac_word... " >&6; }
38167if ${ac_cv_path_LIPO+:} false; then :
38168  $as_echo_n "(cached) " >&6
38169else
38170  case $LIPO in
38171  [\\/]* | ?:[\\/]*)
38172  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38173  ;;
38174  *)
38175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38176for as_dir in $PATH
38177do
38178  IFS=$as_save_IFS
38179  test -z "$as_dir" && as_dir=.
38180    for ac_exec_ext in '' $ac_executable_extensions; do
38181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38182    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38184    break 2
38185  fi
38186done
38187  done
38188IFS=$as_save_IFS
38189
38190  ;;
38191esac
38192fi
38193LIPO=$ac_cv_path_LIPO
38194if test -n "$LIPO"; then
38195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38196$as_echo "$LIPO" >&6; }
38197else
38198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38199$as_echo "no" >&6; }
38200fi
38201
38202
38203          if test "x$LIPO" = x; then
38204            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38205          fi
38206        else
38207          # Otherwise we believe it is a complete path. Use it as it is.
38208          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38209$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38210          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38211$as_echo_n "checking for LIPO... " >&6; }
38212          if test ! -x "$tool_specified"; then
38213            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38214$as_echo "not found" >&6; }
38215            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38216          fi
38217          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38218$as_echo "$tool_specified" >&6; }
38219        fi
38220      fi
38221    fi
38222
38223  fi
38224
38225
38226
38227  # Only process if variable expands to non-empty
38228
38229  if test "x$LIPO" != x; then
38230    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38231
38232  # First separate the path from the arguments. This will split at the first
38233  # space.
38234  complete="$LIPO"
38235  path="${complete%% *}"
38236  tmp="$complete EOL"
38237  arguments="${tmp#* }"
38238
38239  # Input might be given as Windows format, start by converting to
38240  # unix format.
38241  new_path=`$CYGPATH -u "$path"`
38242
38243  # Now try to locate executable using which
38244  new_path=`$WHICH "$new_path" 2> /dev/null`
38245  # bat and cmd files are not always considered executable in cygwin causing which
38246  # to not find them
38247  if test "x$new_path" = x \
38248      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38249      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38250    new_path=`$CYGPATH -u "$path"`
38251  fi
38252  if test "x$new_path" = x; then
38253    # Oops. Which didn't find the executable.
38254    # The splitting of arguments from the executable at a space might have been incorrect,
38255    # since paths with space are more likely in Windows. Give it another try with the whole
38256    # argument.
38257    path="$complete"
38258    arguments="EOL"
38259    new_path=`$CYGPATH -u "$path"`
38260    new_path=`$WHICH "$new_path" 2> /dev/null`
38261    # bat and cmd files are not always considered executable in cygwin causing which
38262    # to not find them
38263    if test "x$new_path" = x \
38264        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38265        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38266      new_path=`$CYGPATH -u "$path"`
38267    fi
38268    if test "x$new_path" = x; then
38269      # It's still not found. Now this is an unrecoverable error.
38270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38271$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38272      has_space=`$ECHO "$complete" | $GREP " "`
38273      if test "x$has_space" != x; then
38274        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38275$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38276      fi
38277      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38278    fi
38279  fi
38280
38281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38284  # "foo.exe" is OK but "foo" is an error.
38285  #
38286  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38287  # It is also a way to make sure we got the proper file name for the real test later on.
38288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38289  if test "x$test_shortpath" = x; then
38290    # Short path failed, file does not exist as specified.
38291    # Try adding .exe or .cmd
38292    if test -f "${new_path}.exe"; then
38293      input_to_shortpath="${new_path}.exe"
38294    elif test -f "${new_path}.cmd"; then
38295      input_to_shortpath="${new_path}.cmd"
38296    else
38297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38298$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38299      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38300$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38301      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38302    fi
38303  else
38304    input_to_shortpath="$new_path"
38305  fi
38306
38307  # Call helper function which possibly converts this using DOS-style short mode.
38308  # If so, the updated path is stored in $new_path.
38309  new_path="$input_to_shortpath"
38310
38311  input_path="$input_to_shortpath"
38312  # Check if we need to convert this using DOS-style short mode. If the path
38313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38314  # take no chances and rewrite it.
38315  # Note: m4 eats our [], so we need to use [ and ] instead.
38316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38317  if test "x$has_forbidden_chars" != x; then
38318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38322      # Going to short mode and back again did indeed matter. Since short mode is
38323      # case insensitive, let's make it lowercase to improve readability.
38324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38325      # Now convert it back to Unix-style (cygpath)
38326      input_path=`$CYGPATH -u "$shortmode_path"`
38327      new_path="$input_path"
38328    fi
38329  fi
38330
38331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38332  if test "x$test_cygdrive_prefix" = x; then
38333    # As a simple fix, exclude /usr/bin since it's not a real path.
38334    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38336      # a path prefixed by /cygdrive for fixpath to work.
38337      new_path="$CYGWIN_ROOT_PATH$input_path"
38338    fi
38339  fi
38340
38341  # remove trailing .exe if any
38342  new_path="${new_path/%.exe/}"
38343
38344    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38345
38346  # First separate the path from the arguments. This will split at the first
38347  # space.
38348  complete="$LIPO"
38349  path="${complete%% *}"
38350  tmp="$complete EOL"
38351  arguments="${tmp#* }"
38352
38353  # Input might be given as Windows format, start by converting to
38354  # unix format.
38355  new_path="$path"
38356
38357  windows_path="$new_path"
38358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38359    unix_path=`$CYGPATH -u "$windows_path"`
38360    new_path="$unix_path"
38361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38363    new_path="$unix_path"
38364  fi
38365
38366
38367  # Now try to locate executable using which
38368  new_path=`$WHICH "$new_path" 2> /dev/null`
38369
38370  if test "x$new_path" = x; then
38371    # Oops. Which didn't find the executable.
38372    # The splitting of arguments from the executable at a space might have been incorrect,
38373    # since paths with space are more likely in Windows. Give it another try with the whole
38374    # argument.
38375    path="$complete"
38376    arguments="EOL"
38377    new_path="$path"
38378
38379  windows_path="$new_path"
38380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38381    unix_path=`$CYGPATH -u "$windows_path"`
38382    new_path="$unix_path"
38383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38385    new_path="$unix_path"
38386  fi
38387
38388
38389    new_path=`$WHICH "$new_path" 2> /dev/null`
38390    # bat and cmd files are not always considered executable in MSYS causing which
38391    # to not find them
38392    if test "x$new_path" = x \
38393        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38394        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38395      new_path="$path"
38396
38397  windows_path="$new_path"
38398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38399    unix_path=`$CYGPATH -u "$windows_path"`
38400    new_path="$unix_path"
38401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38403    new_path="$unix_path"
38404  fi
38405
38406    fi
38407
38408    if test "x$new_path" = x; then
38409      # It's still not found. Now this is an unrecoverable error.
38410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38411$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38412      has_space=`$ECHO "$complete" | $GREP " "`
38413      if test "x$has_space" != x; then
38414        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38415$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38416      fi
38417      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38418    fi
38419  fi
38420
38421  # Now new_path has a complete unix path to the binary
38422  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38423    # Keep paths in /bin as-is, but remove trailing .exe if any
38424    new_path="${new_path/%.exe/}"
38425    # Do not save /bin paths to all_fixpath_prefixes!
38426  else
38427    # Not in mixed or Windows style, start by that.
38428    new_path=`cmd //c echo $new_path`
38429
38430  input_path="$new_path"
38431  # Check if we need to convert this using DOS-style short mode. If the path
38432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38433  # take no chances and rewrite it.
38434  # Note: m4 eats our [], so we need to use [ and ] instead.
38435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38436  if test "x$has_forbidden_chars" != x; then
38437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38439  fi
38440
38441    # Output is in $new_path
38442
38443  windows_path="$new_path"
38444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38445    unix_path=`$CYGPATH -u "$windows_path"`
38446    new_path="$unix_path"
38447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38449    new_path="$unix_path"
38450  fi
38451
38452    # remove trailing .exe if any
38453    new_path="${new_path/%.exe/}"
38454
38455    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38456    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38457  fi
38458
38459    else
38460      # We're on a unix platform. Hooray! :)
38461      # First separate the path from the arguments. This will split at the first
38462      # space.
38463      complete="$LIPO"
38464      path="${complete%% *}"
38465      tmp="$complete EOL"
38466      arguments="${tmp#* }"
38467
38468      # Cannot rely on the command "which" here since it doesn't always work.
38469      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38470      if test -z "$is_absolute_path"; then
38471        # Path to executable is not absolute. Find it.
38472        IFS_save="$IFS"
38473        IFS=:
38474        for p in $PATH; do
38475          if test -f "$p/$path" && test -x "$p/$path"; then
38476            new_path="$p/$path"
38477            break
38478          fi
38479        done
38480        IFS="$IFS_save"
38481      else
38482        # This is an absolute path, we can use it without further modifications.
38483        new_path="$path"
38484      fi
38485
38486      if test "x$new_path" = x; then
38487        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38488$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38489        has_space=`$ECHO "$complete" | $GREP " "`
38490        if test "x$has_space" != x; then
38491          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38492$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38493        fi
38494        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38495      fi
38496    fi
38497
38498    # Now join together the path and the arguments once again
38499    if test "x$arguments" != xEOL; then
38500      new_complete="$new_path ${arguments% *}"
38501    else
38502      new_complete="$new_path"
38503    fi
38504
38505    if test "x$complete" != "x$new_complete"; then
38506      LIPO="$new_complete"
38507      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38508$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38509    fi
38510  fi
38511
38512  fi
38513
38514  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38515    # Extract the first word of "mt", so it can be a program name with args.
38516set dummy mt; ac_word=$2
38517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38518$as_echo_n "checking for $ac_word... " >&6; }
38519if ${ac_cv_prog_MT+:} false; then :
38520  $as_echo_n "(cached) " >&6
38521else
38522  if test -n "$MT"; then
38523  ac_cv_prog_MT="$MT" # Let the user override the test.
38524else
38525  ac_prog_rejected=no
38526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38527for as_dir in $PATH
38528do
38529  IFS=$as_save_IFS
38530  test -z "$as_dir" && as_dir=.
38531    for ac_exec_ext in '' $ac_executable_extensions; do
38532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38533    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38534       ac_prog_rejected=yes
38535       continue
38536     fi
38537    ac_cv_prog_MT="mt"
38538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38539    break 2
38540  fi
38541done
38542  done
38543IFS=$as_save_IFS
38544
38545if test $ac_prog_rejected = yes; then
38546  # We found a bogon in the path, so make sure we never use it.
38547  set dummy $ac_cv_prog_MT
38548  shift
38549  if test $# != 0; then
38550    # We chose a different compiler from the bogus one.
38551    # However, it has the same basename, so the bogon will be chosen
38552    # first if we set MT to just the basename; use the full file name.
38553    shift
38554    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38555  fi
38556fi
38557fi
38558fi
38559MT=$ac_cv_prog_MT
38560if test -n "$MT"; then
38561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38562$as_echo "$MT" >&6; }
38563else
38564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38565$as_echo "no" >&6; }
38566fi
38567
38568
38569
38570  # Only process if variable expands to non-empty
38571
38572  if test "x$MT" != x; then
38573    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38574
38575  # First separate the path from the arguments. This will split at the first
38576  # space.
38577  complete="$MT"
38578  path="${complete%% *}"
38579  tmp="$complete EOL"
38580  arguments="${tmp#* }"
38581
38582  # Input might be given as Windows format, start by converting to
38583  # unix format.
38584  new_path=`$CYGPATH -u "$path"`
38585
38586  # Now try to locate executable using which
38587  new_path=`$WHICH "$new_path" 2> /dev/null`
38588  # bat and cmd files are not always considered executable in cygwin causing which
38589  # to not find them
38590  if test "x$new_path" = x \
38591      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38592      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38593    new_path=`$CYGPATH -u "$path"`
38594  fi
38595  if test "x$new_path" = x; then
38596    # Oops. Which didn't find the executable.
38597    # The splitting of arguments from the executable at a space might have been incorrect,
38598    # since paths with space are more likely in Windows. Give it another try with the whole
38599    # argument.
38600    path="$complete"
38601    arguments="EOL"
38602    new_path=`$CYGPATH -u "$path"`
38603    new_path=`$WHICH "$new_path" 2> /dev/null`
38604    # bat and cmd files are not always considered executable in cygwin causing which
38605    # to not find them
38606    if test "x$new_path" = x \
38607        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38608        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38609      new_path=`$CYGPATH -u "$path"`
38610    fi
38611    if test "x$new_path" = x; then
38612      # It's still not found. Now this is an unrecoverable error.
38613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38614$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38615      has_space=`$ECHO "$complete" | $GREP " "`
38616      if test "x$has_space" != x; then
38617        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38618$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38619      fi
38620      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38621    fi
38622  fi
38623
38624  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38625  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38626  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38627  # "foo.exe" is OK but "foo" is an error.
38628  #
38629  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38630  # It is also a way to make sure we got the proper file name for the real test later on.
38631  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38632  if test "x$test_shortpath" = x; then
38633    # Short path failed, file does not exist as specified.
38634    # Try adding .exe or .cmd
38635    if test -f "${new_path}.exe"; then
38636      input_to_shortpath="${new_path}.exe"
38637    elif test -f "${new_path}.cmd"; then
38638      input_to_shortpath="${new_path}.cmd"
38639    else
38640      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38641$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38642      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38643$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38644      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38645    fi
38646  else
38647    input_to_shortpath="$new_path"
38648  fi
38649
38650  # Call helper function which possibly converts this using DOS-style short mode.
38651  # If so, the updated path is stored in $new_path.
38652  new_path="$input_to_shortpath"
38653
38654  input_path="$input_to_shortpath"
38655  # Check if we need to convert this using DOS-style short mode. If the path
38656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38657  # take no chances and rewrite it.
38658  # Note: m4 eats our [], so we need to use [ and ] instead.
38659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38660  if test "x$has_forbidden_chars" != x; then
38661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38662    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38663    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38664    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38665      # Going to short mode and back again did indeed matter. Since short mode is
38666      # case insensitive, let's make it lowercase to improve readability.
38667      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38668      # Now convert it back to Unix-style (cygpath)
38669      input_path=`$CYGPATH -u "$shortmode_path"`
38670      new_path="$input_path"
38671    fi
38672  fi
38673
38674  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38675  if test "x$test_cygdrive_prefix" = x; then
38676    # As a simple fix, exclude /usr/bin since it's not a real path.
38677    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38678      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38679      # a path prefixed by /cygdrive for fixpath to work.
38680      new_path="$CYGWIN_ROOT_PATH$input_path"
38681    fi
38682  fi
38683
38684  # remove trailing .exe if any
38685  new_path="${new_path/%.exe/}"
38686
38687    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38688
38689  # First separate the path from the arguments. This will split at the first
38690  # space.
38691  complete="$MT"
38692  path="${complete%% *}"
38693  tmp="$complete EOL"
38694  arguments="${tmp#* }"
38695
38696  # Input might be given as Windows format, start by converting to
38697  # unix format.
38698  new_path="$path"
38699
38700  windows_path="$new_path"
38701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38702    unix_path=`$CYGPATH -u "$windows_path"`
38703    new_path="$unix_path"
38704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38706    new_path="$unix_path"
38707  fi
38708
38709
38710  # Now try to locate executable using which
38711  new_path=`$WHICH "$new_path" 2> /dev/null`
38712
38713  if test "x$new_path" = x; then
38714    # Oops. Which didn't find the executable.
38715    # The splitting of arguments from the executable at a space might have been incorrect,
38716    # since paths with space are more likely in Windows. Give it another try with the whole
38717    # argument.
38718    path="$complete"
38719    arguments="EOL"
38720    new_path="$path"
38721
38722  windows_path="$new_path"
38723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38724    unix_path=`$CYGPATH -u "$windows_path"`
38725    new_path="$unix_path"
38726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38728    new_path="$unix_path"
38729  fi
38730
38731
38732    new_path=`$WHICH "$new_path" 2> /dev/null`
38733    # bat and cmd files are not always considered executable in MSYS causing which
38734    # to not find them
38735    if test "x$new_path" = x \
38736        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38737        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38738      new_path="$path"
38739
38740  windows_path="$new_path"
38741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38742    unix_path=`$CYGPATH -u "$windows_path"`
38743    new_path="$unix_path"
38744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38746    new_path="$unix_path"
38747  fi
38748
38749    fi
38750
38751    if test "x$new_path" = x; then
38752      # It's still not found. Now this is an unrecoverable error.
38753      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38754$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38755      has_space=`$ECHO "$complete" | $GREP " "`
38756      if test "x$has_space" != x; then
38757        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38758$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38759      fi
38760      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38761    fi
38762  fi
38763
38764  # Now new_path has a complete unix path to the binary
38765  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38766    # Keep paths in /bin as-is, but remove trailing .exe if any
38767    new_path="${new_path/%.exe/}"
38768    # Do not save /bin paths to all_fixpath_prefixes!
38769  else
38770    # Not in mixed or Windows style, start by that.
38771    new_path=`cmd //c echo $new_path`
38772
38773  input_path="$new_path"
38774  # Check if we need to convert this using DOS-style short mode. If the path
38775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38776  # take no chances and rewrite it.
38777  # Note: m4 eats our [], so we need to use [ and ] instead.
38778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38779  if test "x$has_forbidden_chars" != x; then
38780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38781    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38782  fi
38783
38784    # Output is in $new_path
38785
38786  windows_path="$new_path"
38787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38788    unix_path=`$CYGPATH -u "$windows_path"`
38789    new_path="$unix_path"
38790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38792    new_path="$unix_path"
38793  fi
38794
38795    # remove trailing .exe if any
38796    new_path="${new_path/%.exe/}"
38797
38798    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38799    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38800  fi
38801
38802    else
38803      # We're on a unix platform. Hooray! :)
38804      # First separate the path from the arguments. This will split at the first
38805      # space.
38806      complete="$MT"
38807      path="${complete%% *}"
38808      tmp="$complete EOL"
38809      arguments="${tmp#* }"
38810
38811      # Cannot rely on the command "which" here since it doesn't always work.
38812      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38813      if test -z "$is_absolute_path"; then
38814        # Path to executable is not absolute. Find it.
38815        IFS_save="$IFS"
38816        IFS=:
38817        for p in $PATH; do
38818          if test -f "$p/$path" && test -x "$p/$path"; then
38819            new_path="$p/$path"
38820            break
38821          fi
38822        done
38823        IFS="$IFS_save"
38824      else
38825        # This is an absolute path, we can use it without further modifications.
38826        new_path="$path"
38827      fi
38828
38829      if test "x$new_path" = x; then
38830        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38831$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38832        has_space=`$ECHO "$complete" | $GREP " "`
38833        if test "x$has_space" != x; then
38834          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38835$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38836        fi
38837        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38838      fi
38839    fi
38840
38841    # Now join together the path and the arguments once again
38842    if test "x$arguments" != xEOL; then
38843      new_complete="$new_path ${arguments% *}"
38844    else
38845      new_complete="$new_path"
38846    fi
38847
38848    if test "x$complete" != "x$new_complete"; then
38849      MT="$new_complete"
38850      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38851$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38852    fi
38853  fi
38854
38855    # Setup the resource compiler (RC)
38856    # Extract the first word of "rc", so it can be a program name with args.
38857set dummy rc; ac_word=$2
38858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38859$as_echo_n "checking for $ac_word... " >&6; }
38860if ${ac_cv_prog_RC+:} false; then :
38861  $as_echo_n "(cached) " >&6
38862else
38863  if test -n "$RC"; then
38864  ac_cv_prog_RC="$RC" # Let the user override the test.
38865else
38866  ac_prog_rejected=no
38867as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38868for as_dir in $PATH
38869do
38870  IFS=$as_save_IFS
38871  test -z "$as_dir" && as_dir=.
38872    for ac_exec_ext in '' $ac_executable_extensions; do
38873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38874    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38875       ac_prog_rejected=yes
38876       continue
38877     fi
38878    ac_cv_prog_RC="rc"
38879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38880    break 2
38881  fi
38882done
38883  done
38884IFS=$as_save_IFS
38885
38886if test $ac_prog_rejected = yes; then
38887  # We found a bogon in the path, so make sure we never use it.
38888  set dummy $ac_cv_prog_RC
38889  shift
38890  if test $# != 0; then
38891    # We chose a different compiler from the bogus one.
38892    # However, it has the same basename, so the bogon will be chosen
38893    # first if we set RC to just the basename; use the full file name.
38894    shift
38895    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38896  fi
38897fi
38898fi
38899fi
38900RC=$ac_cv_prog_RC
38901if test -n "$RC"; then
38902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38903$as_echo "$RC" >&6; }
38904else
38905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38906$as_echo "no" >&6; }
38907fi
38908
38909
38910
38911  # Only process if variable expands to non-empty
38912
38913  if test "x$RC" != x; then
38914    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38915
38916  # First separate the path from the arguments. This will split at the first
38917  # space.
38918  complete="$RC"
38919  path="${complete%% *}"
38920  tmp="$complete EOL"
38921  arguments="${tmp#* }"
38922
38923  # Input might be given as Windows format, start by converting to
38924  # unix format.
38925  new_path=`$CYGPATH -u "$path"`
38926
38927  # Now try to locate executable using which
38928  new_path=`$WHICH "$new_path" 2> /dev/null`
38929  # bat and cmd files are not always considered executable in cygwin causing which
38930  # to not find them
38931  if test "x$new_path" = x \
38932      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38933      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38934    new_path=`$CYGPATH -u "$path"`
38935  fi
38936  if test "x$new_path" = x; then
38937    # Oops. Which didn't find the executable.
38938    # The splitting of arguments from the executable at a space might have been incorrect,
38939    # since paths with space are more likely in Windows. Give it another try with the whole
38940    # argument.
38941    path="$complete"
38942    arguments="EOL"
38943    new_path=`$CYGPATH -u "$path"`
38944    new_path=`$WHICH "$new_path" 2> /dev/null`
38945    # bat and cmd files are not always considered executable in cygwin causing which
38946    # to not find them
38947    if test "x$new_path" = x \
38948        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38949        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38950      new_path=`$CYGPATH -u "$path"`
38951    fi
38952    if test "x$new_path" = x; then
38953      # It's still not found. Now this is an unrecoverable error.
38954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38955$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38956      has_space=`$ECHO "$complete" | $GREP " "`
38957      if test "x$has_space" != x; then
38958        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38959$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38960      fi
38961      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38962    fi
38963  fi
38964
38965  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38966  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38967  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38968  # "foo.exe" is OK but "foo" is an error.
38969  #
38970  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38971  # It is also a way to make sure we got the proper file name for the real test later on.
38972  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38973  if test "x$test_shortpath" = x; then
38974    # Short path failed, file does not exist as specified.
38975    # Try adding .exe or .cmd
38976    if test -f "${new_path}.exe"; then
38977      input_to_shortpath="${new_path}.exe"
38978    elif test -f "${new_path}.cmd"; then
38979      input_to_shortpath="${new_path}.cmd"
38980    else
38981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38982$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38983      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38984$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38985      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38986    fi
38987  else
38988    input_to_shortpath="$new_path"
38989  fi
38990
38991  # Call helper function which possibly converts this using DOS-style short mode.
38992  # If so, the updated path is stored in $new_path.
38993  new_path="$input_to_shortpath"
38994
38995  input_path="$input_to_shortpath"
38996  # Check if we need to convert this using DOS-style short mode. If the path
38997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38998  # take no chances and rewrite it.
38999  # Note: m4 eats our [], so we need to use [ and ] instead.
39000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39001  if test "x$has_forbidden_chars" != x; then
39002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39003    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39004    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39005    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39006      # Going to short mode and back again did indeed matter. Since short mode is
39007      # case insensitive, let's make it lowercase to improve readability.
39008      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39009      # Now convert it back to Unix-style (cygpath)
39010      input_path=`$CYGPATH -u "$shortmode_path"`
39011      new_path="$input_path"
39012    fi
39013  fi
39014
39015  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39016  if test "x$test_cygdrive_prefix" = x; then
39017    # As a simple fix, exclude /usr/bin since it's not a real path.
39018    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39019      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39020      # a path prefixed by /cygdrive for fixpath to work.
39021      new_path="$CYGWIN_ROOT_PATH$input_path"
39022    fi
39023  fi
39024
39025  # remove trailing .exe if any
39026  new_path="${new_path/%.exe/}"
39027
39028    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39029
39030  # First separate the path from the arguments. This will split at the first
39031  # space.
39032  complete="$RC"
39033  path="${complete%% *}"
39034  tmp="$complete EOL"
39035  arguments="${tmp#* }"
39036
39037  # Input might be given as Windows format, start by converting to
39038  # unix format.
39039  new_path="$path"
39040
39041  windows_path="$new_path"
39042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39043    unix_path=`$CYGPATH -u "$windows_path"`
39044    new_path="$unix_path"
39045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39047    new_path="$unix_path"
39048  fi
39049
39050
39051  # Now try to locate executable using which
39052  new_path=`$WHICH "$new_path" 2> /dev/null`
39053
39054  if test "x$new_path" = x; then
39055    # Oops. Which didn't find the executable.
39056    # The splitting of arguments from the executable at a space might have been incorrect,
39057    # since paths with space are more likely in Windows. Give it another try with the whole
39058    # argument.
39059    path="$complete"
39060    arguments="EOL"
39061    new_path="$path"
39062
39063  windows_path="$new_path"
39064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39065    unix_path=`$CYGPATH -u "$windows_path"`
39066    new_path="$unix_path"
39067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39069    new_path="$unix_path"
39070  fi
39071
39072
39073    new_path=`$WHICH "$new_path" 2> /dev/null`
39074    # bat and cmd files are not always considered executable in MSYS causing which
39075    # to not find them
39076    if test "x$new_path" = x \
39077        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39078        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39079      new_path="$path"
39080
39081  windows_path="$new_path"
39082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39083    unix_path=`$CYGPATH -u "$windows_path"`
39084    new_path="$unix_path"
39085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39087    new_path="$unix_path"
39088  fi
39089
39090    fi
39091
39092    if test "x$new_path" = x; then
39093      # It's still not found. Now this is an unrecoverable error.
39094      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39095$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39096      has_space=`$ECHO "$complete" | $GREP " "`
39097      if test "x$has_space" != x; then
39098        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39099$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39100      fi
39101      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39102    fi
39103  fi
39104
39105  # Now new_path has a complete unix path to the binary
39106  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39107    # Keep paths in /bin as-is, but remove trailing .exe if any
39108    new_path="${new_path/%.exe/}"
39109    # Do not save /bin paths to all_fixpath_prefixes!
39110  else
39111    # Not in mixed or Windows style, start by that.
39112    new_path=`cmd //c echo $new_path`
39113
39114  input_path="$new_path"
39115  # Check if we need to convert this using DOS-style short mode. If the path
39116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39117  # take no chances and rewrite it.
39118  # Note: m4 eats our [], so we need to use [ and ] instead.
39119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39120  if test "x$has_forbidden_chars" != x; then
39121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39122    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39123  fi
39124
39125    # Output is in $new_path
39126
39127  windows_path="$new_path"
39128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39129    unix_path=`$CYGPATH -u "$windows_path"`
39130    new_path="$unix_path"
39131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39133    new_path="$unix_path"
39134  fi
39135
39136    # remove trailing .exe if any
39137    new_path="${new_path/%.exe/}"
39138
39139    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39140    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39141  fi
39142
39143    else
39144      # We're on a unix platform. Hooray! :)
39145      # First separate the path from the arguments. This will split at the first
39146      # space.
39147      complete="$RC"
39148      path="${complete%% *}"
39149      tmp="$complete EOL"
39150      arguments="${tmp#* }"
39151
39152      # Cannot rely on the command "which" here since it doesn't always work.
39153      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39154      if test -z "$is_absolute_path"; then
39155        # Path to executable is not absolute. Find it.
39156        IFS_save="$IFS"
39157        IFS=:
39158        for p in $PATH; do
39159          if test -f "$p/$path" && test -x "$p/$path"; then
39160            new_path="$p/$path"
39161            break
39162          fi
39163        done
39164        IFS="$IFS_save"
39165      else
39166        # This is an absolute path, we can use it without further modifications.
39167        new_path="$path"
39168      fi
39169
39170      if test "x$new_path" = x; then
39171        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39172$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39173        has_space=`$ECHO "$complete" | $GREP " "`
39174        if test "x$has_space" != x; then
39175          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39176$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39177        fi
39178        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39179      fi
39180    fi
39181
39182    # Now join together the path and the arguments once again
39183    if test "x$arguments" != xEOL; then
39184      new_complete="$new_path ${arguments% *}"
39185    else
39186      new_complete="$new_path"
39187    fi
39188
39189    if test "x$complete" != "x$new_complete"; then
39190      RC="$new_complete"
39191      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39192$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39193    fi
39194  fi
39195
39196    # Extract the first word of "dumpbin", so it can be a program name with args.
39197set dummy dumpbin; ac_word=$2
39198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39199$as_echo_n "checking for $ac_word... " >&6; }
39200if ${ac_cv_prog_DUMPBIN+:} false; then :
39201  $as_echo_n "(cached) " >&6
39202else
39203  if test -n "$DUMPBIN"; then
39204  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39205else
39206as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39207for as_dir in $PATH
39208do
39209  IFS=$as_save_IFS
39210  test -z "$as_dir" && as_dir=.
39211    for ac_exec_ext in '' $ac_executable_extensions; do
39212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39213    ac_cv_prog_DUMPBIN="dumpbin"
39214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39215    break 2
39216  fi
39217done
39218  done
39219IFS=$as_save_IFS
39220
39221fi
39222fi
39223DUMPBIN=$ac_cv_prog_DUMPBIN
39224if test -n "$DUMPBIN"; then
39225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39226$as_echo "$DUMPBIN" >&6; }
39227else
39228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39229$as_echo "no" >&6; }
39230fi
39231
39232
39233
39234  # Only process if variable expands to non-empty
39235
39236  if test "x$DUMPBIN" != x; then
39237    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39238
39239  # First separate the path from the arguments. This will split at the first
39240  # space.
39241  complete="$DUMPBIN"
39242  path="${complete%% *}"
39243  tmp="$complete EOL"
39244  arguments="${tmp#* }"
39245
39246  # Input might be given as Windows format, start by converting to
39247  # unix format.
39248  new_path=`$CYGPATH -u "$path"`
39249
39250  # Now try to locate executable using which
39251  new_path=`$WHICH "$new_path" 2> /dev/null`
39252  # bat and cmd files are not always considered executable in cygwin causing which
39253  # to not find them
39254  if test "x$new_path" = x \
39255      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39256      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39257    new_path=`$CYGPATH -u "$path"`
39258  fi
39259  if test "x$new_path" = x; then
39260    # Oops. Which didn't find the executable.
39261    # The splitting of arguments from the executable at a space might have been incorrect,
39262    # since paths with space are more likely in Windows. Give it another try with the whole
39263    # argument.
39264    path="$complete"
39265    arguments="EOL"
39266    new_path=`$CYGPATH -u "$path"`
39267    new_path=`$WHICH "$new_path" 2> /dev/null`
39268    # bat and cmd files are not always considered executable in cygwin causing which
39269    # to not find them
39270    if test "x$new_path" = x \
39271        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39272        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39273      new_path=`$CYGPATH -u "$path"`
39274    fi
39275    if test "x$new_path" = x; then
39276      # It's still not found. Now this is an unrecoverable error.
39277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39278$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39279      has_space=`$ECHO "$complete" | $GREP " "`
39280      if test "x$has_space" != x; then
39281        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39282$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39283      fi
39284      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39285    fi
39286  fi
39287
39288  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39289  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39290  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39291  # "foo.exe" is OK but "foo" is an error.
39292  #
39293  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39294  # It is also a way to make sure we got the proper file name for the real test later on.
39295  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39296  if test "x$test_shortpath" = x; then
39297    # Short path failed, file does not exist as specified.
39298    # Try adding .exe or .cmd
39299    if test -f "${new_path}.exe"; then
39300      input_to_shortpath="${new_path}.exe"
39301    elif test -f "${new_path}.cmd"; then
39302      input_to_shortpath="${new_path}.cmd"
39303    else
39304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39305$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39306      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39307$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39308      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39309    fi
39310  else
39311    input_to_shortpath="$new_path"
39312  fi
39313
39314  # Call helper function which possibly converts this using DOS-style short mode.
39315  # If so, the updated path is stored in $new_path.
39316  new_path="$input_to_shortpath"
39317
39318  input_path="$input_to_shortpath"
39319  # Check if we need to convert this using DOS-style short mode. If the path
39320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39321  # take no chances and rewrite it.
39322  # Note: m4 eats our [], so we need to use [ and ] instead.
39323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39324  if test "x$has_forbidden_chars" != x; then
39325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39326    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39327    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39328    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39329      # Going to short mode and back again did indeed matter. Since short mode is
39330      # case insensitive, let's make it lowercase to improve readability.
39331      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39332      # Now convert it back to Unix-style (cygpath)
39333      input_path=`$CYGPATH -u "$shortmode_path"`
39334      new_path="$input_path"
39335    fi
39336  fi
39337
39338  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39339  if test "x$test_cygdrive_prefix" = x; then
39340    # As a simple fix, exclude /usr/bin since it's not a real path.
39341    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39342      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39343      # a path prefixed by /cygdrive for fixpath to work.
39344      new_path="$CYGWIN_ROOT_PATH$input_path"
39345    fi
39346  fi
39347
39348  # remove trailing .exe if any
39349  new_path="${new_path/%.exe/}"
39350
39351    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39352
39353  # First separate the path from the arguments. This will split at the first
39354  # space.
39355  complete="$DUMPBIN"
39356  path="${complete%% *}"
39357  tmp="$complete EOL"
39358  arguments="${tmp#* }"
39359
39360  # Input might be given as Windows format, start by converting to
39361  # unix format.
39362  new_path="$path"
39363
39364  windows_path="$new_path"
39365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39366    unix_path=`$CYGPATH -u "$windows_path"`
39367    new_path="$unix_path"
39368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39370    new_path="$unix_path"
39371  fi
39372
39373
39374  # Now try to locate executable using which
39375  new_path=`$WHICH "$new_path" 2> /dev/null`
39376
39377  if test "x$new_path" = x; then
39378    # Oops. Which didn't find the executable.
39379    # The splitting of arguments from the executable at a space might have been incorrect,
39380    # since paths with space are more likely in Windows. Give it another try with the whole
39381    # argument.
39382    path="$complete"
39383    arguments="EOL"
39384    new_path="$path"
39385
39386  windows_path="$new_path"
39387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39388    unix_path=`$CYGPATH -u "$windows_path"`
39389    new_path="$unix_path"
39390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39392    new_path="$unix_path"
39393  fi
39394
39395
39396    new_path=`$WHICH "$new_path" 2> /dev/null`
39397    # bat and cmd files are not always considered executable in MSYS causing which
39398    # to not find them
39399    if test "x$new_path" = x \
39400        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39401        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39402      new_path="$path"
39403
39404  windows_path="$new_path"
39405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39406    unix_path=`$CYGPATH -u "$windows_path"`
39407    new_path="$unix_path"
39408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39410    new_path="$unix_path"
39411  fi
39412
39413    fi
39414
39415    if test "x$new_path" = x; then
39416      # It's still not found. Now this is an unrecoverable error.
39417      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39418$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39419      has_space=`$ECHO "$complete" | $GREP " "`
39420      if test "x$has_space" != x; then
39421        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39422$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39423      fi
39424      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39425    fi
39426  fi
39427
39428  # Now new_path has a complete unix path to the binary
39429  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39430    # Keep paths in /bin as-is, but remove trailing .exe if any
39431    new_path="${new_path/%.exe/}"
39432    # Do not save /bin paths to all_fixpath_prefixes!
39433  else
39434    # Not in mixed or Windows style, start by that.
39435    new_path=`cmd //c echo $new_path`
39436
39437  input_path="$new_path"
39438  # Check if we need to convert this using DOS-style short mode. If the path
39439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39440  # take no chances and rewrite it.
39441  # Note: m4 eats our [], so we need to use [ and ] instead.
39442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39443  if test "x$has_forbidden_chars" != x; then
39444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39445    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39446  fi
39447
39448    # Output is in $new_path
39449
39450  windows_path="$new_path"
39451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39452    unix_path=`$CYGPATH -u "$windows_path"`
39453    new_path="$unix_path"
39454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39456    new_path="$unix_path"
39457  fi
39458
39459    # remove trailing .exe if any
39460    new_path="${new_path/%.exe/}"
39461
39462    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39463    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39464  fi
39465
39466    else
39467      # We're on a unix platform. Hooray! :)
39468      # First separate the path from the arguments. This will split at the first
39469      # space.
39470      complete="$DUMPBIN"
39471      path="${complete%% *}"
39472      tmp="$complete EOL"
39473      arguments="${tmp#* }"
39474
39475      # Cannot rely on the command "which" here since it doesn't always work.
39476      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39477      if test -z "$is_absolute_path"; then
39478        # Path to executable is not absolute. Find it.
39479        IFS_save="$IFS"
39480        IFS=:
39481        for p in $PATH; do
39482          if test -f "$p/$path" && test -x "$p/$path"; then
39483            new_path="$p/$path"
39484            break
39485          fi
39486        done
39487        IFS="$IFS_save"
39488      else
39489        # This is an absolute path, we can use it without further modifications.
39490        new_path="$path"
39491      fi
39492
39493      if test "x$new_path" = x; then
39494        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39495$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39496        has_space=`$ECHO "$complete" | $GREP " "`
39497        if test "x$has_space" != x; then
39498          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39499$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39500        fi
39501        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39502      fi
39503    fi
39504
39505    # Now join together the path and the arguments once again
39506    if test "x$arguments" != xEOL; then
39507      new_complete="$new_path ${arguments% *}"
39508    else
39509      new_complete="$new_path"
39510    fi
39511
39512    if test "x$complete" != "x$new_complete"; then
39513      DUMPBIN="$new_complete"
39514      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39515$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39516    fi
39517  fi
39518
39519    # We need to check for 'msbuild.exe' because at the place where we expect to
39520    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39521    # won't find the 'msbuild.exe' executable in that case (and the
39522    # 'ac_executable_extensions' is unusable due to performance reasons).
39523    # Notice that we intentionally don't fix up the path to MSBUILD because we
39524    # will call it in a DOS shell during freetype detection on Windows (see
39525    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39526    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39527set dummy msbuild.exe; ac_word=$2
39528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39529$as_echo_n "checking for $ac_word... " >&6; }
39530if ${ac_cv_prog_MSBUILD+:} false; then :
39531  $as_echo_n "(cached) " >&6
39532else
39533  if test -n "$MSBUILD"; then
39534  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39535else
39536as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39537for as_dir in $PATH
39538do
39539  IFS=$as_save_IFS
39540  test -z "$as_dir" && as_dir=.
39541    for ac_exec_ext in '' $ac_executable_extensions; do
39542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39543    ac_cv_prog_MSBUILD="msbuild.exe"
39544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39545    break 2
39546  fi
39547done
39548  done
39549IFS=$as_save_IFS
39550
39551fi
39552fi
39553MSBUILD=$ac_cv_prog_MSBUILD
39554if test -n "$MSBUILD"; then
39555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39556$as_echo "$MSBUILD" >&6; }
39557else
39558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39559$as_echo "no" >&6; }
39560fi
39561
39562
39563  fi
39564
39565  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39566
39567
39568  # Publish this variable in the help.
39569
39570
39571  if [ -z "${STRIP+x}" ]; then
39572    # The variable is not set by user, try to locate tool using the code snippet
39573    for ac_prog in strip
39574do
39575  # Extract the first word of "$ac_prog", so it can be a program name with args.
39576set dummy $ac_prog; ac_word=$2
39577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39578$as_echo_n "checking for $ac_word... " >&6; }
39579if ${ac_cv_path_STRIP+:} false; then :
39580  $as_echo_n "(cached) " >&6
39581else
39582  case $STRIP in
39583  [\\/]* | ?:[\\/]*)
39584  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39585  ;;
39586  *)
39587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39588for as_dir in $PATH
39589do
39590  IFS=$as_save_IFS
39591  test -z "$as_dir" && as_dir=.
39592    for ac_exec_ext in '' $ac_executable_extensions; do
39593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39594    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39596    break 2
39597  fi
39598done
39599  done
39600IFS=$as_save_IFS
39601
39602  ;;
39603esac
39604fi
39605STRIP=$ac_cv_path_STRIP
39606if test -n "$STRIP"; then
39607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39608$as_echo "$STRIP" >&6; }
39609else
39610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39611$as_echo "no" >&6; }
39612fi
39613
39614
39615  test -n "$STRIP" && break
39616done
39617
39618  else
39619    # The variable is set, but is it from the command line or the environment?
39620
39621    # Try to remove the string !STRIP! from our list.
39622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39624      # If it failed, the variable was not from the command line. Ignore it,
39625      # but warn the user (except for BASH, which is always set by the calling BASH).
39626      if test "xSTRIP" != xBASH; then
39627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39628$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39629      fi
39630      # Try to locate tool using the code snippet
39631      for ac_prog in strip
39632do
39633  # Extract the first word of "$ac_prog", so it can be a program name with args.
39634set dummy $ac_prog; ac_word=$2
39635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39636$as_echo_n "checking for $ac_word... " >&6; }
39637if ${ac_cv_path_STRIP+:} false; then :
39638  $as_echo_n "(cached) " >&6
39639else
39640  case $STRIP in
39641  [\\/]* | ?:[\\/]*)
39642  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39643  ;;
39644  *)
39645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39646for as_dir in $PATH
39647do
39648  IFS=$as_save_IFS
39649  test -z "$as_dir" && as_dir=.
39650    for ac_exec_ext in '' $ac_executable_extensions; do
39651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39652    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39654    break 2
39655  fi
39656done
39657  done
39658IFS=$as_save_IFS
39659
39660  ;;
39661esac
39662fi
39663STRIP=$ac_cv_path_STRIP
39664if test -n "$STRIP"; then
39665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39666$as_echo "$STRIP" >&6; }
39667else
39668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39669$as_echo "no" >&6; }
39670fi
39671
39672
39673  test -n "$STRIP" && break
39674done
39675
39676    else
39677      # If it succeeded, then it was overridden by the user. We will use it
39678      # for the tool.
39679
39680      # First remove it from the list of overridden variables, so we can test
39681      # for unknown variables in the end.
39682      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39683
39684      # Check if we try to supply an empty value
39685      if test "x$STRIP" = x; then
39686        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39687$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39688        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39689$as_echo_n "checking for STRIP... " >&6; }
39690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39691$as_echo "disabled" >&6; }
39692      else
39693        # Check if the provided tool contains a complete path.
39694        tool_specified="$STRIP"
39695        tool_basename="${tool_specified##*/}"
39696        if test "x$tool_basename" = "x$tool_specified"; then
39697          # A command without a complete path is provided, search $PATH.
39698          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39699$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39700          # Extract the first word of "$tool_basename", so it can be a program name with args.
39701set dummy $tool_basename; ac_word=$2
39702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39703$as_echo_n "checking for $ac_word... " >&6; }
39704if ${ac_cv_path_STRIP+:} false; then :
39705  $as_echo_n "(cached) " >&6
39706else
39707  case $STRIP in
39708  [\\/]* | ?:[\\/]*)
39709  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39710  ;;
39711  *)
39712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39713for as_dir in $PATH
39714do
39715  IFS=$as_save_IFS
39716  test -z "$as_dir" && as_dir=.
39717    for ac_exec_ext in '' $ac_executable_extensions; do
39718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39719    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39721    break 2
39722  fi
39723done
39724  done
39725IFS=$as_save_IFS
39726
39727  ;;
39728esac
39729fi
39730STRIP=$ac_cv_path_STRIP
39731if test -n "$STRIP"; then
39732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39733$as_echo "$STRIP" >&6; }
39734else
39735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39736$as_echo "no" >&6; }
39737fi
39738
39739
39740          if test "x$STRIP" = x; then
39741            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39742          fi
39743        else
39744          # Otherwise we believe it is a complete path. Use it as it is.
39745          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39746$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39747          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39748$as_echo_n "checking for STRIP... " >&6; }
39749          if test ! -x "$tool_specified"; then
39750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39751$as_echo "not found" >&6; }
39752            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39753          fi
39754          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39755$as_echo "$tool_specified" >&6; }
39756        fi
39757      fi
39758    fi
39759
39760  fi
39761
39762
39763
39764  # Only process if variable expands to non-empty
39765
39766  if test "x$STRIP" != x; then
39767    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39768
39769  # First separate the path from the arguments. This will split at the first
39770  # space.
39771  complete="$STRIP"
39772  path="${complete%% *}"
39773  tmp="$complete EOL"
39774  arguments="${tmp#* }"
39775
39776  # Input might be given as Windows format, start by converting to
39777  # unix format.
39778  new_path=`$CYGPATH -u "$path"`
39779
39780  # Now try to locate executable using which
39781  new_path=`$WHICH "$new_path" 2> /dev/null`
39782  # bat and cmd files are not always considered executable in cygwin causing which
39783  # to not find them
39784  if test "x$new_path" = x \
39785      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39786      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39787    new_path=`$CYGPATH -u "$path"`
39788  fi
39789  if test "x$new_path" = x; then
39790    # Oops. Which didn't find the executable.
39791    # The splitting of arguments from the executable at a space might have been incorrect,
39792    # since paths with space are more likely in Windows. Give it another try with the whole
39793    # argument.
39794    path="$complete"
39795    arguments="EOL"
39796    new_path=`$CYGPATH -u "$path"`
39797    new_path=`$WHICH "$new_path" 2> /dev/null`
39798    # bat and cmd files are not always considered executable in cygwin causing which
39799    # to not find them
39800    if test "x$new_path" = x \
39801        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39802        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39803      new_path=`$CYGPATH -u "$path"`
39804    fi
39805    if test "x$new_path" = x; then
39806      # It's still not found. Now this is an unrecoverable error.
39807      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39808$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39809      has_space=`$ECHO "$complete" | $GREP " "`
39810      if test "x$has_space" != x; then
39811        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39812$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39813      fi
39814      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39815    fi
39816  fi
39817
39818  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39819  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39820  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39821  # "foo.exe" is OK but "foo" is an error.
39822  #
39823  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39824  # It is also a way to make sure we got the proper file name for the real test later on.
39825  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39826  if test "x$test_shortpath" = x; then
39827    # Short path failed, file does not exist as specified.
39828    # Try adding .exe or .cmd
39829    if test -f "${new_path}.exe"; then
39830      input_to_shortpath="${new_path}.exe"
39831    elif test -f "${new_path}.cmd"; then
39832      input_to_shortpath="${new_path}.cmd"
39833    else
39834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39835$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39836      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39837$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39838      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39839    fi
39840  else
39841    input_to_shortpath="$new_path"
39842  fi
39843
39844  # Call helper function which possibly converts this using DOS-style short mode.
39845  # If so, the updated path is stored in $new_path.
39846  new_path="$input_to_shortpath"
39847
39848  input_path="$input_to_shortpath"
39849  # Check if we need to convert this using DOS-style short mode. If the path
39850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39851  # take no chances and rewrite it.
39852  # Note: m4 eats our [], so we need to use [ and ] instead.
39853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39854  if test "x$has_forbidden_chars" != x; then
39855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39856    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39857    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39858    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39859      # Going to short mode and back again did indeed matter. Since short mode is
39860      # case insensitive, let's make it lowercase to improve readability.
39861      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39862      # Now convert it back to Unix-style (cygpath)
39863      input_path=`$CYGPATH -u "$shortmode_path"`
39864      new_path="$input_path"
39865    fi
39866  fi
39867
39868  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39869  if test "x$test_cygdrive_prefix" = x; then
39870    # As a simple fix, exclude /usr/bin since it's not a real path.
39871    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39872      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39873      # a path prefixed by /cygdrive for fixpath to work.
39874      new_path="$CYGWIN_ROOT_PATH$input_path"
39875    fi
39876  fi
39877
39878  # remove trailing .exe if any
39879  new_path="${new_path/%.exe/}"
39880
39881    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39882
39883  # First separate the path from the arguments. This will split at the first
39884  # space.
39885  complete="$STRIP"
39886  path="${complete%% *}"
39887  tmp="$complete EOL"
39888  arguments="${tmp#* }"
39889
39890  # Input might be given as Windows format, start by converting to
39891  # unix format.
39892  new_path="$path"
39893
39894  windows_path="$new_path"
39895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39896    unix_path=`$CYGPATH -u "$windows_path"`
39897    new_path="$unix_path"
39898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39900    new_path="$unix_path"
39901  fi
39902
39903
39904  # Now try to locate executable using which
39905  new_path=`$WHICH "$new_path" 2> /dev/null`
39906
39907  if test "x$new_path" = x; then
39908    # Oops. Which didn't find the executable.
39909    # The splitting of arguments from the executable at a space might have been incorrect,
39910    # since paths with space are more likely in Windows. Give it another try with the whole
39911    # argument.
39912    path="$complete"
39913    arguments="EOL"
39914    new_path="$path"
39915
39916  windows_path="$new_path"
39917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39918    unix_path=`$CYGPATH -u "$windows_path"`
39919    new_path="$unix_path"
39920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39922    new_path="$unix_path"
39923  fi
39924
39925
39926    new_path=`$WHICH "$new_path" 2> /dev/null`
39927    # bat and cmd files are not always considered executable in MSYS causing which
39928    # to not find them
39929    if test "x$new_path" = x \
39930        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39931        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39932      new_path="$path"
39933
39934  windows_path="$new_path"
39935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39936    unix_path=`$CYGPATH -u "$windows_path"`
39937    new_path="$unix_path"
39938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39940    new_path="$unix_path"
39941  fi
39942
39943    fi
39944
39945    if test "x$new_path" = x; then
39946      # It's still not found. Now this is an unrecoverable error.
39947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39948$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39949      has_space=`$ECHO "$complete" | $GREP " "`
39950      if test "x$has_space" != x; then
39951        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39952$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39953      fi
39954      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39955    fi
39956  fi
39957
39958  # Now new_path has a complete unix path to the binary
39959  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39960    # Keep paths in /bin as-is, but remove trailing .exe if any
39961    new_path="${new_path/%.exe/}"
39962    # Do not save /bin paths to all_fixpath_prefixes!
39963  else
39964    # Not in mixed or Windows style, start by that.
39965    new_path=`cmd //c echo $new_path`
39966
39967  input_path="$new_path"
39968  # Check if we need to convert this using DOS-style short mode. If the path
39969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39970  # take no chances and rewrite it.
39971  # Note: m4 eats our [], so we need to use [ and ] instead.
39972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39973  if test "x$has_forbidden_chars" != x; then
39974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39975    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39976  fi
39977
39978    # Output is in $new_path
39979
39980  windows_path="$new_path"
39981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39982    unix_path=`$CYGPATH -u "$windows_path"`
39983    new_path="$unix_path"
39984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39986    new_path="$unix_path"
39987  fi
39988
39989    # remove trailing .exe if any
39990    new_path="${new_path/%.exe/}"
39991
39992    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39993    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39994  fi
39995
39996    else
39997      # We're on a unix platform. Hooray! :)
39998      # First separate the path from the arguments. This will split at the first
39999      # space.
40000      complete="$STRIP"
40001      path="${complete%% *}"
40002      tmp="$complete EOL"
40003      arguments="${tmp#* }"
40004
40005      # Cannot rely on the command "which" here since it doesn't always work.
40006      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40007      if test -z "$is_absolute_path"; then
40008        # Path to executable is not absolute. Find it.
40009        IFS_save="$IFS"
40010        IFS=:
40011        for p in $PATH; do
40012          if test -f "$p/$path" && test -x "$p/$path"; then
40013            new_path="$p/$path"
40014            break
40015          fi
40016        done
40017        IFS="$IFS_save"
40018      else
40019        # This is an absolute path, we can use it without further modifications.
40020        new_path="$path"
40021      fi
40022
40023      if test "x$new_path" = x; then
40024        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40025$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40026        has_space=`$ECHO "$complete" | $GREP " "`
40027        if test "x$has_space" != x; then
40028          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40029$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40030        fi
40031        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40032      fi
40033    fi
40034
40035    # Now join together the path and the arguments once again
40036    if test "x$arguments" != xEOL; then
40037      new_complete="$new_path ${arguments% *}"
40038    else
40039      new_complete="$new_path"
40040    fi
40041
40042    if test "x$complete" != "x$new_complete"; then
40043      STRIP="$new_complete"
40044      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40045$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40046    fi
40047  fi
40048
40049
40050
40051  # Publish this variable in the help.
40052
40053
40054  if [ -z "${NM+x}" ]; then
40055    # The variable is not set by user, try to locate tool using the code snippet
40056    for ac_prog in nm
40057do
40058  # Extract the first word of "$ac_prog", so it can be a program name with args.
40059set dummy $ac_prog; ac_word=$2
40060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40061$as_echo_n "checking for $ac_word... " >&6; }
40062if ${ac_cv_path_NM+:} false; then :
40063  $as_echo_n "(cached) " >&6
40064else
40065  case $NM in
40066  [\\/]* | ?:[\\/]*)
40067  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40068  ;;
40069  *)
40070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40071for as_dir in $PATH
40072do
40073  IFS=$as_save_IFS
40074  test -z "$as_dir" && as_dir=.
40075    for ac_exec_ext in '' $ac_executable_extensions; do
40076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40077    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40079    break 2
40080  fi
40081done
40082  done
40083IFS=$as_save_IFS
40084
40085  ;;
40086esac
40087fi
40088NM=$ac_cv_path_NM
40089if test -n "$NM"; then
40090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40091$as_echo "$NM" >&6; }
40092else
40093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40094$as_echo "no" >&6; }
40095fi
40096
40097
40098  test -n "$NM" && break
40099done
40100
40101  else
40102    # The variable is set, but is it from the command line or the environment?
40103
40104    # Try to remove the string !NM! from our list.
40105    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40106    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40107      # If it failed, the variable was not from the command line. Ignore it,
40108      # but warn the user (except for BASH, which is always set by the calling BASH).
40109      if test "xNM" != xBASH; then
40110        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40111$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40112      fi
40113      # Try to locate tool using the code snippet
40114      for ac_prog in nm
40115do
40116  # Extract the first word of "$ac_prog", so it can be a program name with args.
40117set dummy $ac_prog; ac_word=$2
40118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40119$as_echo_n "checking for $ac_word... " >&6; }
40120if ${ac_cv_path_NM+:} false; then :
40121  $as_echo_n "(cached) " >&6
40122else
40123  case $NM in
40124  [\\/]* | ?:[\\/]*)
40125  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40126  ;;
40127  *)
40128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40129for as_dir in $PATH
40130do
40131  IFS=$as_save_IFS
40132  test -z "$as_dir" && as_dir=.
40133    for ac_exec_ext in '' $ac_executable_extensions; do
40134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40135    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40137    break 2
40138  fi
40139done
40140  done
40141IFS=$as_save_IFS
40142
40143  ;;
40144esac
40145fi
40146NM=$ac_cv_path_NM
40147if test -n "$NM"; then
40148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40149$as_echo "$NM" >&6; }
40150else
40151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40152$as_echo "no" >&6; }
40153fi
40154
40155
40156  test -n "$NM" && break
40157done
40158
40159    else
40160      # If it succeeded, then it was overridden by the user. We will use it
40161      # for the tool.
40162
40163      # First remove it from the list of overridden variables, so we can test
40164      # for unknown variables in the end.
40165      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40166
40167      # Check if we try to supply an empty value
40168      if test "x$NM" = x; then
40169        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40170$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40171        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40172$as_echo_n "checking for NM... " >&6; }
40173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40174$as_echo "disabled" >&6; }
40175      else
40176        # Check if the provided tool contains a complete path.
40177        tool_specified="$NM"
40178        tool_basename="${tool_specified##*/}"
40179        if test "x$tool_basename" = "x$tool_specified"; then
40180          # A command without a complete path is provided, search $PATH.
40181          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40182$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40183          # Extract the first word of "$tool_basename", so it can be a program name with args.
40184set dummy $tool_basename; ac_word=$2
40185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40186$as_echo_n "checking for $ac_word... " >&6; }
40187if ${ac_cv_path_NM+:} false; then :
40188  $as_echo_n "(cached) " >&6
40189else
40190  case $NM in
40191  [\\/]* | ?:[\\/]*)
40192  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40193  ;;
40194  *)
40195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40196for as_dir in $PATH
40197do
40198  IFS=$as_save_IFS
40199  test -z "$as_dir" && as_dir=.
40200    for ac_exec_ext in '' $ac_executable_extensions; do
40201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40202    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40204    break 2
40205  fi
40206done
40207  done
40208IFS=$as_save_IFS
40209
40210  ;;
40211esac
40212fi
40213NM=$ac_cv_path_NM
40214if test -n "$NM"; then
40215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40216$as_echo "$NM" >&6; }
40217else
40218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40219$as_echo "no" >&6; }
40220fi
40221
40222
40223          if test "x$NM" = x; then
40224            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40225          fi
40226        else
40227          # Otherwise we believe it is a complete path. Use it as it is.
40228          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40229$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40230          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40231$as_echo_n "checking for NM... " >&6; }
40232          if test ! -x "$tool_specified"; then
40233            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40234$as_echo "not found" >&6; }
40235            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40236          fi
40237          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40238$as_echo "$tool_specified" >&6; }
40239        fi
40240      fi
40241    fi
40242
40243  fi
40244
40245
40246
40247  # Only process if variable expands to non-empty
40248
40249  if test "x$NM" != x; then
40250    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40251
40252  # First separate the path from the arguments. This will split at the first
40253  # space.
40254  complete="$NM"
40255  path="${complete%% *}"
40256  tmp="$complete EOL"
40257  arguments="${tmp#* }"
40258
40259  # Input might be given as Windows format, start by converting to
40260  # unix format.
40261  new_path=`$CYGPATH -u "$path"`
40262
40263  # Now try to locate executable using which
40264  new_path=`$WHICH "$new_path" 2> /dev/null`
40265  # bat and cmd files are not always considered executable in cygwin causing which
40266  # to not find them
40267  if test "x$new_path" = x \
40268      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40269      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40270    new_path=`$CYGPATH -u "$path"`
40271  fi
40272  if test "x$new_path" = x; then
40273    # Oops. Which didn't find the executable.
40274    # The splitting of arguments from the executable at a space might have been incorrect,
40275    # since paths with space are more likely in Windows. Give it another try with the whole
40276    # argument.
40277    path="$complete"
40278    arguments="EOL"
40279    new_path=`$CYGPATH -u "$path"`
40280    new_path=`$WHICH "$new_path" 2> /dev/null`
40281    # bat and cmd files are not always considered executable in cygwin causing which
40282    # to not find them
40283    if test "x$new_path" = x \
40284        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40285        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40286      new_path=`$CYGPATH -u "$path"`
40287    fi
40288    if test "x$new_path" = x; then
40289      # It's still not found. Now this is an unrecoverable error.
40290      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40291$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40292      has_space=`$ECHO "$complete" | $GREP " "`
40293      if test "x$has_space" != x; then
40294        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40295$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40296      fi
40297      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40298    fi
40299  fi
40300
40301  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40302  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40303  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40304  # "foo.exe" is OK but "foo" is an error.
40305  #
40306  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40307  # It is also a way to make sure we got the proper file name for the real test later on.
40308  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40309  if test "x$test_shortpath" = x; then
40310    # Short path failed, file does not exist as specified.
40311    # Try adding .exe or .cmd
40312    if test -f "${new_path}.exe"; then
40313      input_to_shortpath="${new_path}.exe"
40314    elif test -f "${new_path}.cmd"; then
40315      input_to_shortpath="${new_path}.cmd"
40316    else
40317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40318$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40319      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40320$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40321      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40322    fi
40323  else
40324    input_to_shortpath="$new_path"
40325  fi
40326
40327  # Call helper function which possibly converts this using DOS-style short mode.
40328  # If so, the updated path is stored in $new_path.
40329  new_path="$input_to_shortpath"
40330
40331  input_path="$input_to_shortpath"
40332  # Check if we need to convert this using DOS-style short mode. If the path
40333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40334  # take no chances and rewrite it.
40335  # Note: m4 eats our [], so we need to use [ and ] instead.
40336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40337  if test "x$has_forbidden_chars" != x; then
40338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40339    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40340    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40341    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40342      # Going to short mode and back again did indeed matter. Since short mode is
40343      # case insensitive, let's make it lowercase to improve readability.
40344      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40345      # Now convert it back to Unix-style (cygpath)
40346      input_path=`$CYGPATH -u "$shortmode_path"`
40347      new_path="$input_path"
40348    fi
40349  fi
40350
40351  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40352  if test "x$test_cygdrive_prefix" = x; then
40353    # As a simple fix, exclude /usr/bin since it's not a real path.
40354    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40355      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40356      # a path prefixed by /cygdrive for fixpath to work.
40357      new_path="$CYGWIN_ROOT_PATH$input_path"
40358    fi
40359  fi
40360
40361  # remove trailing .exe if any
40362  new_path="${new_path/%.exe/}"
40363
40364    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40365
40366  # First separate the path from the arguments. This will split at the first
40367  # space.
40368  complete="$NM"
40369  path="${complete%% *}"
40370  tmp="$complete EOL"
40371  arguments="${tmp#* }"
40372
40373  # Input might be given as Windows format, start by converting to
40374  # unix format.
40375  new_path="$path"
40376
40377  windows_path="$new_path"
40378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40379    unix_path=`$CYGPATH -u "$windows_path"`
40380    new_path="$unix_path"
40381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40383    new_path="$unix_path"
40384  fi
40385
40386
40387  # Now try to locate executable using which
40388  new_path=`$WHICH "$new_path" 2> /dev/null`
40389
40390  if test "x$new_path" = x; then
40391    # Oops. Which didn't find the executable.
40392    # The splitting of arguments from the executable at a space might have been incorrect,
40393    # since paths with space are more likely in Windows. Give it another try with the whole
40394    # argument.
40395    path="$complete"
40396    arguments="EOL"
40397    new_path="$path"
40398
40399  windows_path="$new_path"
40400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40401    unix_path=`$CYGPATH -u "$windows_path"`
40402    new_path="$unix_path"
40403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40405    new_path="$unix_path"
40406  fi
40407
40408
40409    new_path=`$WHICH "$new_path" 2> /dev/null`
40410    # bat and cmd files are not always considered executable in MSYS causing which
40411    # to not find them
40412    if test "x$new_path" = x \
40413        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40414        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40415      new_path="$path"
40416
40417  windows_path="$new_path"
40418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40419    unix_path=`$CYGPATH -u "$windows_path"`
40420    new_path="$unix_path"
40421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40423    new_path="$unix_path"
40424  fi
40425
40426    fi
40427
40428    if test "x$new_path" = x; then
40429      # It's still not found. Now this is an unrecoverable error.
40430      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40431$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40432      has_space=`$ECHO "$complete" | $GREP " "`
40433      if test "x$has_space" != x; then
40434        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40435$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40436      fi
40437      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40438    fi
40439  fi
40440
40441  # Now new_path has a complete unix path to the binary
40442  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40443    # Keep paths in /bin as-is, but remove trailing .exe if any
40444    new_path="${new_path/%.exe/}"
40445    # Do not save /bin paths to all_fixpath_prefixes!
40446  else
40447    # Not in mixed or Windows style, start by that.
40448    new_path=`cmd //c echo $new_path`
40449
40450  input_path="$new_path"
40451  # Check if we need to convert this using DOS-style short mode. If the path
40452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40453  # take no chances and rewrite it.
40454  # Note: m4 eats our [], so we need to use [ and ] instead.
40455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40456  if test "x$has_forbidden_chars" != x; then
40457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40458    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40459  fi
40460
40461    # Output is in $new_path
40462
40463  windows_path="$new_path"
40464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40465    unix_path=`$CYGPATH -u "$windows_path"`
40466    new_path="$unix_path"
40467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40469    new_path="$unix_path"
40470  fi
40471
40472    # remove trailing .exe if any
40473    new_path="${new_path/%.exe/}"
40474
40475    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40476    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40477  fi
40478
40479    else
40480      # We're on a unix platform. Hooray! :)
40481      # First separate the path from the arguments. This will split at the first
40482      # space.
40483      complete="$NM"
40484      path="${complete%% *}"
40485      tmp="$complete EOL"
40486      arguments="${tmp#* }"
40487
40488      # Cannot rely on the command "which" here since it doesn't always work.
40489      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40490      if test -z "$is_absolute_path"; then
40491        # Path to executable is not absolute. Find it.
40492        IFS_save="$IFS"
40493        IFS=:
40494        for p in $PATH; do
40495          if test -f "$p/$path" && test -x "$p/$path"; then
40496            new_path="$p/$path"
40497            break
40498          fi
40499        done
40500        IFS="$IFS_save"
40501      else
40502        # This is an absolute path, we can use it without further modifications.
40503        new_path="$path"
40504      fi
40505
40506      if test "x$new_path" = x; then
40507        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40508$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40509        has_space=`$ECHO "$complete" | $GREP " "`
40510        if test "x$has_space" != x; then
40511          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40512$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40513        fi
40514        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40515      fi
40516    fi
40517
40518    # Now join together the path and the arguments once again
40519    if test "x$arguments" != xEOL; then
40520      new_complete="$new_path ${arguments% *}"
40521    else
40522      new_complete="$new_path"
40523    fi
40524
40525    if test "x$complete" != "x$new_complete"; then
40526      NM="$new_complete"
40527      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40528$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40529    fi
40530  fi
40531
40532
40533
40534  # Publish this variable in the help.
40535
40536
40537  if [ -z "${GNM+x}" ]; then
40538    # The variable is not set by user, try to locate tool using the code snippet
40539    for ac_prog in gnm
40540do
40541  # Extract the first word of "$ac_prog", so it can be a program name with args.
40542set dummy $ac_prog; ac_word=$2
40543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40544$as_echo_n "checking for $ac_word... " >&6; }
40545if ${ac_cv_path_GNM+:} false; then :
40546  $as_echo_n "(cached) " >&6
40547else
40548  case $GNM in
40549  [\\/]* | ?:[\\/]*)
40550  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40551  ;;
40552  *)
40553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40554for as_dir in $PATH
40555do
40556  IFS=$as_save_IFS
40557  test -z "$as_dir" && as_dir=.
40558    for ac_exec_ext in '' $ac_executable_extensions; do
40559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40560    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40562    break 2
40563  fi
40564done
40565  done
40566IFS=$as_save_IFS
40567
40568  ;;
40569esac
40570fi
40571GNM=$ac_cv_path_GNM
40572if test -n "$GNM"; then
40573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40574$as_echo "$GNM" >&6; }
40575else
40576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40577$as_echo "no" >&6; }
40578fi
40579
40580
40581  test -n "$GNM" && break
40582done
40583
40584  else
40585    # The variable is set, but is it from the command line or the environment?
40586
40587    # Try to remove the string !GNM! from our list.
40588    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40589    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40590      # If it failed, the variable was not from the command line. Ignore it,
40591      # but warn the user (except for BASH, which is always set by the calling BASH).
40592      if test "xGNM" != xBASH; then
40593        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40594$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40595      fi
40596      # Try to locate tool using the code snippet
40597      for ac_prog in gnm
40598do
40599  # Extract the first word of "$ac_prog", so it can be a program name with args.
40600set dummy $ac_prog; ac_word=$2
40601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40602$as_echo_n "checking for $ac_word... " >&6; }
40603if ${ac_cv_path_GNM+:} false; then :
40604  $as_echo_n "(cached) " >&6
40605else
40606  case $GNM in
40607  [\\/]* | ?:[\\/]*)
40608  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40609  ;;
40610  *)
40611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40612for as_dir in $PATH
40613do
40614  IFS=$as_save_IFS
40615  test -z "$as_dir" && as_dir=.
40616    for ac_exec_ext in '' $ac_executable_extensions; do
40617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40618    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40620    break 2
40621  fi
40622done
40623  done
40624IFS=$as_save_IFS
40625
40626  ;;
40627esac
40628fi
40629GNM=$ac_cv_path_GNM
40630if test -n "$GNM"; then
40631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40632$as_echo "$GNM" >&6; }
40633else
40634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40635$as_echo "no" >&6; }
40636fi
40637
40638
40639  test -n "$GNM" && break
40640done
40641
40642    else
40643      # If it succeeded, then it was overridden by the user. We will use it
40644      # for the tool.
40645
40646      # First remove it from the list of overridden variables, so we can test
40647      # for unknown variables in the end.
40648      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40649
40650      # Check if we try to supply an empty value
40651      if test "x$GNM" = x; then
40652        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40653$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40654        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40655$as_echo_n "checking for GNM... " >&6; }
40656        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40657$as_echo "disabled" >&6; }
40658      else
40659        # Check if the provided tool contains a complete path.
40660        tool_specified="$GNM"
40661        tool_basename="${tool_specified##*/}"
40662        if test "x$tool_basename" = "x$tool_specified"; then
40663          # A command without a complete path is provided, search $PATH.
40664          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40665$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40666          # Extract the first word of "$tool_basename", so it can be a program name with args.
40667set dummy $tool_basename; ac_word=$2
40668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40669$as_echo_n "checking for $ac_word... " >&6; }
40670if ${ac_cv_path_GNM+:} false; then :
40671  $as_echo_n "(cached) " >&6
40672else
40673  case $GNM in
40674  [\\/]* | ?:[\\/]*)
40675  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40676  ;;
40677  *)
40678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40679for as_dir in $PATH
40680do
40681  IFS=$as_save_IFS
40682  test -z "$as_dir" && as_dir=.
40683    for ac_exec_ext in '' $ac_executable_extensions; do
40684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40685    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40687    break 2
40688  fi
40689done
40690  done
40691IFS=$as_save_IFS
40692
40693  ;;
40694esac
40695fi
40696GNM=$ac_cv_path_GNM
40697if test -n "$GNM"; then
40698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40699$as_echo "$GNM" >&6; }
40700else
40701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40702$as_echo "no" >&6; }
40703fi
40704
40705
40706          if test "x$GNM" = x; then
40707            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40708          fi
40709        else
40710          # Otherwise we believe it is a complete path. Use it as it is.
40711          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40712$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40713          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40714$as_echo_n "checking for GNM... " >&6; }
40715          if test ! -x "$tool_specified"; then
40716            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40717$as_echo "not found" >&6; }
40718            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40719          fi
40720          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40721$as_echo "$tool_specified" >&6; }
40722        fi
40723      fi
40724    fi
40725
40726  fi
40727
40728
40729
40730  # Only process if variable expands to non-empty
40731
40732  if test "x$GNM" != x; then
40733    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40734
40735  # First separate the path from the arguments. This will split at the first
40736  # space.
40737  complete="$GNM"
40738  path="${complete%% *}"
40739  tmp="$complete EOL"
40740  arguments="${tmp#* }"
40741
40742  # Input might be given as Windows format, start by converting to
40743  # unix format.
40744  new_path=`$CYGPATH -u "$path"`
40745
40746  # Now try to locate executable using which
40747  new_path=`$WHICH "$new_path" 2> /dev/null`
40748  # bat and cmd files are not always considered executable in cygwin causing which
40749  # to not find them
40750  if test "x$new_path" = x \
40751      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40752      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40753    new_path=`$CYGPATH -u "$path"`
40754  fi
40755  if test "x$new_path" = x; then
40756    # Oops. Which didn't find the executable.
40757    # The splitting of arguments from the executable at a space might have been incorrect,
40758    # since paths with space are more likely in Windows. Give it another try with the whole
40759    # argument.
40760    path="$complete"
40761    arguments="EOL"
40762    new_path=`$CYGPATH -u "$path"`
40763    new_path=`$WHICH "$new_path" 2> /dev/null`
40764    # bat and cmd files are not always considered executable in cygwin causing which
40765    # to not find them
40766    if test "x$new_path" = x \
40767        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40768        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40769      new_path=`$CYGPATH -u "$path"`
40770    fi
40771    if test "x$new_path" = x; then
40772      # It's still not found. Now this is an unrecoverable error.
40773      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40774$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40775      has_space=`$ECHO "$complete" | $GREP " "`
40776      if test "x$has_space" != x; then
40777        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40778$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40779      fi
40780      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40781    fi
40782  fi
40783
40784  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40785  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40786  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40787  # "foo.exe" is OK but "foo" is an error.
40788  #
40789  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40790  # It is also a way to make sure we got the proper file name for the real test later on.
40791  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40792  if test "x$test_shortpath" = x; then
40793    # Short path failed, file does not exist as specified.
40794    # Try adding .exe or .cmd
40795    if test -f "${new_path}.exe"; then
40796      input_to_shortpath="${new_path}.exe"
40797    elif test -f "${new_path}.cmd"; then
40798      input_to_shortpath="${new_path}.cmd"
40799    else
40800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40801$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40802      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40803$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40804      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40805    fi
40806  else
40807    input_to_shortpath="$new_path"
40808  fi
40809
40810  # Call helper function which possibly converts this using DOS-style short mode.
40811  # If so, the updated path is stored in $new_path.
40812  new_path="$input_to_shortpath"
40813
40814  input_path="$input_to_shortpath"
40815  # Check if we need to convert this using DOS-style short mode. If the path
40816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40817  # take no chances and rewrite it.
40818  # Note: m4 eats our [], so we need to use [ and ] instead.
40819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40820  if test "x$has_forbidden_chars" != x; then
40821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40822    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40823    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40824    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40825      # Going to short mode and back again did indeed matter. Since short mode is
40826      # case insensitive, let's make it lowercase to improve readability.
40827      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40828      # Now convert it back to Unix-style (cygpath)
40829      input_path=`$CYGPATH -u "$shortmode_path"`
40830      new_path="$input_path"
40831    fi
40832  fi
40833
40834  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40835  if test "x$test_cygdrive_prefix" = x; then
40836    # As a simple fix, exclude /usr/bin since it's not a real path.
40837    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40838      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40839      # a path prefixed by /cygdrive for fixpath to work.
40840      new_path="$CYGWIN_ROOT_PATH$input_path"
40841    fi
40842  fi
40843
40844  # remove trailing .exe if any
40845  new_path="${new_path/%.exe/}"
40846
40847    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40848
40849  # First separate the path from the arguments. This will split at the first
40850  # space.
40851  complete="$GNM"
40852  path="${complete%% *}"
40853  tmp="$complete EOL"
40854  arguments="${tmp#* }"
40855
40856  # Input might be given as Windows format, start by converting to
40857  # unix format.
40858  new_path="$path"
40859
40860  windows_path="$new_path"
40861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40862    unix_path=`$CYGPATH -u "$windows_path"`
40863    new_path="$unix_path"
40864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40866    new_path="$unix_path"
40867  fi
40868
40869
40870  # Now try to locate executable using which
40871  new_path=`$WHICH "$new_path" 2> /dev/null`
40872
40873  if test "x$new_path" = x; then
40874    # Oops. Which didn't find the executable.
40875    # The splitting of arguments from the executable at a space might have been incorrect,
40876    # since paths with space are more likely in Windows. Give it another try with the whole
40877    # argument.
40878    path="$complete"
40879    arguments="EOL"
40880    new_path="$path"
40881
40882  windows_path="$new_path"
40883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40884    unix_path=`$CYGPATH -u "$windows_path"`
40885    new_path="$unix_path"
40886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40888    new_path="$unix_path"
40889  fi
40890
40891
40892    new_path=`$WHICH "$new_path" 2> /dev/null`
40893    # bat and cmd files are not always considered executable in MSYS causing which
40894    # to not find them
40895    if test "x$new_path" = x \
40896        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40897        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40898      new_path="$path"
40899
40900  windows_path="$new_path"
40901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40902    unix_path=`$CYGPATH -u "$windows_path"`
40903    new_path="$unix_path"
40904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40906    new_path="$unix_path"
40907  fi
40908
40909    fi
40910
40911    if test "x$new_path" = x; then
40912      # It's still not found. Now this is an unrecoverable error.
40913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40914$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40915      has_space=`$ECHO "$complete" | $GREP " "`
40916      if test "x$has_space" != x; then
40917        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40918$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40919      fi
40920      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40921    fi
40922  fi
40923
40924  # Now new_path has a complete unix path to the binary
40925  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40926    # Keep paths in /bin as-is, but remove trailing .exe if any
40927    new_path="${new_path/%.exe/}"
40928    # Do not save /bin paths to all_fixpath_prefixes!
40929  else
40930    # Not in mixed or Windows style, start by that.
40931    new_path=`cmd //c echo $new_path`
40932
40933  input_path="$new_path"
40934  # Check if we need to convert this using DOS-style short mode. If the path
40935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40936  # take no chances and rewrite it.
40937  # Note: m4 eats our [], so we need to use [ and ] instead.
40938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40939  if test "x$has_forbidden_chars" != x; then
40940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40941    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40942  fi
40943
40944    # Output is in $new_path
40945
40946  windows_path="$new_path"
40947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40948    unix_path=`$CYGPATH -u "$windows_path"`
40949    new_path="$unix_path"
40950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40952    new_path="$unix_path"
40953  fi
40954
40955    # remove trailing .exe if any
40956    new_path="${new_path/%.exe/}"
40957
40958    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40959    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40960  fi
40961
40962    else
40963      # We're on a unix platform. Hooray! :)
40964      # First separate the path from the arguments. This will split at the first
40965      # space.
40966      complete="$GNM"
40967      path="${complete%% *}"
40968      tmp="$complete EOL"
40969      arguments="${tmp#* }"
40970
40971      # Cannot rely on the command "which" here since it doesn't always work.
40972      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40973      if test -z "$is_absolute_path"; then
40974        # Path to executable is not absolute. Find it.
40975        IFS_save="$IFS"
40976        IFS=:
40977        for p in $PATH; do
40978          if test -f "$p/$path" && test -x "$p/$path"; then
40979            new_path="$p/$path"
40980            break
40981          fi
40982        done
40983        IFS="$IFS_save"
40984      else
40985        # This is an absolute path, we can use it without further modifications.
40986        new_path="$path"
40987      fi
40988
40989      if test "x$new_path" = x; then
40990        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40991$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40992        has_space=`$ECHO "$complete" | $GREP " "`
40993        if test "x$has_space" != x; then
40994          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40995$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40996        fi
40997        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40998      fi
40999    fi
41000
41001    # Now join together the path and the arguments once again
41002    if test "x$arguments" != xEOL; then
41003      new_complete="$new_path ${arguments% *}"
41004    else
41005      new_complete="$new_path"
41006    fi
41007
41008    if test "x$complete" != "x$new_complete"; then
41009      GNM="$new_complete"
41010      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41011$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41012    fi
41013  fi
41014
41015  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41016    # FIXME: we should unify this with the solaris case above.
41017
41018
41019  # Publish this variable in the help.
41020
41021
41022  if [ -z "${STRIP+x}" ]; then
41023    # The variable is not set by user, try to locate tool using the code snippet
41024    if test -n "$ac_tool_prefix"; then
41025  for ac_prog in strip
41026  do
41027    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41028set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41030$as_echo_n "checking for $ac_word... " >&6; }
41031if ${ac_cv_prog_STRIP+:} false; then :
41032  $as_echo_n "(cached) " >&6
41033else
41034  if test -n "$STRIP"; then
41035  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41036else
41037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41038for as_dir in $PATH
41039do
41040  IFS=$as_save_IFS
41041  test -z "$as_dir" && as_dir=.
41042    for ac_exec_ext in '' $ac_executable_extensions; do
41043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41044    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41046    break 2
41047  fi
41048done
41049  done
41050IFS=$as_save_IFS
41051
41052fi
41053fi
41054STRIP=$ac_cv_prog_STRIP
41055if test -n "$STRIP"; then
41056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41057$as_echo "$STRIP" >&6; }
41058else
41059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41060$as_echo "no" >&6; }
41061fi
41062
41063
41064    test -n "$STRIP" && break
41065  done
41066fi
41067if test -z "$STRIP"; then
41068  ac_ct_STRIP=$STRIP
41069  for ac_prog in strip
41070do
41071  # Extract the first word of "$ac_prog", so it can be a program name with args.
41072set dummy $ac_prog; ac_word=$2
41073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41074$as_echo_n "checking for $ac_word... " >&6; }
41075if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41076  $as_echo_n "(cached) " >&6
41077else
41078  if test -n "$ac_ct_STRIP"; then
41079  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41080else
41081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41082for as_dir in $PATH
41083do
41084  IFS=$as_save_IFS
41085  test -z "$as_dir" && as_dir=.
41086    for ac_exec_ext in '' $ac_executable_extensions; do
41087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41088    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41090    break 2
41091  fi
41092done
41093  done
41094IFS=$as_save_IFS
41095
41096fi
41097fi
41098ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41099if test -n "$ac_ct_STRIP"; then
41100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41101$as_echo "$ac_ct_STRIP" >&6; }
41102else
41103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41104$as_echo "no" >&6; }
41105fi
41106
41107
41108  test -n "$ac_ct_STRIP" && break
41109done
41110
41111  if test "x$ac_ct_STRIP" = x; then
41112    STRIP=""
41113  else
41114    case $cross_compiling:$ac_tool_warned in
41115yes:)
41116{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41117$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41118ac_tool_warned=yes ;;
41119esac
41120    STRIP=$ac_ct_STRIP
41121  fi
41122fi
41123
41124  else
41125    # The variable is set, but is it from the command line or the environment?
41126
41127    # Try to remove the string !STRIP! from our list.
41128    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41129    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41130      # If it failed, the variable was not from the command line. Ignore it,
41131      # but warn the user (except for BASH, which is always set by the calling BASH).
41132      if test "xSTRIP" != xBASH; then
41133        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41134$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41135      fi
41136      # Try to locate tool using the code snippet
41137      if test -n "$ac_tool_prefix"; then
41138  for ac_prog in strip
41139  do
41140    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41141set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41143$as_echo_n "checking for $ac_word... " >&6; }
41144if ${ac_cv_prog_STRIP+:} false; then :
41145  $as_echo_n "(cached) " >&6
41146else
41147  if test -n "$STRIP"; then
41148  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41149else
41150as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41151for as_dir in $PATH
41152do
41153  IFS=$as_save_IFS
41154  test -z "$as_dir" && as_dir=.
41155    for ac_exec_ext in '' $ac_executable_extensions; do
41156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41157    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41159    break 2
41160  fi
41161done
41162  done
41163IFS=$as_save_IFS
41164
41165fi
41166fi
41167STRIP=$ac_cv_prog_STRIP
41168if test -n "$STRIP"; then
41169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41170$as_echo "$STRIP" >&6; }
41171else
41172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41173$as_echo "no" >&6; }
41174fi
41175
41176
41177    test -n "$STRIP" && break
41178  done
41179fi
41180if test -z "$STRIP"; then
41181  ac_ct_STRIP=$STRIP
41182  for ac_prog in strip
41183do
41184  # Extract the first word of "$ac_prog", so it can be a program name with args.
41185set dummy $ac_prog; ac_word=$2
41186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41187$as_echo_n "checking for $ac_word... " >&6; }
41188if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41189  $as_echo_n "(cached) " >&6
41190else
41191  if test -n "$ac_ct_STRIP"; then
41192  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41193else
41194as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41195for as_dir in $PATH
41196do
41197  IFS=$as_save_IFS
41198  test -z "$as_dir" && as_dir=.
41199    for ac_exec_ext in '' $ac_executable_extensions; do
41200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41201    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41203    break 2
41204  fi
41205done
41206  done
41207IFS=$as_save_IFS
41208
41209fi
41210fi
41211ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41212if test -n "$ac_ct_STRIP"; then
41213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41214$as_echo "$ac_ct_STRIP" >&6; }
41215else
41216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41217$as_echo "no" >&6; }
41218fi
41219
41220
41221  test -n "$ac_ct_STRIP" && break
41222done
41223
41224  if test "x$ac_ct_STRIP" = x; then
41225    STRIP=""
41226  else
41227    case $cross_compiling:$ac_tool_warned in
41228yes:)
41229{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41230$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41231ac_tool_warned=yes ;;
41232esac
41233    STRIP=$ac_ct_STRIP
41234  fi
41235fi
41236
41237    else
41238      # If it succeeded, then it was overridden by the user. We will use it
41239      # for the tool.
41240
41241      # First remove it from the list of overridden variables, so we can test
41242      # for unknown variables in the end.
41243      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41244
41245      # Check if we try to supply an empty value
41246      if test "x$STRIP" = x; then
41247        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41248$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41249        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41250$as_echo_n "checking for STRIP... " >&6; }
41251        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41252$as_echo "disabled" >&6; }
41253      else
41254        # Check if the provided tool contains a complete path.
41255        tool_specified="$STRIP"
41256        tool_basename="${tool_specified##*/}"
41257        if test "x$tool_basename" = "x$tool_specified"; then
41258          # A command without a complete path is provided, search $PATH.
41259          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41260$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41261          # Extract the first word of "$tool_basename", so it can be a program name with args.
41262set dummy $tool_basename; ac_word=$2
41263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41264$as_echo_n "checking for $ac_word... " >&6; }
41265if ${ac_cv_path_STRIP+:} false; then :
41266  $as_echo_n "(cached) " >&6
41267else
41268  case $STRIP in
41269  [\\/]* | ?:[\\/]*)
41270  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41271  ;;
41272  *)
41273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41274for as_dir in $PATH
41275do
41276  IFS=$as_save_IFS
41277  test -z "$as_dir" && as_dir=.
41278    for ac_exec_ext in '' $ac_executable_extensions; do
41279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41280    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41282    break 2
41283  fi
41284done
41285  done
41286IFS=$as_save_IFS
41287
41288  ;;
41289esac
41290fi
41291STRIP=$ac_cv_path_STRIP
41292if test -n "$STRIP"; then
41293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41294$as_echo "$STRIP" >&6; }
41295else
41296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41297$as_echo "no" >&6; }
41298fi
41299
41300
41301          if test "x$STRIP" = x; then
41302            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41303          fi
41304        else
41305          # Otherwise we believe it is a complete path. Use it as it is.
41306          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41307$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41308          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41309$as_echo_n "checking for STRIP... " >&6; }
41310          if test ! -x "$tool_specified"; then
41311            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41312$as_echo "not found" >&6; }
41313            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41314          fi
41315          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41316$as_echo "$tool_specified" >&6; }
41317        fi
41318      fi
41319    fi
41320
41321  fi
41322
41323
41324
41325  # Only process if variable expands to non-empty
41326
41327  if test "x$STRIP" != x; then
41328    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41329
41330  # First separate the path from the arguments. This will split at the first
41331  # space.
41332  complete="$STRIP"
41333  path="${complete%% *}"
41334  tmp="$complete EOL"
41335  arguments="${tmp#* }"
41336
41337  # Input might be given as Windows format, start by converting to
41338  # unix format.
41339  new_path=`$CYGPATH -u "$path"`
41340
41341  # Now try to locate executable using which
41342  new_path=`$WHICH "$new_path" 2> /dev/null`
41343  # bat and cmd files are not always considered executable in cygwin causing which
41344  # to not find them
41345  if test "x$new_path" = x \
41346      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41347      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41348    new_path=`$CYGPATH -u "$path"`
41349  fi
41350  if test "x$new_path" = x; then
41351    # Oops. Which didn't find the executable.
41352    # The splitting of arguments from the executable at a space might have been incorrect,
41353    # since paths with space are more likely in Windows. Give it another try with the whole
41354    # argument.
41355    path="$complete"
41356    arguments="EOL"
41357    new_path=`$CYGPATH -u "$path"`
41358    new_path=`$WHICH "$new_path" 2> /dev/null`
41359    # bat and cmd files are not always considered executable in cygwin causing which
41360    # to not find them
41361    if test "x$new_path" = x \
41362        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41363        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41364      new_path=`$CYGPATH -u "$path"`
41365    fi
41366    if test "x$new_path" = x; then
41367      # It's still not found. Now this is an unrecoverable error.
41368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41369$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41370      has_space=`$ECHO "$complete" | $GREP " "`
41371      if test "x$has_space" != x; then
41372        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41373$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41374      fi
41375      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41376    fi
41377  fi
41378
41379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41382  # "foo.exe" is OK but "foo" is an error.
41383  #
41384  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41385  # It is also a way to make sure we got the proper file name for the real test later on.
41386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41387  if test "x$test_shortpath" = x; then
41388    # Short path failed, file does not exist as specified.
41389    # Try adding .exe or .cmd
41390    if test -f "${new_path}.exe"; then
41391      input_to_shortpath="${new_path}.exe"
41392    elif test -f "${new_path}.cmd"; then
41393      input_to_shortpath="${new_path}.cmd"
41394    else
41395      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41396$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41397      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41398$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41399      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41400    fi
41401  else
41402    input_to_shortpath="$new_path"
41403  fi
41404
41405  # Call helper function which possibly converts this using DOS-style short mode.
41406  # If so, the updated path is stored in $new_path.
41407  new_path="$input_to_shortpath"
41408
41409  input_path="$input_to_shortpath"
41410  # Check if we need to convert this using DOS-style short mode. If the path
41411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41412  # take no chances and rewrite it.
41413  # Note: m4 eats our [], so we need to use [ and ] instead.
41414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41415  if test "x$has_forbidden_chars" != x; then
41416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41420      # Going to short mode and back again did indeed matter. Since short mode is
41421      # case insensitive, let's make it lowercase to improve readability.
41422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41423      # Now convert it back to Unix-style (cygpath)
41424      input_path=`$CYGPATH -u "$shortmode_path"`
41425      new_path="$input_path"
41426    fi
41427  fi
41428
41429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41430  if test "x$test_cygdrive_prefix" = x; then
41431    # As a simple fix, exclude /usr/bin since it's not a real path.
41432    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41434      # a path prefixed by /cygdrive for fixpath to work.
41435      new_path="$CYGWIN_ROOT_PATH$input_path"
41436    fi
41437  fi
41438
41439  # remove trailing .exe if any
41440  new_path="${new_path/%.exe/}"
41441
41442    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41443
41444  # First separate the path from the arguments. This will split at the first
41445  # space.
41446  complete="$STRIP"
41447  path="${complete%% *}"
41448  tmp="$complete EOL"
41449  arguments="${tmp#* }"
41450
41451  # Input might be given as Windows format, start by converting to
41452  # unix format.
41453  new_path="$path"
41454
41455  windows_path="$new_path"
41456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41457    unix_path=`$CYGPATH -u "$windows_path"`
41458    new_path="$unix_path"
41459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41461    new_path="$unix_path"
41462  fi
41463
41464
41465  # Now try to locate executable using which
41466  new_path=`$WHICH "$new_path" 2> /dev/null`
41467
41468  if test "x$new_path" = x; then
41469    # Oops. Which didn't find the executable.
41470    # The splitting of arguments from the executable at a space might have been incorrect,
41471    # since paths with space are more likely in Windows. Give it another try with the whole
41472    # argument.
41473    path="$complete"
41474    arguments="EOL"
41475    new_path="$path"
41476
41477  windows_path="$new_path"
41478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41479    unix_path=`$CYGPATH -u "$windows_path"`
41480    new_path="$unix_path"
41481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41483    new_path="$unix_path"
41484  fi
41485
41486
41487    new_path=`$WHICH "$new_path" 2> /dev/null`
41488    # bat and cmd files are not always considered executable in MSYS causing which
41489    # to not find them
41490    if test "x$new_path" = x \
41491        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41492        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41493      new_path="$path"
41494
41495  windows_path="$new_path"
41496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41497    unix_path=`$CYGPATH -u "$windows_path"`
41498    new_path="$unix_path"
41499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41501    new_path="$unix_path"
41502  fi
41503
41504    fi
41505
41506    if test "x$new_path" = x; then
41507      # It's still not found. Now this is an unrecoverable error.
41508      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41509$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41510      has_space=`$ECHO "$complete" | $GREP " "`
41511      if test "x$has_space" != x; then
41512        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41513$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41514      fi
41515      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41516    fi
41517  fi
41518
41519  # Now new_path has a complete unix path to the binary
41520  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41521    # Keep paths in /bin as-is, but remove trailing .exe if any
41522    new_path="${new_path/%.exe/}"
41523    # Do not save /bin paths to all_fixpath_prefixes!
41524  else
41525    # Not in mixed or Windows style, start by that.
41526    new_path=`cmd //c echo $new_path`
41527
41528  input_path="$new_path"
41529  # Check if we need to convert this using DOS-style short mode. If the path
41530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41531  # take no chances and rewrite it.
41532  # Note: m4 eats our [], so we need to use [ and ] instead.
41533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41534  if test "x$has_forbidden_chars" != x; then
41535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41536    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41537  fi
41538
41539    # Output is in $new_path
41540
41541  windows_path="$new_path"
41542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41543    unix_path=`$CYGPATH -u "$windows_path"`
41544    new_path="$unix_path"
41545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41547    new_path="$unix_path"
41548  fi
41549
41550    # remove trailing .exe if any
41551    new_path="${new_path/%.exe/}"
41552
41553    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41554    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41555  fi
41556
41557    else
41558      # We're on a unix platform. Hooray! :)
41559      # First separate the path from the arguments. This will split at the first
41560      # space.
41561      complete="$STRIP"
41562      path="${complete%% *}"
41563      tmp="$complete EOL"
41564      arguments="${tmp#* }"
41565
41566      # Cannot rely on the command "which" here since it doesn't always work.
41567      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41568      if test -z "$is_absolute_path"; then
41569        # Path to executable is not absolute. Find it.
41570        IFS_save="$IFS"
41571        IFS=:
41572        for p in $PATH; do
41573          if test -f "$p/$path" && test -x "$p/$path"; then
41574            new_path="$p/$path"
41575            break
41576          fi
41577        done
41578        IFS="$IFS_save"
41579      else
41580        # This is an absolute path, we can use it without further modifications.
41581        new_path="$path"
41582      fi
41583
41584      if test "x$new_path" = x; then
41585        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41586$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41587        has_space=`$ECHO "$complete" | $GREP " "`
41588        if test "x$has_space" != x; then
41589          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41590$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41591        fi
41592        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41593      fi
41594    fi
41595
41596    # Now join together the path and the arguments once again
41597    if test "x$arguments" != xEOL; then
41598      new_complete="$new_path ${arguments% *}"
41599    else
41600      new_complete="$new_path"
41601    fi
41602
41603    if test "x$complete" != "x$new_complete"; then
41604      STRIP="$new_complete"
41605      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41606$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41607    fi
41608  fi
41609
41610    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41611
41612
41613  # Publish this variable in the help.
41614
41615
41616  if [ -z "${NM+x}" ]; then
41617    # The variable is not set by user, try to locate tool using the code snippet
41618    if test -n "$ac_tool_prefix"; then
41619  for ac_prog in nm gcc-nm
41620  do
41621    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41622set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41624$as_echo_n "checking for $ac_word... " >&6; }
41625if ${ac_cv_prog_NM+:} false; then :
41626  $as_echo_n "(cached) " >&6
41627else
41628  if test -n "$NM"; then
41629  ac_cv_prog_NM="$NM" # Let the user override the test.
41630else
41631as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41632for as_dir in $PATH
41633do
41634  IFS=$as_save_IFS
41635  test -z "$as_dir" && as_dir=.
41636    for ac_exec_ext in '' $ac_executable_extensions; do
41637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41638    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41640    break 2
41641  fi
41642done
41643  done
41644IFS=$as_save_IFS
41645
41646fi
41647fi
41648NM=$ac_cv_prog_NM
41649if test -n "$NM"; then
41650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41651$as_echo "$NM" >&6; }
41652else
41653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41654$as_echo "no" >&6; }
41655fi
41656
41657
41658    test -n "$NM" && break
41659  done
41660fi
41661if test -z "$NM"; then
41662  ac_ct_NM=$NM
41663  for ac_prog in nm gcc-nm
41664do
41665  # Extract the first word of "$ac_prog", so it can be a program name with args.
41666set dummy $ac_prog; ac_word=$2
41667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41668$as_echo_n "checking for $ac_word... " >&6; }
41669if ${ac_cv_prog_ac_ct_NM+:} false; then :
41670  $as_echo_n "(cached) " >&6
41671else
41672  if test -n "$ac_ct_NM"; then
41673  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41674else
41675as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41676for as_dir in $PATH
41677do
41678  IFS=$as_save_IFS
41679  test -z "$as_dir" && as_dir=.
41680    for ac_exec_ext in '' $ac_executable_extensions; do
41681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41682    ac_cv_prog_ac_ct_NM="$ac_prog"
41683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41684    break 2
41685  fi
41686done
41687  done
41688IFS=$as_save_IFS
41689
41690fi
41691fi
41692ac_ct_NM=$ac_cv_prog_ac_ct_NM
41693if test -n "$ac_ct_NM"; then
41694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41695$as_echo "$ac_ct_NM" >&6; }
41696else
41697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41698$as_echo "no" >&6; }
41699fi
41700
41701
41702  test -n "$ac_ct_NM" && break
41703done
41704
41705  if test "x$ac_ct_NM" = x; then
41706    NM=""
41707  else
41708    case $cross_compiling:$ac_tool_warned in
41709yes:)
41710{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41711$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41712ac_tool_warned=yes ;;
41713esac
41714    NM=$ac_ct_NM
41715  fi
41716fi
41717
41718  else
41719    # The variable is set, but is it from the command line or the environment?
41720
41721    # Try to remove the string !NM! from our list.
41722    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41723    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41724      # If it failed, the variable was not from the command line. Ignore it,
41725      # but warn the user (except for BASH, which is always set by the calling BASH).
41726      if test "xNM" != xBASH; then
41727        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41728$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41729      fi
41730      # Try to locate tool using the code snippet
41731      if test -n "$ac_tool_prefix"; then
41732  for ac_prog in nm gcc-nm
41733  do
41734    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41735set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41737$as_echo_n "checking for $ac_word... " >&6; }
41738if ${ac_cv_prog_NM+:} false; then :
41739  $as_echo_n "(cached) " >&6
41740else
41741  if test -n "$NM"; then
41742  ac_cv_prog_NM="$NM" # Let the user override the test.
41743else
41744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41745for as_dir in $PATH
41746do
41747  IFS=$as_save_IFS
41748  test -z "$as_dir" && as_dir=.
41749    for ac_exec_ext in '' $ac_executable_extensions; do
41750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41751    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41753    break 2
41754  fi
41755done
41756  done
41757IFS=$as_save_IFS
41758
41759fi
41760fi
41761NM=$ac_cv_prog_NM
41762if test -n "$NM"; then
41763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41764$as_echo "$NM" >&6; }
41765else
41766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41767$as_echo "no" >&6; }
41768fi
41769
41770
41771    test -n "$NM" && break
41772  done
41773fi
41774if test -z "$NM"; then
41775  ac_ct_NM=$NM
41776  for ac_prog in nm gcc-nm
41777do
41778  # Extract the first word of "$ac_prog", so it can be a program name with args.
41779set dummy $ac_prog; ac_word=$2
41780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41781$as_echo_n "checking for $ac_word... " >&6; }
41782if ${ac_cv_prog_ac_ct_NM+:} false; then :
41783  $as_echo_n "(cached) " >&6
41784else
41785  if test -n "$ac_ct_NM"; then
41786  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41787else
41788as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41789for as_dir in $PATH
41790do
41791  IFS=$as_save_IFS
41792  test -z "$as_dir" && as_dir=.
41793    for ac_exec_ext in '' $ac_executable_extensions; do
41794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41795    ac_cv_prog_ac_ct_NM="$ac_prog"
41796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41797    break 2
41798  fi
41799done
41800  done
41801IFS=$as_save_IFS
41802
41803fi
41804fi
41805ac_ct_NM=$ac_cv_prog_ac_ct_NM
41806if test -n "$ac_ct_NM"; then
41807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41808$as_echo "$ac_ct_NM" >&6; }
41809else
41810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41811$as_echo "no" >&6; }
41812fi
41813
41814
41815  test -n "$ac_ct_NM" && break
41816done
41817
41818  if test "x$ac_ct_NM" = x; then
41819    NM=""
41820  else
41821    case $cross_compiling:$ac_tool_warned in
41822yes:)
41823{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41824$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41825ac_tool_warned=yes ;;
41826esac
41827    NM=$ac_ct_NM
41828  fi
41829fi
41830
41831    else
41832      # If it succeeded, then it was overridden by the user. We will use it
41833      # for the tool.
41834
41835      # First remove it from the list of overridden variables, so we can test
41836      # for unknown variables in the end.
41837      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41838
41839      # Check if we try to supply an empty value
41840      if test "x$NM" = x; then
41841        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41842$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41843        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41844$as_echo_n "checking for NM... " >&6; }
41845        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41846$as_echo "disabled" >&6; }
41847      else
41848        # Check if the provided tool contains a complete path.
41849        tool_specified="$NM"
41850        tool_basename="${tool_specified##*/}"
41851        if test "x$tool_basename" = "x$tool_specified"; then
41852          # A command without a complete path is provided, search $PATH.
41853          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41854$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41855          # Extract the first word of "$tool_basename", so it can be a program name with args.
41856set dummy $tool_basename; ac_word=$2
41857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41858$as_echo_n "checking for $ac_word... " >&6; }
41859if ${ac_cv_path_NM+:} false; then :
41860  $as_echo_n "(cached) " >&6
41861else
41862  case $NM in
41863  [\\/]* | ?:[\\/]*)
41864  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41865  ;;
41866  *)
41867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41868for as_dir in $PATH
41869do
41870  IFS=$as_save_IFS
41871  test -z "$as_dir" && as_dir=.
41872    for ac_exec_ext in '' $ac_executable_extensions; do
41873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41874    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41876    break 2
41877  fi
41878done
41879  done
41880IFS=$as_save_IFS
41881
41882  ;;
41883esac
41884fi
41885NM=$ac_cv_path_NM
41886if test -n "$NM"; then
41887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41888$as_echo "$NM" >&6; }
41889else
41890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41891$as_echo "no" >&6; }
41892fi
41893
41894
41895          if test "x$NM" = x; then
41896            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41897          fi
41898        else
41899          # Otherwise we believe it is a complete path. Use it as it is.
41900          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41901$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41902          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41903$as_echo_n "checking for NM... " >&6; }
41904          if test ! -x "$tool_specified"; then
41905            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41906$as_echo "not found" >&6; }
41907            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41908          fi
41909          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41910$as_echo "$tool_specified" >&6; }
41911        fi
41912      fi
41913    fi
41914
41915  fi
41916
41917
41918    else
41919
41920
41921  # Publish this variable in the help.
41922
41923
41924  if [ -z "${NM+x}" ]; then
41925    # The variable is not set by user, try to locate tool using the code snippet
41926    if test -n "$ac_tool_prefix"; then
41927  for ac_prog in nm
41928  do
41929    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41930set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41932$as_echo_n "checking for $ac_word... " >&6; }
41933if ${ac_cv_prog_NM+:} false; then :
41934  $as_echo_n "(cached) " >&6
41935else
41936  if test -n "$NM"; then
41937  ac_cv_prog_NM="$NM" # Let the user override the test.
41938else
41939as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41940for as_dir in $PATH
41941do
41942  IFS=$as_save_IFS
41943  test -z "$as_dir" && as_dir=.
41944    for ac_exec_ext in '' $ac_executable_extensions; do
41945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41946    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41948    break 2
41949  fi
41950done
41951  done
41952IFS=$as_save_IFS
41953
41954fi
41955fi
41956NM=$ac_cv_prog_NM
41957if test -n "$NM"; then
41958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41959$as_echo "$NM" >&6; }
41960else
41961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41962$as_echo "no" >&6; }
41963fi
41964
41965
41966    test -n "$NM" && break
41967  done
41968fi
41969if test -z "$NM"; then
41970  ac_ct_NM=$NM
41971  for ac_prog in nm
41972do
41973  # Extract the first word of "$ac_prog", so it can be a program name with args.
41974set dummy $ac_prog; ac_word=$2
41975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41976$as_echo_n "checking for $ac_word... " >&6; }
41977if ${ac_cv_prog_ac_ct_NM+:} false; then :
41978  $as_echo_n "(cached) " >&6
41979else
41980  if test -n "$ac_ct_NM"; then
41981  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41982else
41983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41984for as_dir in $PATH
41985do
41986  IFS=$as_save_IFS
41987  test -z "$as_dir" && as_dir=.
41988    for ac_exec_ext in '' $ac_executable_extensions; do
41989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41990    ac_cv_prog_ac_ct_NM="$ac_prog"
41991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41992    break 2
41993  fi
41994done
41995  done
41996IFS=$as_save_IFS
41997
41998fi
41999fi
42000ac_ct_NM=$ac_cv_prog_ac_ct_NM
42001if test -n "$ac_ct_NM"; then
42002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42003$as_echo "$ac_ct_NM" >&6; }
42004else
42005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42006$as_echo "no" >&6; }
42007fi
42008
42009
42010  test -n "$ac_ct_NM" && break
42011done
42012
42013  if test "x$ac_ct_NM" = x; then
42014    NM=""
42015  else
42016    case $cross_compiling:$ac_tool_warned in
42017yes:)
42018{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42019$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42020ac_tool_warned=yes ;;
42021esac
42022    NM=$ac_ct_NM
42023  fi
42024fi
42025
42026  else
42027    # The variable is set, but is it from the command line or the environment?
42028
42029    # Try to remove the string !NM! from our list.
42030    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42031    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42032      # If it failed, the variable was not from the command line. Ignore it,
42033      # but warn the user (except for BASH, which is always set by the calling BASH).
42034      if test "xNM" != xBASH; then
42035        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42036$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42037      fi
42038      # Try to locate tool using the code snippet
42039      if test -n "$ac_tool_prefix"; then
42040  for ac_prog in nm
42041  do
42042    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42043set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42045$as_echo_n "checking for $ac_word... " >&6; }
42046if ${ac_cv_prog_NM+:} false; then :
42047  $as_echo_n "(cached) " >&6
42048else
42049  if test -n "$NM"; then
42050  ac_cv_prog_NM="$NM" # Let the user override the test.
42051else
42052as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42053for as_dir in $PATH
42054do
42055  IFS=$as_save_IFS
42056  test -z "$as_dir" && as_dir=.
42057    for ac_exec_ext in '' $ac_executable_extensions; do
42058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42059    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42061    break 2
42062  fi
42063done
42064  done
42065IFS=$as_save_IFS
42066
42067fi
42068fi
42069NM=$ac_cv_prog_NM
42070if test -n "$NM"; then
42071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42072$as_echo "$NM" >&6; }
42073else
42074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42075$as_echo "no" >&6; }
42076fi
42077
42078
42079    test -n "$NM" && break
42080  done
42081fi
42082if test -z "$NM"; then
42083  ac_ct_NM=$NM
42084  for ac_prog in nm
42085do
42086  # Extract the first word of "$ac_prog", so it can be a program name with args.
42087set dummy $ac_prog; ac_word=$2
42088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42089$as_echo_n "checking for $ac_word... " >&6; }
42090if ${ac_cv_prog_ac_ct_NM+:} false; then :
42091  $as_echo_n "(cached) " >&6
42092else
42093  if test -n "$ac_ct_NM"; then
42094  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42095else
42096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42097for as_dir in $PATH
42098do
42099  IFS=$as_save_IFS
42100  test -z "$as_dir" && as_dir=.
42101    for ac_exec_ext in '' $ac_executable_extensions; do
42102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42103    ac_cv_prog_ac_ct_NM="$ac_prog"
42104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42105    break 2
42106  fi
42107done
42108  done
42109IFS=$as_save_IFS
42110
42111fi
42112fi
42113ac_ct_NM=$ac_cv_prog_ac_ct_NM
42114if test -n "$ac_ct_NM"; then
42115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42116$as_echo "$ac_ct_NM" >&6; }
42117else
42118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42119$as_echo "no" >&6; }
42120fi
42121
42122
42123  test -n "$ac_ct_NM" && break
42124done
42125
42126  if test "x$ac_ct_NM" = x; then
42127    NM=""
42128  else
42129    case $cross_compiling:$ac_tool_warned in
42130yes:)
42131{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42132$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42133ac_tool_warned=yes ;;
42134esac
42135    NM=$ac_ct_NM
42136  fi
42137fi
42138
42139    else
42140      # If it succeeded, then it was overridden by the user. We will use it
42141      # for the tool.
42142
42143      # First remove it from the list of overridden variables, so we can test
42144      # for unknown variables in the end.
42145      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42146
42147      # Check if we try to supply an empty value
42148      if test "x$NM" = x; then
42149        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42150$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42151        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42152$as_echo_n "checking for NM... " >&6; }
42153        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42154$as_echo "disabled" >&6; }
42155      else
42156        # Check if the provided tool contains a complete path.
42157        tool_specified="$NM"
42158        tool_basename="${tool_specified##*/}"
42159        if test "x$tool_basename" = "x$tool_specified"; then
42160          # A command without a complete path is provided, search $PATH.
42161          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42162$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42163          # Extract the first word of "$tool_basename", so it can be a program name with args.
42164set dummy $tool_basename; ac_word=$2
42165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42166$as_echo_n "checking for $ac_word... " >&6; }
42167if ${ac_cv_path_NM+:} false; then :
42168  $as_echo_n "(cached) " >&6
42169else
42170  case $NM in
42171  [\\/]* | ?:[\\/]*)
42172  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42173  ;;
42174  *)
42175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42176for as_dir in $PATH
42177do
42178  IFS=$as_save_IFS
42179  test -z "$as_dir" && as_dir=.
42180    for ac_exec_ext in '' $ac_executable_extensions; do
42181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42182    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42184    break 2
42185  fi
42186done
42187  done
42188IFS=$as_save_IFS
42189
42190  ;;
42191esac
42192fi
42193NM=$ac_cv_path_NM
42194if test -n "$NM"; then
42195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42196$as_echo "$NM" >&6; }
42197else
42198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42199$as_echo "no" >&6; }
42200fi
42201
42202
42203          if test "x$NM" = x; then
42204            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42205          fi
42206        else
42207          # Otherwise we believe it is a complete path. Use it as it is.
42208          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42209$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42210          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42211$as_echo_n "checking for NM... " >&6; }
42212          if test ! -x "$tool_specified"; then
42213            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42214$as_echo "not found" >&6; }
42215            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42216          fi
42217          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42218$as_echo "$tool_specified" >&6; }
42219        fi
42220      fi
42221    fi
42222
42223  fi
42224
42225
42226    fi
42227
42228  # Only process if variable expands to non-empty
42229
42230  if test "x$NM" != x; then
42231    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42232
42233  # First separate the path from the arguments. This will split at the first
42234  # space.
42235  complete="$NM"
42236  path="${complete%% *}"
42237  tmp="$complete EOL"
42238  arguments="${tmp#* }"
42239
42240  # Input might be given as Windows format, start by converting to
42241  # unix format.
42242  new_path=`$CYGPATH -u "$path"`
42243
42244  # Now try to locate executable using which
42245  new_path=`$WHICH "$new_path" 2> /dev/null`
42246  # bat and cmd files are not always considered executable in cygwin causing which
42247  # to not find them
42248  if test "x$new_path" = x \
42249      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42250      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42251    new_path=`$CYGPATH -u "$path"`
42252  fi
42253  if test "x$new_path" = x; then
42254    # Oops. Which didn't find the executable.
42255    # The splitting of arguments from the executable at a space might have been incorrect,
42256    # since paths with space are more likely in Windows. Give it another try with the whole
42257    # argument.
42258    path="$complete"
42259    arguments="EOL"
42260    new_path=`$CYGPATH -u "$path"`
42261    new_path=`$WHICH "$new_path" 2> /dev/null`
42262    # bat and cmd files are not always considered executable in cygwin causing which
42263    # to not find them
42264    if test "x$new_path" = x \
42265        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42266        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42267      new_path=`$CYGPATH -u "$path"`
42268    fi
42269    if test "x$new_path" = x; then
42270      # It's still not found. Now this is an unrecoverable error.
42271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42272$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42273      has_space=`$ECHO "$complete" | $GREP " "`
42274      if test "x$has_space" != x; then
42275        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42276$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42277      fi
42278      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42279    fi
42280  fi
42281
42282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42285  # "foo.exe" is OK but "foo" is an error.
42286  #
42287  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42288  # It is also a way to make sure we got the proper file name for the real test later on.
42289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42290  if test "x$test_shortpath" = x; then
42291    # Short path failed, file does not exist as specified.
42292    # Try adding .exe or .cmd
42293    if test -f "${new_path}.exe"; then
42294      input_to_shortpath="${new_path}.exe"
42295    elif test -f "${new_path}.cmd"; then
42296      input_to_shortpath="${new_path}.cmd"
42297    else
42298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42299$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42300      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42301$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42302      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42303    fi
42304  else
42305    input_to_shortpath="$new_path"
42306  fi
42307
42308  # Call helper function which possibly converts this using DOS-style short mode.
42309  # If so, the updated path is stored in $new_path.
42310  new_path="$input_to_shortpath"
42311
42312  input_path="$input_to_shortpath"
42313  # Check if we need to convert this using DOS-style short mode. If the path
42314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42315  # take no chances and rewrite it.
42316  # Note: m4 eats our [], so we need to use [ and ] instead.
42317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42318  if test "x$has_forbidden_chars" != x; then
42319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42323      # Going to short mode and back again did indeed matter. Since short mode is
42324      # case insensitive, let's make it lowercase to improve readability.
42325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42326      # Now convert it back to Unix-style (cygpath)
42327      input_path=`$CYGPATH -u "$shortmode_path"`
42328      new_path="$input_path"
42329    fi
42330  fi
42331
42332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42333  if test "x$test_cygdrive_prefix" = x; then
42334    # As a simple fix, exclude /usr/bin since it's not a real path.
42335    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42337      # a path prefixed by /cygdrive for fixpath to work.
42338      new_path="$CYGWIN_ROOT_PATH$input_path"
42339    fi
42340  fi
42341
42342  # remove trailing .exe if any
42343  new_path="${new_path/%.exe/}"
42344
42345    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42346
42347  # First separate the path from the arguments. This will split at the first
42348  # space.
42349  complete="$NM"
42350  path="${complete%% *}"
42351  tmp="$complete EOL"
42352  arguments="${tmp#* }"
42353
42354  # Input might be given as Windows format, start by converting to
42355  # unix format.
42356  new_path="$path"
42357
42358  windows_path="$new_path"
42359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42360    unix_path=`$CYGPATH -u "$windows_path"`
42361    new_path="$unix_path"
42362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42364    new_path="$unix_path"
42365  fi
42366
42367
42368  # Now try to locate executable using which
42369  new_path=`$WHICH "$new_path" 2> /dev/null`
42370
42371  if test "x$new_path" = x; then
42372    # Oops. Which didn't find the executable.
42373    # The splitting of arguments from the executable at a space might have been incorrect,
42374    # since paths with space are more likely in Windows. Give it another try with the whole
42375    # argument.
42376    path="$complete"
42377    arguments="EOL"
42378    new_path="$path"
42379
42380  windows_path="$new_path"
42381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42382    unix_path=`$CYGPATH -u "$windows_path"`
42383    new_path="$unix_path"
42384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42386    new_path="$unix_path"
42387  fi
42388
42389
42390    new_path=`$WHICH "$new_path" 2> /dev/null`
42391    # bat and cmd files are not always considered executable in MSYS causing which
42392    # to not find them
42393    if test "x$new_path" = x \
42394        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42395        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42396      new_path="$path"
42397
42398  windows_path="$new_path"
42399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42400    unix_path=`$CYGPATH -u "$windows_path"`
42401    new_path="$unix_path"
42402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42404    new_path="$unix_path"
42405  fi
42406
42407    fi
42408
42409    if test "x$new_path" = x; then
42410      # It's still not found. Now this is an unrecoverable error.
42411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42412$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42413      has_space=`$ECHO "$complete" | $GREP " "`
42414      if test "x$has_space" != x; then
42415        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42416$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42417      fi
42418      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42419    fi
42420  fi
42421
42422  # Now new_path has a complete unix path to the binary
42423  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42424    # Keep paths in /bin as-is, but remove trailing .exe if any
42425    new_path="${new_path/%.exe/}"
42426    # Do not save /bin paths to all_fixpath_prefixes!
42427  else
42428    # Not in mixed or Windows style, start by that.
42429    new_path=`cmd //c echo $new_path`
42430
42431  input_path="$new_path"
42432  # Check if we need to convert this using DOS-style short mode. If the path
42433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42434  # take no chances and rewrite it.
42435  # Note: m4 eats our [], so we need to use [ and ] instead.
42436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42437  if test "x$has_forbidden_chars" != x; then
42438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42440  fi
42441
42442    # Output is in $new_path
42443
42444  windows_path="$new_path"
42445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42446    unix_path=`$CYGPATH -u "$windows_path"`
42447    new_path="$unix_path"
42448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42450    new_path="$unix_path"
42451  fi
42452
42453    # remove trailing .exe if any
42454    new_path="${new_path/%.exe/}"
42455
42456    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42457    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42458  fi
42459
42460    else
42461      # We're on a unix platform. Hooray! :)
42462      # First separate the path from the arguments. This will split at the first
42463      # space.
42464      complete="$NM"
42465      path="${complete%% *}"
42466      tmp="$complete EOL"
42467      arguments="${tmp#* }"
42468
42469      # Cannot rely on the command "which" here since it doesn't always work.
42470      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42471      if test -z "$is_absolute_path"; then
42472        # Path to executable is not absolute. Find it.
42473        IFS_save="$IFS"
42474        IFS=:
42475        for p in $PATH; do
42476          if test -f "$p/$path" && test -x "$p/$path"; then
42477            new_path="$p/$path"
42478            break
42479          fi
42480        done
42481        IFS="$IFS_save"
42482      else
42483        # This is an absolute path, we can use it without further modifications.
42484        new_path="$path"
42485      fi
42486
42487      if test "x$new_path" = x; then
42488        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42489$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42490        has_space=`$ECHO "$complete" | $GREP " "`
42491        if test "x$has_space" != x; then
42492          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42493$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42494        fi
42495        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42496      fi
42497    fi
42498
42499    # Now join together the path and the arguments once again
42500    if test "x$arguments" != xEOL; then
42501      new_complete="$new_path ${arguments% *}"
42502    else
42503      new_complete="$new_path"
42504    fi
42505
42506    if test "x$complete" != "x$new_complete"; then
42507      NM="$new_complete"
42508      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42509$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42510    fi
42511  fi
42512
42513    GNM="$NM"
42514
42515  fi
42516
42517  # objcopy is used for moving debug symbols to separate files when
42518  # full debug symbols are enabled.
42519  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42520
42521
42522  # Publish this variable in the help.
42523
42524
42525  if [ -z "${OBJCOPY+x}" ]; then
42526    # The variable is not set by user, try to locate tool using the code snippet
42527    if test -n "$ac_tool_prefix"; then
42528  for ac_prog in gobjcopy objcopy
42529  do
42530    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42531set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42533$as_echo_n "checking for $ac_word... " >&6; }
42534if ${ac_cv_prog_OBJCOPY+:} false; then :
42535  $as_echo_n "(cached) " >&6
42536else
42537  if test -n "$OBJCOPY"; then
42538  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42539else
42540as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42541for as_dir in $PATH
42542do
42543  IFS=$as_save_IFS
42544  test -z "$as_dir" && as_dir=.
42545    for ac_exec_ext in '' $ac_executable_extensions; do
42546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42547    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42549    break 2
42550  fi
42551done
42552  done
42553IFS=$as_save_IFS
42554
42555fi
42556fi
42557OBJCOPY=$ac_cv_prog_OBJCOPY
42558if test -n "$OBJCOPY"; then
42559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42560$as_echo "$OBJCOPY" >&6; }
42561else
42562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42563$as_echo "no" >&6; }
42564fi
42565
42566
42567    test -n "$OBJCOPY" && break
42568  done
42569fi
42570if test -z "$OBJCOPY"; then
42571  ac_ct_OBJCOPY=$OBJCOPY
42572  for ac_prog in gobjcopy objcopy
42573do
42574  # Extract the first word of "$ac_prog", so it can be a program name with args.
42575set dummy $ac_prog; ac_word=$2
42576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42577$as_echo_n "checking for $ac_word... " >&6; }
42578if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42579  $as_echo_n "(cached) " >&6
42580else
42581  if test -n "$ac_ct_OBJCOPY"; then
42582  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42583else
42584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42585for as_dir in $PATH
42586do
42587  IFS=$as_save_IFS
42588  test -z "$as_dir" && as_dir=.
42589    for ac_exec_ext in '' $ac_executable_extensions; do
42590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42591    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42593    break 2
42594  fi
42595done
42596  done
42597IFS=$as_save_IFS
42598
42599fi
42600fi
42601ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42602if test -n "$ac_ct_OBJCOPY"; then
42603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42604$as_echo "$ac_ct_OBJCOPY" >&6; }
42605else
42606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42607$as_echo "no" >&6; }
42608fi
42609
42610
42611  test -n "$ac_ct_OBJCOPY" && break
42612done
42613
42614  if test "x$ac_ct_OBJCOPY" = x; then
42615    OBJCOPY=""
42616  else
42617    case $cross_compiling:$ac_tool_warned in
42618yes:)
42619{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42620$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42621ac_tool_warned=yes ;;
42622esac
42623    OBJCOPY=$ac_ct_OBJCOPY
42624  fi
42625fi
42626
42627  else
42628    # The variable is set, but is it from the command line or the environment?
42629
42630    # Try to remove the string !OBJCOPY! from our list.
42631    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42632    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42633      # If it failed, the variable was not from the command line. Ignore it,
42634      # but warn the user (except for BASH, which is always set by the calling BASH).
42635      if test "xOBJCOPY" != xBASH; then
42636        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42637$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42638      fi
42639      # Try to locate tool using the code snippet
42640      if test -n "$ac_tool_prefix"; then
42641  for ac_prog in gobjcopy objcopy
42642  do
42643    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42644set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42646$as_echo_n "checking for $ac_word... " >&6; }
42647if ${ac_cv_prog_OBJCOPY+:} false; then :
42648  $as_echo_n "(cached) " >&6
42649else
42650  if test -n "$OBJCOPY"; then
42651  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42652else
42653as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42654for as_dir in $PATH
42655do
42656  IFS=$as_save_IFS
42657  test -z "$as_dir" && as_dir=.
42658    for ac_exec_ext in '' $ac_executable_extensions; do
42659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42660    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42662    break 2
42663  fi
42664done
42665  done
42666IFS=$as_save_IFS
42667
42668fi
42669fi
42670OBJCOPY=$ac_cv_prog_OBJCOPY
42671if test -n "$OBJCOPY"; then
42672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42673$as_echo "$OBJCOPY" >&6; }
42674else
42675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42676$as_echo "no" >&6; }
42677fi
42678
42679
42680    test -n "$OBJCOPY" && break
42681  done
42682fi
42683if test -z "$OBJCOPY"; then
42684  ac_ct_OBJCOPY=$OBJCOPY
42685  for ac_prog in gobjcopy objcopy
42686do
42687  # Extract the first word of "$ac_prog", so it can be a program name with args.
42688set dummy $ac_prog; ac_word=$2
42689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42690$as_echo_n "checking for $ac_word... " >&6; }
42691if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42692  $as_echo_n "(cached) " >&6
42693else
42694  if test -n "$ac_ct_OBJCOPY"; then
42695  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42696else
42697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42698for as_dir in $PATH
42699do
42700  IFS=$as_save_IFS
42701  test -z "$as_dir" && as_dir=.
42702    for ac_exec_ext in '' $ac_executable_extensions; do
42703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42704    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42706    break 2
42707  fi
42708done
42709  done
42710IFS=$as_save_IFS
42711
42712fi
42713fi
42714ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42715if test -n "$ac_ct_OBJCOPY"; then
42716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42717$as_echo "$ac_ct_OBJCOPY" >&6; }
42718else
42719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42720$as_echo "no" >&6; }
42721fi
42722
42723
42724  test -n "$ac_ct_OBJCOPY" && break
42725done
42726
42727  if test "x$ac_ct_OBJCOPY" = x; then
42728    OBJCOPY=""
42729  else
42730    case $cross_compiling:$ac_tool_warned in
42731yes:)
42732{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42733$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42734ac_tool_warned=yes ;;
42735esac
42736    OBJCOPY=$ac_ct_OBJCOPY
42737  fi
42738fi
42739
42740    else
42741      # If it succeeded, then it was overridden by the user. We will use it
42742      # for the tool.
42743
42744      # First remove it from the list of overridden variables, so we can test
42745      # for unknown variables in the end.
42746      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42747
42748      # Check if we try to supply an empty value
42749      if test "x$OBJCOPY" = x; then
42750        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42751$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42752        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42753$as_echo_n "checking for OBJCOPY... " >&6; }
42754        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42755$as_echo "disabled" >&6; }
42756      else
42757        # Check if the provided tool contains a complete path.
42758        tool_specified="$OBJCOPY"
42759        tool_basename="${tool_specified##*/}"
42760        if test "x$tool_basename" = "x$tool_specified"; then
42761          # A command without a complete path is provided, search $PATH.
42762          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42763$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42764          # Extract the first word of "$tool_basename", so it can be a program name with args.
42765set dummy $tool_basename; ac_word=$2
42766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42767$as_echo_n "checking for $ac_word... " >&6; }
42768if ${ac_cv_path_OBJCOPY+:} false; then :
42769  $as_echo_n "(cached) " >&6
42770else
42771  case $OBJCOPY in
42772  [\\/]* | ?:[\\/]*)
42773  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42774  ;;
42775  *)
42776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42777for as_dir in $PATH
42778do
42779  IFS=$as_save_IFS
42780  test -z "$as_dir" && as_dir=.
42781    for ac_exec_ext in '' $ac_executable_extensions; do
42782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42783    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42785    break 2
42786  fi
42787done
42788  done
42789IFS=$as_save_IFS
42790
42791  ;;
42792esac
42793fi
42794OBJCOPY=$ac_cv_path_OBJCOPY
42795if test -n "$OBJCOPY"; then
42796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42797$as_echo "$OBJCOPY" >&6; }
42798else
42799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42800$as_echo "no" >&6; }
42801fi
42802
42803
42804          if test "x$OBJCOPY" = x; then
42805            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42806          fi
42807        else
42808          # Otherwise we believe it is a complete path. Use it as it is.
42809          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42810$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42811          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42812$as_echo_n "checking for OBJCOPY... " >&6; }
42813          if test ! -x "$tool_specified"; then
42814            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42815$as_echo "not found" >&6; }
42816            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42817          fi
42818          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42819$as_echo "$tool_specified" >&6; }
42820        fi
42821      fi
42822    fi
42823
42824  fi
42825
42826
42827    # Only call fixup if objcopy was found.
42828    if test -n "$OBJCOPY"; then
42829
42830  # Only process if variable expands to non-empty
42831
42832  if test "x$OBJCOPY" != x; then
42833    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42834
42835  # First separate the path from the arguments. This will split at the first
42836  # space.
42837  complete="$OBJCOPY"
42838  path="${complete%% *}"
42839  tmp="$complete EOL"
42840  arguments="${tmp#* }"
42841
42842  # Input might be given as Windows format, start by converting to
42843  # unix format.
42844  new_path=`$CYGPATH -u "$path"`
42845
42846  # Now try to locate executable using which
42847  new_path=`$WHICH "$new_path" 2> /dev/null`
42848  # bat and cmd files are not always considered executable in cygwin causing which
42849  # to not find them
42850  if test "x$new_path" = x \
42851      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42852      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42853    new_path=`$CYGPATH -u "$path"`
42854  fi
42855  if test "x$new_path" = x; then
42856    # Oops. Which didn't find the executable.
42857    # The splitting of arguments from the executable at a space might have been incorrect,
42858    # since paths with space are more likely in Windows. Give it another try with the whole
42859    # argument.
42860    path="$complete"
42861    arguments="EOL"
42862    new_path=`$CYGPATH -u "$path"`
42863    new_path=`$WHICH "$new_path" 2> /dev/null`
42864    # bat and cmd files are not always considered executable in cygwin causing which
42865    # to not find them
42866    if test "x$new_path" = x \
42867        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42868        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42869      new_path=`$CYGPATH -u "$path"`
42870    fi
42871    if test "x$new_path" = x; then
42872      # It's still not found. Now this is an unrecoverable error.
42873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42874$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42875      has_space=`$ECHO "$complete" | $GREP " "`
42876      if test "x$has_space" != x; then
42877        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42878$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42879      fi
42880      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42881    fi
42882  fi
42883
42884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42887  # "foo.exe" is OK but "foo" is an error.
42888  #
42889  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42890  # It is also a way to make sure we got the proper file name for the real test later on.
42891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42892  if test "x$test_shortpath" = x; then
42893    # Short path failed, file does not exist as specified.
42894    # Try adding .exe or .cmd
42895    if test -f "${new_path}.exe"; then
42896      input_to_shortpath="${new_path}.exe"
42897    elif test -f "${new_path}.cmd"; then
42898      input_to_shortpath="${new_path}.cmd"
42899    else
42900      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42901$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42902      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42903$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42904      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42905    fi
42906  else
42907    input_to_shortpath="$new_path"
42908  fi
42909
42910  # Call helper function which possibly converts this using DOS-style short mode.
42911  # If so, the updated path is stored in $new_path.
42912  new_path="$input_to_shortpath"
42913
42914  input_path="$input_to_shortpath"
42915  # Check if we need to convert this using DOS-style short mode. If the path
42916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42917  # take no chances and rewrite it.
42918  # Note: m4 eats our [], so we need to use [ and ] instead.
42919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42920  if test "x$has_forbidden_chars" != x; then
42921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42922    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42923    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42924    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42925      # Going to short mode and back again did indeed matter. Since short mode is
42926      # case insensitive, let's make it lowercase to improve readability.
42927      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42928      # Now convert it back to Unix-style (cygpath)
42929      input_path=`$CYGPATH -u "$shortmode_path"`
42930      new_path="$input_path"
42931    fi
42932  fi
42933
42934  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42935  if test "x$test_cygdrive_prefix" = x; then
42936    # As a simple fix, exclude /usr/bin since it's not a real path.
42937    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42938      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42939      # a path prefixed by /cygdrive for fixpath to work.
42940      new_path="$CYGWIN_ROOT_PATH$input_path"
42941    fi
42942  fi
42943
42944  # remove trailing .exe if any
42945  new_path="${new_path/%.exe/}"
42946
42947    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42948
42949  # First separate the path from the arguments. This will split at the first
42950  # space.
42951  complete="$OBJCOPY"
42952  path="${complete%% *}"
42953  tmp="$complete EOL"
42954  arguments="${tmp#* }"
42955
42956  # Input might be given as Windows format, start by converting to
42957  # unix format.
42958  new_path="$path"
42959
42960  windows_path="$new_path"
42961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42962    unix_path=`$CYGPATH -u "$windows_path"`
42963    new_path="$unix_path"
42964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42966    new_path="$unix_path"
42967  fi
42968
42969
42970  # Now try to locate executable using which
42971  new_path=`$WHICH "$new_path" 2> /dev/null`
42972
42973  if test "x$new_path" = x; then
42974    # Oops. Which didn't find the executable.
42975    # The splitting of arguments from the executable at a space might have been incorrect,
42976    # since paths with space are more likely in Windows. Give it another try with the whole
42977    # argument.
42978    path="$complete"
42979    arguments="EOL"
42980    new_path="$path"
42981
42982  windows_path="$new_path"
42983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42984    unix_path=`$CYGPATH -u "$windows_path"`
42985    new_path="$unix_path"
42986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42988    new_path="$unix_path"
42989  fi
42990
42991
42992    new_path=`$WHICH "$new_path" 2> /dev/null`
42993    # bat and cmd files are not always considered executable in MSYS causing which
42994    # to not find them
42995    if test "x$new_path" = x \
42996        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42997        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42998      new_path="$path"
42999
43000  windows_path="$new_path"
43001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43002    unix_path=`$CYGPATH -u "$windows_path"`
43003    new_path="$unix_path"
43004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43006    new_path="$unix_path"
43007  fi
43008
43009    fi
43010
43011    if test "x$new_path" = x; then
43012      # It's still not found. Now this is an unrecoverable error.
43013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43014$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43015      has_space=`$ECHO "$complete" | $GREP " "`
43016      if test "x$has_space" != x; then
43017        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43018$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43019      fi
43020      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43021    fi
43022  fi
43023
43024  # Now new_path has a complete unix path to the binary
43025  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43026    # Keep paths in /bin as-is, but remove trailing .exe if any
43027    new_path="${new_path/%.exe/}"
43028    # Do not save /bin paths to all_fixpath_prefixes!
43029  else
43030    # Not in mixed or Windows style, start by that.
43031    new_path=`cmd //c echo $new_path`
43032
43033  input_path="$new_path"
43034  # Check if we need to convert this using DOS-style short mode. If the path
43035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43036  # take no chances and rewrite it.
43037  # Note: m4 eats our [], so we need to use [ and ] instead.
43038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43039  if test "x$has_forbidden_chars" != x; then
43040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43041    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43042  fi
43043
43044    # Output is in $new_path
43045
43046  windows_path="$new_path"
43047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43048    unix_path=`$CYGPATH -u "$windows_path"`
43049    new_path="$unix_path"
43050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43052    new_path="$unix_path"
43053  fi
43054
43055    # remove trailing .exe if any
43056    new_path="${new_path/%.exe/}"
43057
43058    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43059    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43060  fi
43061
43062    else
43063      # We're on a unix platform. Hooray! :)
43064      # First separate the path from the arguments. This will split at the first
43065      # space.
43066      complete="$OBJCOPY"
43067      path="${complete%% *}"
43068      tmp="$complete EOL"
43069      arguments="${tmp#* }"
43070
43071      # Cannot rely on the command "which" here since it doesn't always work.
43072      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43073      if test -z "$is_absolute_path"; then
43074        # Path to executable is not absolute. Find it.
43075        IFS_save="$IFS"
43076        IFS=:
43077        for p in $PATH; do
43078          if test -f "$p/$path" && test -x "$p/$path"; then
43079            new_path="$p/$path"
43080            break
43081          fi
43082        done
43083        IFS="$IFS_save"
43084      else
43085        # This is an absolute path, we can use it without further modifications.
43086        new_path="$path"
43087      fi
43088
43089      if test "x$new_path" = x; then
43090        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43091$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43092        has_space=`$ECHO "$complete" | $GREP " "`
43093        if test "x$has_space" != x; then
43094          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43095$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43096        fi
43097        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43098      fi
43099    fi
43100
43101    # Now join together the path and the arguments once again
43102    if test "x$arguments" != xEOL; then
43103      new_complete="$new_path ${arguments% *}"
43104    else
43105      new_complete="$new_path"
43106    fi
43107
43108    if test "x$complete" != "x$new_complete"; then
43109      OBJCOPY="$new_complete"
43110      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43111$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43112    fi
43113  fi
43114
43115      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43116        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43117        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43118        # - version number is last blank separate word on first line
43119        # - version number formats that have been seen:
43120        #   - <major>.<minor>
43121        #   - <major>.<minor>.<micro>
43122        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43123        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43124         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43125              -e 's/.* //' \
43126              -e '/^[01]\./b bad' \
43127              -e '/^2\./{' \
43128              -e '  s/^2\.//' \
43129              -e '  /^[0-9]$/b bad' \
43130              -e '  /^[0-9]\./b bad' \
43131              -e '  /^1[0-9]$/b bad' \
43132              -e '  /^1[0-9]\./b bad' \
43133              -e '  /^20\./b bad' \
43134              -e '  /^21\.0$/b bad' \
43135              -e '  /^21\.0\./b bad' \
43136              -e '}' \
43137              -e ':good' \
43138              -e 's/.*/VALID_VERSION/p' \
43139              -e 'q' \
43140              -e ':bad' \
43141              -e 's/.*/BAD_VERSION/p' \
43142              -e 'q'`
43143        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43144          OBJCOPY=
43145          { $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
43146$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43147          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43148$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43149          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43150$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43151          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43152$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43153          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43154$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43155        fi
43156      fi
43157    fi
43158  fi
43159
43160
43161
43162  # Publish this variable in the help.
43163
43164
43165  if [ -z "${OBJDUMP+x}" ]; then
43166    # The variable is not set by user, try to locate tool using the code snippet
43167    if test -n "$ac_tool_prefix"; then
43168  for ac_prog in gobjdump objdump
43169  do
43170    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43171set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43173$as_echo_n "checking for $ac_word... " >&6; }
43174if ${ac_cv_prog_OBJDUMP+:} false; then :
43175  $as_echo_n "(cached) " >&6
43176else
43177  if test -n "$OBJDUMP"; then
43178  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43179else
43180as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43181for as_dir in $PATH
43182do
43183  IFS=$as_save_IFS
43184  test -z "$as_dir" && as_dir=.
43185    for ac_exec_ext in '' $ac_executable_extensions; do
43186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43187    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43189    break 2
43190  fi
43191done
43192  done
43193IFS=$as_save_IFS
43194
43195fi
43196fi
43197OBJDUMP=$ac_cv_prog_OBJDUMP
43198if test -n "$OBJDUMP"; then
43199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43200$as_echo "$OBJDUMP" >&6; }
43201else
43202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43203$as_echo "no" >&6; }
43204fi
43205
43206
43207    test -n "$OBJDUMP" && break
43208  done
43209fi
43210if test -z "$OBJDUMP"; then
43211  ac_ct_OBJDUMP=$OBJDUMP
43212  for ac_prog in gobjdump objdump
43213do
43214  # Extract the first word of "$ac_prog", so it can be a program name with args.
43215set dummy $ac_prog; ac_word=$2
43216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43217$as_echo_n "checking for $ac_word... " >&6; }
43218if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43219  $as_echo_n "(cached) " >&6
43220else
43221  if test -n "$ac_ct_OBJDUMP"; then
43222  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43223else
43224as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43225for as_dir in $PATH
43226do
43227  IFS=$as_save_IFS
43228  test -z "$as_dir" && as_dir=.
43229    for ac_exec_ext in '' $ac_executable_extensions; do
43230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43231    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43233    break 2
43234  fi
43235done
43236  done
43237IFS=$as_save_IFS
43238
43239fi
43240fi
43241ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43242if test -n "$ac_ct_OBJDUMP"; then
43243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43244$as_echo "$ac_ct_OBJDUMP" >&6; }
43245else
43246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43247$as_echo "no" >&6; }
43248fi
43249
43250
43251  test -n "$ac_ct_OBJDUMP" && break
43252done
43253
43254  if test "x$ac_ct_OBJDUMP" = x; then
43255    OBJDUMP=""
43256  else
43257    case $cross_compiling:$ac_tool_warned in
43258yes:)
43259{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43260$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43261ac_tool_warned=yes ;;
43262esac
43263    OBJDUMP=$ac_ct_OBJDUMP
43264  fi
43265fi
43266
43267  else
43268    # The variable is set, but is it from the command line or the environment?
43269
43270    # Try to remove the string !OBJDUMP! from our list.
43271    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43272    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43273      # If it failed, the variable was not from the command line. Ignore it,
43274      # but warn the user (except for BASH, which is always set by the calling BASH).
43275      if test "xOBJDUMP" != xBASH; then
43276        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43277$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43278      fi
43279      # Try to locate tool using the code snippet
43280      if test -n "$ac_tool_prefix"; then
43281  for ac_prog in gobjdump objdump
43282  do
43283    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43284set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43286$as_echo_n "checking for $ac_word... " >&6; }
43287if ${ac_cv_prog_OBJDUMP+:} false; then :
43288  $as_echo_n "(cached) " >&6
43289else
43290  if test -n "$OBJDUMP"; then
43291  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43292else
43293as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43294for as_dir in $PATH
43295do
43296  IFS=$as_save_IFS
43297  test -z "$as_dir" && as_dir=.
43298    for ac_exec_ext in '' $ac_executable_extensions; do
43299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43300    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43302    break 2
43303  fi
43304done
43305  done
43306IFS=$as_save_IFS
43307
43308fi
43309fi
43310OBJDUMP=$ac_cv_prog_OBJDUMP
43311if test -n "$OBJDUMP"; then
43312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43313$as_echo "$OBJDUMP" >&6; }
43314else
43315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43316$as_echo "no" >&6; }
43317fi
43318
43319
43320    test -n "$OBJDUMP" && break
43321  done
43322fi
43323if test -z "$OBJDUMP"; then
43324  ac_ct_OBJDUMP=$OBJDUMP
43325  for ac_prog in gobjdump objdump
43326do
43327  # Extract the first word of "$ac_prog", so it can be a program name with args.
43328set dummy $ac_prog; ac_word=$2
43329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43330$as_echo_n "checking for $ac_word... " >&6; }
43331if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43332  $as_echo_n "(cached) " >&6
43333else
43334  if test -n "$ac_ct_OBJDUMP"; then
43335  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43336else
43337as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43338for as_dir in $PATH
43339do
43340  IFS=$as_save_IFS
43341  test -z "$as_dir" && as_dir=.
43342    for ac_exec_ext in '' $ac_executable_extensions; do
43343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43344    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43346    break 2
43347  fi
43348done
43349  done
43350IFS=$as_save_IFS
43351
43352fi
43353fi
43354ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43355if test -n "$ac_ct_OBJDUMP"; then
43356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43357$as_echo "$ac_ct_OBJDUMP" >&6; }
43358else
43359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43360$as_echo "no" >&6; }
43361fi
43362
43363
43364  test -n "$ac_ct_OBJDUMP" && break
43365done
43366
43367  if test "x$ac_ct_OBJDUMP" = x; then
43368    OBJDUMP=""
43369  else
43370    case $cross_compiling:$ac_tool_warned in
43371yes:)
43372{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43373$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43374ac_tool_warned=yes ;;
43375esac
43376    OBJDUMP=$ac_ct_OBJDUMP
43377  fi
43378fi
43379
43380    else
43381      # If it succeeded, then it was overridden by the user. We will use it
43382      # for the tool.
43383
43384      # First remove it from the list of overridden variables, so we can test
43385      # for unknown variables in the end.
43386      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43387
43388      # Check if we try to supply an empty value
43389      if test "x$OBJDUMP" = x; then
43390        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43391$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43392        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43393$as_echo_n "checking for OBJDUMP... " >&6; }
43394        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43395$as_echo "disabled" >&6; }
43396      else
43397        # Check if the provided tool contains a complete path.
43398        tool_specified="$OBJDUMP"
43399        tool_basename="${tool_specified##*/}"
43400        if test "x$tool_basename" = "x$tool_specified"; then
43401          # A command without a complete path is provided, search $PATH.
43402          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43403$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43404          # Extract the first word of "$tool_basename", so it can be a program name with args.
43405set dummy $tool_basename; ac_word=$2
43406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43407$as_echo_n "checking for $ac_word... " >&6; }
43408if ${ac_cv_path_OBJDUMP+:} false; then :
43409  $as_echo_n "(cached) " >&6
43410else
43411  case $OBJDUMP in
43412  [\\/]* | ?:[\\/]*)
43413  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43414  ;;
43415  *)
43416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43417for as_dir in $PATH
43418do
43419  IFS=$as_save_IFS
43420  test -z "$as_dir" && as_dir=.
43421    for ac_exec_ext in '' $ac_executable_extensions; do
43422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43423    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43425    break 2
43426  fi
43427done
43428  done
43429IFS=$as_save_IFS
43430
43431  ;;
43432esac
43433fi
43434OBJDUMP=$ac_cv_path_OBJDUMP
43435if test -n "$OBJDUMP"; then
43436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43437$as_echo "$OBJDUMP" >&6; }
43438else
43439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43440$as_echo "no" >&6; }
43441fi
43442
43443
43444          if test "x$OBJDUMP" = x; then
43445            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43446          fi
43447        else
43448          # Otherwise we believe it is a complete path. Use it as it is.
43449          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43450$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43451          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43452$as_echo_n "checking for OBJDUMP... " >&6; }
43453          if test ! -x "$tool_specified"; then
43454            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43455$as_echo "not found" >&6; }
43456            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43457          fi
43458          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43459$as_echo "$tool_specified" >&6; }
43460        fi
43461      fi
43462    fi
43463
43464  fi
43465
43466
43467  if test "x$OBJDUMP" != x; then
43468    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43469    # bails if argument is missing.
43470
43471  # Only process if variable expands to non-empty
43472
43473  if test "x$OBJDUMP" != x; then
43474    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43475
43476  # First separate the path from the arguments. This will split at the first
43477  # space.
43478  complete="$OBJDUMP"
43479  path="${complete%% *}"
43480  tmp="$complete EOL"
43481  arguments="${tmp#* }"
43482
43483  # Input might be given as Windows format, start by converting to
43484  # unix format.
43485  new_path=`$CYGPATH -u "$path"`
43486
43487  # Now try to locate executable using which
43488  new_path=`$WHICH "$new_path" 2> /dev/null`
43489  # bat and cmd files are not always considered executable in cygwin causing which
43490  # to not find them
43491  if test "x$new_path" = x \
43492      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43493      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43494    new_path=`$CYGPATH -u "$path"`
43495  fi
43496  if test "x$new_path" = x; then
43497    # Oops. Which didn't find the executable.
43498    # The splitting of arguments from the executable at a space might have been incorrect,
43499    # since paths with space are more likely in Windows. Give it another try with the whole
43500    # argument.
43501    path="$complete"
43502    arguments="EOL"
43503    new_path=`$CYGPATH -u "$path"`
43504    new_path=`$WHICH "$new_path" 2> /dev/null`
43505    # bat and cmd files are not always considered executable in cygwin causing which
43506    # to not find them
43507    if test "x$new_path" = x \
43508        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43509        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43510      new_path=`$CYGPATH -u "$path"`
43511    fi
43512    if test "x$new_path" = x; then
43513      # It's still not found. Now this is an unrecoverable error.
43514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43515$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43516      has_space=`$ECHO "$complete" | $GREP " "`
43517      if test "x$has_space" != x; then
43518        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43519$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43520      fi
43521      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43522    fi
43523  fi
43524
43525  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43526  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43527  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43528  # "foo.exe" is OK but "foo" is an error.
43529  #
43530  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43531  # It is also a way to make sure we got the proper file name for the real test later on.
43532  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43533  if test "x$test_shortpath" = x; then
43534    # Short path failed, file does not exist as specified.
43535    # Try adding .exe or .cmd
43536    if test -f "${new_path}.exe"; then
43537      input_to_shortpath="${new_path}.exe"
43538    elif test -f "${new_path}.cmd"; then
43539      input_to_shortpath="${new_path}.cmd"
43540    else
43541      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43542$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43543      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43544$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43545      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43546    fi
43547  else
43548    input_to_shortpath="$new_path"
43549  fi
43550
43551  # Call helper function which possibly converts this using DOS-style short mode.
43552  # If so, the updated path is stored in $new_path.
43553  new_path="$input_to_shortpath"
43554
43555  input_path="$input_to_shortpath"
43556  # Check if we need to convert this using DOS-style short mode. If the path
43557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43558  # take no chances and rewrite it.
43559  # Note: m4 eats our [], so we need to use [ and ] instead.
43560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43561  if test "x$has_forbidden_chars" != x; then
43562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43563    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43564    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43565    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43566      # Going to short mode and back again did indeed matter. Since short mode is
43567      # case insensitive, let's make it lowercase to improve readability.
43568      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43569      # Now convert it back to Unix-style (cygpath)
43570      input_path=`$CYGPATH -u "$shortmode_path"`
43571      new_path="$input_path"
43572    fi
43573  fi
43574
43575  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43576  if test "x$test_cygdrive_prefix" = x; then
43577    # As a simple fix, exclude /usr/bin since it's not a real path.
43578    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43579      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43580      # a path prefixed by /cygdrive for fixpath to work.
43581      new_path="$CYGWIN_ROOT_PATH$input_path"
43582    fi
43583  fi
43584
43585  # remove trailing .exe if any
43586  new_path="${new_path/%.exe/}"
43587
43588    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43589
43590  # First separate the path from the arguments. This will split at the first
43591  # space.
43592  complete="$OBJDUMP"
43593  path="${complete%% *}"
43594  tmp="$complete EOL"
43595  arguments="${tmp#* }"
43596
43597  # Input might be given as Windows format, start by converting to
43598  # unix format.
43599  new_path="$path"
43600
43601  windows_path="$new_path"
43602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43603    unix_path=`$CYGPATH -u "$windows_path"`
43604    new_path="$unix_path"
43605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43607    new_path="$unix_path"
43608  fi
43609
43610
43611  # Now try to locate executable using which
43612  new_path=`$WHICH "$new_path" 2> /dev/null`
43613
43614  if test "x$new_path" = x; then
43615    # Oops. Which didn't find the executable.
43616    # The splitting of arguments from the executable at a space might have been incorrect,
43617    # since paths with space are more likely in Windows. Give it another try with the whole
43618    # argument.
43619    path="$complete"
43620    arguments="EOL"
43621    new_path="$path"
43622
43623  windows_path="$new_path"
43624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43625    unix_path=`$CYGPATH -u "$windows_path"`
43626    new_path="$unix_path"
43627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43629    new_path="$unix_path"
43630  fi
43631
43632
43633    new_path=`$WHICH "$new_path" 2> /dev/null`
43634    # bat and cmd files are not always considered executable in MSYS causing which
43635    # to not find them
43636    if test "x$new_path" = x \
43637        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43638        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43639      new_path="$path"
43640
43641  windows_path="$new_path"
43642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43643    unix_path=`$CYGPATH -u "$windows_path"`
43644    new_path="$unix_path"
43645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43647    new_path="$unix_path"
43648  fi
43649
43650    fi
43651
43652    if test "x$new_path" = x; then
43653      # It's still not found. Now this is an unrecoverable error.
43654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43655$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43656      has_space=`$ECHO "$complete" | $GREP " "`
43657      if test "x$has_space" != x; then
43658        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43659$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43660      fi
43661      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43662    fi
43663  fi
43664
43665  # Now new_path has a complete unix path to the binary
43666  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43667    # Keep paths in /bin as-is, but remove trailing .exe if any
43668    new_path="${new_path/%.exe/}"
43669    # Do not save /bin paths to all_fixpath_prefixes!
43670  else
43671    # Not in mixed or Windows style, start by that.
43672    new_path=`cmd //c echo $new_path`
43673
43674  input_path="$new_path"
43675  # Check if we need to convert this using DOS-style short mode. If the path
43676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43677  # take no chances and rewrite it.
43678  # Note: m4 eats our [], so we need to use [ and ] instead.
43679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43680  if test "x$has_forbidden_chars" != x; then
43681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43682    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43683  fi
43684
43685    # Output is in $new_path
43686
43687  windows_path="$new_path"
43688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43689    unix_path=`$CYGPATH -u "$windows_path"`
43690    new_path="$unix_path"
43691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43693    new_path="$unix_path"
43694  fi
43695
43696    # remove trailing .exe if any
43697    new_path="${new_path/%.exe/}"
43698
43699    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43700    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43701  fi
43702
43703    else
43704      # We're on a unix platform. Hooray! :)
43705      # First separate the path from the arguments. This will split at the first
43706      # space.
43707      complete="$OBJDUMP"
43708      path="${complete%% *}"
43709      tmp="$complete EOL"
43710      arguments="${tmp#* }"
43711
43712      # Cannot rely on the command "which" here since it doesn't always work.
43713      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43714      if test -z "$is_absolute_path"; then
43715        # Path to executable is not absolute. Find it.
43716        IFS_save="$IFS"
43717        IFS=:
43718        for p in $PATH; do
43719          if test -f "$p/$path" && test -x "$p/$path"; then
43720            new_path="$p/$path"
43721            break
43722          fi
43723        done
43724        IFS="$IFS_save"
43725      else
43726        # This is an absolute path, we can use it without further modifications.
43727        new_path="$path"
43728      fi
43729
43730      if test "x$new_path" = x; then
43731        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43732$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43733        has_space=`$ECHO "$complete" | $GREP " "`
43734        if test "x$has_space" != x; then
43735          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43736$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43737        fi
43738        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43739      fi
43740    fi
43741
43742    # Now join together the path and the arguments once again
43743    if test "x$arguments" != xEOL; then
43744      new_complete="$new_path ${arguments% *}"
43745    else
43746      new_complete="$new_path"
43747    fi
43748
43749    if test "x$complete" != "x$new_complete"; then
43750      OBJDUMP="$new_complete"
43751      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43752$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43753    fi
43754  fi
43755
43756  fi
43757
43758
43759  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43760  # to remain in place. Otherwise the compiler will not work in some siutations
43761  # in later configure checks.
43762  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43763    PATH="$OLD_PATH"
43764  fi
43765
43766  # Restore the flags to the user specified values.
43767  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43768  CFLAGS="$ORG_CFLAGS"
43769  CXXFLAGS="$ORG_CXXFLAGS"
43770
43771
43772# Finally do some processing after the detection phase
43773
43774  if test "x$COMPILE_TYPE" = "xcross"; then
43775    # Now we need to find a C/C++ compiler that can build executables for the
43776    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43777    # used once. Also, we need to do this without adding a tools dir to the
43778    # path, otherwise we might pick up cross-compilers which don't use standard
43779    # naming.
43780
43781    OLDPATH="$PATH"
43782
43783
43784# Check whether --with-build-devkit was given.
43785if test "${with_build_devkit+set}" = set; then :
43786  withval=$with_build_devkit;
43787fi
43788
43789    if test "x$with_build_devkit" = "xyes"; then
43790      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43791    elif test -n "$with_build_devkit"; then
43792      if test ! -d "$with_build_devkit"; then
43793        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43794      else
43795
43796  # Only process if variable expands to non-empty
43797
43798  if test "x$with_build_devkit" != x; then
43799    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43800
43801  # Input might be given as Windows format, start by converting to
43802  # unix format.
43803  path="$with_build_devkit"
43804  new_path=`$CYGPATH -u "$path"`
43805
43806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43809  # "foo.exe" is OK but "foo" is an error.
43810  #
43811  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43812  # It is also a way to make sure we got the proper file name for the real test later on.
43813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43814  if test "x$test_shortpath" = x; then
43815    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43816$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43817    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43818  fi
43819
43820  # Call helper function which possibly converts this using DOS-style short mode.
43821  # If so, the updated path is stored in $new_path.
43822
43823  input_path="$new_path"
43824  # Check if we need to convert this using DOS-style short mode. If the path
43825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43826  # take no chances and rewrite it.
43827  # Note: m4 eats our [], so we need to use [ and ] instead.
43828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43829  if test "x$has_forbidden_chars" != x; then
43830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43831    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43832    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43833    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43834      # Going to short mode and back again did indeed matter. Since short mode is
43835      # case insensitive, let's make it lowercase to improve readability.
43836      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43837      # Now convert it back to Unix-style (cygpath)
43838      input_path=`$CYGPATH -u "$shortmode_path"`
43839      new_path="$input_path"
43840    fi
43841  fi
43842
43843  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43844  if test "x$test_cygdrive_prefix" = x; then
43845    # As a simple fix, exclude /usr/bin since it's not a real path.
43846    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43847      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43848      # a path prefixed by /cygdrive for fixpath to work.
43849      new_path="$CYGWIN_ROOT_PATH$input_path"
43850    fi
43851  fi
43852
43853
43854  if test "x$path" != "x$new_path"; then
43855    with_build_devkit="$new_path"
43856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43857$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43858  fi
43859
43860    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43861
43862  path="$with_build_devkit"
43863  has_colon=`$ECHO $path | $GREP ^.:`
43864  new_path="$path"
43865  if test "x$has_colon" = x; then
43866    # Not in mixed or Windows style, start by that.
43867    new_path=`cmd //c echo $path`
43868  fi
43869
43870
43871  input_path="$new_path"
43872  # Check if we need to convert this using DOS-style short mode. If the path
43873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43874  # take no chances and rewrite it.
43875  # Note: m4 eats our [], so we need to use [ and ] instead.
43876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43877  if test "x$has_forbidden_chars" != x; then
43878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43879    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43880  fi
43881
43882
43883  windows_path="$new_path"
43884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43885    unix_path=`$CYGPATH -u "$windows_path"`
43886    new_path="$unix_path"
43887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43889    new_path="$unix_path"
43890  fi
43891
43892  if test "x$path" != "x$new_path"; then
43893    with_build_devkit="$new_path"
43894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43895$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43896  fi
43897
43898  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43899  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43900
43901    else
43902      # We're on a unix platform. Hooray! :)
43903      path="$with_build_devkit"
43904      has_space=`$ECHO "$path" | $GREP " "`
43905      if test "x$has_space" != x; then
43906        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43907$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43908        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43909      fi
43910
43911      # Use eval to expand a potential ~
43912      eval path="$path"
43913      if test ! -f "$path" && test ! -d "$path"; then
43914        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43915      fi
43916
43917      if test -d "$path"; then
43918        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43919      else
43920        dir="`$DIRNAME "$path"`"
43921        base="`$BASENAME "$path"`"
43922        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43923      fi
43924    fi
43925  fi
43926
43927        BUILD_DEVKIT_ROOT="$with_build_devkit"
43928        # Check for a meta data info file in the root of the devkit
43929        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43930          # Process devkit.info so that existing devkit variables are not
43931          # modified by this
43932          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43933              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43934              -e "s/\$host/\$build/g" \
43935              $BUILD_DEVKIT_ROOT/devkit.info \
43936              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43937          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43938          # This potentially sets the following:
43939          # A descriptive name of the devkit
43940
43941  if test "x$BUILD_DEVKIT_NAME" = x; then
43942    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43943  fi
43944
43945          # Corresponds to --with-extra-path
43946
43947  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43948    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43949  fi
43950
43951          # Corresponds to --with-toolchain-path
43952
43953  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43954    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43955  fi
43956
43957          # Corresponds to --with-sysroot
43958
43959  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43960    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43961  fi
43962
43963          # Skip the Window specific parts
43964        fi
43965
43966        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43967$as_echo_n "checking for build platform devkit... " >&6; }
43968        if test "x$BUILD_DEVKIT_NAME" != x; then
43969          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43970$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43971        else
43972          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43973$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43974        fi
43975
43976        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43977
43978  if test "x$BUILD_SYSROOT" != "x"; then
43979    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43980      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43981        # Solaris Studio does not have a concept of sysroot. Instead we must
43982        # make sure the default include and lib dirs are appended to each
43983        # compile and link command line. Must also add -I-xbuiltin to enable
43984        # inlining of system functions and intrinsics.
43985        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43986        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43987            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
43988      fi
43989    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43990      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43991      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43992    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43993      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43994      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43995    fi
43996    # Propagate the sysroot args to hotspot
43997    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43998    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43999    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44000    # The global CFLAGS and LDFLAGS variables need these for configure to function
44001    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44002    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44003    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44004    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44005  fi
44006
44007  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44008    # We also need -iframework<path>/System/Library/Frameworks
44009    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44010    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44011    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44012    # set this here so it doesn't have to be peppered throughout the forest
44013    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44014    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44015  fi
44016
44017
44018
44019
44020
44021         # Fallback default of just /bin if DEVKIT_PATH is not defined
44022        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44023          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44024        fi
44025        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44026      fi
44027    fi
44028
44029    # FIXME: we should list the discovered compilers as an exclude pattern!
44030    # If we do that, we can do this detection before POST_DETECTION, and still
44031    # find the build compilers in the tools dir, if needed.
44032
44033
44034
44035  # Publish this variable in the help.
44036
44037
44038  if [ -z "${BUILD_CC+x}" ]; then
44039    # The variable is not set by user, try to locate tool using the code snippet
44040    for ac_prog in cl cc gcc
44041do
44042  # Extract the first word of "$ac_prog", so it can be a program name with args.
44043set dummy $ac_prog; ac_word=$2
44044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44045$as_echo_n "checking for $ac_word... " >&6; }
44046if ${ac_cv_path_BUILD_CC+:} false; then :
44047  $as_echo_n "(cached) " >&6
44048else
44049  case $BUILD_CC in
44050  [\\/]* | ?:[\\/]*)
44051  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44052  ;;
44053  *)
44054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44055for as_dir in $PATH
44056do
44057  IFS=$as_save_IFS
44058  test -z "$as_dir" && as_dir=.
44059    for ac_exec_ext in '' $ac_executable_extensions; do
44060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44061    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44063    break 2
44064  fi
44065done
44066  done
44067IFS=$as_save_IFS
44068
44069  ;;
44070esac
44071fi
44072BUILD_CC=$ac_cv_path_BUILD_CC
44073if test -n "$BUILD_CC"; then
44074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44075$as_echo "$BUILD_CC" >&6; }
44076else
44077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44078$as_echo "no" >&6; }
44079fi
44080
44081
44082  test -n "$BUILD_CC" && break
44083done
44084
44085  else
44086    # The variable is set, but is it from the command line or the environment?
44087
44088    # Try to remove the string !BUILD_CC! from our list.
44089    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44090    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44091      # If it failed, the variable was not from the command line. Ignore it,
44092      # but warn the user (except for BASH, which is always set by the calling BASH).
44093      if test "xBUILD_CC" != xBASH; then
44094        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44095$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44096      fi
44097      # Try to locate tool using the code snippet
44098      for ac_prog in cl cc gcc
44099do
44100  # Extract the first word of "$ac_prog", so it can be a program name with args.
44101set dummy $ac_prog; ac_word=$2
44102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44103$as_echo_n "checking for $ac_word... " >&6; }
44104if ${ac_cv_path_BUILD_CC+:} false; then :
44105  $as_echo_n "(cached) " >&6
44106else
44107  case $BUILD_CC in
44108  [\\/]* | ?:[\\/]*)
44109  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44110  ;;
44111  *)
44112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44113for as_dir in $PATH
44114do
44115  IFS=$as_save_IFS
44116  test -z "$as_dir" && as_dir=.
44117    for ac_exec_ext in '' $ac_executable_extensions; do
44118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44119    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44121    break 2
44122  fi
44123done
44124  done
44125IFS=$as_save_IFS
44126
44127  ;;
44128esac
44129fi
44130BUILD_CC=$ac_cv_path_BUILD_CC
44131if test -n "$BUILD_CC"; then
44132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44133$as_echo "$BUILD_CC" >&6; }
44134else
44135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44136$as_echo "no" >&6; }
44137fi
44138
44139
44140  test -n "$BUILD_CC" && break
44141done
44142
44143    else
44144      # If it succeeded, then it was overridden by the user. We will use it
44145      # for the tool.
44146
44147      # First remove it from the list of overridden variables, so we can test
44148      # for unknown variables in the end.
44149      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44150
44151      # Check if we try to supply an empty value
44152      if test "x$BUILD_CC" = x; then
44153        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44154$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44155        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44156$as_echo_n "checking for BUILD_CC... " >&6; }
44157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44158$as_echo "disabled" >&6; }
44159      else
44160        # Check if the provided tool contains a complete path.
44161        tool_specified="$BUILD_CC"
44162        tool_basename="${tool_specified##*/}"
44163        if test "x$tool_basename" = "x$tool_specified"; then
44164          # A command without a complete path is provided, search $PATH.
44165          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44166$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44167          # Extract the first word of "$tool_basename", so it can be a program name with args.
44168set dummy $tool_basename; ac_word=$2
44169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44170$as_echo_n "checking for $ac_word... " >&6; }
44171if ${ac_cv_path_BUILD_CC+:} false; then :
44172  $as_echo_n "(cached) " >&6
44173else
44174  case $BUILD_CC in
44175  [\\/]* | ?:[\\/]*)
44176  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44177  ;;
44178  *)
44179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44180for as_dir in $PATH
44181do
44182  IFS=$as_save_IFS
44183  test -z "$as_dir" && as_dir=.
44184    for ac_exec_ext in '' $ac_executable_extensions; do
44185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44186    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44188    break 2
44189  fi
44190done
44191  done
44192IFS=$as_save_IFS
44193
44194  ;;
44195esac
44196fi
44197BUILD_CC=$ac_cv_path_BUILD_CC
44198if test -n "$BUILD_CC"; then
44199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44200$as_echo "$BUILD_CC" >&6; }
44201else
44202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44203$as_echo "no" >&6; }
44204fi
44205
44206
44207          if test "x$BUILD_CC" = x; then
44208            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44209          fi
44210        else
44211          # Otherwise we believe it is a complete path. Use it as it is.
44212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44213$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44214          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44215$as_echo_n "checking for BUILD_CC... " >&6; }
44216          if test ! -x "$tool_specified"; then
44217            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44218$as_echo "not found" >&6; }
44219            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44220          fi
44221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44222$as_echo "$tool_specified" >&6; }
44223        fi
44224      fi
44225    fi
44226
44227  fi
44228
44229
44230
44231  if test "x$BUILD_CC" = x; then
44232    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44233  fi
44234
44235
44236
44237  # Only process if variable expands to non-empty
44238
44239  if test "x$BUILD_CC" != x; then
44240    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44241
44242  # First separate the path from the arguments. This will split at the first
44243  # space.
44244  complete="$BUILD_CC"
44245  path="${complete%% *}"
44246  tmp="$complete EOL"
44247  arguments="${tmp#* }"
44248
44249  # Input might be given as Windows format, start by converting to
44250  # unix format.
44251  new_path=`$CYGPATH -u "$path"`
44252
44253  # Now try to locate executable using which
44254  new_path=`$WHICH "$new_path" 2> /dev/null`
44255  # bat and cmd files are not always considered executable in cygwin causing which
44256  # to not find them
44257  if test "x$new_path" = x \
44258      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44259      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44260    new_path=`$CYGPATH -u "$path"`
44261  fi
44262  if test "x$new_path" = x; then
44263    # Oops. Which didn't find the executable.
44264    # The splitting of arguments from the executable at a space might have been incorrect,
44265    # since paths with space are more likely in Windows. Give it another try with the whole
44266    # argument.
44267    path="$complete"
44268    arguments="EOL"
44269    new_path=`$CYGPATH -u "$path"`
44270    new_path=`$WHICH "$new_path" 2> /dev/null`
44271    # bat and cmd files are not always considered executable in cygwin causing which
44272    # to not find them
44273    if test "x$new_path" = x \
44274        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44275        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44276      new_path=`$CYGPATH -u "$path"`
44277    fi
44278    if test "x$new_path" = x; then
44279      # It's still not found. Now this is an unrecoverable error.
44280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44281$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44282      has_space=`$ECHO "$complete" | $GREP " "`
44283      if test "x$has_space" != x; then
44284        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44285$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44286      fi
44287      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44288    fi
44289  fi
44290
44291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44294  # "foo.exe" is OK but "foo" is an error.
44295  #
44296  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44297  # It is also a way to make sure we got the proper file name for the real test later on.
44298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44299  if test "x$test_shortpath" = x; then
44300    # Short path failed, file does not exist as specified.
44301    # Try adding .exe or .cmd
44302    if test -f "${new_path}.exe"; then
44303      input_to_shortpath="${new_path}.exe"
44304    elif test -f "${new_path}.cmd"; then
44305      input_to_shortpath="${new_path}.cmd"
44306    else
44307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44308$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44309      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44310$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44311      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44312    fi
44313  else
44314    input_to_shortpath="$new_path"
44315  fi
44316
44317  # Call helper function which possibly converts this using DOS-style short mode.
44318  # If so, the updated path is stored in $new_path.
44319  new_path="$input_to_shortpath"
44320
44321  input_path="$input_to_shortpath"
44322  # Check if we need to convert this using DOS-style short mode. If the path
44323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44324  # take no chances and rewrite it.
44325  # Note: m4 eats our [], so we need to use [ and ] instead.
44326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44327  if test "x$has_forbidden_chars" != x; then
44328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44329    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44330    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44331    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44332      # Going to short mode and back again did indeed matter. Since short mode is
44333      # case insensitive, let's make it lowercase to improve readability.
44334      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44335      # Now convert it back to Unix-style (cygpath)
44336      input_path=`$CYGPATH -u "$shortmode_path"`
44337      new_path="$input_path"
44338    fi
44339  fi
44340
44341  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44342  if test "x$test_cygdrive_prefix" = x; then
44343    # As a simple fix, exclude /usr/bin since it's not a real path.
44344    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44345      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44346      # a path prefixed by /cygdrive for fixpath to work.
44347      new_path="$CYGWIN_ROOT_PATH$input_path"
44348    fi
44349  fi
44350
44351  # remove trailing .exe if any
44352  new_path="${new_path/%.exe/}"
44353
44354    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44355
44356  # First separate the path from the arguments. This will split at the first
44357  # space.
44358  complete="$BUILD_CC"
44359  path="${complete%% *}"
44360  tmp="$complete EOL"
44361  arguments="${tmp#* }"
44362
44363  # Input might be given as Windows format, start by converting to
44364  # unix format.
44365  new_path="$path"
44366
44367  windows_path="$new_path"
44368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44369    unix_path=`$CYGPATH -u "$windows_path"`
44370    new_path="$unix_path"
44371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44373    new_path="$unix_path"
44374  fi
44375
44376
44377  # Now try to locate executable using which
44378  new_path=`$WHICH "$new_path" 2> /dev/null`
44379
44380  if test "x$new_path" = x; then
44381    # Oops. Which didn't find the executable.
44382    # The splitting of arguments from the executable at a space might have been incorrect,
44383    # since paths with space are more likely in Windows. Give it another try with the whole
44384    # argument.
44385    path="$complete"
44386    arguments="EOL"
44387    new_path="$path"
44388
44389  windows_path="$new_path"
44390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44391    unix_path=`$CYGPATH -u "$windows_path"`
44392    new_path="$unix_path"
44393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44395    new_path="$unix_path"
44396  fi
44397
44398
44399    new_path=`$WHICH "$new_path" 2> /dev/null`
44400    # bat and cmd files are not always considered executable in MSYS causing which
44401    # to not find them
44402    if test "x$new_path" = x \
44403        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44404        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44405      new_path="$path"
44406
44407  windows_path="$new_path"
44408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44409    unix_path=`$CYGPATH -u "$windows_path"`
44410    new_path="$unix_path"
44411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44413    new_path="$unix_path"
44414  fi
44415
44416    fi
44417
44418    if test "x$new_path" = x; then
44419      # It's still not found. Now this is an unrecoverable error.
44420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44421$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44422      has_space=`$ECHO "$complete" | $GREP " "`
44423      if test "x$has_space" != x; then
44424        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44425$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44426      fi
44427      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44428    fi
44429  fi
44430
44431  # Now new_path has a complete unix path to the binary
44432  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44433    # Keep paths in /bin as-is, but remove trailing .exe if any
44434    new_path="${new_path/%.exe/}"
44435    # Do not save /bin paths to all_fixpath_prefixes!
44436  else
44437    # Not in mixed or Windows style, start by that.
44438    new_path=`cmd //c echo $new_path`
44439
44440  input_path="$new_path"
44441  # Check if we need to convert this using DOS-style short mode. If the path
44442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44443  # take no chances and rewrite it.
44444  # Note: m4 eats our [], so we need to use [ and ] instead.
44445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44446  if test "x$has_forbidden_chars" != x; then
44447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44449  fi
44450
44451    # Output is in $new_path
44452
44453  windows_path="$new_path"
44454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44455    unix_path=`$CYGPATH -u "$windows_path"`
44456    new_path="$unix_path"
44457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44459    new_path="$unix_path"
44460  fi
44461
44462    # remove trailing .exe if any
44463    new_path="${new_path/%.exe/}"
44464
44465    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44466    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44467  fi
44468
44469    else
44470      # We're on a unix platform. Hooray! :)
44471      # First separate the path from the arguments. This will split at the first
44472      # space.
44473      complete="$BUILD_CC"
44474      path="${complete%% *}"
44475      tmp="$complete EOL"
44476      arguments="${tmp#* }"
44477
44478      # Cannot rely on the command "which" here since it doesn't always work.
44479      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44480      if test -z "$is_absolute_path"; then
44481        # Path to executable is not absolute. Find it.
44482        IFS_save="$IFS"
44483        IFS=:
44484        for p in $PATH; do
44485          if test -f "$p/$path" && test -x "$p/$path"; then
44486            new_path="$p/$path"
44487            break
44488          fi
44489        done
44490        IFS="$IFS_save"
44491      else
44492        # This is an absolute path, we can use it without further modifications.
44493        new_path="$path"
44494      fi
44495
44496      if test "x$new_path" = x; then
44497        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44498$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44499        has_space=`$ECHO "$complete" | $GREP " "`
44500        if test "x$has_space" != x; then
44501          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44502$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44503        fi
44504        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44505      fi
44506    fi
44507
44508    # Now join together the path and the arguments once again
44509    if test "x$arguments" != xEOL; then
44510      new_complete="$new_path ${arguments% *}"
44511    else
44512      new_complete="$new_path"
44513    fi
44514
44515    if test "x$complete" != "x$new_complete"; then
44516      BUILD_CC="$new_complete"
44517      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44518$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44519    fi
44520  fi
44521
44522
44523
44524
44525  # Publish this variable in the help.
44526
44527
44528  if [ -z "${BUILD_CXX+x}" ]; then
44529    # The variable is not set by user, try to locate tool using the code snippet
44530    for ac_prog in cl CC g++
44531do
44532  # Extract the first word of "$ac_prog", so it can be a program name with args.
44533set dummy $ac_prog; ac_word=$2
44534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44535$as_echo_n "checking for $ac_word... " >&6; }
44536if ${ac_cv_path_BUILD_CXX+:} false; then :
44537  $as_echo_n "(cached) " >&6
44538else
44539  case $BUILD_CXX in
44540  [\\/]* | ?:[\\/]*)
44541  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44542  ;;
44543  *)
44544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44545for as_dir in $PATH
44546do
44547  IFS=$as_save_IFS
44548  test -z "$as_dir" && as_dir=.
44549    for ac_exec_ext in '' $ac_executable_extensions; do
44550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44551    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44553    break 2
44554  fi
44555done
44556  done
44557IFS=$as_save_IFS
44558
44559  ;;
44560esac
44561fi
44562BUILD_CXX=$ac_cv_path_BUILD_CXX
44563if test -n "$BUILD_CXX"; then
44564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44565$as_echo "$BUILD_CXX" >&6; }
44566else
44567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44568$as_echo "no" >&6; }
44569fi
44570
44571
44572  test -n "$BUILD_CXX" && break
44573done
44574
44575  else
44576    # The variable is set, but is it from the command line or the environment?
44577
44578    # Try to remove the string !BUILD_CXX! from our list.
44579    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44580    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44581      # If it failed, the variable was not from the command line. Ignore it,
44582      # but warn the user (except for BASH, which is always set by the calling BASH).
44583      if test "xBUILD_CXX" != xBASH; then
44584        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44585$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44586      fi
44587      # Try to locate tool using the code snippet
44588      for ac_prog in cl CC g++
44589do
44590  # Extract the first word of "$ac_prog", so it can be a program name with args.
44591set dummy $ac_prog; ac_word=$2
44592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44593$as_echo_n "checking for $ac_word... " >&6; }
44594if ${ac_cv_path_BUILD_CXX+:} false; then :
44595  $as_echo_n "(cached) " >&6
44596else
44597  case $BUILD_CXX in
44598  [\\/]* | ?:[\\/]*)
44599  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44600  ;;
44601  *)
44602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44603for as_dir in $PATH
44604do
44605  IFS=$as_save_IFS
44606  test -z "$as_dir" && as_dir=.
44607    for ac_exec_ext in '' $ac_executable_extensions; do
44608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44609    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44611    break 2
44612  fi
44613done
44614  done
44615IFS=$as_save_IFS
44616
44617  ;;
44618esac
44619fi
44620BUILD_CXX=$ac_cv_path_BUILD_CXX
44621if test -n "$BUILD_CXX"; then
44622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44623$as_echo "$BUILD_CXX" >&6; }
44624else
44625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44626$as_echo "no" >&6; }
44627fi
44628
44629
44630  test -n "$BUILD_CXX" && break
44631done
44632
44633    else
44634      # If it succeeded, then it was overridden by the user. We will use it
44635      # for the tool.
44636
44637      # First remove it from the list of overridden variables, so we can test
44638      # for unknown variables in the end.
44639      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44640
44641      # Check if we try to supply an empty value
44642      if test "x$BUILD_CXX" = x; then
44643        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44644$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44645        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44646$as_echo_n "checking for BUILD_CXX... " >&6; }
44647        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44648$as_echo "disabled" >&6; }
44649      else
44650        # Check if the provided tool contains a complete path.
44651        tool_specified="$BUILD_CXX"
44652        tool_basename="${tool_specified##*/}"
44653        if test "x$tool_basename" = "x$tool_specified"; then
44654          # A command without a complete path is provided, search $PATH.
44655          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44656$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44657          # Extract the first word of "$tool_basename", so it can be a program name with args.
44658set dummy $tool_basename; ac_word=$2
44659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44660$as_echo_n "checking for $ac_word... " >&6; }
44661if ${ac_cv_path_BUILD_CXX+:} false; then :
44662  $as_echo_n "(cached) " >&6
44663else
44664  case $BUILD_CXX in
44665  [\\/]* | ?:[\\/]*)
44666  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44667  ;;
44668  *)
44669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44670for as_dir in $PATH
44671do
44672  IFS=$as_save_IFS
44673  test -z "$as_dir" && as_dir=.
44674    for ac_exec_ext in '' $ac_executable_extensions; do
44675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44676    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44678    break 2
44679  fi
44680done
44681  done
44682IFS=$as_save_IFS
44683
44684  ;;
44685esac
44686fi
44687BUILD_CXX=$ac_cv_path_BUILD_CXX
44688if test -n "$BUILD_CXX"; then
44689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44690$as_echo "$BUILD_CXX" >&6; }
44691else
44692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44693$as_echo "no" >&6; }
44694fi
44695
44696
44697          if test "x$BUILD_CXX" = x; then
44698            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44699          fi
44700        else
44701          # Otherwise we believe it is a complete path. Use it as it is.
44702          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44703$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44704          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44705$as_echo_n "checking for BUILD_CXX... " >&6; }
44706          if test ! -x "$tool_specified"; then
44707            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44708$as_echo "not found" >&6; }
44709            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44710          fi
44711          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44712$as_echo "$tool_specified" >&6; }
44713        fi
44714      fi
44715    fi
44716
44717  fi
44718
44719
44720
44721  if test "x$BUILD_CXX" = x; then
44722    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44723  fi
44724
44725
44726
44727  # Only process if variable expands to non-empty
44728
44729  if test "x$BUILD_CXX" != x; then
44730    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44731
44732  # First separate the path from the arguments. This will split at the first
44733  # space.
44734  complete="$BUILD_CXX"
44735  path="${complete%% *}"
44736  tmp="$complete EOL"
44737  arguments="${tmp#* }"
44738
44739  # Input might be given as Windows format, start by converting to
44740  # unix format.
44741  new_path=`$CYGPATH -u "$path"`
44742
44743  # Now try to locate executable using which
44744  new_path=`$WHICH "$new_path" 2> /dev/null`
44745  # bat and cmd files are not always considered executable in cygwin causing which
44746  # to not find them
44747  if test "x$new_path" = x \
44748      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44749      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44750    new_path=`$CYGPATH -u "$path"`
44751  fi
44752  if test "x$new_path" = x; then
44753    # Oops. Which didn't find the executable.
44754    # The splitting of arguments from the executable at a space might have been incorrect,
44755    # since paths with space are more likely in Windows. Give it another try with the whole
44756    # argument.
44757    path="$complete"
44758    arguments="EOL"
44759    new_path=`$CYGPATH -u "$path"`
44760    new_path=`$WHICH "$new_path" 2> /dev/null`
44761    # bat and cmd files are not always considered executable in cygwin causing which
44762    # to not find them
44763    if test "x$new_path" = x \
44764        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44765        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44766      new_path=`$CYGPATH -u "$path"`
44767    fi
44768    if test "x$new_path" = x; then
44769      # It's still not found. Now this is an unrecoverable error.
44770      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44771$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44772      has_space=`$ECHO "$complete" | $GREP " "`
44773      if test "x$has_space" != x; then
44774        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44775$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44776      fi
44777      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44778    fi
44779  fi
44780
44781  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44782  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44783  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44784  # "foo.exe" is OK but "foo" is an error.
44785  #
44786  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44787  # It is also a way to make sure we got the proper file name for the real test later on.
44788  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44789  if test "x$test_shortpath" = x; then
44790    # Short path failed, file does not exist as specified.
44791    # Try adding .exe or .cmd
44792    if test -f "${new_path}.exe"; then
44793      input_to_shortpath="${new_path}.exe"
44794    elif test -f "${new_path}.cmd"; then
44795      input_to_shortpath="${new_path}.cmd"
44796    else
44797      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44798$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44799      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44800$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44801      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44802    fi
44803  else
44804    input_to_shortpath="$new_path"
44805  fi
44806
44807  # Call helper function which possibly converts this using DOS-style short mode.
44808  # If so, the updated path is stored in $new_path.
44809  new_path="$input_to_shortpath"
44810
44811  input_path="$input_to_shortpath"
44812  # Check if we need to convert this using DOS-style short mode. If the path
44813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44814  # take no chances and rewrite it.
44815  # Note: m4 eats our [], so we need to use [ and ] instead.
44816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44817  if test "x$has_forbidden_chars" != x; then
44818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44819    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44820    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44821    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44822      # Going to short mode and back again did indeed matter. Since short mode is
44823      # case insensitive, let's make it lowercase to improve readability.
44824      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44825      # Now convert it back to Unix-style (cygpath)
44826      input_path=`$CYGPATH -u "$shortmode_path"`
44827      new_path="$input_path"
44828    fi
44829  fi
44830
44831  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44832  if test "x$test_cygdrive_prefix" = x; then
44833    # As a simple fix, exclude /usr/bin since it's not a real path.
44834    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44835      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44836      # a path prefixed by /cygdrive for fixpath to work.
44837      new_path="$CYGWIN_ROOT_PATH$input_path"
44838    fi
44839  fi
44840
44841  # remove trailing .exe if any
44842  new_path="${new_path/%.exe/}"
44843
44844    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44845
44846  # First separate the path from the arguments. This will split at the first
44847  # space.
44848  complete="$BUILD_CXX"
44849  path="${complete%% *}"
44850  tmp="$complete EOL"
44851  arguments="${tmp#* }"
44852
44853  # Input might be given as Windows format, start by converting to
44854  # unix format.
44855  new_path="$path"
44856
44857  windows_path="$new_path"
44858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44859    unix_path=`$CYGPATH -u "$windows_path"`
44860    new_path="$unix_path"
44861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44863    new_path="$unix_path"
44864  fi
44865
44866
44867  # Now try to locate executable using which
44868  new_path=`$WHICH "$new_path" 2> /dev/null`
44869
44870  if test "x$new_path" = x; then
44871    # Oops. Which didn't find the executable.
44872    # The splitting of arguments from the executable at a space might have been incorrect,
44873    # since paths with space are more likely in Windows. Give it another try with the whole
44874    # argument.
44875    path="$complete"
44876    arguments="EOL"
44877    new_path="$path"
44878
44879  windows_path="$new_path"
44880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44881    unix_path=`$CYGPATH -u "$windows_path"`
44882    new_path="$unix_path"
44883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44885    new_path="$unix_path"
44886  fi
44887
44888
44889    new_path=`$WHICH "$new_path" 2> /dev/null`
44890    # bat and cmd files are not always considered executable in MSYS causing which
44891    # to not find them
44892    if test "x$new_path" = x \
44893        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44894        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44895      new_path="$path"
44896
44897  windows_path="$new_path"
44898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44899    unix_path=`$CYGPATH -u "$windows_path"`
44900    new_path="$unix_path"
44901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44903    new_path="$unix_path"
44904  fi
44905
44906    fi
44907
44908    if test "x$new_path" = x; then
44909      # It's still not found. Now this is an unrecoverable error.
44910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44911$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44912      has_space=`$ECHO "$complete" | $GREP " "`
44913      if test "x$has_space" != x; then
44914        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44915$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44916      fi
44917      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44918    fi
44919  fi
44920
44921  # Now new_path has a complete unix path to the binary
44922  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44923    # Keep paths in /bin as-is, but remove trailing .exe if any
44924    new_path="${new_path/%.exe/}"
44925    # Do not save /bin paths to all_fixpath_prefixes!
44926  else
44927    # Not in mixed or Windows style, start by that.
44928    new_path=`cmd //c echo $new_path`
44929
44930  input_path="$new_path"
44931  # Check if we need to convert this using DOS-style short mode. If the path
44932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44933  # take no chances and rewrite it.
44934  # Note: m4 eats our [], so we need to use [ and ] instead.
44935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44936  if test "x$has_forbidden_chars" != x; then
44937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44938    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44939  fi
44940
44941    # Output is in $new_path
44942
44943  windows_path="$new_path"
44944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44945    unix_path=`$CYGPATH -u "$windows_path"`
44946    new_path="$unix_path"
44947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44949    new_path="$unix_path"
44950  fi
44951
44952    # remove trailing .exe if any
44953    new_path="${new_path/%.exe/}"
44954
44955    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44956    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44957  fi
44958
44959    else
44960      # We're on a unix platform. Hooray! :)
44961      # First separate the path from the arguments. This will split at the first
44962      # space.
44963      complete="$BUILD_CXX"
44964      path="${complete%% *}"
44965      tmp="$complete EOL"
44966      arguments="${tmp#* }"
44967
44968      # Cannot rely on the command "which" here since it doesn't always work.
44969      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44970      if test -z "$is_absolute_path"; then
44971        # Path to executable is not absolute. Find it.
44972        IFS_save="$IFS"
44973        IFS=:
44974        for p in $PATH; do
44975          if test -f "$p/$path" && test -x "$p/$path"; then
44976            new_path="$p/$path"
44977            break
44978          fi
44979        done
44980        IFS="$IFS_save"
44981      else
44982        # This is an absolute path, we can use it without further modifications.
44983        new_path="$path"
44984      fi
44985
44986      if test "x$new_path" = x; then
44987        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44988$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44989        has_space=`$ECHO "$complete" | $GREP " "`
44990        if test "x$has_space" != x; then
44991          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44992$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44993        fi
44994        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44995      fi
44996    fi
44997
44998    # Now join together the path and the arguments once again
44999    if test "x$arguments" != xEOL; then
45000      new_complete="$new_path ${arguments% *}"
45001    else
45002      new_complete="$new_path"
45003    fi
45004
45005    if test "x$complete" != "x$new_complete"; then
45006      BUILD_CXX="$new_complete"
45007      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45008$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45009    fi
45010  fi
45011
45012
45013
45014  # Publish this variable in the help.
45015
45016
45017  if [ -z "${BUILD_NM+x}" ]; then
45018    # The variable is not set by user, try to locate tool using the code snippet
45019    for ac_prog in nm gcc-nm
45020do
45021  # Extract the first word of "$ac_prog", so it can be a program name with args.
45022set dummy $ac_prog; ac_word=$2
45023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45024$as_echo_n "checking for $ac_word... " >&6; }
45025if ${ac_cv_path_BUILD_NM+:} false; then :
45026  $as_echo_n "(cached) " >&6
45027else
45028  case $BUILD_NM in
45029  [\\/]* | ?:[\\/]*)
45030  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45031  ;;
45032  *)
45033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45034for as_dir in $PATH
45035do
45036  IFS=$as_save_IFS
45037  test -z "$as_dir" && as_dir=.
45038    for ac_exec_ext in '' $ac_executable_extensions; do
45039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45040    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45042    break 2
45043  fi
45044done
45045  done
45046IFS=$as_save_IFS
45047
45048  ;;
45049esac
45050fi
45051BUILD_NM=$ac_cv_path_BUILD_NM
45052if test -n "$BUILD_NM"; then
45053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45054$as_echo "$BUILD_NM" >&6; }
45055else
45056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45057$as_echo "no" >&6; }
45058fi
45059
45060
45061  test -n "$BUILD_NM" && break
45062done
45063
45064  else
45065    # The variable is set, but is it from the command line or the environment?
45066
45067    # Try to remove the string !BUILD_NM! from our list.
45068    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45069    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45070      # If it failed, the variable was not from the command line. Ignore it,
45071      # but warn the user (except for BASH, which is always set by the calling BASH).
45072      if test "xBUILD_NM" != xBASH; then
45073        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45074$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45075      fi
45076      # Try to locate tool using the code snippet
45077      for ac_prog in nm gcc-nm
45078do
45079  # Extract the first word of "$ac_prog", so it can be a program name with args.
45080set dummy $ac_prog; ac_word=$2
45081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45082$as_echo_n "checking for $ac_word... " >&6; }
45083if ${ac_cv_path_BUILD_NM+:} false; then :
45084  $as_echo_n "(cached) " >&6
45085else
45086  case $BUILD_NM in
45087  [\\/]* | ?:[\\/]*)
45088  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45089  ;;
45090  *)
45091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45092for as_dir in $PATH
45093do
45094  IFS=$as_save_IFS
45095  test -z "$as_dir" && as_dir=.
45096    for ac_exec_ext in '' $ac_executable_extensions; do
45097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45098    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45100    break 2
45101  fi
45102done
45103  done
45104IFS=$as_save_IFS
45105
45106  ;;
45107esac
45108fi
45109BUILD_NM=$ac_cv_path_BUILD_NM
45110if test -n "$BUILD_NM"; then
45111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45112$as_echo "$BUILD_NM" >&6; }
45113else
45114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45115$as_echo "no" >&6; }
45116fi
45117
45118
45119  test -n "$BUILD_NM" && break
45120done
45121
45122    else
45123      # If it succeeded, then it was overridden by the user. We will use it
45124      # for the tool.
45125
45126      # First remove it from the list of overridden variables, so we can test
45127      # for unknown variables in the end.
45128      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45129
45130      # Check if we try to supply an empty value
45131      if test "x$BUILD_NM" = x; then
45132        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45133$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45134        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45135$as_echo_n "checking for BUILD_NM... " >&6; }
45136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45137$as_echo "disabled" >&6; }
45138      else
45139        # Check if the provided tool contains a complete path.
45140        tool_specified="$BUILD_NM"
45141        tool_basename="${tool_specified##*/}"
45142        if test "x$tool_basename" = "x$tool_specified"; then
45143          # A command without a complete path is provided, search $PATH.
45144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45145$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45146          # Extract the first word of "$tool_basename", so it can be a program name with args.
45147set dummy $tool_basename; ac_word=$2
45148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45149$as_echo_n "checking for $ac_word... " >&6; }
45150if ${ac_cv_path_BUILD_NM+:} false; then :
45151  $as_echo_n "(cached) " >&6
45152else
45153  case $BUILD_NM in
45154  [\\/]* | ?:[\\/]*)
45155  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45156  ;;
45157  *)
45158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45159for as_dir in $PATH
45160do
45161  IFS=$as_save_IFS
45162  test -z "$as_dir" && as_dir=.
45163    for ac_exec_ext in '' $ac_executable_extensions; do
45164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45165    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45167    break 2
45168  fi
45169done
45170  done
45171IFS=$as_save_IFS
45172
45173  ;;
45174esac
45175fi
45176BUILD_NM=$ac_cv_path_BUILD_NM
45177if test -n "$BUILD_NM"; then
45178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45179$as_echo "$BUILD_NM" >&6; }
45180else
45181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45182$as_echo "no" >&6; }
45183fi
45184
45185
45186          if test "x$BUILD_NM" = x; then
45187            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45188          fi
45189        else
45190          # Otherwise we believe it is a complete path. Use it as it is.
45191          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45192$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45193          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45194$as_echo_n "checking for BUILD_NM... " >&6; }
45195          if test ! -x "$tool_specified"; then
45196            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45197$as_echo "not found" >&6; }
45198            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45199          fi
45200          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45201$as_echo "$tool_specified" >&6; }
45202        fi
45203      fi
45204    fi
45205
45206  fi
45207
45208
45209
45210  # Only process if variable expands to non-empty
45211
45212  if test "x$BUILD_NM" != x; then
45213    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45214
45215  # First separate the path from the arguments. This will split at the first
45216  # space.
45217  complete="$BUILD_NM"
45218  path="${complete%% *}"
45219  tmp="$complete EOL"
45220  arguments="${tmp#* }"
45221
45222  # Input might be given as Windows format, start by converting to
45223  # unix format.
45224  new_path=`$CYGPATH -u "$path"`
45225
45226  # Now try to locate executable using which
45227  new_path=`$WHICH "$new_path" 2> /dev/null`
45228  # bat and cmd files are not always considered executable in cygwin causing which
45229  # to not find them
45230  if test "x$new_path" = x \
45231      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45232      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45233    new_path=`$CYGPATH -u "$path"`
45234  fi
45235  if test "x$new_path" = x; then
45236    # Oops. Which didn't find the executable.
45237    # The splitting of arguments from the executable at a space might have been incorrect,
45238    # since paths with space are more likely in Windows. Give it another try with the whole
45239    # argument.
45240    path="$complete"
45241    arguments="EOL"
45242    new_path=`$CYGPATH -u "$path"`
45243    new_path=`$WHICH "$new_path" 2> /dev/null`
45244    # bat and cmd files are not always considered executable in cygwin causing which
45245    # to not find them
45246    if test "x$new_path" = x \
45247        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45248        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45249      new_path=`$CYGPATH -u "$path"`
45250    fi
45251    if test "x$new_path" = x; then
45252      # It's still not found. Now this is an unrecoverable error.
45253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45254$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45255      has_space=`$ECHO "$complete" | $GREP " "`
45256      if test "x$has_space" != x; then
45257        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45258$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45259      fi
45260      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45261    fi
45262  fi
45263
45264  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45265  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45266  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45267  # "foo.exe" is OK but "foo" is an error.
45268  #
45269  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45270  # It is also a way to make sure we got the proper file name for the real test later on.
45271  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45272  if test "x$test_shortpath" = x; then
45273    # Short path failed, file does not exist as specified.
45274    # Try adding .exe or .cmd
45275    if test -f "${new_path}.exe"; then
45276      input_to_shortpath="${new_path}.exe"
45277    elif test -f "${new_path}.cmd"; then
45278      input_to_shortpath="${new_path}.cmd"
45279    else
45280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45281$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45282      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45283$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45284      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45285    fi
45286  else
45287    input_to_shortpath="$new_path"
45288  fi
45289
45290  # Call helper function which possibly converts this using DOS-style short mode.
45291  # If so, the updated path is stored in $new_path.
45292  new_path="$input_to_shortpath"
45293
45294  input_path="$input_to_shortpath"
45295  # Check if we need to convert this using DOS-style short mode. If the path
45296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45297  # take no chances and rewrite it.
45298  # Note: m4 eats our [], so we need to use [ and ] instead.
45299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45300  if test "x$has_forbidden_chars" != x; then
45301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45302    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45303    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45304    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45305      # Going to short mode and back again did indeed matter. Since short mode is
45306      # case insensitive, let's make it lowercase to improve readability.
45307      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45308      # Now convert it back to Unix-style (cygpath)
45309      input_path=`$CYGPATH -u "$shortmode_path"`
45310      new_path="$input_path"
45311    fi
45312  fi
45313
45314  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45315  if test "x$test_cygdrive_prefix" = x; then
45316    # As a simple fix, exclude /usr/bin since it's not a real path.
45317    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45318      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45319      # a path prefixed by /cygdrive for fixpath to work.
45320      new_path="$CYGWIN_ROOT_PATH$input_path"
45321    fi
45322  fi
45323
45324  # remove trailing .exe if any
45325  new_path="${new_path/%.exe/}"
45326
45327    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45328
45329  # First separate the path from the arguments. This will split at the first
45330  # space.
45331  complete="$BUILD_NM"
45332  path="${complete%% *}"
45333  tmp="$complete EOL"
45334  arguments="${tmp#* }"
45335
45336  # Input might be given as Windows format, start by converting to
45337  # unix format.
45338  new_path="$path"
45339
45340  windows_path="$new_path"
45341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45342    unix_path=`$CYGPATH -u "$windows_path"`
45343    new_path="$unix_path"
45344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45346    new_path="$unix_path"
45347  fi
45348
45349
45350  # Now try to locate executable using which
45351  new_path=`$WHICH "$new_path" 2> /dev/null`
45352
45353  if test "x$new_path" = x; then
45354    # Oops. Which didn't find the executable.
45355    # The splitting of arguments from the executable at a space might have been incorrect,
45356    # since paths with space are more likely in Windows. Give it another try with the whole
45357    # argument.
45358    path="$complete"
45359    arguments="EOL"
45360    new_path="$path"
45361
45362  windows_path="$new_path"
45363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45364    unix_path=`$CYGPATH -u "$windows_path"`
45365    new_path="$unix_path"
45366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45368    new_path="$unix_path"
45369  fi
45370
45371
45372    new_path=`$WHICH "$new_path" 2> /dev/null`
45373    # bat and cmd files are not always considered executable in MSYS causing which
45374    # to not find them
45375    if test "x$new_path" = x \
45376        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45377        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45378      new_path="$path"
45379
45380  windows_path="$new_path"
45381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45382    unix_path=`$CYGPATH -u "$windows_path"`
45383    new_path="$unix_path"
45384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45386    new_path="$unix_path"
45387  fi
45388
45389    fi
45390
45391    if test "x$new_path" = x; then
45392      # It's still not found. Now this is an unrecoverable error.
45393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45394$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45395      has_space=`$ECHO "$complete" | $GREP " "`
45396      if test "x$has_space" != x; then
45397        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45398$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45399      fi
45400      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45401    fi
45402  fi
45403
45404  # Now new_path has a complete unix path to the binary
45405  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45406    # Keep paths in /bin as-is, but remove trailing .exe if any
45407    new_path="${new_path/%.exe/}"
45408    # Do not save /bin paths to all_fixpath_prefixes!
45409  else
45410    # Not in mixed or Windows style, start by that.
45411    new_path=`cmd //c echo $new_path`
45412
45413  input_path="$new_path"
45414  # Check if we need to convert this using DOS-style short mode. If the path
45415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45416  # take no chances and rewrite it.
45417  # Note: m4 eats our [], so we need to use [ and ] instead.
45418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45419  if test "x$has_forbidden_chars" != x; then
45420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45422  fi
45423
45424    # Output is in $new_path
45425
45426  windows_path="$new_path"
45427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45428    unix_path=`$CYGPATH -u "$windows_path"`
45429    new_path="$unix_path"
45430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45432    new_path="$unix_path"
45433  fi
45434
45435    # remove trailing .exe if any
45436    new_path="${new_path/%.exe/}"
45437
45438    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45439    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45440  fi
45441
45442    else
45443      # We're on a unix platform. Hooray! :)
45444      # First separate the path from the arguments. This will split at the first
45445      # space.
45446      complete="$BUILD_NM"
45447      path="${complete%% *}"
45448      tmp="$complete EOL"
45449      arguments="${tmp#* }"
45450
45451      # Cannot rely on the command "which" here since it doesn't always work.
45452      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45453      if test -z "$is_absolute_path"; then
45454        # Path to executable is not absolute. Find it.
45455        IFS_save="$IFS"
45456        IFS=:
45457        for p in $PATH; do
45458          if test -f "$p/$path" && test -x "$p/$path"; then
45459            new_path="$p/$path"
45460            break
45461          fi
45462        done
45463        IFS="$IFS_save"
45464      else
45465        # This is an absolute path, we can use it without further modifications.
45466        new_path="$path"
45467      fi
45468
45469      if test "x$new_path" = x; then
45470        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45471$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45472        has_space=`$ECHO "$complete" | $GREP " "`
45473        if test "x$has_space" != x; then
45474          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45475$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45476        fi
45477        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45478      fi
45479    fi
45480
45481    # Now join together the path and the arguments once again
45482    if test "x$arguments" != xEOL; then
45483      new_complete="$new_path ${arguments% *}"
45484    else
45485      new_complete="$new_path"
45486    fi
45487
45488    if test "x$complete" != "x$new_complete"; then
45489      BUILD_NM="$new_complete"
45490      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45491$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45492    fi
45493  fi
45494
45495
45496
45497  # Publish this variable in the help.
45498
45499
45500  if [ -z "${BUILD_AR+x}" ]; then
45501    # The variable is not set by user, try to locate tool using the code snippet
45502    for ac_prog in ar gcc-ar
45503do
45504  # Extract the first word of "$ac_prog", so it can be a program name with args.
45505set dummy $ac_prog; ac_word=$2
45506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45507$as_echo_n "checking for $ac_word... " >&6; }
45508if ${ac_cv_path_BUILD_AR+:} false; then :
45509  $as_echo_n "(cached) " >&6
45510else
45511  case $BUILD_AR in
45512  [\\/]* | ?:[\\/]*)
45513  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45514  ;;
45515  *)
45516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45517for as_dir in $PATH
45518do
45519  IFS=$as_save_IFS
45520  test -z "$as_dir" && as_dir=.
45521    for ac_exec_ext in '' $ac_executable_extensions; do
45522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45523    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45525    break 2
45526  fi
45527done
45528  done
45529IFS=$as_save_IFS
45530
45531  ;;
45532esac
45533fi
45534BUILD_AR=$ac_cv_path_BUILD_AR
45535if test -n "$BUILD_AR"; then
45536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45537$as_echo "$BUILD_AR" >&6; }
45538else
45539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45540$as_echo "no" >&6; }
45541fi
45542
45543
45544  test -n "$BUILD_AR" && break
45545done
45546
45547  else
45548    # The variable is set, but is it from the command line or the environment?
45549
45550    # Try to remove the string !BUILD_AR! from our list.
45551    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45552    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45553      # If it failed, the variable was not from the command line. Ignore it,
45554      # but warn the user (except for BASH, which is always set by the calling BASH).
45555      if test "xBUILD_AR" != xBASH; then
45556        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45557$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45558      fi
45559      # Try to locate tool using the code snippet
45560      for ac_prog in ar gcc-ar
45561do
45562  # Extract the first word of "$ac_prog", so it can be a program name with args.
45563set dummy $ac_prog; ac_word=$2
45564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45565$as_echo_n "checking for $ac_word... " >&6; }
45566if ${ac_cv_path_BUILD_AR+:} false; then :
45567  $as_echo_n "(cached) " >&6
45568else
45569  case $BUILD_AR in
45570  [\\/]* | ?:[\\/]*)
45571  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45572  ;;
45573  *)
45574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45575for as_dir in $PATH
45576do
45577  IFS=$as_save_IFS
45578  test -z "$as_dir" && as_dir=.
45579    for ac_exec_ext in '' $ac_executable_extensions; do
45580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45581    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45583    break 2
45584  fi
45585done
45586  done
45587IFS=$as_save_IFS
45588
45589  ;;
45590esac
45591fi
45592BUILD_AR=$ac_cv_path_BUILD_AR
45593if test -n "$BUILD_AR"; then
45594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45595$as_echo "$BUILD_AR" >&6; }
45596else
45597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45598$as_echo "no" >&6; }
45599fi
45600
45601
45602  test -n "$BUILD_AR" && break
45603done
45604
45605    else
45606      # If it succeeded, then it was overridden by the user. We will use it
45607      # for the tool.
45608
45609      # First remove it from the list of overridden variables, so we can test
45610      # for unknown variables in the end.
45611      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45612
45613      # Check if we try to supply an empty value
45614      if test "x$BUILD_AR" = x; then
45615        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45616$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45617        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45618$as_echo_n "checking for BUILD_AR... " >&6; }
45619        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45620$as_echo "disabled" >&6; }
45621      else
45622        # Check if the provided tool contains a complete path.
45623        tool_specified="$BUILD_AR"
45624        tool_basename="${tool_specified##*/}"
45625        if test "x$tool_basename" = "x$tool_specified"; then
45626          # A command without a complete path is provided, search $PATH.
45627          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45628$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45629          # Extract the first word of "$tool_basename", so it can be a program name with args.
45630set dummy $tool_basename; ac_word=$2
45631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45632$as_echo_n "checking for $ac_word... " >&6; }
45633if ${ac_cv_path_BUILD_AR+:} false; then :
45634  $as_echo_n "(cached) " >&6
45635else
45636  case $BUILD_AR in
45637  [\\/]* | ?:[\\/]*)
45638  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45639  ;;
45640  *)
45641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45642for as_dir in $PATH
45643do
45644  IFS=$as_save_IFS
45645  test -z "$as_dir" && as_dir=.
45646    for ac_exec_ext in '' $ac_executable_extensions; do
45647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45648    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45650    break 2
45651  fi
45652done
45653  done
45654IFS=$as_save_IFS
45655
45656  ;;
45657esac
45658fi
45659BUILD_AR=$ac_cv_path_BUILD_AR
45660if test -n "$BUILD_AR"; then
45661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45662$as_echo "$BUILD_AR" >&6; }
45663else
45664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45665$as_echo "no" >&6; }
45666fi
45667
45668
45669          if test "x$BUILD_AR" = x; then
45670            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45671          fi
45672        else
45673          # Otherwise we believe it is a complete path. Use it as it is.
45674          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45675$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45676          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45677$as_echo_n "checking for BUILD_AR... " >&6; }
45678          if test ! -x "$tool_specified"; then
45679            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45680$as_echo "not found" >&6; }
45681            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45682          fi
45683          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45684$as_echo "$tool_specified" >&6; }
45685        fi
45686      fi
45687    fi
45688
45689  fi
45690
45691
45692
45693  # Only process if variable expands to non-empty
45694
45695  if test "x$BUILD_AR" != x; then
45696    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45697
45698  # First separate the path from the arguments. This will split at the first
45699  # space.
45700  complete="$BUILD_AR"
45701  path="${complete%% *}"
45702  tmp="$complete EOL"
45703  arguments="${tmp#* }"
45704
45705  # Input might be given as Windows format, start by converting to
45706  # unix format.
45707  new_path=`$CYGPATH -u "$path"`
45708
45709  # Now try to locate executable using which
45710  new_path=`$WHICH "$new_path" 2> /dev/null`
45711  # bat and cmd files are not always considered executable in cygwin causing which
45712  # to not find them
45713  if test "x$new_path" = x \
45714      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45715      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45716    new_path=`$CYGPATH -u "$path"`
45717  fi
45718  if test "x$new_path" = x; then
45719    # Oops. Which didn't find the executable.
45720    # The splitting of arguments from the executable at a space might have been incorrect,
45721    # since paths with space are more likely in Windows. Give it another try with the whole
45722    # argument.
45723    path="$complete"
45724    arguments="EOL"
45725    new_path=`$CYGPATH -u "$path"`
45726    new_path=`$WHICH "$new_path" 2> /dev/null`
45727    # bat and cmd files are not always considered executable in cygwin causing which
45728    # to not find them
45729    if test "x$new_path" = x \
45730        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45731        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45732      new_path=`$CYGPATH -u "$path"`
45733    fi
45734    if test "x$new_path" = x; then
45735      # It's still not found. Now this is an unrecoverable error.
45736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45737$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45738      has_space=`$ECHO "$complete" | $GREP " "`
45739      if test "x$has_space" != x; then
45740        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45741$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45742      fi
45743      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45744    fi
45745  fi
45746
45747  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45748  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45749  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45750  # "foo.exe" is OK but "foo" is an error.
45751  #
45752  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45753  # It is also a way to make sure we got the proper file name for the real test later on.
45754  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45755  if test "x$test_shortpath" = x; then
45756    # Short path failed, file does not exist as specified.
45757    # Try adding .exe or .cmd
45758    if test -f "${new_path}.exe"; then
45759      input_to_shortpath="${new_path}.exe"
45760    elif test -f "${new_path}.cmd"; then
45761      input_to_shortpath="${new_path}.cmd"
45762    else
45763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45764$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45765      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45766$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45767      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45768    fi
45769  else
45770    input_to_shortpath="$new_path"
45771  fi
45772
45773  # Call helper function which possibly converts this using DOS-style short mode.
45774  # If so, the updated path is stored in $new_path.
45775  new_path="$input_to_shortpath"
45776
45777  input_path="$input_to_shortpath"
45778  # Check if we need to convert this using DOS-style short mode. If the path
45779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45780  # take no chances and rewrite it.
45781  # Note: m4 eats our [], so we need to use [ and ] instead.
45782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45783  if test "x$has_forbidden_chars" != x; then
45784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45788      # Going to short mode and back again did indeed matter. Since short mode is
45789      # case insensitive, let's make it lowercase to improve readability.
45790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45791      # Now convert it back to Unix-style (cygpath)
45792      input_path=`$CYGPATH -u "$shortmode_path"`
45793      new_path="$input_path"
45794    fi
45795  fi
45796
45797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45798  if test "x$test_cygdrive_prefix" = x; then
45799    # As a simple fix, exclude /usr/bin since it's not a real path.
45800    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45802      # a path prefixed by /cygdrive for fixpath to work.
45803      new_path="$CYGWIN_ROOT_PATH$input_path"
45804    fi
45805  fi
45806
45807  # remove trailing .exe if any
45808  new_path="${new_path/%.exe/}"
45809
45810    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45811
45812  # First separate the path from the arguments. This will split at the first
45813  # space.
45814  complete="$BUILD_AR"
45815  path="${complete%% *}"
45816  tmp="$complete EOL"
45817  arguments="${tmp#* }"
45818
45819  # Input might be given as Windows format, start by converting to
45820  # unix format.
45821  new_path="$path"
45822
45823  windows_path="$new_path"
45824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45825    unix_path=`$CYGPATH -u "$windows_path"`
45826    new_path="$unix_path"
45827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45829    new_path="$unix_path"
45830  fi
45831
45832
45833  # Now try to locate executable using which
45834  new_path=`$WHICH "$new_path" 2> /dev/null`
45835
45836  if test "x$new_path" = x; then
45837    # Oops. Which didn't find the executable.
45838    # The splitting of arguments from the executable at a space might have been incorrect,
45839    # since paths with space are more likely in Windows. Give it another try with the whole
45840    # argument.
45841    path="$complete"
45842    arguments="EOL"
45843    new_path="$path"
45844
45845  windows_path="$new_path"
45846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45847    unix_path=`$CYGPATH -u "$windows_path"`
45848    new_path="$unix_path"
45849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45851    new_path="$unix_path"
45852  fi
45853
45854
45855    new_path=`$WHICH "$new_path" 2> /dev/null`
45856    # bat and cmd files are not always considered executable in MSYS causing which
45857    # to not find them
45858    if test "x$new_path" = x \
45859        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45860        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45861      new_path="$path"
45862
45863  windows_path="$new_path"
45864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45865    unix_path=`$CYGPATH -u "$windows_path"`
45866    new_path="$unix_path"
45867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45869    new_path="$unix_path"
45870  fi
45871
45872    fi
45873
45874    if test "x$new_path" = x; then
45875      # It's still not found. Now this is an unrecoverable error.
45876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45877$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45878      has_space=`$ECHO "$complete" | $GREP " "`
45879      if test "x$has_space" != x; then
45880        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45881$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45882      fi
45883      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45884    fi
45885  fi
45886
45887  # Now new_path has a complete unix path to the binary
45888  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45889    # Keep paths in /bin as-is, but remove trailing .exe if any
45890    new_path="${new_path/%.exe/}"
45891    # Do not save /bin paths to all_fixpath_prefixes!
45892  else
45893    # Not in mixed or Windows style, start by that.
45894    new_path=`cmd //c echo $new_path`
45895
45896  input_path="$new_path"
45897  # Check if we need to convert this using DOS-style short mode. If the path
45898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45899  # take no chances and rewrite it.
45900  # Note: m4 eats our [], so we need to use [ and ] instead.
45901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45902  if test "x$has_forbidden_chars" != x; then
45903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45904    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45905  fi
45906
45907    # Output is in $new_path
45908
45909  windows_path="$new_path"
45910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45911    unix_path=`$CYGPATH -u "$windows_path"`
45912    new_path="$unix_path"
45913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45915    new_path="$unix_path"
45916  fi
45917
45918    # remove trailing .exe if any
45919    new_path="${new_path/%.exe/}"
45920
45921    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45922    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45923  fi
45924
45925    else
45926      # We're on a unix platform. Hooray! :)
45927      # First separate the path from the arguments. This will split at the first
45928      # space.
45929      complete="$BUILD_AR"
45930      path="${complete%% *}"
45931      tmp="$complete EOL"
45932      arguments="${tmp#* }"
45933
45934      # Cannot rely on the command "which" here since it doesn't always work.
45935      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45936      if test -z "$is_absolute_path"; then
45937        # Path to executable is not absolute. Find it.
45938        IFS_save="$IFS"
45939        IFS=:
45940        for p in $PATH; do
45941          if test -f "$p/$path" && test -x "$p/$path"; then
45942            new_path="$p/$path"
45943            break
45944          fi
45945        done
45946        IFS="$IFS_save"
45947      else
45948        # This is an absolute path, we can use it without further modifications.
45949        new_path="$path"
45950      fi
45951
45952      if test "x$new_path" = x; then
45953        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45954$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45955        has_space=`$ECHO "$complete" | $GREP " "`
45956        if test "x$has_space" != x; then
45957          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45958$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45959        fi
45960        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45961      fi
45962    fi
45963
45964    # Now join together the path and the arguments once again
45965    if test "x$arguments" != xEOL; then
45966      new_complete="$new_path ${arguments% *}"
45967    else
45968      new_complete="$new_path"
45969    fi
45970
45971    if test "x$complete" != "x$new_complete"; then
45972      BUILD_AR="$new_complete"
45973      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45974$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45975    fi
45976  fi
45977
45978
45979
45980  # Publish this variable in the help.
45981
45982
45983  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45984    # The variable is not set by user, try to locate tool using the code snippet
45985    for ac_prog in objcopy
45986do
45987  # Extract the first word of "$ac_prog", so it can be a program name with args.
45988set dummy $ac_prog; ac_word=$2
45989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45990$as_echo_n "checking for $ac_word... " >&6; }
45991if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45992  $as_echo_n "(cached) " >&6
45993else
45994  case $BUILD_OBJCOPY in
45995  [\\/]* | ?:[\\/]*)
45996  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45997  ;;
45998  *)
45999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46000for as_dir in $PATH
46001do
46002  IFS=$as_save_IFS
46003  test -z "$as_dir" && as_dir=.
46004    for ac_exec_ext in '' $ac_executable_extensions; do
46005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46006    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46008    break 2
46009  fi
46010done
46011  done
46012IFS=$as_save_IFS
46013
46014  ;;
46015esac
46016fi
46017BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46018if test -n "$BUILD_OBJCOPY"; then
46019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46020$as_echo "$BUILD_OBJCOPY" >&6; }
46021else
46022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46023$as_echo "no" >&6; }
46024fi
46025
46026
46027  test -n "$BUILD_OBJCOPY" && break
46028done
46029
46030  else
46031    # The variable is set, but is it from the command line or the environment?
46032
46033    # Try to remove the string !BUILD_OBJCOPY! from our list.
46034    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46035    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46036      # If it failed, the variable was not from the command line. Ignore it,
46037      # but warn the user (except for BASH, which is always set by the calling BASH).
46038      if test "xBUILD_OBJCOPY" != xBASH; then
46039        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46040$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46041      fi
46042      # Try to locate tool using the code snippet
46043      for ac_prog in objcopy
46044do
46045  # Extract the first word of "$ac_prog", so it can be a program name with args.
46046set dummy $ac_prog; ac_word=$2
46047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46048$as_echo_n "checking for $ac_word... " >&6; }
46049if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46050  $as_echo_n "(cached) " >&6
46051else
46052  case $BUILD_OBJCOPY in
46053  [\\/]* | ?:[\\/]*)
46054  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46055  ;;
46056  *)
46057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46058for as_dir in $PATH
46059do
46060  IFS=$as_save_IFS
46061  test -z "$as_dir" && as_dir=.
46062    for ac_exec_ext in '' $ac_executable_extensions; do
46063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46064    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46066    break 2
46067  fi
46068done
46069  done
46070IFS=$as_save_IFS
46071
46072  ;;
46073esac
46074fi
46075BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46076if test -n "$BUILD_OBJCOPY"; then
46077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46078$as_echo "$BUILD_OBJCOPY" >&6; }
46079else
46080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46081$as_echo "no" >&6; }
46082fi
46083
46084
46085  test -n "$BUILD_OBJCOPY" && break
46086done
46087
46088    else
46089      # If it succeeded, then it was overridden by the user. We will use it
46090      # for the tool.
46091
46092      # First remove it from the list of overridden variables, so we can test
46093      # for unknown variables in the end.
46094      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46095
46096      # Check if we try to supply an empty value
46097      if test "x$BUILD_OBJCOPY" = x; then
46098        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46099$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46100        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46101$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46102        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46103$as_echo "disabled" >&6; }
46104      else
46105        # Check if the provided tool contains a complete path.
46106        tool_specified="$BUILD_OBJCOPY"
46107        tool_basename="${tool_specified##*/}"
46108        if test "x$tool_basename" = "x$tool_specified"; then
46109          # A command without a complete path is provided, search $PATH.
46110          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46111$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46112          # Extract the first word of "$tool_basename", so it can be a program name with args.
46113set dummy $tool_basename; ac_word=$2
46114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46115$as_echo_n "checking for $ac_word... " >&6; }
46116if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46117  $as_echo_n "(cached) " >&6
46118else
46119  case $BUILD_OBJCOPY in
46120  [\\/]* | ?:[\\/]*)
46121  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46122  ;;
46123  *)
46124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46125for as_dir in $PATH
46126do
46127  IFS=$as_save_IFS
46128  test -z "$as_dir" && as_dir=.
46129    for ac_exec_ext in '' $ac_executable_extensions; do
46130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46131    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46133    break 2
46134  fi
46135done
46136  done
46137IFS=$as_save_IFS
46138
46139  ;;
46140esac
46141fi
46142BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46143if test -n "$BUILD_OBJCOPY"; then
46144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46145$as_echo "$BUILD_OBJCOPY" >&6; }
46146else
46147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46148$as_echo "no" >&6; }
46149fi
46150
46151
46152          if test "x$BUILD_OBJCOPY" = x; then
46153            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46154          fi
46155        else
46156          # Otherwise we believe it is a complete path. Use it as it is.
46157          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46158$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46159          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46160$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46161          if test ! -x "$tool_specified"; then
46162            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46163$as_echo "not found" >&6; }
46164            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46165          fi
46166          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46167$as_echo "$tool_specified" >&6; }
46168        fi
46169      fi
46170    fi
46171
46172  fi
46173
46174
46175
46176  # Only process if variable expands to non-empty
46177
46178  if test "x$BUILD_OBJCOPY" != x; then
46179    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46180
46181  # First separate the path from the arguments. This will split at the first
46182  # space.
46183  complete="$BUILD_OBJCOPY"
46184  path="${complete%% *}"
46185  tmp="$complete EOL"
46186  arguments="${tmp#* }"
46187
46188  # Input might be given as Windows format, start by converting to
46189  # unix format.
46190  new_path=`$CYGPATH -u "$path"`
46191
46192  # Now try to locate executable using which
46193  new_path=`$WHICH "$new_path" 2> /dev/null`
46194  # bat and cmd files are not always considered executable in cygwin causing which
46195  # to not find them
46196  if test "x$new_path" = x \
46197      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46198      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46199    new_path=`$CYGPATH -u "$path"`
46200  fi
46201  if test "x$new_path" = x; then
46202    # Oops. Which didn't find the executable.
46203    # The splitting of arguments from the executable at a space might have been incorrect,
46204    # since paths with space are more likely in Windows. Give it another try with the whole
46205    # argument.
46206    path="$complete"
46207    arguments="EOL"
46208    new_path=`$CYGPATH -u "$path"`
46209    new_path=`$WHICH "$new_path" 2> /dev/null`
46210    # bat and cmd files are not always considered executable in cygwin causing which
46211    # to not find them
46212    if test "x$new_path" = x \
46213        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46214        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46215      new_path=`$CYGPATH -u "$path"`
46216    fi
46217    if test "x$new_path" = x; then
46218      # It's still not found. Now this is an unrecoverable error.
46219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46220$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46221      has_space=`$ECHO "$complete" | $GREP " "`
46222      if test "x$has_space" != x; then
46223        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46224$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46225      fi
46226      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46227    fi
46228  fi
46229
46230  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46231  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46232  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46233  # "foo.exe" is OK but "foo" is an error.
46234  #
46235  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46236  # It is also a way to make sure we got the proper file name for the real test later on.
46237  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46238  if test "x$test_shortpath" = x; then
46239    # Short path failed, file does not exist as specified.
46240    # Try adding .exe or .cmd
46241    if test -f "${new_path}.exe"; then
46242      input_to_shortpath="${new_path}.exe"
46243    elif test -f "${new_path}.cmd"; then
46244      input_to_shortpath="${new_path}.cmd"
46245    else
46246      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46247$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46248      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46249$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46250      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46251    fi
46252  else
46253    input_to_shortpath="$new_path"
46254  fi
46255
46256  # Call helper function which possibly converts this using DOS-style short mode.
46257  # If so, the updated path is stored in $new_path.
46258  new_path="$input_to_shortpath"
46259
46260  input_path="$input_to_shortpath"
46261  # Check if we need to convert this using DOS-style short mode. If the path
46262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46263  # take no chances and rewrite it.
46264  # Note: m4 eats our [], so we need to use [ and ] instead.
46265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46266  if test "x$has_forbidden_chars" != x; then
46267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46268    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46269    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46270    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46271      # Going to short mode and back again did indeed matter. Since short mode is
46272      # case insensitive, let's make it lowercase to improve readability.
46273      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46274      # Now convert it back to Unix-style (cygpath)
46275      input_path=`$CYGPATH -u "$shortmode_path"`
46276      new_path="$input_path"
46277    fi
46278  fi
46279
46280  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46281  if test "x$test_cygdrive_prefix" = x; then
46282    # As a simple fix, exclude /usr/bin since it's not a real path.
46283    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46284      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46285      # a path prefixed by /cygdrive for fixpath to work.
46286      new_path="$CYGWIN_ROOT_PATH$input_path"
46287    fi
46288  fi
46289
46290  # remove trailing .exe if any
46291  new_path="${new_path/%.exe/}"
46292
46293    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46294
46295  # First separate the path from the arguments. This will split at the first
46296  # space.
46297  complete="$BUILD_OBJCOPY"
46298  path="${complete%% *}"
46299  tmp="$complete EOL"
46300  arguments="${tmp#* }"
46301
46302  # Input might be given as Windows format, start by converting to
46303  # unix format.
46304  new_path="$path"
46305
46306  windows_path="$new_path"
46307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46308    unix_path=`$CYGPATH -u "$windows_path"`
46309    new_path="$unix_path"
46310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46312    new_path="$unix_path"
46313  fi
46314
46315
46316  # Now try to locate executable using which
46317  new_path=`$WHICH "$new_path" 2> /dev/null`
46318
46319  if test "x$new_path" = x; then
46320    # Oops. Which didn't find the executable.
46321    # The splitting of arguments from the executable at a space might have been incorrect,
46322    # since paths with space are more likely in Windows. Give it another try with the whole
46323    # argument.
46324    path="$complete"
46325    arguments="EOL"
46326    new_path="$path"
46327
46328  windows_path="$new_path"
46329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46330    unix_path=`$CYGPATH -u "$windows_path"`
46331    new_path="$unix_path"
46332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46334    new_path="$unix_path"
46335  fi
46336
46337
46338    new_path=`$WHICH "$new_path" 2> /dev/null`
46339    # bat and cmd files are not always considered executable in MSYS causing which
46340    # to not find them
46341    if test "x$new_path" = x \
46342        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46343        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46344      new_path="$path"
46345
46346  windows_path="$new_path"
46347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46348    unix_path=`$CYGPATH -u "$windows_path"`
46349    new_path="$unix_path"
46350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46352    new_path="$unix_path"
46353  fi
46354
46355    fi
46356
46357    if test "x$new_path" = x; then
46358      # It's still not found. Now this is an unrecoverable error.
46359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46360$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46361      has_space=`$ECHO "$complete" | $GREP " "`
46362      if test "x$has_space" != x; then
46363        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46364$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46365      fi
46366      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46367    fi
46368  fi
46369
46370  # Now new_path has a complete unix path to the binary
46371  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46372    # Keep paths in /bin as-is, but remove trailing .exe if any
46373    new_path="${new_path/%.exe/}"
46374    # Do not save /bin paths to all_fixpath_prefixes!
46375  else
46376    # Not in mixed or Windows style, start by that.
46377    new_path=`cmd //c echo $new_path`
46378
46379  input_path="$new_path"
46380  # Check if we need to convert this using DOS-style short mode. If the path
46381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46382  # take no chances and rewrite it.
46383  # Note: m4 eats our [], so we need to use [ and ] instead.
46384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46385  if test "x$has_forbidden_chars" != x; then
46386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46387    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46388  fi
46389
46390    # Output is in $new_path
46391
46392  windows_path="$new_path"
46393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46394    unix_path=`$CYGPATH -u "$windows_path"`
46395    new_path="$unix_path"
46396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46398    new_path="$unix_path"
46399  fi
46400
46401    # remove trailing .exe if any
46402    new_path="${new_path/%.exe/}"
46403
46404    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46405    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46406  fi
46407
46408    else
46409      # We're on a unix platform. Hooray! :)
46410      # First separate the path from the arguments. This will split at the first
46411      # space.
46412      complete="$BUILD_OBJCOPY"
46413      path="${complete%% *}"
46414      tmp="$complete EOL"
46415      arguments="${tmp#* }"
46416
46417      # Cannot rely on the command "which" here since it doesn't always work.
46418      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46419      if test -z "$is_absolute_path"; then
46420        # Path to executable is not absolute. Find it.
46421        IFS_save="$IFS"
46422        IFS=:
46423        for p in $PATH; do
46424          if test -f "$p/$path" && test -x "$p/$path"; then
46425            new_path="$p/$path"
46426            break
46427          fi
46428        done
46429        IFS="$IFS_save"
46430      else
46431        # This is an absolute path, we can use it without further modifications.
46432        new_path="$path"
46433      fi
46434
46435      if test "x$new_path" = x; then
46436        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46437$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46438        has_space=`$ECHO "$complete" | $GREP " "`
46439        if test "x$has_space" != x; then
46440          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46441$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46442        fi
46443        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46444      fi
46445    fi
46446
46447    # Now join together the path and the arguments once again
46448    if test "x$arguments" != xEOL; then
46449      new_complete="$new_path ${arguments% *}"
46450    else
46451      new_complete="$new_path"
46452    fi
46453
46454    if test "x$complete" != "x$new_complete"; then
46455      BUILD_OBJCOPY="$new_complete"
46456      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46457$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46458    fi
46459  fi
46460
46461
46462
46463  # Publish this variable in the help.
46464
46465
46466  if [ -z "${BUILD_STRIP+x}" ]; then
46467    # The variable is not set by user, try to locate tool using the code snippet
46468    for ac_prog in strip
46469do
46470  # Extract the first word of "$ac_prog", so it can be a program name with args.
46471set dummy $ac_prog; ac_word=$2
46472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46473$as_echo_n "checking for $ac_word... " >&6; }
46474if ${ac_cv_path_BUILD_STRIP+:} false; then :
46475  $as_echo_n "(cached) " >&6
46476else
46477  case $BUILD_STRIP in
46478  [\\/]* | ?:[\\/]*)
46479  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46480  ;;
46481  *)
46482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46483for as_dir in $PATH
46484do
46485  IFS=$as_save_IFS
46486  test -z "$as_dir" && as_dir=.
46487    for ac_exec_ext in '' $ac_executable_extensions; do
46488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46489    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46491    break 2
46492  fi
46493done
46494  done
46495IFS=$as_save_IFS
46496
46497  ;;
46498esac
46499fi
46500BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46501if test -n "$BUILD_STRIP"; then
46502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46503$as_echo "$BUILD_STRIP" >&6; }
46504else
46505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46506$as_echo "no" >&6; }
46507fi
46508
46509
46510  test -n "$BUILD_STRIP" && break
46511done
46512
46513  else
46514    # The variable is set, but is it from the command line or the environment?
46515
46516    # Try to remove the string !BUILD_STRIP! from our list.
46517    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46518    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46519      # If it failed, the variable was not from the command line. Ignore it,
46520      # but warn the user (except for BASH, which is always set by the calling BASH).
46521      if test "xBUILD_STRIP" != xBASH; then
46522        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46523$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46524      fi
46525      # Try to locate tool using the code snippet
46526      for ac_prog in strip
46527do
46528  # Extract the first word of "$ac_prog", so it can be a program name with args.
46529set dummy $ac_prog; ac_word=$2
46530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46531$as_echo_n "checking for $ac_word... " >&6; }
46532if ${ac_cv_path_BUILD_STRIP+:} false; then :
46533  $as_echo_n "(cached) " >&6
46534else
46535  case $BUILD_STRIP in
46536  [\\/]* | ?:[\\/]*)
46537  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46538  ;;
46539  *)
46540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46541for as_dir in $PATH
46542do
46543  IFS=$as_save_IFS
46544  test -z "$as_dir" && as_dir=.
46545    for ac_exec_ext in '' $ac_executable_extensions; do
46546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46547    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46549    break 2
46550  fi
46551done
46552  done
46553IFS=$as_save_IFS
46554
46555  ;;
46556esac
46557fi
46558BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46559if test -n "$BUILD_STRIP"; then
46560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46561$as_echo "$BUILD_STRIP" >&6; }
46562else
46563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46564$as_echo "no" >&6; }
46565fi
46566
46567
46568  test -n "$BUILD_STRIP" && break
46569done
46570
46571    else
46572      # If it succeeded, then it was overridden by the user. We will use it
46573      # for the tool.
46574
46575      # First remove it from the list of overridden variables, so we can test
46576      # for unknown variables in the end.
46577      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46578
46579      # Check if we try to supply an empty value
46580      if test "x$BUILD_STRIP" = x; then
46581        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46582$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46583        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46584$as_echo_n "checking for BUILD_STRIP... " >&6; }
46585        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46586$as_echo "disabled" >&6; }
46587      else
46588        # Check if the provided tool contains a complete path.
46589        tool_specified="$BUILD_STRIP"
46590        tool_basename="${tool_specified##*/}"
46591        if test "x$tool_basename" = "x$tool_specified"; then
46592          # A command without a complete path is provided, search $PATH.
46593          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46594$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46595          # Extract the first word of "$tool_basename", so it can be a program name with args.
46596set dummy $tool_basename; ac_word=$2
46597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46598$as_echo_n "checking for $ac_word... " >&6; }
46599if ${ac_cv_path_BUILD_STRIP+:} false; then :
46600  $as_echo_n "(cached) " >&6
46601else
46602  case $BUILD_STRIP in
46603  [\\/]* | ?:[\\/]*)
46604  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46605  ;;
46606  *)
46607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46608for as_dir in $PATH
46609do
46610  IFS=$as_save_IFS
46611  test -z "$as_dir" && as_dir=.
46612    for ac_exec_ext in '' $ac_executable_extensions; do
46613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46614    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46616    break 2
46617  fi
46618done
46619  done
46620IFS=$as_save_IFS
46621
46622  ;;
46623esac
46624fi
46625BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46626if test -n "$BUILD_STRIP"; then
46627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46628$as_echo "$BUILD_STRIP" >&6; }
46629else
46630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46631$as_echo "no" >&6; }
46632fi
46633
46634
46635          if test "x$BUILD_STRIP" = x; then
46636            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46637          fi
46638        else
46639          # Otherwise we believe it is a complete path. Use it as it is.
46640          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46641$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46642          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46643$as_echo_n "checking for BUILD_STRIP... " >&6; }
46644          if test ! -x "$tool_specified"; then
46645            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46646$as_echo "not found" >&6; }
46647            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46648          fi
46649          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46650$as_echo "$tool_specified" >&6; }
46651        fi
46652      fi
46653    fi
46654
46655  fi
46656
46657
46658
46659  # Only process if variable expands to non-empty
46660
46661  if test "x$BUILD_STRIP" != x; then
46662    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46663
46664  # First separate the path from the arguments. This will split at the first
46665  # space.
46666  complete="$BUILD_STRIP"
46667  path="${complete%% *}"
46668  tmp="$complete EOL"
46669  arguments="${tmp#* }"
46670
46671  # Input might be given as Windows format, start by converting to
46672  # unix format.
46673  new_path=`$CYGPATH -u "$path"`
46674
46675  # Now try to locate executable using which
46676  new_path=`$WHICH "$new_path" 2> /dev/null`
46677  # bat and cmd files are not always considered executable in cygwin causing which
46678  # to not find them
46679  if test "x$new_path" = x \
46680      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46681      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46682    new_path=`$CYGPATH -u "$path"`
46683  fi
46684  if test "x$new_path" = x; then
46685    # Oops. Which didn't find the executable.
46686    # The splitting of arguments from the executable at a space might have been incorrect,
46687    # since paths with space are more likely in Windows. Give it another try with the whole
46688    # argument.
46689    path="$complete"
46690    arguments="EOL"
46691    new_path=`$CYGPATH -u "$path"`
46692    new_path=`$WHICH "$new_path" 2> /dev/null`
46693    # bat and cmd files are not always considered executable in cygwin causing which
46694    # to not find them
46695    if test "x$new_path" = x \
46696        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46697        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46698      new_path=`$CYGPATH -u "$path"`
46699    fi
46700    if test "x$new_path" = x; then
46701      # It's still not found. Now this is an unrecoverable error.
46702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46703$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46704      has_space=`$ECHO "$complete" | $GREP " "`
46705      if test "x$has_space" != x; then
46706        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46707$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46708      fi
46709      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46710    fi
46711  fi
46712
46713  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46714  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46715  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46716  # "foo.exe" is OK but "foo" is an error.
46717  #
46718  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46719  # It is also a way to make sure we got the proper file name for the real test later on.
46720  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46721  if test "x$test_shortpath" = x; then
46722    # Short path failed, file does not exist as specified.
46723    # Try adding .exe or .cmd
46724    if test -f "${new_path}.exe"; then
46725      input_to_shortpath="${new_path}.exe"
46726    elif test -f "${new_path}.cmd"; then
46727      input_to_shortpath="${new_path}.cmd"
46728    else
46729      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46730$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46731      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46732$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46733      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46734    fi
46735  else
46736    input_to_shortpath="$new_path"
46737  fi
46738
46739  # Call helper function which possibly converts this using DOS-style short mode.
46740  # If so, the updated path is stored in $new_path.
46741  new_path="$input_to_shortpath"
46742
46743  input_path="$input_to_shortpath"
46744  # Check if we need to convert this using DOS-style short mode. If the path
46745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46746  # take no chances and rewrite it.
46747  # Note: m4 eats our [], so we need to use [ and ] instead.
46748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46749  if test "x$has_forbidden_chars" != x; then
46750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46751    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46752    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46753    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46754      # Going to short mode and back again did indeed matter. Since short mode is
46755      # case insensitive, let's make it lowercase to improve readability.
46756      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46757      # Now convert it back to Unix-style (cygpath)
46758      input_path=`$CYGPATH -u "$shortmode_path"`
46759      new_path="$input_path"
46760    fi
46761  fi
46762
46763  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46764  if test "x$test_cygdrive_prefix" = x; then
46765    # As a simple fix, exclude /usr/bin since it's not a real path.
46766    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46767      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46768      # a path prefixed by /cygdrive for fixpath to work.
46769      new_path="$CYGWIN_ROOT_PATH$input_path"
46770    fi
46771  fi
46772
46773  # remove trailing .exe if any
46774  new_path="${new_path/%.exe/}"
46775
46776    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46777
46778  # First separate the path from the arguments. This will split at the first
46779  # space.
46780  complete="$BUILD_STRIP"
46781  path="${complete%% *}"
46782  tmp="$complete EOL"
46783  arguments="${tmp#* }"
46784
46785  # Input might be given as Windows format, start by converting to
46786  # unix format.
46787  new_path="$path"
46788
46789  windows_path="$new_path"
46790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46791    unix_path=`$CYGPATH -u "$windows_path"`
46792    new_path="$unix_path"
46793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46795    new_path="$unix_path"
46796  fi
46797
46798
46799  # Now try to locate executable using which
46800  new_path=`$WHICH "$new_path" 2> /dev/null`
46801
46802  if test "x$new_path" = x; then
46803    # Oops. Which didn't find the executable.
46804    # The splitting of arguments from the executable at a space might have been incorrect,
46805    # since paths with space are more likely in Windows. Give it another try with the whole
46806    # argument.
46807    path="$complete"
46808    arguments="EOL"
46809    new_path="$path"
46810
46811  windows_path="$new_path"
46812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46813    unix_path=`$CYGPATH -u "$windows_path"`
46814    new_path="$unix_path"
46815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46817    new_path="$unix_path"
46818  fi
46819
46820
46821    new_path=`$WHICH "$new_path" 2> /dev/null`
46822    # bat and cmd files are not always considered executable in MSYS causing which
46823    # to not find them
46824    if test "x$new_path" = x \
46825        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46826        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46827      new_path="$path"
46828
46829  windows_path="$new_path"
46830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46831    unix_path=`$CYGPATH -u "$windows_path"`
46832    new_path="$unix_path"
46833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46835    new_path="$unix_path"
46836  fi
46837
46838    fi
46839
46840    if test "x$new_path" = x; then
46841      # It's still not found. Now this is an unrecoverable error.
46842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46843$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46844      has_space=`$ECHO "$complete" | $GREP " "`
46845      if test "x$has_space" != x; then
46846        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46847$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46848      fi
46849      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46850    fi
46851  fi
46852
46853  # Now new_path has a complete unix path to the binary
46854  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46855    # Keep paths in /bin as-is, but remove trailing .exe if any
46856    new_path="${new_path/%.exe/}"
46857    # Do not save /bin paths to all_fixpath_prefixes!
46858  else
46859    # Not in mixed or Windows style, start by that.
46860    new_path=`cmd //c echo $new_path`
46861
46862  input_path="$new_path"
46863  # Check if we need to convert this using DOS-style short mode. If the path
46864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46865  # take no chances and rewrite it.
46866  # Note: m4 eats our [], so we need to use [ and ] instead.
46867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46868  if test "x$has_forbidden_chars" != x; then
46869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46870    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46871  fi
46872
46873    # Output is in $new_path
46874
46875  windows_path="$new_path"
46876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46877    unix_path=`$CYGPATH -u "$windows_path"`
46878    new_path="$unix_path"
46879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46881    new_path="$unix_path"
46882  fi
46883
46884    # remove trailing .exe if any
46885    new_path="${new_path/%.exe/}"
46886
46887    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46888    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46889  fi
46890
46891    else
46892      # We're on a unix platform. Hooray! :)
46893      # First separate the path from the arguments. This will split at the first
46894      # space.
46895      complete="$BUILD_STRIP"
46896      path="${complete%% *}"
46897      tmp="$complete EOL"
46898      arguments="${tmp#* }"
46899
46900      # Cannot rely on the command "which" here since it doesn't always work.
46901      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46902      if test -z "$is_absolute_path"; then
46903        # Path to executable is not absolute. Find it.
46904        IFS_save="$IFS"
46905        IFS=:
46906        for p in $PATH; do
46907          if test -f "$p/$path" && test -x "$p/$path"; then
46908            new_path="$p/$path"
46909            break
46910          fi
46911        done
46912        IFS="$IFS_save"
46913      else
46914        # This is an absolute path, we can use it without further modifications.
46915        new_path="$path"
46916      fi
46917
46918      if test "x$new_path" = x; then
46919        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46920$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46921        has_space=`$ECHO "$complete" | $GREP " "`
46922        if test "x$has_space" != x; then
46923          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46924$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46925        fi
46926        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46927      fi
46928    fi
46929
46930    # Now join together the path and the arguments once again
46931    if test "x$arguments" != xEOL; then
46932      new_complete="$new_path ${arguments% *}"
46933    else
46934      new_complete="$new_path"
46935    fi
46936
46937    if test "x$complete" != "x$new_complete"; then
46938      BUILD_STRIP="$new_complete"
46939      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46940$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46941    fi
46942  fi
46943
46944    # Assume the C compiler is the assembler
46945    BUILD_AS="$BUILD_CC -c"
46946    # Just like for the target compiler, use the compiler as linker
46947    BUILD_LD="$BUILD_CC"
46948    BUILD_LDCXX="$BUILD_CXX"
46949
46950    PATH="$OLDPATH"
46951
46952
46953  COMPILER=$BUILD_CC
46954  COMPILER_NAME=BuildC
46955
46956  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46957    # cc -V output typically looks like
46958    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46959    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46960    # Check that this is likely to be the Solaris Studio cc.
46961    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46962    if test $? -ne 0; then
46963      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46964      { $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
46965$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46966      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46967$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46968      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46969$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46970      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46971    fi
46972    # Remove usage instructions (if present), and
46973    # collapse compiler output into a single line
46974    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46975        $SED -e 's/ *[Uu]sage:.*//'`
46976    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46977        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46978  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46979    # xlc -qversion output typically looks like
46980    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46981    #     Version: 11.01.0000.0015
46982    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46983    # Check that this is likely to be the IBM XL C compiler.
46984    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46985    if test $? -ne 0; then
46986      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46987      { $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
46988$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46989      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46990$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46991      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46992$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46993      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46994    fi
46995    # Collapse compiler output into a single line
46996    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46997    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46998        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
46999  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47000    # There is no specific version flag, but all output starts with a version string.
47001    # First line typically looks something like:
47002    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47003    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47004    # Check that this is likely to be Microsoft CL.EXE.
47005    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47006    if test $? -ne 0; then
47007      { $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
47008$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47009      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47010$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47011      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47012    fi
47013    # Collapse compiler output into a single line
47014    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47015    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47016        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47017  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47018    # gcc --version output typically looks like
47019    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47020    #     Copyright (C) 2013 Free Software Foundation, Inc.
47021    #     This is free software; see the source for copying conditions.  There is NO
47022    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47023    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47024    # Check that this is likely to be GCC.
47025    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47026    if test $? -ne 0; then
47027      { $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
47028$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47029      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47030$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47031      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47032    fi
47033    # Remove Copyright and legalese from version string, and
47034    # collapse into a single line
47035    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47036        $SED -e 's/ *Copyright .*//'`
47037    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47038        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47039  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47040    # clang --version output typically looks like
47041    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47042    #    clang version 3.3 (tags/RELEASE_33/final)
47043    # or
47044    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47045    #    Target: x86_64-pc-linux-gnu
47046    #    Thread model: posix
47047    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47048    # Check that this is likely to be clang
47049    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47050    if test $? -ne 0; then
47051      { $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
47052$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47053      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47054$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47055      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47056    fi
47057    # Collapse compiler output into a single line
47058    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47059    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47060        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47061  else
47062      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47063  fi
47064  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47065  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47066  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47067  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47068
47069  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47070$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47071
47072
47073  COMPILER=$BUILD_CXX
47074  COMPILER_NAME=BuildC++
47075
47076  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47077    # cc -V output typically looks like
47078    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47079    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47080    # Check that this is likely to be the Solaris Studio cc.
47081    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
47082    if test $? -ne 0; then
47083      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47084      { $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
47085$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47086      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47087$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47088      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47089$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47090      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47091    fi
47092    # Remove usage instructions (if present), and
47093    # collapse compiler output into a single line
47094    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47095        $SED -e 's/ *[Uu]sage:.*//'`
47096    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47097        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47098  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47099    # xlc -qversion output typically looks like
47100    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47101    #     Version: 11.01.0000.0015
47102    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47103    # Check that this is likely to be the IBM XL C compiler.
47104    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47105    if test $? -ne 0; then
47106      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47107      { $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
47108$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47109      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47110$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47111      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47112$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47113      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47114    fi
47115    # Collapse compiler output into a single line
47116    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47117    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47118        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47119  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47120    # There is no specific version flag, but all output starts with a version string.
47121    # First line typically looks something like:
47122    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47123    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47124    # Check that this is likely to be Microsoft CL.EXE.
47125    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47126    if test $? -ne 0; then
47127      { $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
47128$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47129      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47130$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47131      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47132    fi
47133    # Collapse compiler output into a single line
47134    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47135    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47136        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47137  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47138    # gcc --version output typically looks like
47139    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47140    #     Copyright (C) 2013 Free Software Foundation, Inc.
47141    #     This is free software; see the source for copying conditions.  There is NO
47142    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47143    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47144    # Check that this is likely to be GCC.
47145    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47146    if test $? -ne 0; then
47147      { $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
47148$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47149      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47150$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47151      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47152    fi
47153    # Remove Copyright and legalese from version string, and
47154    # collapse into a single line
47155    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47156        $SED -e 's/ *Copyright .*//'`
47157    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47158        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47159  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47160    # clang --version output typically looks like
47161    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47162    #    clang version 3.3 (tags/RELEASE_33/final)
47163    # or
47164    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47165    #    Target: x86_64-pc-linux-gnu
47166    #    Thread model: posix
47167    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47168    # Check that this is likely to be clang
47169    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47170    if test $? -ne 0; then
47171      { $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
47172$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47173      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47174$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47175      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47176    fi
47177    # Collapse compiler output into a single line
47178    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47179    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47180        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47181  else
47182      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47183  fi
47184  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47185  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47186  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47187  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47188
47189  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47190$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47191
47192
47193  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47194    { $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
47195$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47196    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47197$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47198  fi
47199
47200  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47201  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47202    { $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
47203$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;}
47204  fi
47205
47206  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47207    { $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
47208$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47209  fi
47210
47211  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47212
47213  else
47214    # If we are not cross compiling, use the normal target compilers for
47215    # building the build platform executables.
47216    BUILD_CC="$CC"
47217    BUILD_CXX="$CXX"
47218    BUILD_LD="$LD"
47219    BUILD_LDCXX="$LDCXX"
47220    BUILD_NM="$NM"
47221    BUILD_AS="$AS"
47222    BUILD_OBJCOPY="$OBJCOPY"
47223    BUILD_STRIP="$STRIP"
47224    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47225    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47226    BUILD_AR="$AR"
47227
47228
47229  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47230    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47231$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47232    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47233$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47234  fi
47235
47236  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47237  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47238    { $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
47239$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;}
47240  fi
47241
47242  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47243    { $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
47244$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47245  fi
47246
47247  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
47248
47249  fi
47250
47251
47252
47253
47254
47255
47256
47257
47258
47259
47260
47261
47262  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47263    # For hotspot, we need these in Windows mixed path,
47264    # so rewrite them all. Need added .exe suffix.
47265    HOTSPOT_CXX="$CXX.exe"
47266    HOTSPOT_LD="$LD.exe"
47267    HOTSPOT_MT="$MT.exe"
47268    HOTSPOT_RC="$RC.exe"
47269
47270  unix_path="$HOTSPOT_CXX"
47271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47272    windows_path=`$CYGPATH -m "$unix_path"`
47273    HOTSPOT_CXX="$windows_path"
47274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47275    windows_path=`cmd //c echo $unix_path`
47276    HOTSPOT_CXX="$windows_path"
47277  fi
47278
47279
47280  unix_path="$HOTSPOT_LD"
47281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47282    windows_path=`$CYGPATH -m "$unix_path"`
47283    HOTSPOT_LD="$windows_path"
47284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47285    windows_path=`cmd //c echo $unix_path`
47286    HOTSPOT_LD="$windows_path"
47287  fi
47288
47289
47290  unix_path="$HOTSPOT_MT"
47291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47292    windows_path=`$CYGPATH -m "$unix_path"`
47293    HOTSPOT_MT="$windows_path"
47294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47295    windows_path=`cmd //c echo $unix_path`
47296    HOTSPOT_MT="$windows_path"
47297  fi
47298
47299
47300  unix_path="$HOTSPOT_RC"
47301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47302    windows_path=`$CYGPATH -m "$unix_path"`
47303    HOTSPOT_RC="$windows_path"
47304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47305    windows_path=`cmd //c echo $unix_path`
47306    HOTSPOT_RC="$windows_path"
47307  fi
47308
47309
47310
47311  else
47312    HOTSPOT_CXX="$CXX"
47313    HOTSPOT_LD="$LD"
47314  fi
47315
47316
47317
47318  if test  "x$TOOLCHAIN_TYPE" = xclang; then
47319    USE_CLANG=true
47320  fi
47321
47322
47323
47324
47325
47326  # The package path is used only on macosx?
47327  # FIXME: clean this up, and/or move it elsewhere.
47328  PACKAGE_PATH=/opt/local
47329
47330
47331  # Check for extra potential brokenness.
47332  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47333    # On Windows, double-check that we got the right compiler.
47334    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47335    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47336    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47337      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47338        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
47339      fi
47340    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47341      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47342        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47343      fi
47344    fi
47345  fi
47346
47347  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47348    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47349    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47350    # This is later checked when setting flags.
47351
47352    # "-Og" suppported for GCC 4.8 and later
47353    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47354
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    # Execute function body
47402
47403
47404
47405
47406
47407
47408
47409
47410
47411
47412
47413
47414
47415
47416
47417
47418
47419
47420
47421
47422
47423
47424
47425
47426
47427
47428
47429
47430
47431
47432
47433
47434
47435
47436
47437
47438
47439
47440
47441
47442
47443
47444
47445
47446
47447
47448
47449
47450    # Execute function body
47451
47452  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47453$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47454  supports=yes
47455
47456  saved_cflags="$CFLAGS"
47457  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47458  ac_ext=c
47459ac_cpp='$CPP $CPPFLAGS'
47460ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47461ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47462ac_compiler_gnu=$ac_cv_c_compiler_gnu
47463
47464  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47465/* end confdefs.h.  */
47466int i;
47467_ACEOF
47468if ac_fn_c_try_compile "$LINENO"; then :
47469
47470else
47471  supports=no
47472fi
47473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47474  ac_ext=cpp
47475ac_cpp='$CXXCPP $CPPFLAGS'
47476ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47477ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47478ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47479
47480  CFLAGS="$saved_cflags"
47481
47482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47483$as_echo "$supports" >&6; }
47484  if test "x$supports" = "xyes" ; then
47485    :
47486    C_COMP_SUPPORTS="yes"
47487  else
47488    :
47489    C_COMP_SUPPORTS="no"
47490  fi
47491
47492
47493
47494
47495
47496
47497
47498
47499
47500
47501
47502
47503
47504
47505
47506
47507
47508
47509
47510
47511
47512
47513
47514
47515
47516
47517
47518
47519
47520
47521
47522
47523
47524
47525
47526
47527
47528
47529
47530
47531
47532
47533
47534
47535
47536
47537
47538
47539
47540
47541
47542
47543
47544
47545
47546
47547
47548
47549
47550    # Execute function body
47551
47552  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47553$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47554  supports=yes
47555
47556  saved_cxxflags="$CXXFLAGS"
47557  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47558  ac_ext=cpp
47559ac_cpp='$CXXCPP $CPPFLAGS'
47560ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47561ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47562ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47563
47564  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47565/* end confdefs.h.  */
47566int i;
47567_ACEOF
47568if ac_fn_cxx_try_compile "$LINENO"; then :
47569
47570else
47571  supports=no
47572fi
47573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47574  ac_ext=cpp
47575ac_cpp='$CXXCPP $CPPFLAGS'
47576ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47577ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47578ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47579
47580  CXXFLAGS="$saved_cxxflags"
47581
47582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47583$as_echo "$supports" >&6; }
47584  if test "x$supports" = "xyes" ; then
47585    :
47586    CXX_COMP_SUPPORTS="yes"
47587  else
47588    :
47589    CXX_COMP_SUPPORTS="no"
47590  fi
47591
47592
47593
47594
47595
47596
47597
47598
47599
47600
47601
47602
47603
47604  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47605$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47606  supports=no
47607  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47608
47609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47610$as_echo "$supports" >&6; }
47611  if test "x$supports" = "xyes" ; then
47612    :
47613    HAS_CFLAG_OPTIMIZE_DEBUG=true
47614  else
47615    :
47616    HAS_CFLAG_OPTIMIZE_DEBUG=false
47617  fi
47618
47619
47620
47621
47622
47623
47624
47625    # "-z relro" supported in GNU binutils 2.17 and later
47626    LINKER_RELRO_FLAG="-Wl,-z,relro"
47627
47628
47629
47630
47631
47632
47633
47634
47635
47636
47637
47638
47639
47640
47641
47642
47643
47644
47645
47646
47647
47648
47649
47650
47651
47652
47653
47654
47655
47656
47657
47658
47659
47660
47661
47662
47663
47664
47665
47666
47667
47668
47669
47670
47671
47672
47673
47674    # Execute function body
47675
47676  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47677$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47678  supports=yes
47679
47680  saved_ldflags="$LDFLAGS"
47681  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47682  ac_ext=c
47683ac_cpp='$CPP $CPPFLAGS'
47684ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47685ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47686ac_compiler_gnu=$ac_cv_c_compiler_gnu
47687
47688  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47689/* end confdefs.h.  */
47690
47691int
47692main ()
47693{
47694
47695  ;
47696  return 0;
47697}
47698_ACEOF
47699if ac_fn_c_try_link "$LINENO"; then :
47700
47701else
47702  supports=no
47703fi
47704rm -f core conftest.err conftest.$ac_objext \
47705    conftest$ac_exeext conftest.$ac_ext
47706  ac_ext=cpp
47707ac_cpp='$CXXCPP $CPPFLAGS'
47708ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47709ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47710ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47711
47712  LDFLAGS="$saved_ldflags"
47713
47714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47715$as_echo "$supports" >&6; }
47716  if test "x$supports" = "xyes" ; then
47717    :
47718    HAS_LINKER_RELRO=true
47719  else
47720    :
47721    HAS_LINKER_RELRO=false
47722  fi
47723
47724
47725
47726
47727
47728
47729
47730
47731
47732
47733
47734
47735
47736    # "-z now" supported in GNU binutils 2.11 and later
47737    LINKER_NOW_FLAG="-Wl,-z,now"
47738
47739
47740
47741
47742
47743
47744
47745
47746
47747
47748
47749
47750
47751
47752
47753
47754
47755
47756
47757
47758
47759
47760
47761
47762
47763
47764
47765
47766
47767
47768
47769
47770
47771
47772
47773
47774
47775
47776
47777
47778
47779
47780
47781
47782
47783
47784
47785    # Execute function body
47786
47787  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47788$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47789  supports=yes
47790
47791  saved_ldflags="$LDFLAGS"
47792  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47793  ac_ext=c
47794ac_cpp='$CPP $CPPFLAGS'
47795ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47796ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47797ac_compiler_gnu=$ac_cv_c_compiler_gnu
47798
47799  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47800/* end confdefs.h.  */
47801
47802int
47803main ()
47804{
47805
47806  ;
47807  return 0;
47808}
47809_ACEOF
47810if ac_fn_c_try_link "$LINENO"; then :
47811
47812else
47813  supports=no
47814fi
47815rm -f core conftest.err conftest.$ac_objext \
47816    conftest$ac_exeext conftest.$ac_ext
47817  ac_ext=cpp
47818ac_cpp='$CXXCPP $CPPFLAGS'
47819ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47820ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47821ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47822
47823  LDFLAGS="$saved_ldflags"
47824
47825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47826$as_echo "$supports" >&6; }
47827  if test "x$supports" = "xyes" ; then
47828    :
47829    HAS_LINKER_NOW=true
47830  else
47831    :
47832    HAS_LINKER_NOW=false
47833  fi
47834
47835
47836
47837
47838
47839
47840
47841
47842
47843
47844
47845
47846  fi
47847
47848  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47849  # in executable.'
47850  USING_BROKEN_SUSE_LD=no
47851  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47852    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47853$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47854    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47855    $ECHO "int main() { }" > main.c
47856    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47857      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47858$as_echo "no" >&6; }
47859      USING_BROKEN_SUSE_LD=no
47860    else
47861      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47862$as_echo "yes" >&6; }
47863      USING_BROKEN_SUSE_LD=yes
47864    fi
47865    $RM version-script.map main.c a.out
47866  fi
47867
47868
47869  # Setup hotspot lecagy names for toolchains
47870  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47871  if test "x$TOOLCHAIN_TYPE" = xclang; then
47872    HOTSPOT_TOOLCHAIN_TYPE=gcc
47873  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47874    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47875  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47876    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47877  fi
47878
47879
47880
47881# Setup the JTReg Regression Test Harness.
47882
47883
47884# Check whether --with-jtreg was given.
47885if test "${with_jtreg+set}" = set; then :
47886  withval=$with_jtreg;
47887else
47888  with_jtreg=no
47889fi
47890
47891
47892  if test "x$with_jtreg" = xno; then
47893    # jtreg disabled
47894    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47895$as_echo_n "checking for jtreg... " >&6; }
47896    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47897$as_echo "no" >&6; }
47898  else
47899    if test "x$with_jtreg" != xyes; then
47900      # with path specified.
47901      JT_HOME="$with_jtreg"
47902    fi
47903
47904    if test "x$JT_HOME" != x; then
47905      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47906$as_echo_n "checking for jtreg... " >&6; }
47907
47908      # use JT_HOME enviroment var.
47909
47910  # Only process if variable expands to non-empty
47911
47912  if test "x$JT_HOME" != x; then
47913    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47914
47915  # Input might be given as Windows format, start by converting to
47916  # unix format.
47917  path="$JT_HOME"
47918  new_path=`$CYGPATH -u "$path"`
47919
47920  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47921  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47922  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47923  # "foo.exe" is OK but "foo" is an error.
47924  #
47925  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47926  # It is also a way to make sure we got the proper file name for the real test later on.
47927  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47928  if test "x$test_shortpath" = x; then
47929    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47930$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47931    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47932  fi
47933
47934  # Call helper function which possibly converts this using DOS-style short mode.
47935  # If so, the updated path is stored in $new_path.
47936
47937  input_path="$new_path"
47938  # Check if we need to convert this using DOS-style short mode. If the path
47939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47940  # take no chances and rewrite it.
47941  # Note: m4 eats our [], so we need to use [ and ] instead.
47942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47943  if test "x$has_forbidden_chars" != x; then
47944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47945    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47946    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47947    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47948      # Going to short mode and back again did indeed matter. Since short mode is
47949      # case insensitive, let's make it lowercase to improve readability.
47950      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47951      # Now convert it back to Unix-style (cygpath)
47952      input_path=`$CYGPATH -u "$shortmode_path"`
47953      new_path="$input_path"
47954    fi
47955  fi
47956
47957  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47958  if test "x$test_cygdrive_prefix" = x; then
47959    # As a simple fix, exclude /usr/bin since it's not a real path.
47960    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47961      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47962      # a path prefixed by /cygdrive for fixpath to work.
47963      new_path="$CYGWIN_ROOT_PATH$input_path"
47964    fi
47965  fi
47966
47967
47968  if test "x$path" != "x$new_path"; then
47969    JT_HOME="$new_path"
47970    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47971$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47972  fi
47973
47974    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47975
47976  path="$JT_HOME"
47977  has_colon=`$ECHO $path | $GREP ^.:`
47978  new_path="$path"
47979  if test "x$has_colon" = x; then
47980    # Not in mixed or Windows style, start by that.
47981    new_path=`cmd //c echo $path`
47982  fi
47983
47984
47985  input_path="$new_path"
47986  # Check if we need to convert this using DOS-style short mode. If the path
47987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47988  # take no chances and rewrite it.
47989  # Note: m4 eats our [], so we need to use [ and ] instead.
47990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47991  if test "x$has_forbidden_chars" != x; then
47992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47993    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47994  fi
47995
47996
47997  windows_path="$new_path"
47998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47999    unix_path=`$CYGPATH -u "$windows_path"`
48000    new_path="$unix_path"
48001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48003    new_path="$unix_path"
48004  fi
48005
48006  if test "x$path" != "x$new_path"; then
48007    JT_HOME="$new_path"
48008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48009$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48010  fi
48011
48012  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48013  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48014
48015    else
48016      # We're on a unix platform. Hooray! :)
48017      path="$JT_HOME"
48018      has_space=`$ECHO "$path" | $GREP " "`
48019      if test "x$has_space" != x; then
48020        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48021$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48022        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48023      fi
48024
48025      # Use eval to expand a potential ~
48026      eval path="$path"
48027      if test ! -f "$path" && test ! -d "$path"; then
48028        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48029      fi
48030
48031      if test -d "$path"; then
48032        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48033      else
48034        dir="`$DIRNAME "$path"`"
48035        base="`$BASENAME "$path"`"
48036        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48037      fi
48038    fi
48039  fi
48040
48041
48042      # jtreg win32 script works for everybody
48043      JTREGEXE="$JT_HOME/bin/jtreg"
48044
48045      if test ! -f "$JTREGEXE"; then
48046        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48047      fi
48048
48049      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48050$as_echo "$JTREGEXE" >&6; }
48051    else
48052      # try to find jtreg on path
48053
48054
48055
48056  # Publish this variable in the help.
48057
48058
48059  if [ -z "${JTREGEXE+x}" ]; then
48060    # The variable is not set by user, try to locate tool using the code snippet
48061    for ac_prog in jtreg
48062do
48063  # Extract the first word of "$ac_prog", so it can be a program name with args.
48064set dummy $ac_prog; ac_word=$2
48065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48066$as_echo_n "checking for $ac_word... " >&6; }
48067if ${ac_cv_path_JTREGEXE+:} false; then :
48068  $as_echo_n "(cached) " >&6
48069else
48070  case $JTREGEXE in
48071  [\\/]* | ?:[\\/]*)
48072  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48073  ;;
48074  *)
48075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48076for as_dir in $PATH
48077do
48078  IFS=$as_save_IFS
48079  test -z "$as_dir" && as_dir=.
48080    for ac_exec_ext in '' $ac_executable_extensions; do
48081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48082    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48084    break 2
48085  fi
48086done
48087  done
48088IFS=$as_save_IFS
48089
48090  ;;
48091esac
48092fi
48093JTREGEXE=$ac_cv_path_JTREGEXE
48094if test -n "$JTREGEXE"; then
48095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48096$as_echo "$JTREGEXE" >&6; }
48097else
48098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48099$as_echo "no" >&6; }
48100fi
48101
48102
48103  test -n "$JTREGEXE" && break
48104done
48105
48106  else
48107    # The variable is set, but is it from the command line or the environment?
48108
48109    # Try to remove the string !JTREGEXE! from our list.
48110    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48111    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48112      # If it failed, the variable was not from the command line. Ignore it,
48113      # but warn the user (except for BASH, which is always set by the calling BASH).
48114      if test "xJTREGEXE" != xBASH; then
48115        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48116$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48117      fi
48118      # Try to locate tool using the code snippet
48119      for ac_prog in jtreg
48120do
48121  # Extract the first word of "$ac_prog", so it can be a program name with args.
48122set dummy $ac_prog; ac_word=$2
48123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48124$as_echo_n "checking for $ac_word... " >&6; }
48125if ${ac_cv_path_JTREGEXE+:} false; then :
48126  $as_echo_n "(cached) " >&6
48127else
48128  case $JTREGEXE in
48129  [\\/]* | ?:[\\/]*)
48130  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48131  ;;
48132  *)
48133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48134for as_dir in $PATH
48135do
48136  IFS=$as_save_IFS
48137  test -z "$as_dir" && as_dir=.
48138    for ac_exec_ext in '' $ac_executable_extensions; do
48139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48140    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48142    break 2
48143  fi
48144done
48145  done
48146IFS=$as_save_IFS
48147
48148  ;;
48149esac
48150fi
48151JTREGEXE=$ac_cv_path_JTREGEXE
48152if test -n "$JTREGEXE"; then
48153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48154$as_echo "$JTREGEXE" >&6; }
48155else
48156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48157$as_echo "no" >&6; }
48158fi
48159
48160
48161  test -n "$JTREGEXE" && break
48162done
48163
48164    else
48165      # If it succeeded, then it was overridden by the user. We will use it
48166      # for the tool.
48167
48168      # First remove it from the list of overridden variables, so we can test
48169      # for unknown variables in the end.
48170      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48171
48172      # Check if we try to supply an empty value
48173      if test "x$JTREGEXE" = x; then
48174        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48175$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48176        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48177$as_echo_n "checking for JTREGEXE... " >&6; }
48178        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48179$as_echo "disabled" >&6; }
48180      else
48181        # Check if the provided tool contains a complete path.
48182        tool_specified="$JTREGEXE"
48183        tool_basename="${tool_specified##*/}"
48184        if test "x$tool_basename" = "x$tool_specified"; then
48185          # A command without a complete path is provided, search $PATH.
48186          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48187$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48188          # Extract the first word of "$tool_basename", so it can be a program name with args.
48189set dummy $tool_basename; ac_word=$2
48190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48191$as_echo_n "checking for $ac_word... " >&6; }
48192if ${ac_cv_path_JTREGEXE+:} false; then :
48193  $as_echo_n "(cached) " >&6
48194else
48195  case $JTREGEXE in
48196  [\\/]* | ?:[\\/]*)
48197  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48198  ;;
48199  *)
48200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48201for as_dir in $PATH
48202do
48203  IFS=$as_save_IFS
48204  test -z "$as_dir" && as_dir=.
48205    for ac_exec_ext in '' $ac_executable_extensions; do
48206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48207    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48209    break 2
48210  fi
48211done
48212  done
48213IFS=$as_save_IFS
48214
48215  ;;
48216esac
48217fi
48218JTREGEXE=$ac_cv_path_JTREGEXE
48219if test -n "$JTREGEXE"; then
48220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48221$as_echo "$JTREGEXE" >&6; }
48222else
48223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48224$as_echo "no" >&6; }
48225fi
48226
48227
48228          if test "x$JTREGEXE" = x; then
48229            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48230          fi
48231        else
48232          # Otherwise we believe it is a complete path. Use it as it is.
48233          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48234$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48235          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48236$as_echo_n "checking for JTREGEXE... " >&6; }
48237          if test ! -x "$tool_specified"; then
48238            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48239$as_echo "not found" >&6; }
48240            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48241          fi
48242          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48243$as_echo "$tool_specified" >&6; }
48244        fi
48245      fi
48246    fi
48247
48248  fi
48249
48250
48251
48252  if test "x$JTREGEXE" = x; then
48253    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48254  fi
48255
48256
48257      JT_HOME="`$DIRNAME $JTREGEXE`"
48258    fi
48259  fi
48260
48261
48262
48263
48264
48265
48266  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48267  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48268  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48269  #                              commands produced by the link step (currently AIX only)
48270  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48271    COMPILER_TARGET_BITS_FLAG="-q"
48272    COMPILER_COMMAND_FILE_FLAG="-f"
48273    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48274  else
48275    COMPILER_TARGET_BITS_FLAG="-m"
48276    COMPILER_COMMAND_FILE_FLAG="@"
48277    COMPILER_BINDCMD_FILE_FLAG=""
48278
48279    # The solstudio linker does not support @-files.
48280    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48281      COMPILER_COMMAND_FILE_FLAG=
48282    fi
48283
48284    # Check if @file is supported by gcc
48285    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48286      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48287$as_echo_n "checking if @file is supported by gcc... " >&6; }
48288      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48289      $ECHO "" "--version" > command.file
48290      if $CXX @command.file 2>&5 >&5; then
48291        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48292$as_echo "yes" >&6; }
48293        COMPILER_COMMAND_FILE_FLAG="@"
48294      else
48295        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48296$as_echo "no" >&6; }
48297        COMPILER_COMMAND_FILE_FLAG=
48298      fi
48299      $RM command.file
48300    fi
48301  fi
48302
48303
48304
48305
48306  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48307  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48308    ARFLAGS="-r"
48309  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48310    ARFLAGS="-X64"
48311  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48312    # lib.exe is used as AR to create static libraries.
48313    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48314  else
48315    ARFLAGS=""
48316  fi
48317
48318
48319  ## Setup strip.
48320  # FIXME: should this really be per platform, or should it be per toolchain type?
48321  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48322  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48323  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48324    STRIPFLAGS="-g"
48325  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48326    STRIPFLAGS="-x"
48327  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48328    STRIPFLAGS="-S"
48329  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48330    STRIPFLAGS="-X32_64"
48331  fi
48332
48333
48334
48335  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48336    CC_OUT_OPTION=-Fo
48337    EXE_OUT_OPTION=-out:
48338    LD_OUT_OPTION=-out:
48339    AR_OUT_OPTION=-out:
48340  else
48341    # The option used to specify the target .o,.a or .so file.
48342    # When compiling, how to specify the to be created object file.
48343    CC_OUT_OPTION='-o$(SPACE)'
48344    # When linking, how to specify the to be created executable.
48345    EXE_OUT_OPTION='-o$(SPACE)'
48346    # When linking, how to specify the to be created dynamically linkable library.
48347    LD_OUT_OPTION='-o$(SPACE)'
48348    # When archiving, how to specify the to be create static archive for object files.
48349    AR_OUT_OPTION='rcs$(SPACE)'
48350  fi
48351
48352
48353
48354
48355
48356  # On Windows, we need to set RC flags.
48357  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48358    RC_FLAGS="-nologo -l0x409"
48359    JVM_RCFLAGS="-nologo"
48360    if test "x$DEBUG_LEVEL" = xrelease; then
48361      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48362      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48363    fi
48364
48365    # The version variables used to create RC_FLAGS may be overridden
48366    # in a custom configure script, or possibly the command line.
48367    # Let those variables be expanded at make time in spec.gmk.
48368    # The \$ are escaped to the shell, and the $(...) variables
48369    # are evaluated by make.
48370    RC_FLAGS="$RC_FLAGS \
48371        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48372        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48373        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48374        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48375        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48376        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48377        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48378
48379    JVM_RCFLAGS="$JVM_RCFLAGS \
48380        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48381        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48382        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48383        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48384        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48385        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48386        -D\"HS_FNAME=jvm.dll\" \
48387        -D\"HS_INTERNAL_NAME=jvm\""
48388  fi
48389
48390
48391
48392  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48393    # silence copyright notice and other headers.
48394    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48395  fi
48396
48397
48398# Now we can test some aspects on the target using configure macros.
48399
48400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48401$as_echo_n "checking for ANSI C header files... " >&6; }
48402if ${ac_cv_header_stdc+:} false; then :
48403  $as_echo_n "(cached) " >&6
48404else
48405  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48406/* end confdefs.h.  */
48407#include <stdlib.h>
48408#include <stdarg.h>
48409#include <string.h>
48410#include <float.h>
48411
48412int
48413main ()
48414{
48415
48416  ;
48417  return 0;
48418}
48419_ACEOF
48420if ac_fn_cxx_try_compile "$LINENO"; then :
48421  ac_cv_header_stdc=yes
48422else
48423  ac_cv_header_stdc=no
48424fi
48425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48426
48427if test $ac_cv_header_stdc = yes; then
48428  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48429  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48430/* end confdefs.h.  */
48431#include <string.h>
48432
48433_ACEOF
48434if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48435  $EGREP "memchr" >/dev/null 2>&1; then :
48436
48437else
48438  ac_cv_header_stdc=no
48439fi
48440rm -f conftest*
48441
48442fi
48443
48444if test $ac_cv_header_stdc = yes; then
48445  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48446  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48447/* end confdefs.h.  */
48448#include <stdlib.h>
48449
48450_ACEOF
48451if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48452  $EGREP "free" >/dev/null 2>&1; then :
48453
48454else
48455  ac_cv_header_stdc=no
48456fi
48457rm -f conftest*
48458
48459fi
48460
48461if test $ac_cv_header_stdc = yes; then
48462  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48463  if test "$cross_compiling" = yes; then :
48464  :
48465else
48466  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48467/* end confdefs.h.  */
48468#include <ctype.h>
48469#include <stdlib.h>
48470#if ((' ' & 0x0FF) == 0x020)
48471# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48472# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48473#else
48474# define ISLOWER(c) \
48475		   (('a' <= (c) && (c) <= 'i') \
48476		     || ('j' <= (c) && (c) <= 'r') \
48477		     || ('s' <= (c) && (c) <= 'z'))
48478# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48479#endif
48480
48481#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48482int
48483main ()
48484{
48485  int i;
48486  for (i = 0; i < 256; i++)
48487    if (XOR (islower (i), ISLOWER (i))
48488	|| toupper (i) != TOUPPER (i))
48489      return 2;
48490  return 0;
48491}
48492_ACEOF
48493if ac_fn_cxx_try_run "$LINENO"; then :
48494
48495else
48496  ac_cv_header_stdc=no
48497fi
48498rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48499  conftest.$ac_objext conftest.beam conftest.$ac_ext
48500fi
48501
48502fi
48503fi
48504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48505$as_echo "$ac_cv_header_stdc" >&6; }
48506if test $ac_cv_header_stdc = yes; then
48507
48508$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48509
48510fi
48511
48512# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48513for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48514		  inttypes.h stdint.h unistd.h
48515do :
48516  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48517ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48518"
48519if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48520  cat >>confdefs.h <<_ACEOF
48521#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48522_ACEOF
48523
48524fi
48525
48526done
48527
48528
48529
48530  ###############################################################################
48531  #
48532  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48533  # (The JVM can use 32 or 64 bit Java pointers but that decision
48534  # is made at runtime.)
48535  #
48536
48537  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48538    # Always specify -m flag on Solaris
48539    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48540
48541  # When we add flags to the "official" CFLAGS etc, we need to
48542  # keep track of these additions in ADDED_CFLAGS etc. These
48543  # will later be checked to make sure only controlled additions
48544  # have been made to CFLAGS etc.
48545  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48546  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48547  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48548
48549  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48550  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48551  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48552
48553  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48554  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48555  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48556
48557  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48558  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48559  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48560
48561  elif test "x$COMPILE_TYPE" = xreduced; then
48562    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48563      # Specify -m if running reduced on unix platforms
48564
48565  # When we add flags to the "official" CFLAGS etc, we need to
48566  # keep track of these additions in ADDED_CFLAGS etc. These
48567  # will later be checked to make sure only controlled additions
48568  # have been made to CFLAGS etc.
48569  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48570  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48571  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48572
48573  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48574  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48575  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48576
48577  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48578  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48579  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48580
48581  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48582  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48583  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48584
48585    fi
48586  fi
48587  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48588    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48589    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48590    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48591  fi
48592
48593  # Make compilation sanity check
48594  for ac_header in stdio.h
48595do :
48596  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48597if test "x$ac_cv_header_stdio_h" = xyes; then :
48598  cat >>confdefs.h <<_ACEOF
48599#define HAVE_STDIO_H 1
48600_ACEOF
48601
48602else
48603
48604    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48605$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48606    if test "x$COMPILE_TYPE" = xreduced; then
48607
48608  # Print a helpful message on how to acquire the necessary build dependency.
48609  # reduced is the help tag: freetype, cups, alsa etc
48610  MISSING_DEPENDENCY=reduced
48611
48612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48613    cygwin_help $MISSING_DEPENDENCY
48614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48615    msys_help $MISSING_DEPENDENCY
48616  else
48617    PKGHANDLER_COMMAND=
48618
48619    case $PKGHANDLER in
48620      apt-get)
48621        apt_help     $MISSING_DEPENDENCY ;;
48622      yum)
48623        yum_help     $MISSING_DEPENDENCY ;;
48624      port)
48625        port_help    $MISSING_DEPENDENCY ;;
48626      pkgutil)
48627        pkgutil_help $MISSING_DEPENDENCY ;;
48628      pkgadd)
48629        pkgadd_help  $MISSING_DEPENDENCY ;;
48630    esac
48631
48632    if test "x$PKGHANDLER_COMMAND" != x; then
48633      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48634    fi
48635  fi
48636
48637      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48638$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48639    elif test "x$COMPILE_TYPE" = xcross; then
48640      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48641$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48642    fi
48643    as_fn_error $? "Cannot continue." "$LINENO" 5
48644
48645fi
48646
48647done
48648
48649
48650  # The cast to long int works around a bug in the HP C Compiler
48651# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48652# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48653# This bug is HP SR number 8606223364.
48654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48655$as_echo_n "checking size of int *... " >&6; }
48656if ${ac_cv_sizeof_int_p+:} false; then :
48657  $as_echo_n "(cached) " >&6
48658else
48659  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48660
48661else
48662  if test "$ac_cv_type_int_p" = yes; then
48663     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48665as_fn_error 77 "cannot compute sizeof (int *)
48666See \`config.log' for more details" "$LINENO" 5; }
48667   else
48668     ac_cv_sizeof_int_p=0
48669   fi
48670fi
48671
48672fi
48673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48674$as_echo "$ac_cv_sizeof_int_p" >&6; }
48675
48676
48677
48678cat >>confdefs.h <<_ACEOF
48679#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48680_ACEOF
48681
48682
48683
48684  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48685  if test "x$ac_cv_sizeof_int_p" = x; then
48686    # The test failed, lets stick to the assumed value.
48687    { $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
48688$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48689  else
48690    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48691
48692    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48693      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48694      # Let's try to implicitely set the compilers target architecture and retry the test
48695      { $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
48696$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;}
48697      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48698$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48699
48700  # When we add flags to the "official" CFLAGS etc, we need to
48701  # keep track of these additions in ADDED_CFLAGS etc. These
48702  # will later be checked to make sure only controlled additions
48703  # have been made to CFLAGS etc.
48704  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48705  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48706  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48707
48708  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48709  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48710  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48711
48712  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48713  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48714  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48715
48716  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48717  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48718  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48719
48720
48721      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48722      unset ac_cv_sizeof_int_p
48723      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48724      cat >>confdefs.h <<_ACEOF
48725#undef SIZEOF_INT_P
48726_ACEOF
48727
48728      # The cast to long int works around a bug in the HP C Compiler
48729# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48730# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48731# This bug is HP SR number 8606223364.
48732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48733$as_echo_n "checking size of int *... " >&6; }
48734if ${ac_cv_sizeof_int_p+:} false; then :
48735  $as_echo_n "(cached) " >&6
48736else
48737  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48738
48739else
48740  if test "$ac_cv_type_int_p" = yes; then
48741     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48742$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48743as_fn_error 77 "cannot compute sizeof (int *)
48744See \`config.log' for more details" "$LINENO" 5; }
48745   else
48746     ac_cv_sizeof_int_p=0
48747   fi
48748fi
48749
48750fi
48751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48752$as_echo "$ac_cv_sizeof_int_p" >&6; }
48753
48754
48755
48756cat >>confdefs.h <<_ACEOF
48757#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48758_ACEOF
48759
48760
48761
48762      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48763
48764      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48765        { $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
48766$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;}
48767        if test "x$COMPILE_TYPE" = xreduced; then
48768
48769  # Print a helpful message on how to acquire the necessary build dependency.
48770  # reduced is the help tag: freetype, cups, alsa etc
48771  MISSING_DEPENDENCY=reduced
48772
48773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48774    cygwin_help $MISSING_DEPENDENCY
48775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48776    msys_help $MISSING_DEPENDENCY
48777  else
48778    PKGHANDLER_COMMAND=
48779
48780    case $PKGHANDLER in
48781      apt-get)
48782        apt_help     $MISSING_DEPENDENCY ;;
48783      yum)
48784        yum_help     $MISSING_DEPENDENCY ;;
48785      port)
48786        port_help    $MISSING_DEPENDENCY ;;
48787      pkgutil)
48788        pkgutil_help $MISSING_DEPENDENCY ;;
48789      pkgadd)
48790        pkgadd_help  $MISSING_DEPENDENCY ;;
48791    esac
48792
48793    if test "x$PKGHANDLER_COMMAND" != x; then
48794      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48795    fi
48796  fi
48797
48798          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48799$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48800        elif test "x$COMPILE_TYPE" = xcross; then
48801          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48802$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48803        fi
48804        as_fn_error $? "Cannot continue." "$LINENO" 5
48805      fi
48806    fi
48807  fi
48808
48809  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48810$as_echo_n "checking for target address size... " >&6; }
48811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48812$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48813
48814
48815  ###############################################################################
48816  #
48817  # Is the target little of big endian?
48818  #
48819   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48820$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48821if ${ac_cv_c_bigendian+:} false; then :
48822  $as_echo_n "(cached) " >&6
48823else
48824  ac_cv_c_bigendian=unknown
48825    # See if we're dealing with a universal compiler.
48826    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48827/* end confdefs.h.  */
48828#ifndef __APPLE_CC__
48829	       not a universal capable compiler
48830	     #endif
48831	     typedef int dummy;
48832
48833_ACEOF
48834if ac_fn_cxx_try_compile "$LINENO"; then :
48835
48836	# Check for potential -arch flags.  It is not universal unless
48837	# there are at least two -arch flags with different values.
48838	ac_arch=
48839	ac_prev=
48840	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48841	 if test -n "$ac_prev"; then
48842	   case $ac_word in
48843	     i?86 | x86_64 | ppc | ppc64)
48844	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48845		 ac_arch=$ac_word
48846	       else
48847		 ac_cv_c_bigendian=universal
48848		 break
48849	       fi
48850	       ;;
48851	   esac
48852	   ac_prev=
48853	 elif test "x$ac_word" = "x-arch"; then
48854	   ac_prev=arch
48855	 fi
48856       done
48857fi
48858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48859    if test $ac_cv_c_bigendian = unknown; then
48860      # See if sys/param.h defines the BYTE_ORDER macro.
48861      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48862/* end confdefs.h.  */
48863#include <sys/types.h>
48864	     #include <sys/param.h>
48865
48866int
48867main ()
48868{
48869#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48870		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48871		     && LITTLE_ENDIAN)
48872	      bogus endian macros
48873	     #endif
48874
48875  ;
48876  return 0;
48877}
48878_ACEOF
48879if ac_fn_cxx_try_compile "$LINENO"; then :
48880  # It does; now see whether it defined to BIG_ENDIAN or not.
48881	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48882/* end confdefs.h.  */
48883#include <sys/types.h>
48884		#include <sys/param.h>
48885
48886int
48887main ()
48888{
48889#if BYTE_ORDER != BIG_ENDIAN
48890		 not big endian
48891		#endif
48892
48893  ;
48894  return 0;
48895}
48896_ACEOF
48897if ac_fn_cxx_try_compile "$LINENO"; then :
48898  ac_cv_c_bigendian=yes
48899else
48900  ac_cv_c_bigendian=no
48901fi
48902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48903fi
48904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48905    fi
48906    if test $ac_cv_c_bigendian = unknown; then
48907      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48908      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48909/* end confdefs.h.  */
48910#include <limits.h>
48911
48912int
48913main ()
48914{
48915#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48916	      bogus endian macros
48917	     #endif
48918
48919  ;
48920  return 0;
48921}
48922_ACEOF
48923if ac_fn_cxx_try_compile "$LINENO"; then :
48924  # It does; now see whether it defined to _BIG_ENDIAN or not.
48925	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48926/* end confdefs.h.  */
48927#include <limits.h>
48928
48929int
48930main ()
48931{
48932#ifndef _BIG_ENDIAN
48933		 not big endian
48934		#endif
48935
48936  ;
48937  return 0;
48938}
48939_ACEOF
48940if ac_fn_cxx_try_compile "$LINENO"; then :
48941  ac_cv_c_bigendian=yes
48942else
48943  ac_cv_c_bigendian=no
48944fi
48945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48946fi
48947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48948    fi
48949    if test $ac_cv_c_bigendian = unknown; then
48950      # Compile a test program.
48951      if test "$cross_compiling" = yes; then :
48952  # Try to guess by grepping values from an object file.
48953	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48954/* end confdefs.h.  */
48955short int ascii_mm[] =
48956		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48957		short int ascii_ii[] =
48958		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48959		int use_ascii (int i) {
48960		  return ascii_mm[i] + ascii_ii[i];
48961		}
48962		short int ebcdic_ii[] =
48963		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48964		short int ebcdic_mm[] =
48965		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48966		int use_ebcdic (int i) {
48967		  return ebcdic_mm[i] + ebcdic_ii[i];
48968		}
48969		extern int foo;
48970
48971int
48972main ()
48973{
48974return use_ascii (foo) == use_ebcdic (foo);
48975  ;
48976  return 0;
48977}
48978_ACEOF
48979if ac_fn_cxx_try_compile "$LINENO"; then :
48980  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48981	      ac_cv_c_bigendian=yes
48982	    fi
48983	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48984	      if test "$ac_cv_c_bigendian" = unknown; then
48985		ac_cv_c_bigendian=no
48986	      else
48987		# finding both strings is unlikely to happen, but who knows?
48988		ac_cv_c_bigendian=unknown
48989	      fi
48990	    fi
48991fi
48992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48993else
48994  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48995/* end confdefs.h.  */
48996$ac_includes_default
48997int
48998main ()
48999{
49000
49001	     /* Are we little or big endian?  From Harbison&Steele.  */
49002	     union
49003	     {
49004	       long int l;
49005	       char c[sizeof (long int)];
49006	     } u;
49007	     u.l = 1;
49008	     return u.c[sizeof (long int) - 1] == 1;
49009
49010  ;
49011  return 0;
49012}
49013_ACEOF
49014if ac_fn_cxx_try_run "$LINENO"; then :
49015  ac_cv_c_bigendian=no
49016else
49017  ac_cv_c_bigendian=yes
49018fi
49019rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49020  conftest.$ac_objext conftest.beam conftest.$ac_ext
49021fi
49022
49023    fi
49024fi
49025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49026$as_echo "$ac_cv_c_bigendian" >&6; }
49027 case $ac_cv_c_bigendian in #(
49028   yes)
49029     ENDIAN="big";; #(
49030   no)
49031     ENDIAN="little" ;; #(
49032   universal)
49033     ENDIAN="universal_endianness"
49034     ;; #(
49035   *)
49036     ENDIAN="unknown" ;;
49037 esac
49038
49039
49040  if test "x$ENDIAN" = xuniversal_endianness; then
49041    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49042  fi
49043  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49044    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
49045  fi
49046
49047
49048# Configure flags for the tools
49049
49050  ###############################################################################
49051  #
49052  # How to compile shared libraries.
49053  #
49054
49055  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49056    PICFLAG="-fPIC"
49057    C_FLAG_REORDER=''
49058    CXX_FLAG_REORDER=''
49059
49060    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49061      # Linking is different on MacOSX
49062      if test "x$STATIC_BUILD" = xtrue; then
49063        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49064      else
49065        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49066        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49067      fi
49068      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49069      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49070      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49071      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49072    else
49073      # Default works for linux, might work on other platforms as well.
49074      SHARED_LIBRARY_FLAGS='-shared'
49075      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49076      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49077      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49078      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49079    fi
49080  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49081    C_FLAG_REORDER=''
49082    CXX_FLAG_REORDER=''
49083
49084    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49085      # Linking is different on MacOSX
49086      PICFLAG=''
49087      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49088      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49089      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49090      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49091      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49092
49093      if test "x$STATIC_BUILD" = xfalse; then
49094        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49095      fi
49096    else
49097      # Default works for linux, might work on other platforms as well.
49098      PICFLAG='-fPIC'
49099      SHARED_LIBRARY_FLAGS='-shared'
49100      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49101      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49102      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49103      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49104    fi
49105  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49106    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49107      PICFLAG="-xcode=pic32"
49108    else
49109      PICFLAG="-KPIC"
49110    fi
49111    C_FLAG_REORDER='-xF'
49112    CXX_FLAG_REORDER='-xF'
49113    SHARED_LIBRARY_FLAGS="-G"
49114    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49115    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49116    SET_SHARED_LIBRARY_NAME='-h $1'
49117    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49118  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49119    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49120    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49121    # will have to patch this single instruction with a call to some out-of-order code which
49122    # does the load from the TOC. This is of course slow. But in that case we also would have
49123    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49124    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49125    # can be patched directly by the linker and does not require a jump to out-of-order code.
49126    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49127    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49128    # loads for accessing a global variable). But there are rumors that this may be seen as a
49129    # 'performance feature' because of improved code locality of the symbols used in a
49130    # compilation unit.
49131    PICFLAG="-qpic"
49132    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49133    C_FLAG_REORDER=''
49134    CXX_FLAG_REORDER=''
49135    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49136    SET_EXECUTABLE_ORIGIN=""
49137    SET_SHARED_LIBRARY_ORIGIN=''
49138    SET_SHARED_LIBRARY_NAME=''
49139    SET_SHARED_LIBRARY_MAPFILE=''
49140  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49141    PICFLAG=""
49142    C_FLAG_REORDER=''
49143    CXX_FLAG_REORDER=''
49144    SHARED_LIBRARY_FLAGS="-dll"
49145    SET_EXECUTABLE_ORIGIN=''
49146    SET_SHARED_LIBRARY_ORIGIN=''
49147    SET_SHARED_LIBRARY_NAME=''
49148    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49149  fi
49150
49151
49152
49153
49154
49155
49156
49157
49158
49159  # The (cross) compiler is now configured, we can now test capabilities
49160  # of the target platform.
49161
49162
49163
49164  ###############################################################################
49165  #
49166  # Setup the opt flags for different compilers
49167  # and different operating systems.
49168  #
49169
49170  # FIXME: this was indirectly the old default, but just inherited.
49171  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49172  #   C_FLAG_DEPS="-MMD -MF"
49173  # fi
49174
49175  # Generate make dependency files
49176  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49177    C_FLAG_DEPS="-MMD -MF"
49178  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49179    C_FLAG_DEPS="-MMD -MF"
49180  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49181    C_FLAG_DEPS="-xMMD -xMF"
49182  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49183    C_FLAG_DEPS="-qmakedep=gcc -MF"
49184  fi
49185  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49186
49187
49188
49189  # Debug symbols
49190  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49191    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49192      # reduce from default "-g2" option to save space
49193      CFLAGS_DEBUG_SYMBOLS="-g1"
49194      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49195    else
49196      CFLAGS_DEBUG_SYMBOLS="-g"
49197      CXXFLAGS_DEBUG_SYMBOLS="-g"
49198    fi
49199  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49200    CFLAGS_DEBUG_SYMBOLS="-g"
49201    CXXFLAGS_DEBUG_SYMBOLS="-g"
49202  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49203    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49204    # -g0 enables debug symbols without disabling inlining.
49205    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49206  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49207    CFLAGS_DEBUG_SYMBOLS="-g"
49208    CXXFLAGS_DEBUG_SYMBOLS="-g"
49209  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49210    CFLAGS_DEBUG_SYMBOLS="-Zi"
49211    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49212  fi
49213
49214
49215
49216  # Debug symbols for JVM_CFLAGS
49217  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49218    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49219    if test "x$DEBUG_LEVEL" = xslowdebug; then
49220      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49221    else
49222      # -g0 does not disable inlining, which -g does.
49223      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49224    fi
49225  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49226    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49227  else
49228    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49229  fi
49230
49231
49232  # bounds, memory and behavior checking options
49233  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49234    case $DEBUG_LEVEL in
49235    release )
49236      # no adjustment
49237      ;;
49238    fastdebug )
49239      # no adjustment
49240      ;;
49241    slowdebug )
49242      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49243      # get's added conditionally on whether we produce debug symbols or not.
49244      # This is most likely not really correct.
49245
49246      # Add runtime stack smashing and undefined behavior checks.
49247      # Not all versions of gcc support -fstack-protector
49248      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
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
49290
49291    # Execute function body
49292
49293
49294
49295
49296
49297
49298
49299
49300
49301
49302
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314
49315
49316
49317
49318
49319
49320
49321
49322
49323
49324
49325
49326
49327
49328
49329
49330
49331
49332
49333
49334
49335
49336
49337
49338
49339
49340    # Execute function body
49341
49342  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49343$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49344  supports=yes
49345
49346  saved_cflags="$CFLAGS"
49347  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49348  ac_ext=c
49349ac_cpp='$CPP $CPPFLAGS'
49350ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49351ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49352ac_compiler_gnu=$ac_cv_c_compiler_gnu
49353
49354  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49355/* end confdefs.h.  */
49356int i;
49357_ACEOF
49358if ac_fn_c_try_compile "$LINENO"; then :
49359
49360else
49361  supports=no
49362fi
49363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49364  ac_ext=cpp
49365ac_cpp='$CXXCPP $CPPFLAGS'
49366ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49367ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49368ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49369
49370  CFLAGS="$saved_cflags"
49371
49372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49373$as_echo "$supports" >&6; }
49374  if test "x$supports" = "xyes" ; then
49375    :
49376    C_COMP_SUPPORTS="yes"
49377  else
49378    :
49379    C_COMP_SUPPORTS="no"
49380  fi
49381
49382
49383
49384
49385
49386
49387
49388
49389
49390
49391
49392
49393
49394
49395
49396
49397
49398
49399
49400
49401
49402
49403
49404
49405
49406
49407
49408
49409
49410
49411
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422
49423
49424
49425
49426
49427
49428
49429
49430
49431
49432
49433
49434
49435
49436
49437
49438
49439
49440    # Execute function body
49441
49442  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49443$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49444  supports=yes
49445
49446  saved_cxxflags="$CXXFLAGS"
49447  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49448  ac_ext=cpp
49449ac_cpp='$CXXCPP $CPPFLAGS'
49450ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49451ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49452ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49453
49454  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49455/* end confdefs.h.  */
49456int i;
49457_ACEOF
49458if ac_fn_cxx_try_compile "$LINENO"; then :
49459
49460else
49461  supports=no
49462fi
49463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49464  ac_ext=cpp
49465ac_cpp='$CXXCPP $CPPFLAGS'
49466ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49467ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49468ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49469
49470  CXXFLAGS="$saved_cxxflags"
49471
49472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49473$as_echo "$supports" >&6; }
49474  if test "x$supports" = "xyes" ; then
49475    :
49476    CXX_COMP_SUPPORTS="yes"
49477  else
49478    :
49479    CXX_COMP_SUPPORTS="no"
49480  fi
49481
49482
49483
49484
49485
49486
49487
49488
49489
49490
49491
49492
49493
49494  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49495$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49496  supports=no
49497  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49498
49499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49500$as_echo "$supports" >&6; }
49501  if test "x$supports" = "xyes" ; then
49502    :
49503
49504  else
49505    :
49506    STACK_PROTECTOR_CFLAG=""
49507  fi
49508
49509
49510
49511
49512
49513
49514
49515      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49516      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49517      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49518        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49519      fi
49520      ;;
49521    esac
49522  fi
49523
49524  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49525    if test "x$DEBUG_LEVEL" != xrelease; then
49526      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49527        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49528      fi
49529    fi
49530  fi
49531
49532  # Optimization levels
49533  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49534    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49535
49536    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49537      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49538      C_O_FLAG_HIGHEST_JVM="-xO4"
49539      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49540      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49541      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49542      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49543      C_O_FLAG_DEBUG_JVM=""
49544      C_O_FLAG_NONE="-xregs=no%frameptr"
49545      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49546      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49547      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49548      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49549      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49550      CXX_O_FLAG_DEBUG_JVM=""
49551      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49552      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49553        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49554        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49555      fi
49556    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49557      C_O_FLAG_HIGHEST_JVM="-xO4"
49558      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49559      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49560      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49561      C_O_FLAG_DEBUG=""
49562      C_O_FLAG_DEBUG_JVM=""
49563      C_O_FLAG_NONE=""
49564      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49565      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49566      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49567      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49568      CXX_O_FLAG_DEBUG=""
49569      CXX_O_FLAG_DEBUG_JVM=""
49570      CXX_O_FLAG_NONE=""
49571    fi
49572  else
49573    # The remaining toolchains share opt flags between CC and CXX;
49574    # setup for C and duplicate afterwards.
49575    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49576      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49577        # On MacOSX we optimize for size, something
49578        # we should do for all platforms?
49579        C_O_FLAG_HIGHEST_JVM="-Os"
49580        C_O_FLAG_HIGHEST="-Os"
49581        C_O_FLAG_HI="-Os"
49582        C_O_FLAG_NORM="-Os"
49583        C_O_FLAG_SIZE="-Os"
49584      else
49585        C_O_FLAG_HIGHEST_JVM="-O3"
49586        C_O_FLAG_HIGHEST="-O3"
49587        C_O_FLAG_HI="-O3"
49588        C_O_FLAG_NORM="-O2"
49589        C_O_FLAG_SIZE="-Os"
49590      fi
49591      C_O_FLAG_DEBUG="-O0"
49592      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49593        C_O_FLAG_DEBUG_JVM=""
49594      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49595        C_O_FLAG_DEBUG_JVM="-O0"
49596      fi
49597      C_O_FLAG_NONE="-O0"
49598    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49599      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49600        # On MacOSX we optimize for size, something
49601        # we should do for all platforms?
49602        C_O_FLAG_HIGHEST_JVM="-Os"
49603        C_O_FLAG_HIGHEST="-Os"
49604        C_O_FLAG_HI="-Os"
49605        C_O_FLAG_NORM="-Os"
49606        C_O_FLAG_SIZE="-Os"
49607      else
49608        C_O_FLAG_HIGHEST_JVM="-O3"
49609        C_O_FLAG_HIGHEST="-O3"
49610        C_O_FLAG_HI="-O3"
49611        C_O_FLAG_NORM="-O2"
49612        C_O_FLAG_SIZE="-Os"
49613      fi
49614      C_O_FLAG_DEBUG="-O0"
49615      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49616        C_O_FLAG_DEBUG_JVM=""
49617      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49618        C_O_FLAG_DEBUG_JVM="-O0"
49619      fi
49620      C_O_FLAG_NONE="-O0"
49621    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49622      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49623      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49624      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49625      C_O_FLAG_NORM="-O2"
49626      C_O_FLAG_DEBUG="-qnoopt"
49627      # FIXME: Value below not verified.
49628      C_O_FLAG_DEBUG_JVM=""
49629      C_O_FLAG_NONE="-qnoopt"
49630    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49631      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49632      C_O_FLAG_HIGHEST="-O2"
49633      C_O_FLAG_HI="-O1"
49634      C_O_FLAG_NORM="-O1"
49635      C_O_FLAG_DEBUG="-Od"
49636      C_O_FLAG_DEBUG_JVM=""
49637      C_O_FLAG_NONE="-Od"
49638      C_O_FLAG_SIZE="-Os"
49639    fi
49640    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49641    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49642    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49643    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49644    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49645    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49646    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49647    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49648  fi
49649
49650  # Adjust optimization flags according to debug level.
49651  case $DEBUG_LEVEL in
49652    release )
49653      # no adjustment
49654      ;;
49655    fastdebug )
49656      # Not quite so much optimization
49657      C_O_FLAG_HI="$C_O_FLAG_NORM"
49658      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49659      ;;
49660    slowdebug )
49661      # Disable optimization
49662      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49663      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49664      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49665      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49666      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49667      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49668      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49669      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49670      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49671      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49672      ;;
49673  esac
49674
49675
49676
49677
49678
49679
49680
49681
49682
49683
49684
49685
49686
49687
49688
49689
49690
49691
49692
49693  # Special extras...
49694  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49695    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49696      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49697      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49698    fi
49699    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49700    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49701  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49702    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49703    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49704  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49705    CXXSTD_CXXFLAG="-std=gnu++98"
49706
49707
49708
49709
49710
49711
49712
49713
49714
49715
49716
49717
49718
49719
49720
49721
49722
49723
49724
49725
49726
49727
49728
49729
49730
49731
49732
49733
49734
49735
49736
49737
49738
49739
49740
49741
49742
49743
49744
49745
49746
49747
49748    # Execute function body
49749
49750  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49751$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49752  supports=yes
49753
49754  saved_cxxflags="$CXXFLAGS"
49755  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49756  ac_ext=cpp
49757ac_cpp='$CXXCPP $CPPFLAGS'
49758ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49759ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49760ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49761
49762  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49763/* end confdefs.h.  */
49764int i;
49765_ACEOF
49766if ac_fn_cxx_try_compile "$LINENO"; then :
49767
49768else
49769  supports=no
49770fi
49771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49772  ac_ext=cpp
49773ac_cpp='$CXXCPP $CPPFLAGS'
49774ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49775ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49776ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49777
49778  CXXFLAGS="$saved_cxxflags"
49779
49780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49781$as_echo "$supports" >&6; }
49782  if test "x$supports" = "xyes" ; then
49783    :
49784
49785  else
49786    :
49787    CXXSTD_CXXFLAG=""
49788  fi
49789
49790
49791
49792
49793
49794
49795
49796
49797
49798
49799
49800
49801    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49802    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49803
49804  fi
49805  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49806    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49807    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49808  fi
49809
49810  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49811    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49812    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49813  fi
49814
49815  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49816  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49817  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49818
49819  ###############################################################################
49820  #
49821  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49822  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49823  #
49824
49825  # Setup compiler/platform specific flags into
49826  #    CFLAGS_JDK    - C Compiler flags
49827  #    CXXFLAGS_JDK  - C++ Compiler flags
49828  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49829  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49830    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49831    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49832    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49833    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49834      # Force compatibility with i586 on 32 bit intel platforms.
49835      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49836      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49837    fi
49838    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49839        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49840    case $OPENJDK_TARGET_CPU_ARCH in
49841      arm )
49842        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49843        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49844        ;;
49845      ppc )
49846        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49847        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49848        ;;
49849      s390 )
49850        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
49851        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49852        ;;
49853      * )
49854        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49855        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49856        ;;
49857    esac
49858
49859
49860
49861
49862
49863
49864
49865
49866
49867
49868
49869
49870
49871
49872
49873
49874
49875
49876
49877
49878
49879
49880
49881
49882
49883
49884
49885
49886
49887
49888
49889
49890
49891
49892
49893
49894
49895
49896
49897
49898
49899
49900
49901
49902
49903
49904
49905
49906
49907
49908
49909
49910
49911
49912    # Execute function body
49913
49914  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49915  REFERENCE_VERSION=6
49916
49917  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49918    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49919  fi
49920
49921  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49922    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49923  fi
49924
49925  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49926  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49927
49928  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49929    :
49930
49931  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49932  # runs afoul of the more aggressive versions of these optimisations.
49933  # Notably, value range propagation now assumes that the this pointer of C++
49934  # member functions is non-null.
49935  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
49936        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49937        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
49938$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
49939  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49940  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49941
49942  else
49943    :
49944
49945  fi
49946
49947
49948
49949
49950
49951
49952
49953
49954
49955
49956
49957
49958
49959
49960  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49961    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49962
49963    # Restrict the debug information created by Clang to avoid
49964    # too big object files and speed the build up a little bit
49965    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49966    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49967    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49968      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49969        # Force compatibility with i586 on 32 bit intel platforms.
49970        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49971        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49972      fi
49973      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49974      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49975          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49976      case $OPENJDK_TARGET_CPU_ARCH in
49977        ppc )
49978          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49979          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49980          ;;
49981        * )
49982          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49983          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49984          ;;
49985      esac
49986    fi
49987  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49988    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49989    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49990    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49991      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49992    fi
49993
49994    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49995    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49996  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49997    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49998    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49999    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50000  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50001    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50002        -MD -Zc:wchar_t- -W3 -wd4800 \
50003        -DWIN32_LEAN_AND_MEAN \
50004        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50005        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50006        -DWIN32 -DIAL"
50007    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50008      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50009    else
50010      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50011    fi
50012    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50013    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50014    # studio.
50015    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50016      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50017      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50018      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50019    fi
50020  fi
50021
50022  ###############################################################################
50023
50024  # Adjust flags according to debug level.
50025  case $DEBUG_LEVEL in
50026    fastdebug | slowdebug )
50027      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50028      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50029      ;;
50030    release )
50031      ;;
50032    * )
50033      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50034      ;;
50035  esac
50036
50037  # Set some common defines. These works for all compilers, but assume
50038  # -D is universally accepted.
50039
50040  # Setup endianness
50041  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50042    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50043    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50044    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50045    #   Note: -Dmacro         is the same as    #define macro 1
50046    #         -Dmacro=        is the same as    #define macro
50047    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50048      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50049    else
50050      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50051    fi
50052  else
50053    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50054    # are defined in the system?
50055    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50056      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50057    else
50058      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50059    fi
50060  fi
50061
50062  # Setup target OS define. Use OS target name but in upper case.
50063  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50064  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50065
50066  # Setup target CPU
50067  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50068      $OPENJDK_TARGET_ADD_LP64 \
50069      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50070
50071  # Setup debug/release defines
50072  if test "x$DEBUG_LEVEL" = xrelease; then
50073    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50074    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50075      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50076    fi
50077  else
50078    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50079  fi
50080
50081  # Set some additional per-OS defines.
50082  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50083    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50084    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50085        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50086  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50087    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50088    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50089        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50090  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50091    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50092    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50093    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50094    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50095        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50096        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50097        -fno-omit-frame-pointer"
50098  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50099    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50100    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50101    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50102        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50103        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50104  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50105    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50106  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50107    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50108    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50109  fi
50110
50111  # Set some additional per-CPU defines.
50112  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50113    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50114  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50115    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50116  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50117    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50118      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50119      # fixes `relocation truncated to fit' error for gcc 4.1.
50120      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50121      # Use ppc64 instructions, but schedule for power5
50122      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50123    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50124      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50125    fi
50126  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50127    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50128      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50129      # Little endian machine uses ELFv2 ABI.
50130      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50131      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50132      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50133    fi
50134  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50135    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50136      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50137    fi
50138  fi
50139
50140  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50141    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50142  fi
50143
50144  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50145    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50146      # Solaris does not have _LP64=1 in the old build.
50147      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50148      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50149    fi
50150  fi
50151
50152  # Set JVM_CFLAGS warning handling
50153  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50154    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50155        -Wunused-value -Woverloaded-virtual"
50156
50157    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50158
50159
50160
50161
50162
50163
50164
50165
50166
50167
50168
50169
50170
50171
50172
50173
50174
50175
50176
50177
50178
50179
50180
50181
50182
50183
50184
50185
50186
50187
50188
50189
50190
50191
50192
50193
50194
50195
50196
50197
50198
50199
50200
50201
50202
50203
50204
50205
50206
50207
50208
50209
50210
50211
50212    # Execute function body
50213
50214  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50215  REFERENCE_VERSION=4.8
50216
50217  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50218    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50219  fi
50220
50221  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50222    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50223  fi
50224
50225  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50226  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50227
50228  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50229    :
50230
50231            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50232            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50233
50234
50235  else
50236    :
50237
50238  fi
50239
50240
50241
50242
50243
50244
50245
50246
50247
50248
50249
50250
50251
50252
50253    fi
50254    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50255      # Non-zero builds have stricter warnings
50256      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50257    else
50258      if test "x$TOOLCHAIN_TYPE" = xclang; then
50259        # Some versions of llvm do not like -Wundef
50260        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50261      fi
50262    fi
50263  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50264    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50265        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50266  fi
50267
50268  # Additional macosx handling
50269  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50270    # Setting these parameters makes it an error to link to macosx APIs that are
50271    # newer than the given OS version and makes the linked binaries compatible
50272    # even if built on a newer version of the OS.
50273    # The expected format is X.Y.Z
50274    MACOSX_VERSION_MIN=10.7.0
50275
50276
50277    # The macro takes the version with no dots, ex: 1070
50278    # Let the flags variables get resolved in make for easier override on make
50279    # command line.
50280    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50281    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50282  fi
50283
50284  # Setup some hard coded includes
50285  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50286      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50287      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50288      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50289      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50290      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50291      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50292
50293  # The shared libraries are compiled using the picflag.
50294  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50295      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50296  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50297      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50298
50299  # Executable flags
50300  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50301  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50302
50303
50304
50305
50306
50307
50308  # Setup LDFLAGS et al.
50309  #
50310
50311  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50312    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50313    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50314    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50315    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50316      LDFLAGS_SAFESH="-safeseh"
50317      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50318      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50319      # NOTE: Old build added -machine. Probably not needed.
50320      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50321    else
50322      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50323    fi
50324  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50325      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50326      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50327        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50328        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50329    fi
50330  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50331    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50332    # We have previously set HAS_GNU_HASH if this is the case
50333    if test -n "$HAS_GNU_HASH"; then
50334      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50335      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50336      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50337    fi
50338      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50339        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50340    fi
50341    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50342      # And since we now know that the linker is gnu, then add -z defs, to forbid
50343      # undefined symbols in object files.
50344      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50345      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50346      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50347      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50348      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50349      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50350        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50351      fi
50352      case $DEBUG_LEVEL in
50353        release )
50354          # tell linker to optimize libraries.
50355          # Should this be supplied to the OSS linker as well?
50356          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50357          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50358          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50359          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50360            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50361          fi
50362          ;;
50363        slowdebug )
50364          # Hotspot always let the linker optimize
50365          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50366          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50367            # do relocations at load
50368            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50369            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50370            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50371          fi
50372          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50373            # mark relocations read only
50374            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50375            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50376            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50377          fi
50378          ;;
50379        fastdebug )
50380          # Hotspot always let the linker optimize
50381          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50382          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50383            # mark relocations read only
50384            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50385            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50386            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50387          fi
50388          ;;
50389        * )
50390          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50391          ;;
50392        esac
50393    fi
50394  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50395    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50396    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50397    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50398    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50399    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50400    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50401      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50402    fi
50403  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50404    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50405    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50406    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50407  fi
50408
50409  # Customize LDFLAGS for executables
50410
50411  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50412
50413  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50414    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50415      LDFLAGS_STACK_SIZE=1048576
50416    else
50417      LDFLAGS_STACK_SIZE=327680
50418    fi
50419    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50420  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50421    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50422  fi
50423
50424  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50425
50426  # Customize LDFLAGS for libs
50427  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50428
50429  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50430  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50431    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50432        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50433    JDKLIB_LIBS=""
50434  else
50435    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50436        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50437
50438    if test "xTARGET" = "xTARGET"; then
50439    # On some platforms (mac) the linker warns about non existing -L dirs.
50440    # Add server first if available. Linking aginst client does not always produce the same results.
50441      # Only add client/minimal dir if client/minimal is being built.
50442    # Default to server for other variants.
50443      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50444        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50445      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50446        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50447      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50448        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50449    else
50450        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50451    fi
50452    elif test "xTARGET" = "xBUILD"; then
50453      # When building a buildjdk, it's always only the server variant
50454      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50455          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50456    fi
50457
50458    JDKLIB_LIBS="-ljava -ljvm"
50459    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50460      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50461    fi
50462
50463  fi
50464
50465LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50466
50467  # Set JVM_LIBS (per os)
50468  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50469    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50470  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50471    # FIXME: This hard-coded path is not really proper.
50472    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50473      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50474    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50475      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50476    fi
50477    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50478        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50479  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50480    JVM_LIBS="$JVM_LIBS -lm"
50481  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50482    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50483  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50484    JVM_LIBS="$JVM_LIBS -lm"
50485  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50486    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50487        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50488        wsock32.lib winmm.lib version.lib psapi.lib"
50489    fi
50490
50491  # Set JVM_ASFLAGS
50492  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50493    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50494      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50495    fi
50496  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50497    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50498  fi
50499
50500  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50501
50502
50503
50504
50505
50506
50507
50508
50509
50510
50511
50512
50513
50514
50515
50516  # Special extras...
50517  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50518    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50519      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50520      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50521    fi
50522    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50523    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50524  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50525    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50526    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50527  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50528    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50529
50530
50531
50532
50533
50534
50535
50536
50537
50538
50539
50540
50541
50542
50543
50544
50545
50546
50547
50548
50549
50550
50551
50552
50553
50554
50555
50556
50557
50558
50559
50560
50561
50562
50563
50564
50565
50566
50567
50568
50569
50570
50571    # Execute function body
50572
50573  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50574$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50575  supports=yes
50576
50577  saved_cxxflags="$CXXFLAGS"
50578  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50579  ac_ext=cpp
50580ac_cpp='$CXXCPP $CPPFLAGS'
50581ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50582ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50583ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50584
50585  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50586/* end confdefs.h.  */
50587int i;
50588_ACEOF
50589if ac_fn_cxx_try_compile "$LINENO"; then :
50590
50591else
50592  supports=no
50593fi
50594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50595  ac_ext=cpp
50596ac_cpp='$CXXCPP $CPPFLAGS'
50597ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50598ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50599ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50600
50601  CXXFLAGS="$saved_cxxflags"
50602
50603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50604$as_echo "$supports" >&6; }
50605  if test "x$supports" = "xyes" ; then
50606    :
50607
50608  else
50609    :
50610    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50611  fi
50612
50613
50614
50615
50616
50617
50618
50619
50620
50621
50622
50623
50624    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50625    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50626
50627  fi
50628  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50629    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50630    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50631  fi
50632
50633  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50634    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50635    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50636  fi
50637
50638  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50639  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50640  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50641
50642  ###############################################################################
50643  #
50644  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50645  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50646  #
50647
50648  # Setup compiler/platform specific flags into
50649  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50650  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50651  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50652  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50653    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50654    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50655    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50656    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50657      # Force compatibility with i586 on 32 bit intel platforms.
50658      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50659      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50660    fi
50661    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50662        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50663    case $OPENJDK_BUILD_CPU_ARCH in
50664      arm )
50665        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50666        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50667        ;;
50668      ppc )
50669        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50670        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50671        ;;
50672      s390 )
50673        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50674        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50675        ;;
50676      * )
50677        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50678        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50679        ;;
50680    esac
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706
50707
50708
50709
50710
50711
50712
50713
50714
50715
50716
50717
50718
50719
50720
50721
50722
50723
50724
50725
50726
50727
50728
50729
50730
50731
50732
50733
50734
50735    # Execute function body
50736
50737  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50738  REFERENCE_VERSION=6
50739
50740  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50741    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50742  fi
50743
50744  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50745    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50746  fi
50747
50748  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50749  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50750
50751  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50752    :
50753
50754  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50755  # runs afoul of the more aggressive versions of these optimisations.
50756  # Notably, value range propagation now assumes that the this pointer of C++
50757  # member functions is non-null.
50758  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50759        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50760        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50761$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50762  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50763  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50764
50765  else
50766    :
50767
50768  fi
50769
50770
50771
50772
50773
50774
50775
50776
50777
50778
50779
50780
50781
50782
50783  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50784    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50785
50786    # Restrict the debug information created by Clang to avoid
50787    # too big object files and speed the build up a little bit
50788    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50789    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50790    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50791      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50792        # Force compatibility with i586 on 32 bit intel platforms.
50793        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50794        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50795      fi
50796      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50797      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50798          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50799      case $OPENJDK_BUILD_CPU_ARCH in
50800        ppc )
50801          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50802          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50803          ;;
50804        * )
50805          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50806          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50807          ;;
50808      esac
50809    fi
50810  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50811    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50812    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50813    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50814      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50815    fi
50816
50817    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50818    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50819  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50820    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50821    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50822    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50823  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50824    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50825        -MD -Zc:wchar_t- -W3 -wd4800 \
50826        -DWIN32_LEAN_AND_MEAN \
50827        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50828        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50829        -DWIN32 -DIAL"
50830    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50831      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50832    else
50833      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50834    fi
50835    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50836    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50837    # studio.
50838    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50839      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50840      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50841      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50842    fi
50843  fi
50844
50845  ###############################################################################
50846
50847  # Adjust flags according to debug level.
50848  case $DEBUG_LEVEL in
50849    fastdebug | slowdebug )
50850      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50851      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50852      ;;
50853    release )
50854      ;;
50855    * )
50856      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50857      ;;
50858  esac
50859
50860  # Set some common defines. These works for all compilers, but assume
50861  # -D is universally accepted.
50862
50863  # Setup endianness
50864  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50865    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50866    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50867    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50868    #   Note: -Dmacro         is the same as    #define macro 1
50869    #         -Dmacro=        is the same as    #define macro
50870    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50871      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50872    else
50873      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50874    fi
50875  else
50876    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50877    # are defined in the system?
50878    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50879      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50880    else
50881      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50882    fi
50883  fi
50884
50885  # Setup target OS define. Use OS target name but in upper case.
50886  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50887  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50888
50889  # Setup target CPU
50890  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50891      $OPENJDK_BUILD_ADD_LP64 \
50892      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50893
50894  # Setup debug/release defines
50895  if test "x$DEBUG_LEVEL" = xrelease; then
50896    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50897    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50898      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50899    fi
50900  else
50901    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50902  fi
50903
50904  # Set some additional per-OS defines.
50905  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50906    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50907    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50908        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50909  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50910    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50911    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50912        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50913  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50914    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50915    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50916    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50917    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50918        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50919        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50920        -fno-omit-frame-pointer"
50921  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50922    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50923    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50924    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
50925        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50926        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50927  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50928    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50929  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50930    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50931    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50932  fi
50933
50934  # Set some additional per-CPU defines.
50935  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50936    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50937  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50938    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50939  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50940    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50941      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50942      # fixes `relocation truncated to fit' error for gcc 4.1.
50943      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50944      # Use ppc64 instructions, but schedule for power5
50945      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50946    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50947      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50948    fi
50949  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50950    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50951      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50952      # Little endian machine uses ELFv2 ABI.
50953      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50954      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50955      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
50956    fi
50957  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
50958    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50959      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
50960    fi
50961  fi
50962
50963  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50964    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50965  fi
50966
50967  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50968    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50969      # Solaris does not have _LP64=1 in the old build.
50970      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50971      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50972    fi
50973  fi
50974
50975  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50976  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50977    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50978        -Wunused-value -Woverloaded-virtual"
50979
50980    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50981
50982
50983
50984
50985
50986
50987
50988
50989
50990
50991
50992
50993
50994
50995
50996
50997
50998
50999
51000
51001
51002
51003
51004
51005
51006
51007
51008
51009
51010
51011
51012
51013
51014
51015
51016
51017
51018
51019
51020
51021
51022
51023
51024
51025
51026
51027
51028
51029
51030
51031
51032
51033
51034
51035    # Execute function body
51036
51037  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51038  REFERENCE_VERSION=4.8
51039
51040  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51041    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
51042  fi
51043
51044  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51045    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51046  fi
51047
51048  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51049  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51050
51051  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51052    :
51053
51054            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51055            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51056
51057
51058  else
51059    :
51060
51061  fi
51062
51063
51064
51065
51066
51067
51068
51069
51070
51071
51072
51073
51074
51075
51076    fi
51077    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51078      # Non-zero builds have stricter warnings
51079      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51080    else
51081      if test "x$TOOLCHAIN_TYPE" = xclang; then
51082        # Some versions of llvm do not like -Wundef
51083        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51084      fi
51085    fi
51086  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51087    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51088        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51089  fi
51090
51091  # Additional macosx handling
51092  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51093    # Setting these parameters makes it an error to link to macosx APIs that are
51094    # newer than the given OS version and makes the linked binaries compatible
51095    # even if built on a newer version of the OS.
51096    # The expected format is X.Y.Z
51097    MACOSX_VERSION_MIN=10.7.0
51098
51099
51100    # The macro takes the version with no dots, ex: 1070
51101    # Let the flags variables get resolved in make for easier override on make
51102    # command line.
51103    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)"
51104    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51105  fi
51106
51107  # Setup some hard coded includes
51108  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51109      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51110      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51111      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51112      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51113      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51114      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51115
51116  # The shared libraries are compiled using the picflag.
51117  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51118      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51119  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51120      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51121
51122  # Executable flags
51123  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51124  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51125
51126
51127
51128
51129
51130
51131  # Setup LDFLAGS et al.
51132  #
51133
51134  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51135    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51136    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51137    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51138    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51139      LDFLAGS_SAFESH="-safeseh"
51140      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51141      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51142      # NOTE: Old build added -machine. Probably not needed.
51143      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51144    else
51145      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51146    fi
51147  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51148      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51149      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51150        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51151        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51152    fi
51153  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51154    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51155    # We have previously set HAS_GNU_HASH if this is the case
51156    if test -n "$HAS_GNU_HASH"; then
51157      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51158      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51159      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51160    fi
51161      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51162        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51163    fi
51164    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51165      # And since we now know that the linker is gnu, then add -z defs, to forbid
51166      # undefined symbols in object files.
51167      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51168      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51169      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51170      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51171      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51172      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51173        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51174      fi
51175      case $DEBUG_LEVEL in
51176        release )
51177          # tell linker to optimize libraries.
51178          # Should this be supplied to the OSS linker as well?
51179          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51180          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51181          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51182          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51183            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51184          fi
51185          ;;
51186        slowdebug )
51187          # Hotspot always let the linker optimize
51188          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51189          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51190            # do relocations at load
51191            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51192            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51193            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51194          fi
51195          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51196            # mark relocations read only
51197            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51198            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51199            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51200          fi
51201          ;;
51202        fastdebug )
51203          # Hotspot always let the linker optimize
51204          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51205          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51206            # mark relocations read only
51207            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51208            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51209            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51210          fi
51211          ;;
51212        * )
51213          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51214          ;;
51215        esac
51216    fi
51217  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51218    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51219    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51220    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51221    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51222    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51223    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51224      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51225    fi
51226  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51227    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51228    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51229    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51230  fi
51231
51232  # Customize LDFLAGS for executables
51233
51234  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51235
51236  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51237    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51238      LDFLAGS_STACK_SIZE=1048576
51239    else
51240      LDFLAGS_STACK_SIZE=327680
51241    fi
51242    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51243  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51244    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51245  fi
51246
51247  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51248
51249  # Customize LDFLAGS for libs
51250  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51251
51252  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51253  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51254    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51255        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51256    OPENJDK_BUILD_JDKLIB_LIBS=""
51257  else
51258    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51259        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51260
51261    if test "xBUILD" = "xTARGET"; then
51262    # On some platforms (mac) the linker warns about non existing -L dirs.
51263    # Add server first if available. Linking aginst client does not always produce the same results.
51264      # Only add client/minimal dir if client/minimal is being built.
51265    # Default to server for other variants.
51266      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
51267        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51268      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
51269        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
51270      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51271        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
51272    else
51273        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51274    fi
51275    elif test "xBUILD" = "xBUILD"; then
51276      # When building a buildjdk, it's always only the server variant
51277      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51278          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51279    fi
51280
51281    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51282    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51283      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51284    fi
51285
51286  fi
51287
51288OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51289
51290  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51291  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51292    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51293  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51294    # FIXME: This hard-coded path is not really proper.
51295    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51296      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51297    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51298      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51299    fi
51300    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51301        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51302  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51303    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51304  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51305    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51306  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51307    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51308  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51309    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51310        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51311        wsock32.lib winmm.lib version.lib psapi.lib"
51312    fi
51313
51314  # Set OPENJDK_BUILD_JVM_ASFLAGS
51315  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51316    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51317      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51318    fi
51319  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51320    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51321  fi
51322
51323  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335
51336
51337
51338
51339  # Tests are only ever compiled for TARGET
51340  # Flags for compiling test libraries
51341  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51342  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51343
51344  # Flags for compiling test executables
51345  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51346  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51347
51348
51349
51350
51351
51352
51353  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51354  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51355
51356
51357
51358
51359
51360
51361  # Some Zero and Shark settings.
51362  # ZERO_ARCHFLAG tells the compiler which mode to build for
51363  case "${OPENJDK_TARGET_CPU}" in
51364    s390)
51365      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51366      ;;
51367    *)
51368      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51369  esac
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
51411
51412    # Execute function body
51413
51414
51415
51416
51417
51418
51419
51420
51421
51422
51423
51424
51425
51426
51427
51428
51429
51430
51431
51432
51433
51434
51435
51436
51437
51438
51439
51440
51441
51442
51443
51444
51445
51446
51447
51448
51449
51450
51451
51452
51453
51454
51455
51456
51457
51458
51459
51460
51461    # Execute function body
51462
51463  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51464$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51465  supports=yes
51466
51467  saved_cflags="$CFLAGS"
51468  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51469  ac_ext=c
51470ac_cpp='$CPP $CPPFLAGS'
51471ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51472ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51473ac_compiler_gnu=$ac_cv_c_compiler_gnu
51474
51475  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51476/* end confdefs.h.  */
51477int i;
51478_ACEOF
51479if ac_fn_c_try_compile "$LINENO"; then :
51480
51481else
51482  supports=no
51483fi
51484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51485  ac_ext=cpp
51486ac_cpp='$CXXCPP $CPPFLAGS'
51487ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51488ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51489ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51490
51491  CFLAGS="$saved_cflags"
51492
51493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51494$as_echo "$supports" >&6; }
51495  if test "x$supports" = "xyes" ; then
51496    :
51497    C_COMP_SUPPORTS="yes"
51498  else
51499    :
51500    C_COMP_SUPPORTS="no"
51501  fi
51502
51503
51504
51505
51506
51507
51508
51509
51510
51511
51512
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524
51525
51526
51527
51528
51529
51530
51531
51532
51533
51534
51535
51536
51537
51538
51539
51540
51541
51542
51543
51544
51545
51546
51547
51548
51549
51550
51551
51552
51553
51554
51555
51556
51557
51558
51559
51560
51561    # Execute function body
51562
51563  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51564$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51565  supports=yes
51566
51567  saved_cxxflags="$CXXFLAGS"
51568  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51569  ac_ext=cpp
51570ac_cpp='$CXXCPP $CPPFLAGS'
51571ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51572ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51573ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51574
51575  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51576/* end confdefs.h.  */
51577int i;
51578_ACEOF
51579if ac_fn_cxx_try_compile "$LINENO"; then :
51580
51581else
51582  supports=no
51583fi
51584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51585  ac_ext=cpp
51586ac_cpp='$CXXCPP $CPPFLAGS'
51587ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51588ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51589ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51590
51591  CXXFLAGS="$saved_cxxflags"
51592
51593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51594$as_echo "$supports" >&6; }
51595  if test "x$supports" = "xyes" ; then
51596    :
51597    CXX_COMP_SUPPORTS="yes"
51598  else
51599    :
51600    CXX_COMP_SUPPORTS="no"
51601  fi
51602
51603
51604
51605
51606
51607
51608
51609
51610
51611
51612
51613
51614
51615  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51616$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51617  supports=no
51618  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51619
51620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51621$as_echo "$supports" >&6; }
51622  if test "x$supports" = "xyes" ; then
51623    :
51624
51625  else
51626    :
51627    ZERO_ARCHFLAG=""
51628  fi
51629
51630
51631
51632
51633
51634
51635
51636
51637  # Check that the compiler supports -mX (or -qX on AIX) flags
51638  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
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
51685
51686    # Execute function body
51687
51688
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698
51699
51700
51701
51702
51703
51704
51705
51706
51707
51708
51709
51710
51711
51712
51713
51714
51715
51716
51717
51718
51719
51720
51721
51722
51723
51724
51725
51726
51727
51728
51729
51730
51731
51732
51733
51734
51735    # Execute function body
51736
51737  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51738$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51739  supports=yes
51740
51741  saved_cflags="$CFLAGS"
51742  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51743  ac_ext=c
51744ac_cpp='$CPP $CPPFLAGS'
51745ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51746ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51747ac_compiler_gnu=$ac_cv_c_compiler_gnu
51748
51749  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51750/* end confdefs.h.  */
51751int i;
51752_ACEOF
51753if ac_fn_c_try_compile "$LINENO"; then :
51754
51755else
51756  supports=no
51757fi
51758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51759  ac_ext=cpp
51760ac_cpp='$CXXCPP $CPPFLAGS'
51761ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51762ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51763ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51764
51765  CFLAGS="$saved_cflags"
51766
51767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51768$as_echo "$supports" >&6; }
51769  if test "x$supports" = "xyes" ; then
51770    :
51771    C_COMP_SUPPORTS="yes"
51772  else
51773    :
51774    C_COMP_SUPPORTS="no"
51775  fi
51776
51777
51778
51779
51780
51781
51782
51783
51784
51785
51786
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798
51799
51800
51801
51802
51803
51804
51805
51806
51807
51808
51809
51810
51811
51812
51813
51814
51815
51816
51817
51818
51819
51820
51821
51822
51823
51824
51825
51826
51827
51828
51829
51830
51831
51832
51833
51834
51835    # Execute function body
51836
51837  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51838$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51839  supports=yes
51840
51841  saved_cxxflags="$CXXFLAGS"
51842  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51843  ac_ext=cpp
51844ac_cpp='$CXXCPP $CPPFLAGS'
51845ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51846ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51847ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51848
51849  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51850/* end confdefs.h.  */
51851int i;
51852_ACEOF
51853if ac_fn_cxx_try_compile "$LINENO"; then :
51854
51855else
51856  supports=no
51857fi
51858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51859  ac_ext=cpp
51860ac_cpp='$CXXCPP $CPPFLAGS'
51861ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51862ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51863ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51864
51865  CXXFLAGS="$saved_cxxflags"
51866
51867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51868$as_echo "$supports" >&6; }
51869  if test "x$supports" = "xyes" ; then
51870    :
51871    CXX_COMP_SUPPORTS="yes"
51872  else
51873    :
51874    CXX_COMP_SUPPORTS="no"
51875  fi
51876
51877
51878
51879
51880
51881
51882
51883
51884
51885
51886
51887
51888
51889  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51890$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51891  supports=no
51892  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51893
51894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51895$as_echo "$supports" >&6; }
51896  if test "x$supports" = "xyes" ; then
51897    :
51898    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51899  else
51900    :
51901    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51902  fi
51903
51904
51905
51906
51907
51908
51909
51910
51911  # Check whether --enable-warnings-as-errors was given.
51912if test "${enable_warnings_as_errors+set}" = set; then :
51913  enableval=$enable_warnings_as_errors;
51914fi
51915
51916
51917  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51918$as_echo_n "checking if native warnings are errors... " >&6; }
51919  if test "x$enable_warnings_as_errors" = "xyes"; then
51920    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51921$as_echo "yes (explicitely set)" >&6; }
51922    WARNINGS_AS_ERRORS=true
51923  elif test "x$enable_warnings_as_errors" = "xno"; then
51924    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51925$as_echo "no" >&6; }
51926    WARNINGS_AS_ERRORS=false
51927  elif test "x$enable_warnings_as_errors" = "x"; then
51928    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51929$as_echo "yes (default)" >&6; }
51930    WARNINGS_AS_ERRORS=true
51931  else
51932    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51933  fi
51934
51935  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51936    # Set legacy hotspot variable
51937    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51938  else
51939    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51940  fi
51941
51942
51943
51944
51945  case "${TOOLCHAIN_TYPE}" in
51946    microsoft)
51947      DISABLE_WARNING_PREFIX="-wd"
51948      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51949      ;;
51950    solstudio)
51951      DISABLE_WARNING_PREFIX="-erroff="
51952      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51953      ;;
51954    gcc)
51955      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
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
52002
52003    # Execute function body
52004
52005
52006
52007
52008
52009
52010
52011
52012
52013
52014
52015
52016
52017
52018
52019
52020
52021
52022
52023
52024
52025
52026
52027
52028
52029
52030
52031
52032
52033
52034
52035
52036
52037
52038
52039
52040
52041
52042
52043
52044
52045
52046
52047
52048
52049
52050
52051
52052    # Execute function body
52053
52054  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52055$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52056  supports=yes
52057
52058  saved_cflags="$CFLAGS"
52059  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52060  ac_ext=c
52061ac_cpp='$CPP $CPPFLAGS'
52062ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52063ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52064ac_compiler_gnu=$ac_cv_c_compiler_gnu
52065
52066  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52067/* end confdefs.h.  */
52068int i;
52069_ACEOF
52070if ac_fn_c_try_compile "$LINENO"; then :
52071
52072else
52073  supports=no
52074fi
52075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52076  ac_ext=cpp
52077ac_cpp='$CXXCPP $CPPFLAGS'
52078ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52079ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52080ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52081
52082  CFLAGS="$saved_cflags"
52083
52084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52085$as_echo "$supports" >&6; }
52086  if test "x$supports" = "xyes" ; then
52087    :
52088    C_COMP_SUPPORTS="yes"
52089  else
52090    :
52091    C_COMP_SUPPORTS="no"
52092  fi
52093
52094
52095
52096
52097
52098
52099
52100
52101
52102
52103
52104
52105
52106
52107
52108
52109
52110
52111
52112
52113
52114
52115
52116
52117
52118
52119
52120
52121
52122
52123
52124
52125
52126
52127
52128
52129
52130
52131
52132
52133
52134
52135
52136
52137
52138
52139
52140
52141
52142
52143
52144
52145
52146
52147
52148
52149
52150
52151
52152    # Execute function body
52153
52154  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52155$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52156  supports=yes
52157
52158  saved_cxxflags="$CXXFLAGS"
52159  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52160  ac_ext=cpp
52161ac_cpp='$CXXCPP $CPPFLAGS'
52162ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52163ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52164ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52165
52166  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52167/* end confdefs.h.  */
52168int i;
52169_ACEOF
52170if ac_fn_cxx_try_compile "$LINENO"; then :
52171
52172else
52173  supports=no
52174fi
52175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52176  ac_ext=cpp
52177ac_cpp='$CXXCPP $CPPFLAGS'
52178ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52179ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52180ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52181
52182  CXXFLAGS="$saved_cxxflags"
52183
52184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52185$as_echo "$supports" >&6; }
52186  if test "x$supports" = "xyes" ; then
52187    :
52188    CXX_COMP_SUPPORTS="yes"
52189  else
52190    :
52191    CXX_COMP_SUPPORTS="no"
52192  fi
52193
52194
52195
52196
52197
52198
52199
52200
52201
52202
52203
52204
52205
52206  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52207$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52208  supports=no
52209  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52210
52211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52212$as_echo "$supports" >&6; }
52213  if test "x$supports" = "xyes" ; then
52214    :
52215    GCC_CAN_DISABLE_WARNINGS=true
52216  else
52217    :
52218    GCC_CAN_DISABLE_WARNINGS=false
52219
52220  fi
52221
52222
52223
52224
52225
52226
52227      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52228        DISABLE_WARNING_PREFIX="-Wno-"
52229      else
52230        DISABLE_WARNING_PREFIX=
52231      fi
52232      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52233      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52234      # CFLAGS since any target specific flags will likely not work with the
52235      # build compiler
52236      CC_OLD="$CC"
52237      CXX_OLD="$CXX"
52238      CC="$BUILD_CC"
52239      CXX="$BUILD_CXX"
52240      CFLAGS_OLD="$CFLAGS"
52241      CFLAGS=""
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
52288
52289    # Execute function body
52290
52291
52292
52293
52294
52295
52296
52297
52298
52299
52300
52301
52302
52303
52304
52305
52306
52307
52308
52309
52310
52311
52312
52313
52314
52315
52316
52317
52318
52319
52320
52321
52322
52323
52324
52325
52326
52327
52328
52329
52330
52331
52332
52333
52334
52335
52336
52337
52338    # Execute function body
52339
52340  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52341$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52342  supports=yes
52343
52344  saved_cflags="$CFLAGS"
52345  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52346  ac_ext=c
52347ac_cpp='$CPP $CPPFLAGS'
52348ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52349ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52350ac_compiler_gnu=$ac_cv_c_compiler_gnu
52351
52352  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52353/* end confdefs.h.  */
52354int i;
52355_ACEOF
52356if ac_fn_c_try_compile "$LINENO"; then :
52357
52358else
52359  supports=no
52360fi
52361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52362  ac_ext=cpp
52363ac_cpp='$CXXCPP $CPPFLAGS'
52364ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52365ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52366ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52367
52368  CFLAGS="$saved_cflags"
52369
52370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52371$as_echo "$supports" >&6; }
52372  if test "x$supports" = "xyes" ; then
52373    :
52374    C_COMP_SUPPORTS="yes"
52375  else
52376    :
52377    C_COMP_SUPPORTS="no"
52378  fi
52379
52380
52381
52382
52383
52384
52385
52386
52387
52388
52389
52390
52391
52392
52393
52394
52395
52396
52397
52398
52399
52400
52401
52402
52403
52404
52405
52406
52407
52408
52409
52410
52411
52412
52413
52414
52415
52416
52417
52418
52419
52420
52421
52422
52423
52424
52425
52426
52427
52428
52429
52430
52431
52432
52433
52434
52435
52436
52437
52438    # Execute function body
52439
52440  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52441$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52442  supports=yes
52443
52444  saved_cxxflags="$CXXFLAGS"
52445  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52446  ac_ext=cpp
52447ac_cpp='$CXXCPP $CPPFLAGS'
52448ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52449ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52450ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52451
52452  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52453/* end confdefs.h.  */
52454int i;
52455_ACEOF
52456if ac_fn_cxx_try_compile "$LINENO"; then :
52457
52458else
52459  supports=no
52460fi
52461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52462  ac_ext=cpp
52463ac_cpp='$CXXCPP $CPPFLAGS'
52464ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52465ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52466ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52467
52468  CXXFLAGS="$saved_cxxflags"
52469
52470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52471$as_echo "$supports" >&6; }
52472  if test "x$supports" = "xyes" ; then
52473    :
52474    CXX_COMP_SUPPORTS="yes"
52475  else
52476    :
52477    CXX_COMP_SUPPORTS="no"
52478  fi
52479
52480
52481
52482
52483
52484
52485
52486
52487
52488
52489
52490
52491
52492  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52493$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52494  supports=no
52495  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52496
52497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52498$as_echo "$supports" >&6; }
52499  if test "x$supports" = "xyes" ; then
52500    :
52501    BUILD_CC_CAN_DISABLE_WARNINGS=true
52502  else
52503    :
52504    BUILD_CC_CAN_DISABLE_WARNINGS=false
52505
52506  fi
52507
52508
52509
52510
52511
52512
52513      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52514        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52515      else
52516        BUILD_CC_DISABLE_WARNING_PREFIX=
52517      fi
52518      CC="$CC_OLD"
52519      CXX="$CXX_OLD"
52520      CFLAGS="$CFLAGS_OLD"
52521      ;;
52522    clang)
52523      DISABLE_WARNING_PREFIX="-Wno-"
52524      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52525      ;;
52526    xlc)
52527      DISABLE_WARNING_PREFIX="-qsuppress="
52528      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52529      ;;
52530  esac
52531
52532
52533
52534
52535
52536# Setup debug symbols (need objcopy from the toolchain for that)
52537
52538  #
52539  # NATIVE_DEBUG_SYMBOLS
52540  # This must be done after the toolchain is setup, since we're looking at objcopy.
52541  #
52542  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52543$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52544
52545# Check whether --with-native-debug-symbols was given.
52546if test "${with_native_debug_symbols+set}" = set; then :
52547  withval=$with_native_debug_symbols;
52548        if test "x$OPENJDK_TARGET_OS" = xaix; then
52549          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52550            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52551          fi
52552        fi
52553
52554else
52555
52556        if test "x$OPENJDK_TARGET_OS" = xaix; then
52557          # AIX doesn't support 'zipped' so use 'internal' as default
52558          with_native_debug_symbols="internal"
52559        else
52560          if test "x$STATIC_BUILD" = xtrue; then
52561            with_native_debug_symbols="none"
52562          else
52563            with_native_debug_symbols="zipped"
52564          fi
52565        fi
52566
52567fi
52568
52569  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52571$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52572
52573  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52574
52575    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52576      if test "x$OBJCOPY" = x; then
52577        # enabling of enable-debug-symbols and can't find objcopy
52578        # this is an error
52579        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52580      fi
52581    fi
52582
52583    COMPILE_WITH_DEBUG_SYMBOLS=true
52584    COPY_DEBUG_SYMBOLS=true
52585    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52586
52587    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52588    DEBUG_BINARIES=false
52589    STRIP_POLICY=min_strip
52590
52591  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52592    COMPILE_WITH_DEBUG_SYMBOLS=false
52593    COPY_DEBUG_SYMBOLS=false
52594    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52595
52596    DEBUG_BINARIES=false
52597    STRIP_POLICY=no_strip
52598  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52599    COMPILE_WITH_DEBUG_SYMBOLS=true
52600    COPY_DEBUG_SYMBOLS=false
52601    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52602
52603    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52604    DEBUG_BINARIES=true
52605    STRIP_POLICY=no_strip
52606    STRIP=""
52607
52608  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52609
52610    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52611      if test "x$OBJCOPY" = x; then
52612        # enabling of enable-debug-symbols and can't find objcopy
52613        # this is an error
52614        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52615      fi
52616    fi
52617
52618    COMPILE_WITH_DEBUG_SYMBOLS=true
52619    COPY_DEBUG_SYMBOLS=true
52620    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52621
52622    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52623    DEBUG_BINARIES=false
52624    STRIP_POLICY=min_strip
52625  else
52626    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52627  fi
52628
52629  # --enable-debug-symbols is deprecated.
52630  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52631
52632  # Check whether --enable-debug-symbols was given.
52633if test "${enable_debug_symbols+set}" = set; then :
52634  enableval=$enable_debug_symbols;
52635fi
52636
52637  if test "x$enable_debug_symbols" != x; then
52638    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52639$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52640
52641    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52642      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52643$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52644    fi
52645
52646  fi
52647
52648
52649  # --enable-zip-debug-info is deprecated.
52650  # Please use --with-native-debug-symbols=zipped .
52651
52652  # Check whether --enable-zip-debug-info was given.
52653if test "${enable_zip_debug_info+set}" = set; then :
52654  enableval=$enable_zip_debug_info;
52655fi
52656
52657  if test "x$enable_zip_debug_info" != x; then
52658    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52659$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52660
52661    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52662      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52663$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52664    fi
52665
52666  fi
52667
52668
52669
52670
52671
52672
52673  # Legacy values
52674
52675
52676
52677
52678  # Check whether --enable-native-coverage was given.
52679if test "${enable_native_coverage+set}" = set; then :
52680  enableval=$enable_native_coverage;
52681fi
52682
52683  GCOV_ENABLED="false"
52684  if test "x$enable_native_coverage" = "xyes"; then
52685    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52686      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52687$as_echo_n "checking if native coverage is enabled... " >&6; }
52688      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52689$as_echo "yes" >&6; }
52690      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52691      GCOV_LDFLAGS="-fprofile-arcs"
52692      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52693      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52694      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52695      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52696      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52697      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52698      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52699      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52700      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52701      GCOV_ENABLED="true"
52702    else
52703      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52704    fi
52705  elif test "x$enable_native_coverage" = "xno"; then
52706    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52707$as_echo_n "checking if native coverage is enabled... " >&6; }
52708    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52709$as_echo "no" >&6; }
52710  elif test "x$enable_native_coverage" != "x"; then
52711    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52712  fi
52713
52714
52715
52716
52717# Need toolchain to setup dtrace
52718
52719  # Test for dtrace dependencies
52720  # Check whether --enable-dtrace was given.
52721if test "${enable_dtrace+set}" = set; then :
52722  enableval=$enable_dtrace;
52723fi
52724
52725
52726  DTRACE_DEP_MISSING=false
52727
52728  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52729$as_echo_n "checking for dtrace tool... " >&6; }
52730  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52731    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52732$as_echo "$DTRACE" >&6; }
52733  else
52734    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52735$as_echo "not found, cannot build dtrace" >&6; }
52736    DTRACE_DEP_MISSING=true
52737  fi
52738
52739  for ac_header in sys/sdt.h
52740do :
52741  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52742if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52743  cat >>confdefs.h <<_ACEOF
52744#define HAVE_SYS_SDT_H 1
52745_ACEOF
52746 DTRACE_HEADERS_OK=yes
52747else
52748  DTRACE_HEADERS_OK=no
52749fi
52750
52751done
52752
52753  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52754    DTRACE_DEP_MISSING=true
52755  fi
52756
52757  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52758$as_echo_n "checking if dtrace should be built... " >&6; }
52759  if test "x$enable_dtrace" = "xyes"; then
52760    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52761      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52762$as_echo "no, missing dependencies" >&6; }
52763
52764  # Print a helpful message on how to acquire the necessary build dependency.
52765  # dtrace is the help tag: freetype, cups, alsa etc
52766  MISSING_DEPENDENCY=dtrace
52767
52768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52769    cygwin_help $MISSING_DEPENDENCY
52770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52771    msys_help $MISSING_DEPENDENCY
52772  else
52773    PKGHANDLER_COMMAND=
52774
52775    case $PKGHANDLER in
52776      apt-get)
52777        apt_help     $MISSING_DEPENDENCY ;;
52778      yum)
52779        yum_help     $MISSING_DEPENDENCY ;;
52780      port)
52781        port_help    $MISSING_DEPENDENCY ;;
52782      pkgutil)
52783        pkgutil_help $MISSING_DEPENDENCY ;;
52784      pkgadd)
52785        pkgadd_help  $MISSING_DEPENDENCY ;;
52786    esac
52787
52788    if test "x$PKGHANDLER_COMMAND" != x; then
52789      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52790    fi
52791  fi
52792
52793      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52794    else
52795      INCLUDE_DTRACE=true
52796      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52797$as_echo "yes, forced" >&6; }
52798    fi
52799  elif test "x$enable_dtrace" = "xno"; then
52800    INCLUDE_DTRACE=false
52801    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52802$as_echo "no, forced" >&6; }
52803  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52804    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52805      INCLUDE_DTRACE=false
52806      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52807$as_echo "no, missing dependencies" >&6; }
52808    else
52809      INCLUDE_DTRACE=true
52810      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52811$as_echo "yes, dependencies present" >&6; }
52812    fi
52813  else
52814    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52815  fi
52816
52817
52818
52819  # The user can in some cases supply additional jvm features. For the custom
52820  # variant, this defines the entire variant.
52821
52822# Check whether --with-jvm-features was given.
52823if test "${with_jvm_features+set}" = set; then :
52824  withval=$with_jvm_features;
52825fi
52826
52827  if test "x$with_jvm_features" != x; then
52828    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52829$as_echo_n "checking additional JVM features... " >&6; }
52830    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52831    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52832$as_echo "$JVM_FEATURES" >&6; }
52833  fi
52834
52835  # Verify that dependencies are met for explicitly set features.
52836  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52837    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52838  fi
52839
52840  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52841    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52842  fi
52843
52844  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
52845    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
52846  fi
52847
52848  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52849    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52850  fi
52851
52852  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52853    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52854  fi
52855
52856  # Turn on additional features based on other parts of configure
52857  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52858    JVM_FEATURES="$JVM_FEATURES dtrace"
52859  else
52860    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52861      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52862    fi
52863  fi
52864
52865  if test "x$STATIC_BUILD" = "xtrue"; then
52866    JVM_FEATURES="$JVM_FEATURES static-build"
52867  else
52868    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52869      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52870    fi
52871  fi
52872
52873  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52874    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52875      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52876    fi
52877  fi
52878
52879  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52880    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52881      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52882    fi
52883  fi
52884
52885  # Only enable jvmci on x86_64, sparcv9 and aarch64.
52886  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52887      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52888      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52889    JVM_FEATURES_jvmci="jvmci"
52890  else
52891    JVM_FEATURES_jvmci=""
52892  fi
52893
52894  # All variants but minimal (and custom) get these features
52895  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52896
52897  # Enable features depending on variant.
52898  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52899  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52900  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52901  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52902  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52903  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52904  JVM_FEATURES_custom="$JVM_FEATURES"
52905
52906
52907
52908
52909
52910
52911
52912
52913
52914  # Used for verification of Makefiles by check-jvm-feature
52915
52916
52917  # We don't support --with-jvm-interpreter anymore, use zero instead.
52918
52919
52920# Check whether --with-jvm-interpreter was given.
52921if test "${with_jvm_interpreter+set}" = set; then :
52922  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52923$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52924fi
52925
52926
52927
52928
52929  # Check whether --enable-hotspot-gtest was given.
52930if test "${enable_hotspot_gtest+set}" = set; then :
52931  enableval=$enable_hotspot_gtest;
52932fi
52933
52934
52935  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52936    GTEST_DIR_EXISTS="true"
52937  else
52938    GTEST_DIR_EXISTS="false"
52939  fi
52940
52941  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52942$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52943  if test "x$enable_hotspot_gtest" = "xyes"; then
52944    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52945      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52946$as_echo "yes, forced" >&6; }
52947      BUILD_GTEST="true"
52948    else
52949      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52950    fi
52951  elif test "x$enable_hotspot_gtest" = "xno"; then
52952    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52953$as_echo "no, forced" >&6; }
52954    BUILD_GTEST="false"
52955  elif test "x$enable_hotspot_gtest" = "x"; then
52956    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
52957      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52958$as_echo "yes" >&6; }
52959      BUILD_GTEST="true"
52960    else
52961      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52962$as_echo "no" >&6; }
52963      BUILD_GTEST="false"
52964    fi
52965  else
52966    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52967  fi
52968
52969
52970
52971
52972###############################################################################
52973#
52974# Check dependencies for external and internal libraries.
52975#
52976###############################################################################
52977
52978# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52979
52980  # When using cygwin or msys, we need a wrapper binary that renames
52981  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52982  # @files and rewrites these too! This wrapper binary is
52983  # called fixpath.
52984  FIXPATH=
52985  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52986    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52987$as_echo_n "checking if fixpath can be created... " >&6; }
52988    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52989    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52990    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52991    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52992      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52993      FIXPATH="$FIXPATH_BIN -c"
52994    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52995      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52996      # @ was chosen as separator to minimize risk of other tools messing around with it
52997      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52998          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
52999      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53000      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53001    fi
53002    FIXPATH_SRC_W="$FIXPATH_SRC"
53003    FIXPATH_BIN_W="$FIXPATH_BIN"
53004
53005  unix_path="$FIXPATH_SRC_W"
53006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53007    windows_path=`$CYGPATH -m "$unix_path"`
53008    FIXPATH_SRC_W="$windows_path"
53009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53010    windows_path=`cmd //c echo $unix_path`
53011    FIXPATH_SRC_W="$windows_path"
53012  fi
53013
53014
53015  unix_path="$FIXPATH_BIN_W"
53016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53017    windows_path=`$CYGPATH -m "$unix_path"`
53018    FIXPATH_BIN_W="$windows_path"
53019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53020    windows_path=`cmd //c echo $unix_path`
53021    FIXPATH_BIN_W="$windows_path"
53022  fi
53023
53024    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53025    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53026    cd $FIXPATH_DIR
53027    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53028    cd $CURDIR
53029
53030    if test ! -x $FIXPATH_BIN; then
53031      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53032$as_echo "no" >&6; }
53033      cat $FIXPATH_DIR/fixpath1.log
53034      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53035    fi
53036    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53037$as_echo "yes" >&6; }
53038    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53039$as_echo_n "checking if fixpath.exe works... " >&6; }
53040    cd $FIXPATH_DIR
53041    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53042        > $FIXPATH_DIR/fixpath2.log 2>&1
53043    cd $CURDIR
53044    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53045      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53046$as_echo "no" >&6; }
53047      cat $FIXPATH_DIR/fixpath2.log
53048      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53049    fi
53050    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53051$as_echo "yes" >&6; }
53052
53053    FIXPATH_DETACH_FLAG="--detach"
53054  fi
53055
53056
53057
53058
53059
53060
53061  # Check if X11 is needed
53062  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53063    # No X11 support on windows or macosx
53064    NEEDS_LIB_X11=false
53065  else
53066    # All other instances need X11, even if building headless only, libawt still
53067    # needs X11 headers.
53068    NEEDS_LIB_X11=true
53069  fi
53070
53071  # Check if cups is needed
53072  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53073    # Windows have a separate print system
53074    NEEDS_LIB_CUPS=false
53075  else
53076    NEEDS_LIB_CUPS=true
53077  fi
53078
53079  # A custom hook may have set this already
53080  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53081    NEEDS_LIB_FREETYPE=true
53082  fi
53083
53084  # Check if alsa is needed
53085  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53086    NEEDS_LIB_ALSA=true
53087  else
53088    NEEDS_LIB_ALSA=false
53089  fi
53090
53091  # Check if ffi is needed
53092  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53093    NEEDS_LIB_FFI=true
53094  else
53095    NEEDS_LIB_FFI=false
53096  fi
53097
53098
53099  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53100  # dynamic build is configured on command line.
53101
53102# Check whether --with-stdc++lib was given.
53103if test "${with_stdc__lib+set}" = set; then :
53104  withval=$with_stdc__lib;
53105        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53106                && test "x$with_stdc__lib" != xdefault; then
53107          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53108        fi
53109
53110else
53111  with_stdc__lib=default
53112
53113fi
53114
53115
53116  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53117    # Test if stdc++ can be linked statically.
53118    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53119$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53120    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53121    ac_ext=cpp
53122ac_cpp='$CXXCPP $CPPFLAGS'
53123ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53124ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53125ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53126
53127    OLD_LIBS="$LIBS"
53128    LIBS="$STATIC_STDCXX_FLAGS"
53129    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53130/* end confdefs.h.  */
53131
53132int
53133main ()
53134{
53135return 0;
53136  ;
53137  return 0;
53138}
53139_ACEOF
53140if ac_fn_cxx_try_link "$LINENO"; then :
53141  has_static_libstdcxx=yes
53142else
53143  has_static_libstdcxx=no
53144fi
53145rm -f core conftest.err conftest.$ac_objext \
53146    conftest$ac_exeext conftest.$ac_ext
53147    LIBS="$OLD_LIBS"
53148    ac_ext=cpp
53149ac_cpp='$CXXCPP $CPPFLAGS'
53150ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53151ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53152ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53153
53154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53155$as_echo "$has_static_libstdcxx" >&6; }
53156
53157    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53158      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53159    fi
53160
53161    # If dynamic was requested, it's available since it would fail above otherwise.
53162    # If dynamic wasn't requested, go with static unless it isn't available.
53163    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53164$as_echo_n "checking how to link with libstdc++... " >&6; }
53165    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53166        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53167      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53168$as_echo "dynamic" >&6; }
53169    else
53170      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53171      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53172      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53173      # just use the same setting as for the TARGET toolchain.
53174      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53175      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53176$as_echo "static" >&6; }
53177    fi
53178  fi
53179
53180  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53181  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53182    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53183  fi
53184
53185
53186
53187  # Setup Windows runtime dlls
53188  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53189
53190
53191# Check whether --with-msvcr-dll was given.
53192if test "${with_msvcr_dll+set}" = set; then :
53193  withval=$with_msvcr_dll;
53194fi
53195
53196
53197  if test "x$with_msvcr_dll" != x; then
53198    # If given explicitely by user, do not probe. If not present, fail directly.
53199
53200  DLL_NAME="$MSVCR_NAME"
53201  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53202  METHOD="--with-msvcr-dll"
53203  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53204    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53205$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53206
53207    # Need to check if the found msvcr is correct architecture
53208    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53209$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53210    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53211    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53212      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53213      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53214      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53215        CORRECT_MSVCR_ARCH="PE32 executable"
53216      else
53217        CORRECT_MSVCR_ARCH="PE32+ executable"
53218      fi
53219    else
53220      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53221        CORRECT_MSVCR_ARCH=386
53222      else
53223        CORRECT_MSVCR_ARCH=x86-64
53224      fi
53225    fi
53226    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53227      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53228$as_echo "ok" >&6; }
53229      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53230
53231  # Only process if variable expands to non-empty
53232
53233  if test "x$MSVC_DLL" != x; then
53234    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53235
53236  # Input might be given as Windows format, start by converting to
53237  # unix format.
53238  path="$MSVC_DLL"
53239  new_path=`$CYGPATH -u "$path"`
53240
53241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53244  # "foo.exe" is OK but "foo" is an error.
53245  #
53246  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53247  # It is also a way to make sure we got the proper file name for the real test later on.
53248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53249  if test "x$test_shortpath" = x; then
53250    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53251$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53252    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53253  fi
53254
53255  # Call helper function which possibly converts this using DOS-style short mode.
53256  # If so, the updated path is stored in $new_path.
53257
53258  input_path="$new_path"
53259  # Check if we need to convert this using DOS-style short mode. If the path
53260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53261  # take no chances and rewrite it.
53262  # Note: m4 eats our [], so we need to use [ and ] instead.
53263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53264  if test "x$has_forbidden_chars" != x; then
53265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53266    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53267    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53268    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53269      # Going to short mode and back again did indeed matter. Since short mode is
53270      # case insensitive, let's make it lowercase to improve readability.
53271      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53272      # Now convert it back to Unix-style (cygpath)
53273      input_path=`$CYGPATH -u "$shortmode_path"`
53274      new_path="$input_path"
53275    fi
53276  fi
53277
53278  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53279  if test "x$test_cygdrive_prefix" = x; then
53280    # As a simple fix, exclude /usr/bin since it's not a real path.
53281    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53282      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53283      # a path prefixed by /cygdrive for fixpath to work.
53284      new_path="$CYGWIN_ROOT_PATH$input_path"
53285    fi
53286  fi
53287
53288
53289  if test "x$path" != "x$new_path"; then
53290    MSVC_DLL="$new_path"
53291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53292$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53293  fi
53294
53295    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53296
53297  path="$MSVC_DLL"
53298  has_colon=`$ECHO $path | $GREP ^.:`
53299  new_path="$path"
53300  if test "x$has_colon" = x; then
53301    # Not in mixed or Windows style, start by that.
53302    new_path=`cmd //c echo $path`
53303  fi
53304
53305
53306  input_path="$new_path"
53307  # Check if we need to convert this using DOS-style short mode. If the path
53308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53309  # take no chances and rewrite it.
53310  # Note: m4 eats our [], so we need to use [ and ] instead.
53311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53312  if test "x$has_forbidden_chars" != x; then
53313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53314    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53315  fi
53316
53317
53318  windows_path="$new_path"
53319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53320    unix_path=`$CYGPATH -u "$windows_path"`
53321    new_path="$unix_path"
53322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53324    new_path="$unix_path"
53325  fi
53326
53327  if test "x$path" != "x$new_path"; then
53328    MSVC_DLL="$new_path"
53329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53330$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53331  fi
53332
53333  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53334  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53335
53336    else
53337      # We're on a unix platform. Hooray! :)
53338      path="$MSVC_DLL"
53339      has_space=`$ECHO "$path" | $GREP " "`
53340      if test "x$has_space" != x; then
53341        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53342$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53343        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53344      fi
53345
53346      # Use eval to expand a potential ~
53347      eval path="$path"
53348      if test ! -f "$path" && test ! -d "$path"; then
53349        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53350      fi
53351
53352      if test -d "$path"; then
53353        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53354      else
53355        dir="`$DIRNAME "$path"`"
53356        base="`$BASENAME "$path"`"
53357        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53358      fi
53359    fi
53360  fi
53361
53362      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53363$as_echo_n "checking for $DLL_NAME... " >&6; }
53364      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53365$as_echo "$MSVC_DLL" >&6; }
53366    else
53367      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53368$as_echo "incorrect, ignoring" >&6; }
53369      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53370$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53371    fi
53372  fi
53373
53374    if test "x$MSVC_DLL" = x; then
53375      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53376    fi
53377    MSVCR_DLL="$MSVC_DLL"
53378  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53379
53380  DLL_NAME="$MSVCR_NAME"
53381  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53382  METHOD="devkit"
53383  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53384    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53385$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53386
53387    # Need to check if the found msvcr is correct architecture
53388    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53389$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53390    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53391    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53392      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53393      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53394      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53395        CORRECT_MSVCR_ARCH="PE32 executable"
53396      else
53397        CORRECT_MSVCR_ARCH="PE32+ executable"
53398      fi
53399    else
53400      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53401        CORRECT_MSVCR_ARCH=386
53402      else
53403        CORRECT_MSVCR_ARCH=x86-64
53404      fi
53405    fi
53406    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53407      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53408$as_echo "ok" >&6; }
53409      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53410
53411  # Only process if variable expands to non-empty
53412
53413  if test "x$MSVC_DLL" != x; then
53414    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53415
53416  # Input might be given as Windows format, start by converting to
53417  # unix format.
53418  path="$MSVC_DLL"
53419  new_path=`$CYGPATH -u "$path"`
53420
53421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53424  # "foo.exe" is OK but "foo" is an error.
53425  #
53426  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53427  # It is also a way to make sure we got the proper file name for the real test later on.
53428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53429  if test "x$test_shortpath" = x; then
53430    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53431$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53432    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53433  fi
53434
53435  # Call helper function which possibly converts this using DOS-style short mode.
53436  # If so, the updated path is stored in $new_path.
53437
53438  input_path="$new_path"
53439  # Check if we need to convert this using DOS-style short mode. If the path
53440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53441  # take no chances and rewrite it.
53442  # Note: m4 eats our [], so we need to use [ and ] instead.
53443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53444  if test "x$has_forbidden_chars" != x; then
53445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53446    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53447    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53448    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53449      # Going to short mode and back again did indeed matter. Since short mode is
53450      # case insensitive, let's make it lowercase to improve readability.
53451      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53452      # Now convert it back to Unix-style (cygpath)
53453      input_path=`$CYGPATH -u "$shortmode_path"`
53454      new_path="$input_path"
53455    fi
53456  fi
53457
53458  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53459  if test "x$test_cygdrive_prefix" = x; then
53460    # As a simple fix, exclude /usr/bin since it's not a real path.
53461    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53462      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53463      # a path prefixed by /cygdrive for fixpath to work.
53464      new_path="$CYGWIN_ROOT_PATH$input_path"
53465    fi
53466  fi
53467
53468
53469  if test "x$path" != "x$new_path"; then
53470    MSVC_DLL="$new_path"
53471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53472$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53473  fi
53474
53475    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53476
53477  path="$MSVC_DLL"
53478  has_colon=`$ECHO $path | $GREP ^.:`
53479  new_path="$path"
53480  if test "x$has_colon" = x; then
53481    # Not in mixed or Windows style, start by that.
53482    new_path=`cmd //c echo $path`
53483  fi
53484
53485
53486  input_path="$new_path"
53487  # Check if we need to convert this using DOS-style short mode. If the path
53488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53489  # take no chances and rewrite it.
53490  # Note: m4 eats our [], so we need to use [ and ] instead.
53491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53492  if test "x$has_forbidden_chars" != x; then
53493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53495  fi
53496
53497
53498  windows_path="$new_path"
53499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53500    unix_path=`$CYGPATH -u "$windows_path"`
53501    new_path="$unix_path"
53502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53504    new_path="$unix_path"
53505  fi
53506
53507  if test "x$path" != "x$new_path"; then
53508    MSVC_DLL="$new_path"
53509    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53510$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53511  fi
53512
53513  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53514  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53515
53516    else
53517      # We're on a unix platform. Hooray! :)
53518      path="$MSVC_DLL"
53519      has_space=`$ECHO "$path" | $GREP " "`
53520      if test "x$has_space" != x; then
53521        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53522$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53523        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53524      fi
53525
53526      # Use eval to expand a potential ~
53527      eval path="$path"
53528      if test ! -f "$path" && test ! -d "$path"; then
53529        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53530      fi
53531
53532      if test -d "$path"; then
53533        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53534      else
53535        dir="`$DIRNAME "$path"`"
53536        base="`$BASENAME "$path"`"
53537        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53538      fi
53539    fi
53540  fi
53541
53542      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53543$as_echo_n "checking for $DLL_NAME... " >&6; }
53544      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53545$as_echo "$MSVC_DLL" >&6; }
53546    else
53547      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53548$as_echo "incorrect, ignoring" >&6; }
53549      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53550$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53551    fi
53552  fi
53553
53554    if test "x$MSVC_DLL" = x; then
53555      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53556    fi
53557    MSVCR_DLL="$MSVC_DLL"
53558  else
53559
53560  DLL_NAME="${MSVCR_NAME}"
53561  MSVC_DLL=
53562
53563  if test "x$MSVC_DLL" = x; then
53564    # Probe: Using well-known location from Visual Studio 10.0
53565    if test "x$VCINSTALLDIR" != x; then
53566      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53567
53568  windows_path="$CYGWIN_VC_INSTALL_DIR"
53569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53570    unix_path=`$CYGPATH -u "$windows_path"`
53571    CYGWIN_VC_INSTALL_DIR="$unix_path"
53572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53574    CYGWIN_VC_INSTALL_DIR="$unix_path"
53575  fi
53576
53577      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53578        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53579      else
53580        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53581      fi
53582      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53583
53584  DLL_NAME="$DLL_NAME"
53585  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53586  METHOD="well-known location in VCINSTALLDIR"
53587  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53588    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53589$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53590
53591    # Need to check if the found msvcr is correct architecture
53592    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53593$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53594    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53595    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53596      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53597      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53598      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53599        CORRECT_MSVCR_ARCH="PE32 executable"
53600      else
53601        CORRECT_MSVCR_ARCH="PE32+ executable"
53602      fi
53603    else
53604      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53605        CORRECT_MSVCR_ARCH=386
53606      else
53607        CORRECT_MSVCR_ARCH=x86-64
53608      fi
53609    fi
53610    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53611      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53612$as_echo "ok" >&6; }
53613      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53614
53615  # Only process if variable expands to non-empty
53616
53617  if test "x$MSVC_DLL" != x; then
53618    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53619
53620  # Input might be given as Windows format, start by converting to
53621  # unix format.
53622  path="$MSVC_DLL"
53623  new_path=`$CYGPATH -u "$path"`
53624
53625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53628  # "foo.exe" is OK but "foo" is an error.
53629  #
53630  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53631  # It is also a way to make sure we got the proper file name for the real test later on.
53632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53633  if test "x$test_shortpath" = x; then
53634    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53635$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53636    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53637  fi
53638
53639  # Call helper function which possibly converts this using DOS-style short mode.
53640  # If so, the updated path is stored in $new_path.
53641
53642  input_path="$new_path"
53643  # Check if we need to convert this using DOS-style short mode. If the path
53644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53645  # take no chances and rewrite it.
53646  # Note: m4 eats our [], so we need to use [ and ] instead.
53647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53648  if test "x$has_forbidden_chars" != x; then
53649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53650    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53651    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53652    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53653      # Going to short mode and back again did indeed matter. Since short mode is
53654      # case insensitive, let's make it lowercase to improve readability.
53655      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53656      # Now convert it back to Unix-style (cygpath)
53657      input_path=`$CYGPATH -u "$shortmode_path"`
53658      new_path="$input_path"
53659    fi
53660  fi
53661
53662  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53663  if test "x$test_cygdrive_prefix" = x; then
53664    # As a simple fix, exclude /usr/bin since it's not a real path.
53665    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53666      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53667      # a path prefixed by /cygdrive for fixpath to work.
53668      new_path="$CYGWIN_ROOT_PATH$input_path"
53669    fi
53670  fi
53671
53672
53673  if test "x$path" != "x$new_path"; then
53674    MSVC_DLL="$new_path"
53675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53676$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53677  fi
53678
53679    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53680
53681  path="$MSVC_DLL"
53682  has_colon=`$ECHO $path | $GREP ^.:`
53683  new_path="$path"
53684  if test "x$has_colon" = x; then
53685    # Not in mixed or Windows style, start by that.
53686    new_path=`cmd //c echo $path`
53687  fi
53688
53689
53690  input_path="$new_path"
53691  # Check if we need to convert this using DOS-style short mode. If the path
53692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53693  # take no chances and rewrite it.
53694  # Note: m4 eats our [], so we need to use [ and ] instead.
53695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53696  if test "x$has_forbidden_chars" != x; then
53697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53698    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53699  fi
53700
53701
53702  windows_path="$new_path"
53703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53704    unix_path=`$CYGPATH -u "$windows_path"`
53705    new_path="$unix_path"
53706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53708    new_path="$unix_path"
53709  fi
53710
53711  if test "x$path" != "x$new_path"; then
53712    MSVC_DLL="$new_path"
53713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53714$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53715  fi
53716
53717  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53718  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53719
53720    else
53721      # We're on a unix platform. Hooray! :)
53722      path="$MSVC_DLL"
53723      has_space=`$ECHO "$path" | $GREP " "`
53724      if test "x$has_space" != x; then
53725        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53726$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53727        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53728      fi
53729
53730      # Use eval to expand a potential ~
53731      eval path="$path"
53732      if test ! -f "$path" && test ! -d "$path"; then
53733        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53734      fi
53735
53736      if test -d "$path"; then
53737        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53738      else
53739        dir="`$DIRNAME "$path"`"
53740        base="`$BASENAME "$path"`"
53741        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53742      fi
53743    fi
53744  fi
53745
53746      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53747$as_echo_n "checking for $DLL_NAME... " >&6; }
53748      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53749$as_echo "$MSVC_DLL" >&6; }
53750    else
53751      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53752$as_echo "incorrect, ignoring" >&6; }
53753      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53754$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53755    fi
53756  fi
53757
53758    fi
53759  fi
53760
53761  if test "x$MSVC_DLL" = x; then
53762    # Probe: Check in the Boot JDK directory.
53763    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53764
53765  DLL_NAME="$DLL_NAME"
53766  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53767  METHOD="well-known location in Boot JDK"
53768  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53769    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53770$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53771
53772    # Need to check if the found msvcr is correct architecture
53773    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53774$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53775    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53776    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53777      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53778      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53779      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53780        CORRECT_MSVCR_ARCH="PE32 executable"
53781      else
53782        CORRECT_MSVCR_ARCH="PE32+ executable"
53783      fi
53784    else
53785      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53786        CORRECT_MSVCR_ARCH=386
53787      else
53788        CORRECT_MSVCR_ARCH=x86-64
53789      fi
53790    fi
53791    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53792      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53793$as_echo "ok" >&6; }
53794      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53795
53796  # Only process if variable expands to non-empty
53797
53798  if test "x$MSVC_DLL" != x; then
53799    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53800
53801  # Input might be given as Windows format, start by converting to
53802  # unix format.
53803  path="$MSVC_DLL"
53804  new_path=`$CYGPATH -u "$path"`
53805
53806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53809  # "foo.exe" is OK but "foo" is an error.
53810  #
53811  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53812  # It is also a way to make sure we got the proper file name for the real test later on.
53813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53814  if test "x$test_shortpath" = x; then
53815    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53816$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53817    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53818  fi
53819
53820  # Call helper function which possibly converts this using DOS-style short mode.
53821  # If so, the updated path is stored in $new_path.
53822
53823  input_path="$new_path"
53824  # Check if we need to convert this using DOS-style short mode. If the path
53825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53826  # take no chances and rewrite it.
53827  # Note: m4 eats our [], so we need to use [ and ] instead.
53828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53829  if test "x$has_forbidden_chars" != x; then
53830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53831    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53832    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53833    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53834      # Going to short mode and back again did indeed matter. Since short mode is
53835      # case insensitive, let's make it lowercase to improve readability.
53836      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53837      # Now convert it back to Unix-style (cygpath)
53838      input_path=`$CYGPATH -u "$shortmode_path"`
53839      new_path="$input_path"
53840    fi
53841  fi
53842
53843  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53844  if test "x$test_cygdrive_prefix" = x; then
53845    # As a simple fix, exclude /usr/bin since it's not a real path.
53846    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53847      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53848      # a path prefixed by /cygdrive for fixpath to work.
53849      new_path="$CYGWIN_ROOT_PATH$input_path"
53850    fi
53851  fi
53852
53853
53854  if test "x$path" != "x$new_path"; then
53855    MSVC_DLL="$new_path"
53856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53857$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53858  fi
53859
53860    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53861
53862  path="$MSVC_DLL"
53863  has_colon=`$ECHO $path | $GREP ^.:`
53864  new_path="$path"
53865  if test "x$has_colon" = x; then
53866    # Not in mixed or Windows style, start by that.
53867    new_path=`cmd //c echo $path`
53868  fi
53869
53870
53871  input_path="$new_path"
53872  # Check if we need to convert this using DOS-style short mode. If the path
53873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53874  # take no chances and rewrite it.
53875  # Note: m4 eats our [], so we need to use [ and ] instead.
53876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53877  if test "x$has_forbidden_chars" != x; then
53878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53879    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53880  fi
53881
53882
53883  windows_path="$new_path"
53884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53885    unix_path=`$CYGPATH -u "$windows_path"`
53886    new_path="$unix_path"
53887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53889    new_path="$unix_path"
53890  fi
53891
53892  if test "x$path" != "x$new_path"; then
53893    MSVC_DLL="$new_path"
53894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53895$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53896  fi
53897
53898  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53899  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53900
53901    else
53902      # We're on a unix platform. Hooray! :)
53903      path="$MSVC_DLL"
53904      has_space=`$ECHO "$path" | $GREP " "`
53905      if test "x$has_space" != x; then
53906        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53907$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53908        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53909      fi
53910
53911      # Use eval to expand a potential ~
53912      eval path="$path"
53913      if test ! -f "$path" && test ! -d "$path"; then
53914        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53915      fi
53916
53917      if test -d "$path"; then
53918        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53919      else
53920        dir="`$DIRNAME "$path"`"
53921        base="`$BASENAME "$path"`"
53922        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53923      fi
53924    fi
53925  fi
53926
53927      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53928$as_echo_n "checking for $DLL_NAME... " >&6; }
53929      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53930$as_echo "$MSVC_DLL" >&6; }
53931    else
53932      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53933$as_echo "incorrect, ignoring" >&6; }
53934      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53935$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53936    fi
53937  fi
53938
53939  fi
53940
53941  if test "x$MSVC_DLL" = x; then
53942    # Probe: Look in the Windows system32 directory
53943    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53944
53945  windows_path="$CYGWIN_SYSTEMROOT"
53946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53947    unix_path=`$CYGPATH -u "$windows_path"`
53948    CYGWIN_SYSTEMROOT="$unix_path"
53949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53951    CYGWIN_SYSTEMROOT="$unix_path"
53952  fi
53953
53954    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53955
53956  DLL_NAME="$DLL_NAME"
53957  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53958  METHOD="well-known location in SYSTEMROOT"
53959  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53960    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53961$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53962
53963    # Need to check if the found msvcr is correct architecture
53964    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53965$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53966    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53967    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53968      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53969      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53970      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53971        CORRECT_MSVCR_ARCH="PE32 executable"
53972      else
53973        CORRECT_MSVCR_ARCH="PE32+ executable"
53974      fi
53975    else
53976      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53977        CORRECT_MSVCR_ARCH=386
53978      else
53979        CORRECT_MSVCR_ARCH=x86-64
53980      fi
53981    fi
53982    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53983      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53984$as_echo "ok" >&6; }
53985      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53986
53987  # Only process if variable expands to non-empty
53988
53989  if test "x$MSVC_DLL" != x; then
53990    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53991
53992  # Input might be given as Windows format, start by converting to
53993  # unix format.
53994  path="$MSVC_DLL"
53995  new_path=`$CYGPATH -u "$path"`
53996
53997  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53998  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53999  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54000  # "foo.exe" is OK but "foo" is an error.
54001  #
54002  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54003  # It is also a way to make sure we got the proper file name for the real test later on.
54004  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54005  if test "x$test_shortpath" = x; then
54006    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54007$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54008    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54009  fi
54010
54011  # Call helper function which possibly converts this using DOS-style short mode.
54012  # If so, the updated path is stored in $new_path.
54013
54014  input_path="$new_path"
54015  # Check if we need to convert this using DOS-style short mode. If the path
54016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54017  # take no chances and rewrite it.
54018  # Note: m4 eats our [], so we need to use [ and ] instead.
54019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54020  if test "x$has_forbidden_chars" != x; then
54021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54022    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54023    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54024    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54025      # Going to short mode and back again did indeed matter. Since short mode is
54026      # case insensitive, let's make it lowercase to improve readability.
54027      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54028      # Now convert it back to Unix-style (cygpath)
54029      input_path=`$CYGPATH -u "$shortmode_path"`
54030      new_path="$input_path"
54031    fi
54032  fi
54033
54034  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54035  if test "x$test_cygdrive_prefix" = x; then
54036    # As a simple fix, exclude /usr/bin since it's not a real path.
54037    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54038      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54039      # a path prefixed by /cygdrive for fixpath to work.
54040      new_path="$CYGWIN_ROOT_PATH$input_path"
54041    fi
54042  fi
54043
54044
54045  if test "x$path" != "x$new_path"; then
54046    MSVC_DLL="$new_path"
54047    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54048$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54049  fi
54050
54051    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54052
54053  path="$MSVC_DLL"
54054  has_colon=`$ECHO $path | $GREP ^.:`
54055  new_path="$path"
54056  if test "x$has_colon" = x; then
54057    # Not in mixed or Windows style, start by that.
54058    new_path=`cmd //c echo $path`
54059  fi
54060
54061
54062  input_path="$new_path"
54063  # Check if we need to convert this using DOS-style short mode. If the path
54064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54065  # take no chances and rewrite it.
54066  # Note: m4 eats our [], so we need to use [ and ] instead.
54067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54068  if test "x$has_forbidden_chars" != x; then
54069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54070    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54071  fi
54072
54073
54074  windows_path="$new_path"
54075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54076    unix_path=`$CYGPATH -u "$windows_path"`
54077    new_path="$unix_path"
54078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54080    new_path="$unix_path"
54081  fi
54082
54083  if test "x$path" != "x$new_path"; then
54084    MSVC_DLL="$new_path"
54085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54086$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54087  fi
54088
54089  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54090  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54091
54092    else
54093      # We're on a unix platform. Hooray! :)
54094      path="$MSVC_DLL"
54095      has_space=`$ECHO "$path" | $GREP " "`
54096      if test "x$has_space" != x; then
54097        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54098$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54099        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54100      fi
54101
54102      # Use eval to expand a potential ~
54103      eval path="$path"
54104      if test ! -f "$path" && test ! -d "$path"; then
54105        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54106      fi
54107
54108      if test -d "$path"; then
54109        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54110      else
54111        dir="`$DIRNAME "$path"`"
54112        base="`$BASENAME "$path"`"
54113        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54114      fi
54115    fi
54116  fi
54117
54118      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54119$as_echo_n "checking for $DLL_NAME... " >&6; }
54120      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54121$as_echo "$MSVC_DLL" >&6; }
54122    else
54123      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54124$as_echo "incorrect, ignoring" >&6; }
54125      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54126$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54127    fi
54128  fi
54129
54130  fi
54131
54132  if test "x$MSVC_DLL" = x; then
54133    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54134    if test "x$VS100COMNTOOLS" != x; then
54135      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54136
54137  windows_path="$CYGWIN_VS_TOOLS_DIR"
54138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54139    unix_path=`$CYGPATH -u "$windows_path"`
54140    CYGWIN_VS_TOOLS_DIR="$unix_path"
54141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54143    CYGWIN_VS_TOOLS_DIR="$unix_path"
54144  fi
54145
54146      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54147        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54148	    | $GREP -i /x64/ | $HEAD --lines 1`
54149      else
54150        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54151	    | $GREP -i /x86/ | $HEAD --lines 1`
54152      fi
54153
54154  DLL_NAME="$DLL_NAME"
54155  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54156  METHOD="search of VS100COMNTOOLS"
54157  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54158    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54159$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54160
54161    # Need to check if the found msvcr is correct architecture
54162    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54163$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54164    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54165    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54166      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54167      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54168      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54169        CORRECT_MSVCR_ARCH="PE32 executable"
54170      else
54171        CORRECT_MSVCR_ARCH="PE32+ executable"
54172      fi
54173    else
54174      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54175        CORRECT_MSVCR_ARCH=386
54176      else
54177        CORRECT_MSVCR_ARCH=x86-64
54178      fi
54179    fi
54180    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54181      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54182$as_echo "ok" >&6; }
54183      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54184
54185  # Only process if variable expands to non-empty
54186
54187  if test "x$MSVC_DLL" != x; then
54188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54189
54190  # Input might be given as Windows format, start by converting to
54191  # unix format.
54192  path="$MSVC_DLL"
54193  new_path=`$CYGPATH -u "$path"`
54194
54195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54198  # "foo.exe" is OK but "foo" is an error.
54199  #
54200  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54201  # It is also a way to make sure we got the proper file name for the real test later on.
54202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54203  if test "x$test_shortpath" = x; then
54204    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54205$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54206    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54207  fi
54208
54209  # Call helper function which possibly converts this using DOS-style short mode.
54210  # If so, the updated path is stored in $new_path.
54211
54212  input_path="$new_path"
54213  # Check if we need to convert this using DOS-style short mode. If the path
54214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54215  # take no chances and rewrite it.
54216  # Note: m4 eats our [], so we need to use [ and ] instead.
54217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54218  if test "x$has_forbidden_chars" != x; then
54219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54220    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54221    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54222    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54223      # Going to short mode and back again did indeed matter. Since short mode is
54224      # case insensitive, let's make it lowercase to improve readability.
54225      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54226      # Now convert it back to Unix-style (cygpath)
54227      input_path=`$CYGPATH -u "$shortmode_path"`
54228      new_path="$input_path"
54229    fi
54230  fi
54231
54232  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54233  if test "x$test_cygdrive_prefix" = x; then
54234    # As a simple fix, exclude /usr/bin since it's not a real path.
54235    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54236      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54237      # a path prefixed by /cygdrive for fixpath to work.
54238      new_path="$CYGWIN_ROOT_PATH$input_path"
54239    fi
54240  fi
54241
54242
54243  if test "x$path" != "x$new_path"; then
54244    MSVC_DLL="$new_path"
54245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54246$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54247  fi
54248
54249    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54250
54251  path="$MSVC_DLL"
54252  has_colon=`$ECHO $path | $GREP ^.:`
54253  new_path="$path"
54254  if test "x$has_colon" = x; then
54255    # Not in mixed or Windows style, start by that.
54256    new_path=`cmd //c echo $path`
54257  fi
54258
54259
54260  input_path="$new_path"
54261  # Check if we need to convert this using DOS-style short mode. If the path
54262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54263  # take no chances and rewrite it.
54264  # Note: m4 eats our [], so we need to use [ and ] instead.
54265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54266  if test "x$has_forbidden_chars" != x; then
54267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54268    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54269  fi
54270
54271
54272  windows_path="$new_path"
54273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54274    unix_path=`$CYGPATH -u "$windows_path"`
54275    new_path="$unix_path"
54276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54278    new_path="$unix_path"
54279  fi
54280
54281  if test "x$path" != "x$new_path"; then
54282    MSVC_DLL="$new_path"
54283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54284$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54285  fi
54286
54287  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54288  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54289
54290    else
54291      # We're on a unix platform. Hooray! :)
54292      path="$MSVC_DLL"
54293      has_space=`$ECHO "$path" | $GREP " "`
54294      if test "x$has_space" != x; then
54295        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54296$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54297        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54298      fi
54299
54300      # Use eval to expand a potential ~
54301      eval path="$path"
54302      if test ! -f "$path" && test ! -d "$path"; then
54303        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54304      fi
54305
54306      if test -d "$path"; then
54307        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54308      else
54309        dir="`$DIRNAME "$path"`"
54310        base="`$BASENAME "$path"`"
54311        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54312      fi
54313    fi
54314  fi
54315
54316      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54317$as_echo_n "checking for $DLL_NAME... " >&6; }
54318      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54319$as_echo "$MSVC_DLL" >&6; }
54320    else
54321      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54322$as_echo "incorrect, ignoring" >&6; }
54323      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54324$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54325    fi
54326  fi
54327
54328    fi
54329  fi
54330
54331  if test "x$MSVC_DLL" = x; then
54332    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54333    # (This was the original behaviour; kept since it might turn something up)
54334    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54335      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54336        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54337	    | $GREP x64 | $HEAD --lines 1`
54338      else
54339        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54340	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54341        if test "x$POSSIBLE_MSVC_DLL" = x; then
54342          # We're grasping at straws now...
54343          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54344	      | $HEAD --lines 1`
54345        fi
54346      fi
54347
54348
54349  DLL_NAME="$DLL_NAME"
54350  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54351  METHOD="search of VCINSTALLDIR"
54352  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54353    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54354$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54355
54356    # Need to check if the found msvcr is correct architecture
54357    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54358$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54359    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54360    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54361      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54362      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54363      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54364        CORRECT_MSVCR_ARCH="PE32 executable"
54365      else
54366        CORRECT_MSVCR_ARCH="PE32+ executable"
54367      fi
54368    else
54369      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54370        CORRECT_MSVCR_ARCH=386
54371      else
54372        CORRECT_MSVCR_ARCH=x86-64
54373      fi
54374    fi
54375    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54376      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54377$as_echo "ok" >&6; }
54378      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54379
54380  # Only process if variable expands to non-empty
54381
54382  if test "x$MSVC_DLL" != x; then
54383    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54384
54385  # Input might be given as Windows format, start by converting to
54386  # unix format.
54387  path="$MSVC_DLL"
54388  new_path=`$CYGPATH -u "$path"`
54389
54390  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54391  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54392  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54393  # "foo.exe" is OK but "foo" is an error.
54394  #
54395  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54396  # It is also a way to make sure we got the proper file name for the real test later on.
54397  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54398  if test "x$test_shortpath" = x; then
54399    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54400$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54401    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54402  fi
54403
54404  # Call helper function which possibly converts this using DOS-style short mode.
54405  # If so, the updated path is stored in $new_path.
54406
54407  input_path="$new_path"
54408  # Check if we need to convert this using DOS-style short mode. If the path
54409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54410  # take no chances and rewrite it.
54411  # Note: m4 eats our [], so we need to use [ and ] instead.
54412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54413  if test "x$has_forbidden_chars" != x; then
54414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54415    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54416    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54417    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54418      # Going to short mode and back again did indeed matter. Since short mode is
54419      # case insensitive, let's make it lowercase to improve readability.
54420      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54421      # Now convert it back to Unix-style (cygpath)
54422      input_path=`$CYGPATH -u "$shortmode_path"`
54423      new_path="$input_path"
54424    fi
54425  fi
54426
54427  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54428  if test "x$test_cygdrive_prefix" = x; then
54429    # As a simple fix, exclude /usr/bin since it's not a real path.
54430    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54431      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54432      # a path prefixed by /cygdrive for fixpath to work.
54433      new_path="$CYGWIN_ROOT_PATH$input_path"
54434    fi
54435  fi
54436
54437
54438  if test "x$path" != "x$new_path"; then
54439    MSVC_DLL="$new_path"
54440    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54441$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54442  fi
54443
54444    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54445
54446  path="$MSVC_DLL"
54447  has_colon=`$ECHO $path | $GREP ^.:`
54448  new_path="$path"
54449  if test "x$has_colon" = x; then
54450    # Not in mixed or Windows style, start by that.
54451    new_path=`cmd //c echo $path`
54452  fi
54453
54454
54455  input_path="$new_path"
54456  # Check if we need to convert this using DOS-style short mode. If the path
54457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54458  # take no chances and rewrite it.
54459  # Note: m4 eats our [], so we need to use [ and ] instead.
54460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54461  if test "x$has_forbidden_chars" != x; then
54462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54463    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54464  fi
54465
54466
54467  windows_path="$new_path"
54468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54469    unix_path=`$CYGPATH -u "$windows_path"`
54470    new_path="$unix_path"
54471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54473    new_path="$unix_path"
54474  fi
54475
54476  if test "x$path" != "x$new_path"; then
54477    MSVC_DLL="$new_path"
54478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54479$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54480  fi
54481
54482  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54483  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54484
54485    else
54486      # We're on a unix platform. Hooray! :)
54487      path="$MSVC_DLL"
54488      has_space=`$ECHO "$path" | $GREP " "`
54489      if test "x$has_space" != x; then
54490        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54491$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54492        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54493      fi
54494
54495      # Use eval to expand a potential ~
54496      eval path="$path"
54497      if test ! -f "$path" && test ! -d "$path"; then
54498        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54499      fi
54500
54501      if test -d "$path"; then
54502        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54503      else
54504        dir="`$DIRNAME "$path"`"
54505        base="`$BASENAME "$path"`"
54506        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54507      fi
54508    fi
54509  fi
54510
54511      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54512$as_echo_n "checking for $DLL_NAME... " >&6; }
54513      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54514$as_echo "$MSVC_DLL" >&6; }
54515    else
54516      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54517$as_echo "incorrect, ignoring" >&6; }
54518      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54519$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54520    fi
54521  fi
54522
54523    fi
54524  fi
54525
54526  if test "x$MSVC_DLL" = x; then
54527    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54528$as_echo_n "checking for $DLL_NAME... " >&6; }
54529    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54530$as_echo "no" >&6; }
54531    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54532  fi
54533
54534    MSVCR_DLL="$MSVC_DLL"
54535  fi
54536
54537
54538
54539# Check whether --with-msvcp-dll was given.
54540if test "${with_msvcp_dll+set}" = set; then :
54541  withval=$with_msvcp_dll;
54542fi
54543
54544
54545  if test "x$MSVCP_NAME" != "x"; then
54546    if test "x$with_msvcp_dll" != x; then
54547      # If given explicitely by user, do not probe. If not present, fail directly.
54548
54549  DLL_NAME="$MSVCP_NAME"
54550  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54551  METHOD="--with-msvcp-dll"
54552  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54553    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54554$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54555
54556    # Need to check if the found msvcr is correct architecture
54557    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54558$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54559    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54560    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54561      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54562      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54563      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54564        CORRECT_MSVCR_ARCH="PE32 executable"
54565      else
54566        CORRECT_MSVCR_ARCH="PE32+ executable"
54567      fi
54568    else
54569      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54570        CORRECT_MSVCR_ARCH=386
54571      else
54572        CORRECT_MSVCR_ARCH=x86-64
54573      fi
54574    fi
54575    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54576      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54577$as_echo "ok" >&6; }
54578      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54579
54580  # Only process if variable expands to non-empty
54581
54582  if test "x$MSVC_DLL" != x; then
54583    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54584
54585  # Input might be given as Windows format, start by converting to
54586  # unix format.
54587  path="$MSVC_DLL"
54588  new_path=`$CYGPATH -u "$path"`
54589
54590  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54591  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54592  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54593  # "foo.exe" is OK but "foo" is an error.
54594  #
54595  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54596  # It is also a way to make sure we got the proper file name for the real test later on.
54597  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54598  if test "x$test_shortpath" = x; then
54599    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54600$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54601    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54602  fi
54603
54604  # Call helper function which possibly converts this using DOS-style short mode.
54605  # If so, the updated path is stored in $new_path.
54606
54607  input_path="$new_path"
54608  # Check if we need to convert this using DOS-style short mode. If the path
54609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54610  # take no chances and rewrite it.
54611  # Note: m4 eats our [], so we need to use [ and ] instead.
54612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54613  if test "x$has_forbidden_chars" != x; then
54614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54615    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54616    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54617    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54618      # Going to short mode and back again did indeed matter. Since short mode is
54619      # case insensitive, let's make it lowercase to improve readability.
54620      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54621      # Now convert it back to Unix-style (cygpath)
54622      input_path=`$CYGPATH -u "$shortmode_path"`
54623      new_path="$input_path"
54624    fi
54625  fi
54626
54627  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54628  if test "x$test_cygdrive_prefix" = x; then
54629    # As a simple fix, exclude /usr/bin since it's not a real path.
54630    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54631      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54632      # a path prefixed by /cygdrive for fixpath to work.
54633      new_path="$CYGWIN_ROOT_PATH$input_path"
54634    fi
54635  fi
54636
54637
54638  if test "x$path" != "x$new_path"; then
54639    MSVC_DLL="$new_path"
54640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54641$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54642  fi
54643
54644    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54645
54646  path="$MSVC_DLL"
54647  has_colon=`$ECHO $path | $GREP ^.:`
54648  new_path="$path"
54649  if test "x$has_colon" = x; then
54650    # Not in mixed or Windows style, start by that.
54651    new_path=`cmd //c echo $path`
54652  fi
54653
54654
54655  input_path="$new_path"
54656  # Check if we need to convert this using DOS-style short mode. If the path
54657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54658  # take no chances and rewrite it.
54659  # Note: m4 eats our [], so we need to use [ and ] instead.
54660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54661  if test "x$has_forbidden_chars" != x; then
54662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54663    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54664  fi
54665
54666
54667  windows_path="$new_path"
54668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54669    unix_path=`$CYGPATH -u "$windows_path"`
54670    new_path="$unix_path"
54671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54673    new_path="$unix_path"
54674  fi
54675
54676  if test "x$path" != "x$new_path"; then
54677    MSVC_DLL="$new_path"
54678    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54679$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54680  fi
54681
54682  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54683  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54684
54685    else
54686      # We're on a unix platform. Hooray! :)
54687      path="$MSVC_DLL"
54688      has_space=`$ECHO "$path" | $GREP " "`
54689      if test "x$has_space" != x; then
54690        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54691$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54692        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54693      fi
54694
54695      # Use eval to expand a potential ~
54696      eval path="$path"
54697      if test ! -f "$path" && test ! -d "$path"; then
54698        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54699      fi
54700
54701      if test -d "$path"; then
54702        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54703      else
54704        dir="`$DIRNAME "$path"`"
54705        base="`$BASENAME "$path"`"
54706        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54707      fi
54708    fi
54709  fi
54710
54711      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54712$as_echo_n "checking for $DLL_NAME... " >&6; }
54713      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54714$as_echo "$MSVC_DLL" >&6; }
54715    else
54716      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54717$as_echo "incorrect, ignoring" >&6; }
54718      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54719$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54720    fi
54721  fi
54722
54723      if test "x$MSVC_DLL" = x; then
54724        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54725      fi
54726      MSVCP_DLL="$MSVC_DLL"
54727    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54728
54729  DLL_NAME="$MSVCP_NAME"
54730  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54731  METHOD="devkit"
54732  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54733    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54734$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54735
54736    # Need to check if the found msvcr is correct architecture
54737    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54738$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54739    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54740    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54741      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54742      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54743      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54744        CORRECT_MSVCR_ARCH="PE32 executable"
54745      else
54746        CORRECT_MSVCR_ARCH="PE32+ executable"
54747      fi
54748    else
54749      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54750        CORRECT_MSVCR_ARCH=386
54751      else
54752        CORRECT_MSVCR_ARCH=x86-64
54753      fi
54754    fi
54755    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54756      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54757$as_echo "ok" >&6; }
54758      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54759
54760  # Only process if variable expands to non-empty
54761
54762  if test "x$MSVC_DLL" != x; then
54763    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54764
54765  # Input might be given as Windows format, start by converting to
54766  # unix format.
54767  path="$MSVC_DLL"
54768  new_path=`$CYGPATH -u "$path"`
54769
54770  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54771  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54772  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54773  # "foo.exe" is OK but "foo" is an error.
54774  #
54775  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54776  # It is also a way to make sure we got the proper file name for the real test later on.
54777  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54778  if test "x$test_shortpath" = x; then
54779    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54780$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54781    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54782  fi
54783
54784  # Call helper function which possibly converts this using DOS-style short mode.
54785  # If so, the updated path is stored in $new_path.
54786
54787  input_path="$new_path"
54788  # Check if we need to convert this using DOS-style short mode. If the path
54789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54790  # take no chances and rewrite it.
54791  # Note: m4 eats our [], so we need to use [ and ] instead.
54792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54793  if test "x$has_forbidden_chars" != x; then
54794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54795    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54796    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54797    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54798      # Going to short mode and back again did indeed matter. Since short mode is
54799      # case insensitive, let's make it lowercase to improve readability.
54800      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54801      # Now convert it back to Unix-style (cygpath)
54802      input_path=`$CYGPATH -u "$shortmode_path"`
54803      new_path="$input_path"
54804    fi
54805  fi
54806
54807  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54808  if test "x$test_cygdrive_prefix" = x; then
54809    # As a simple fix, exclude /usr/bin since it's not a real path.
54810    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54811      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54812      # a path prefixed by /cygdrive for fixpath to work.
54813      new_path="$CYGWIN_ROOT_PATH$input_path"
54814    fi
54815  fi
54816
54817
54818  if test "x$path" != "x$new_path"; then
54819    MSVC_DLL="$new_path"
54820    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54821$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54822  fi
54823
54824    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54825
54826  path="$MSVC_DLL"
54827  has_colon=`$ECHO $path | $GREP ^.:`
54828  new_path="$path"
54829  if test "x$has_colon" = x; then
54830    # Not in mixed or Windows style, start by that.
54831    new_path=`cmd //c echo $path`
54832  fi
54833
54834
54835  input_path="$new_path"
54836  # Check if we need to convert this using DOS-style short mode. If the path
54837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54838  # take no chances and rewrite it.
54839  # Note: m4 eats our [], so we need to use [ and ] instead.
54840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54841  if test "x$has_forbidden_chars" != x; then
54842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54843    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54844  fi
54845
54846
54847  windows_path="$new_path"
54848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54849    unix_path=`$CYGPATH -u "$windows_path"`
54850    new_path="$unix_path"
54851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54853    new_path="$unix_path"
54854  fi
54855
54856  if test "x$path" != "x$new_path"; then
54857    MSVC_DLL="$new_path"
54858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54859$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54860  fi
54861
54862  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54863  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54864
54865    else
54866      # We're on a unix platform. Hooray! :)
54867      path="$MSVC_DLL"
54868      has_space=`$ECHO "$path" | $GREP " "`
54869      if test "x$has_space" != x; then
54870        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54871$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54872        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54873      fi
54874
54875      # Use eval to expand a potential ~
54876      eval path="$path"
54877      if test ! -f "$path" && test ! -d "$path"; then
54878        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54879      fi
54880
54881      if test -d "$path"; then
54882        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54883      else
54884        dir="`$DIRNAME "$path"`"
54885        base="`$BASENAME "$path"`"
54886        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54887      fi
54888    fi
54889  fi
54890
54891      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54892$as_echo_n "checking for $DLL_NAME... " >&6; }
54893      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54894$as_echo "$MSVC_DLL" >&6; }
54895    else
54896      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54897$as_echo "incorrect, ignoring" >&6; }
54898      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54899$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54900    fi
54901  fi
54902
54903      if test "x$MSVC_DLL" = x; then
54904        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54905      fi
54906      MSVCP_DLL="$MSVC_DLL"
54907    else
54908
54909  DLL_NAME="${MSVCP_NAME}"
54910  MSVC_DLL=
54911
54912  if test "x$MSVC_DLL" = x; then
54913    # Probe: Using well-known location from Visual Studio 10.0
54914    if test "x$VCINSTALLDIR" != x; then
54915      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54916
54917  windows_path="$CYGWIN_VC_INSTALL_DIR"
54918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54919    unix_path=`$CYGPATH -u "$windows_path"`
54920    CYGWIN_VC_INSTALL_DIR="$unix_path"
54921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54923    CYGWIN_VC_INSTALL_DIR="$unix_path"
54924  fi
54925
54926      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54927        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54928      else
54929        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54930      fi
54931      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54932
54933  DLL_NAME="$DLL_NAME"
54934  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54935  METHOD="well-known location in VCINSTALLDIR"
54936  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54937    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54938$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54939
54940    # Need to check if the found msvcr is correct architecture
54941    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54942$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54943    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54944    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54945      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54946      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54947      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54948        CORRECT_MSVCR_ARCH="PE32 executable"
54949      else
54950        CORRECT_MSVCR_ARCH="PE32+ executable"
54951      fi
54952    else
54953      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54954        CORRECT_MSVCR_ARCH=386
54955      else
54956        CORRECT_MSVCR_ARCH=x86-64
54957      fi
54958    fi
54959    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54960      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54961$as_echo "ok" >&6; }
54962      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54963
54964  # Only process if variable expands to non-empty
54965
54966  if test "x$MSVC_DLL" != x; then
54967    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54968
54969  # Input might be given as Windows format, start by converting to
54970  # unix format.
54971  path="$MSVC_DLL"
54972  new_path=`$CYGPATH -u "$path"`
54973
54974  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54975  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54976  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54977  # "foo.exe" is OK but "foo" is an error.
54978  #
54979  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54980  # It is also a way to make sure we got the proper file name for the real test later on.
54981  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54982  if test "x$test_shortpath" = x; then
54983    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54984$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54985    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54986  fi
54987
54988  # Call helper function which possibly converts this using DOS-style short mode.
54989  # If so, the updated path is stored in $new_path.
54990
54991  input_path="$new_path"
54992  # Check if we need to convert this using DOS-style short mode. If the path
54993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54994  # take no chances and rewrite it.
54995  # Note: m4 eats our [], so we need to use [ and ] instead.
54996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54997  if test "x$has_forbidden_chars" != x; then
54998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54999    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55000    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55001    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55002      # Going to short mode and back again did indeed matter. Since short mode is
55003      # case insensitive, let's make it lowercase to improve readability.
55004      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55005      # Now convert it back to Unix-style (cygpath)
55006      input_path=`$CYGPATH -u "$shortmode_path"`
55007      new_path="$input_path"
55008    fi
55009  fi
55010
55011  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55012  if test "x$test_cygdrive_prefix" = x; then
55013    # As a simple fix, exclude /usr/bin since it's not a real path.
55014    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55015      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55016      # a path prefixed by /cygdrive for fixpath to work.
55017      new_path="$CYGWIN_ROOT_PATH$input_path"
55018    fi
55019  fi
55020
55021
55022  if test "x$path" != "x$new_path"; then
55023    MSVC_DLL="$new_path"
55024    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55025$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55026  fi
55027
55028    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55029
55030  path="$MSVC_DLL"
55031  has_colon=`$ECHO $path | $GREP ^.:`
55032  new_path="$path"
55033  if test "x$has_colon" = x; then
55034    # Not in mixed or Windows style, start by that.
55035    new_path=`cmd //c echo $path`
55036  fi
55037
55038
55039  input_path="$new_path"
55040  # Check if we need to convert this using DOS-style short mode. If the path
55041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55042  # take no chances and rewrite it.
55043  # Note: m4 eats our [], so we need to use [ and ] instead.
55044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55045  if test "x$has_forbidden_chars" != x; then
55046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55047    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55048  fi
55049
55050
55051  windows_path="$new_path"
55052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55053    unix_path=`$CYGPATH -u "$windows_path"`
55054    new_path="$unix_path"
55055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55057    new_path="$unix_path"
55058  fi
55059
55060  if test "x$path" != "x$new_path"; then
55061    MSVC_DLL="$new_path"
55062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55063$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55064  fi
55065
55066  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55067  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55068
55069    else
55070      # We're on a unix platform. Hooray! :)
55071      path="$MSVC_DLL"
55072      has_space=`$ECHO "$path" | $GREP " "`
55073      if test "x$has_space" != x; then
55074        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55075$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55076        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55077      fi
55078
55079      # Use eval to expand a potential ~
55080      eval path="$path"
55081      if test ! -f "$path" && test ! -d "$path"; then
55082        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55083      fi
55084
55085      if test -d "$path"; then
55086        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55087      else
55088        dir="`$DIRNAME "$path"`"
55089        base="`$BASENAME "$path"`"
55090        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55091      fi
55092    fi
55093  fi
55094
55095      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55096$as_echo_n "checking for $DLL_NAME... " >&6; }
55097      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55098$as_echo "$MSVC_DLL" >&6; }
55099    else
55100      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55101$as_echo "incorrect, ignoring" >&6; }
55102      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55103$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55104    fi
55105  fi
55106
55107    fi
55108  fi
55109
55110  if test "x$MSVC_DLL" = x; then
55111    # Probe: Check in the Boot JDK directory.
55112    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55113
55114  DLL_NAME="$DLL_NAME"
55115  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55116  METHOD="well-known location in Boot JDK"
55117  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55118    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55119$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55120
55121    # Need to check if the found msvcr is correct architecture
55122    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55123$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55124    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55125    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55126      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55127      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55128      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55129        CORRECT_MSVCR_ARCH="PE32 executable"
55130      else
55131        CORRECT_MSVCR_ARCH="PE32+ executable"
55132      fi
55133    else
55134      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55135        CORRECT_MSVCR_ARCH=386
55136      else
55137        CORRECT_MSVCR_ARCH=x86-64
55138      fi
55139    fi
55140    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55141      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55142$as_echo "ok" >&6; }
55143      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55144
55145  # Only process if variable expands to non-empty
55146
55147  if test "x$MSVC_DLL" != x; then
55148    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55149
55150  # Input might be given as Windows format, start by converting to
55151  # unix format.
55152  path="$MSVC_DLL"
55153  new_path=`$CYGPATH -u "$path"`
55154
55155  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55156  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55157  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55158  # "foo.exe" is OK but "foo" is an error.
55159  #
55160  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55161  # It is also a way to make sure we got the proper file name for the real test later on.
55162  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55163  if test "x$test_shortpath" = x; then
55164    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55165$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55166    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55167  fi
55168
55169  # Call helper function which possibly converts this using DOS-style short mode.
55170  # If so, the updated path is stored in $new_path.
55171
55172  input_path="$new_path"
55173  # Check if we need to convert this using DOS-style short mode. If the path
55174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55175  # take no chances and rewrite it.
55176  # Note: m4 eats our [], so we need to use [ and ] instead.
55177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55178  if test "x$has_forbidden_chars" != x; then
55179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55180    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55181    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55182    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55183      # Going to short mode and back again did indeed matter. Since short mode is
55184      # case insensitive, let's make it lowercase to improve readability.
55185      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55186      # Now convert it back to Unix-style (cygpath)
55187      input_path=`$CYGPATH -u "$shortmode_path"`
55188      new_path="$input_path"
55189    fi
55190  fi
55191
55192  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55193  if test "x$test_cygdrive_prefix" = x; then
55194    # As a simple fix, exclude /usr/bin since it's not a real path.
55195    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55196      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55197      # a path prefixed by /cygdrive for fixpath to work.
55198      new_path="$CYGWIN_ROOT_PATH$input_path"
55199    fi
55200  fi
55201
55202
55203  if test "x$path" != "x$new_path"; then
55204    MSVC_DLL="$new_path"
55205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55206$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55207  fi
55208
55209    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55210
55211  path="$MSVC_DLL"
55212  has_colon=`$ECHO $path | $GREP ^.:`
55213  new_path="$path"
55214  if test "x$has_colon" = x; then
55215    # Not in mixed or Windows style, start by that.
55216    new_path=`cmd //c echo $path`
55217  fi
55218
55219
55220  input_path="$new_path"
55221  # Check if we need to convert this using DOS-style short mode. If the path
55222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55223  # take no chances and rewrite it.
55224  # Note: m4 eats our [], so we need to use [ and ] instead.
55225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55226  if test "x$has_forbidden_chars" != x; then
55227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55228    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55229  fi
55230
55231
55232  windows_path="$new_path"
55233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55234    unix_path=`$CYGPATH -u "$windows_path"`
55235    new_path="$unix_path"
55236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55238    new_path="$unix_path"
55239  fi
55240
55241  if test "x$path" != "x$new_path"; then
55242    MSVC_DLL="$new_path"
55243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55244$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55245  fi
55246
55247  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55248  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55249
55250    else
55251      # We're on a unix platform. Hooray! :)
55252      path="$MSVC_DLL"
55253      has_space=`$ECHO "$path" | $GREP " "`
55254      if test "x$has_space" != x; then
55255        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55256$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55257        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55258      fi
55259
55260      # Use eval to expand a potential ~
55261      eval path="$path"
55262      if test ! -f "$path" && test ! -d "$path"; then
55263        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55264      fi
55265
55266      if test -d "$path"; then
55267        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55268      else
55269        dir="`$DIRNAME "$path"`"
55270        base="`$BASENAME "$path"`"
55271        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55272      fi
55273    fi
55274  fi
55275
55276      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55277$as_echo_n "checking for $DLL_NAME... " >&6; }
55278      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55279$as_echo "$MSVC_DLL" >&6; }
55280    else
55281      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55282$as_echo "incorrect, ignoring" >&6; }
55283      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55284$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55285    fi
55286  fi
55287
55288  fi
55289
55290  if test "x$MSVC_DLL" = x; then
55291    # Probe: Look in the Windows system32 directory
55292    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55293
55294  windows_path="$CYGWIN_SYSTEMROOT"
55295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55296    unix_path=`$CYGPATH -u "$windows_path"`
55297    CYGWIN_SYSTEMROOT="$unix_path"
55298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55300    CYGWIN_SYSTEMROOT="$unix_path"
55301  fi
55302
55303    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55304
55305  DLL_NAME="$DLL_NAME"
55306  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55307  METHOD="well-known location in SYSTEMROOT"
55308  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55309    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55310$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55311
55312    # Need to check if the found msvcr is correct architecture
55313    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55314$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55315    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55316    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55317      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55318      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55319      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55320        CORRECT_MSVCR_ARCH="PE32 executable"
55321      else
55322        CORRECT_MSVCR_ARCH="PE32+ executable"
55323      fi
55324    else
55325      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55326        CORRECT_MSVCR_ARCH=386
55327      else
55328        CORRECT_MSVCR_ARCH=x86-64
55329      fi
55330    fi
55331    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55332      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55333$as_echo "ok" >&6; }
55334      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55335
55336  # Only process if variable expands to non-empty
55337
55338  if test "x$MSVC_DLL" != x; then
55339    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55340
55341  # Input might be given as Windows format, start by converting to
55342  # unix format.
55343  path="$MSVC_DLL"
55344  new_path=`$CYGPATH -u "$path"`
55345
55346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55349  # "foo.exe" is OK but "foo" is an error.
55350  #
55351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55352  # It is also a way to make sure we got the proper file name for the real test later on.
55353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55354  if test "x$test_shortpath" = x; then
55355    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55356$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55357    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55358  fi
55359
55360  # Call helper function which possibly converts this using DOS-style short mode.
55361  # If so, the updated path is stored in $new_path.
55362
55363  input_path="$new_path"
55364  # Check if we need to convert this using DOS-style short mode. If the path
55365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55366  # take no chances and rewrite it.
55367  # Note: m4 eats our [], so we need to use [ and ] instead.
55368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55369  if test "x$has_forbidden_chars" != x; then
55370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55374      # Going to short mode and back again did indeed matter. Since short mode is
55375      # case insensitive, let's make it lowercase to improve readability.
55376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55377      # Now convert it back to Unix-style (cygpath)
55378      input_path=`$CYGPATH -u "$shortmode_path"`
55379      new_path="$input_path"
55380    fi
55381  fi
55382
55383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55384  if test "x$test_cygdrive_prefix" = x; then
55385    # As a simple fix, exclude /usr/bin since it's not a real path.
55386    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55388      # a path prefixed by /cygdrive for fixpath to work.
55389      new_path="$CYGWIN_ROOT_PATH$input_path"
55390    fi
55391  fi
55392
55393
55394  if test "x$path" != "x$new_path"; then
55395    MSVC_DLL="$new_path"
55396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55397$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55398  fi
55399
55400    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55401
55402  path="$MSVC_DLL"
55403  has_colon=`$ECHO $path | $GREP ^.:`
55404  new_path="$path"
55405  if test "x$has_colon" = x; then
55406    # Not in mixed or Windows style, start by that.
55407    new_path=`cmd //c echo $path`
55408  fi
55409
55410
55411  input_path="$new_path"
55412  # Check if we need to convert this using DOS-style short mode. If the path
55413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55414  # take no chances and rewrite it.
55415  # Note: m4 eats our [], so we need to use [ and ] instead.
55416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55417  if test "x$has_forbidden_chars" != x; then
55418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55420  fi
55421
55422
55423  windows_path="$new_path"
55424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55425    unix_path=`$CYGPATH -u "$windows_path"`
55426    new_path="$unix_path"
55427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55429    new_path="$unix_path"
55430  fi
55431
55432  if test "x$path" != "x$new_path"; then
55433    MSVC_DLL="$new_path"
55434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55435$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55436  fi
55437
55438  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55439  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55440
55441    else
55442      # We're on a unix platform. Hooray! :)
55443      path="$MSVC_DLL"
55444      has_space=`$ECHO "$path" | $GREP " "`
55445      if test "x$has_space" != x; then
55446        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55447$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55448        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55449      fi
55450
55451      # Use eval to expand a potential ~
55452      eval path="$path"
55453      if test ! -f "$path" && test ! -d "$path"; then
55454        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55455      fi
55456
55457      if test -d "$path"; then
55458        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55459      else
55460        dir="`$DIRNAME "$path"`"
55461        base="`$BASENAME "$path"`"
55462        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55463      fi
55464    fi
55465  fi
55466
55467      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55468$as_echo_n "checking for $DLL_NAME... " >&6; }
55469      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55470$as_echo "$MSVC_DLL" >&6; }
55471    else
55472      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55473$as_echo "incorrect, ignoring" >&6; }
55474      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55475$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55476    fi
55477  fi
55478
55479  fi
55480
55481  if test "x$MSVC_DLL" = x; then
55482    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55483    if test "x$VS100COMNTOOLS" != x; then
55484      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55485
55486  windows_path="$CYGWIN_VS_TOOLS_DIR"
55487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55488    unix_path=`$CYGPATH -u "$windows_path"`
55489    CYGWIN_VS_TOOLS_DIR="$unix_path"
55490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55492    CYGWIN_VS_TOOLS_DIR="$unix_path"
55493  fi
55494
55495      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55496        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55497	    | $GREP -i /x64/ | $HEAD --lines 1`
55498      else
55499        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55500	    | $GREP -i /x86/ | $HEAD --lines 1`
55501      fi
55502
55503  DLL_NAME="$DLL_NAME"
55504  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55505  METHOD="search of VS100COMNTOOLS"
55506  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55507    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55508$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55509
55510    # Need to check if the found msvcr is correct architecture
55511    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55512$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55513    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55514    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55515      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55516      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55517      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55518        CORRECT_MSVCR_ARCH="PE32 executable"
55519      else
55520        CORRECT_MSVCR_ARCH="PE32+ executable"
55521      fi
55522    else
55523      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55524        CORRECT_MSVCR_ARCH=386
55525      else
55526        CORRECT_MSVCR_ARCH=x86-64
55527      fi
55528    fi
55529    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55530      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55531$as_echo "ok" >&6; }
55532      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55533
55534  # Only process if variable expands to non-empty
55535
55536  if test "x$MSVC_DLL" != x; then
55537    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55538
55539  # Input might be given as Windows format, start by converting to
55540  # unix format.
55541  path="$MSVC_DLL"
55542  new_path=`$CYGPATH -u "$path"`
55543
55544  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55545  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55546  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55547  # "foo.exe" is OK but "foo" is an error.
55548  #
55549  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55550  # It is also a way to make sure we got the proper file name for the real test later on.
55551  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55552  if test "x$test_shortpath" = x; then
55553    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55554$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55555    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55556  fi
55557
55558  # Call helper function which possibly converts this using DOS-style short mode.
55559  # If so, the updated path is stored in $new_path.
55560
55561  input_path="$new_path"
55562  # Check if we need to convert this using DOS-style short mode. If the path
55563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55564  # take no chances and rewrite it.
55565  # Note: m4 eats our [], so we need to use [ and ] instead.
55566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55567  if test "x$has_forbidden_chars" != x; then
55568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55572      # Going to short mode and back again did indeed matter. Since short mode is
55573      # case insensitive, let's make it lowercase to improve readability.
55574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55575      # Now convert it back to Unix-style (cygpath)
55576      input_path=`$CYGPATH -u "$shortmode_path"`
55577      new_path="$input_path"
55578    fi
55579  fi
55580
55581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55582  if test "x$test_cygdrive_prefix" = x; then
55583    # As a simple fix, exclude /usr/bin since it's not a real path.
55584    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55586      # a path prefixed by /cygdrive for fixpath to work.
55587      new_path="$CYGWIN_ROOT_PATH$input_path"
55588    fi
55589  fi
55590
55591
55592  if test "x$path" != "x$new_path"; then
55593    MSVC_DLL="$new_path"
55594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55595$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55596  fi
55597
55598    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55599
55600  path="$MSVC_DLL"
55601  has_colon=`$ECHO $path | $GREP ^.:`
55602  new_path="$path"
55603  if test "x$has_colon" = x; then
55604    # Not in mixed or Windows style, start by that.
55605    new_path=`cmd //c echo $path`
55606  fi
55607
55608
55609  input_path="$new_path"
55610  # Check if we need to convert this using DOS-style short mode. If the path
55611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55612  # take no chances and rewrite it.
55613  # Note: m4 eats our [], so we need to use [ and ] instead.
55614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55615  if test "x$has_forbidden_chars" != x; then
55616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55617    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55618  fi
55619
55620
55621  windows_path="$new_path"
55622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55623    unix_path=`$CYGPATH -u "$windows_path"`
55624    new_path="$unix_path"
55625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55627    new_path="$unix_path"
55628  fi
55629
55630  if test "x$path" != "x$new_path"; then
55631    MSVC_DLL="$new_path"
55632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55633$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55634  fi
55635
55636  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55637  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55638
55639    else
55640      # We're on a unix platform. Hooray! :)
55641      path="$MSVC_DLL"
55642      has_space=`$ECHO "$path" | $GREP " "`
55643      if test "x$has_space" != x; then
55644        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55645$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55646        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55647      fi
55648
55649      # Use eval to expand a potential ~
55650      eval path="$path"
55651      if test ! -f "$path" && test ! -d "$path"; then
55652        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55653      fi
55654
55655      if test -d "$path"; then
55656        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55657      else
55658        dir="`$DIRNAME "$path"`"
55659        base="`$BASENAME "$path"`"
55660        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55661      fi
55662    fi
55663  fi
55664
55665      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55666$as_echo_n "checking for $DLL_NAME... " >&6; }
55667      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55668$as_echo "$MSVC_DLL" >&6; }
55669    else
55670      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55671$as_echo "incorrect, ignoring" >&6; }
55672      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55673$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55674    fi
55675  fi
55676
55677    fi
55678  fi
55679
55680  if test "x$MSVC_DLL" = x; then
55681    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55682    # (This was the original behaviour; kept since it might turn something up)
55683    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55684      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55685        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55686	    | $GREP x64 | $HEAD --lines 1`
55687      else
55688        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55689	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55690        if test "x$POSSIBLE_MSVC_DLL" = x; then
55691          # We're grasping at straws now...
55692          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55693	      | $HEAD --lines 1`
55694        fi
55695      fi
55696
55697
55698  DLL_NAME="$DLL_NAME"
55699  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55700  METHOD="search of VCINSTALLDIR"
55701  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55702    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55703$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55704
55705    # Need to check if the found msvcr is correct architecture
55706    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55707$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55708    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55709    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55710      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55711      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55712      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55713        CORRECT_MSVCR_ARCH="PE32 executable"
55714      else
55715        CORRECT_MSVCR_ARCH="PE32+ executable"
55716      fi
55717    else
55718      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55719        CORRECT_MSVCR_ARCH=386
55720      else
55721        CORRECT_MSVCR_ARCH=x86-64
55722      fi
55723    fi
55724    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55725      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55726$as_echo "ok" >&6; }
55727      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55728
55729  # Only process if variable expands to non-empty
55730
55731  if test "x$MSVC_DLL" != x; then
55732    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55733
55734  # Input might be given as Windows format, start by converting to
55735  # unix format.
55736  path="$MSVC_DLL"
55737  new_path=`$CYGPATH -u "$path"`
55738
55739  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55740  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55741  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55742  # "foo.exe" is OK but "foo" is an error.
55743  #
55744  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55745  # It is also a way to make sure we got the proper file name for the real test later on.
55746  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55747  if test "x$test_shortpath" = x; then
55748    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55749$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55750    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55751  fi
55752
55753  # Call helper function which possibly converts this using DOS-style short mode.
55754  # If so, the updated path is stored in $new_path.
55755
55756  input_path="$new_path"
55757  # Check if we need to convert this using DOS-style short mode. If the path
55758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55759  # take no chances and rewrite it.
55760  # Note: m4 eats our [], so we need to use [ and ] instead.
55761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55762  if test "x$has_forbidden_chars" != x; then
55763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55764    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55765    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55766    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55767      # Going to short mode and back again did indeed matter. Since short mode is
55768      # case insensitive, let's make it lowercase to improve readability.
55769      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55770      # Now convert it back to Unix-style (cygpath)
55771      input_path=`$CYGPATH -u "$shortmode_path"`
55772      new_path="$input_path"
55773    fi
55774  fi
55775
55776  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55777  if test "x$test_cygdrive_prefix" = x; then
55778    # As a simple fix, exclude /usr/bin since it's not a real path.
55779    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55780      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55781      # a path prefixed by /cygdrive for fixpath to work.
55782      new_path="$CYGWIN_ROOT_PATH$input_path"
55783    fi
55784  fi
55785
55786
55787  if test "x$path" != "x$new_path"; then
55788    MSVC_DLL="$new_path"
55789    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55790$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55791  fi
55792
55793    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55794
55795  path="$MSVC_DLL"
55796  has_colon=`$ECHO $path | $GREP ^.:`
55797  new_path="$path"
55798  if test "x$has_colon" = x; then
55799    # Not in mixed or Windows style, start by that.
55800    new_path=`cmd //c echo $path`
55801  fi
55802
55803
55804  input_path="$new_path"
55805  # Check if we need to convert this using DOS-style short mode. If the path
55806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55807  # take no chances and rewrite it.
55808  # Note: m4 eats our [], so we need to use [ and ] instead.
55809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55810  if test "x$has_forbidden_chars" != x; then
55811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55812    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55813  fi
55814
55815
55816  windows_path="$new_path"
55817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55818    unix_path=`$CYGPATH -u "$windows_path"`
55819    new_path="$unix_path"
55820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55822    new_path="$unix_path"
55823  fi
55824
55825  if test "x$path" != "x$new_path"; then
55826    MSVC_DLL="$new_path"
55827    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55828$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55829  fi
55830
55831  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55832  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55833
55834    else
55835      # We're on a unix platform. Hooray! :)
55836      path="$MSVC_DLL"
55837      has_space=`$ECHO "$path" | $GREP " "`
55838      if test "x$has_space" != x; then
55839        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55840$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55841        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55842      fi
55843
55844      # Use eval to expand a potential ~
55845      eval path="$path"
55846      if test ! -f "$path" && test ! -d "$path"; then
55847        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55848      fi
55849
55850      if test -d "$path"; then
55851        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55852      else
55853        dir="`$DIRNAME "$path"`"
55854        base="`$BASENAME "$path"`"
55855        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55856      fi
55857    fi
55858  fi
55859
55860      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55861$as_echo_n "checking for $DLL_NAME... " >&6; }
55862      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55863$as_echo "$MSVC_DLL" >&6; }
55864    else
55865      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55866$as_echo "incorrect, ignoring" >&6; }
55867      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55868$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55869    fi
55870  fi
55871
55872    fi
55873  fi
55874
55875  if test "x$MSVC_DLL" = x; then
55876    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55877$as_echo_n "checking for $DLL_NAME... " >&6; }
55878    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55879$as_echo "no" >&6; }
55880    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55881  fi
55882
55883      MSVCP_DLL="$MSVC_DLL"
55884    fi
55885
55886  fi
55887
55888  fi
55889
55890
55891  if test "x$NEEDS_LIB_X11" = xfalse; then
55892    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55893      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55894$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55895    fi
55896    X_CFLAGS=
55897    X_LIBS=
55898  else
55899
55900    if test "x${with_x}" = xno; then
55901      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55902    fi
55903
55904    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55905      # The user has specified a X11 base directory. Use it for includes and
55906      # libraries, unless explicitely overridden.
55907      if test "x$x_includes" = xNONE; then
55908        x_includes="${with_x}/include"
55909      fi
55910      if test "x$x_libraries" = xNONE; then
55911        x_libraries="${with_x}/lib"
55912      fi
55913    else
55914      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55915      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55916      # --x-libraries for the sysroot, if that seems to be correct.
55917      if test "x$SYSROOT" != "x"; then
55918        if test "x$x_includes" = xNONE; then
55919          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55920            x_includes="$SYSROOT/usr/X11R6/include"
55921          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55922            x_includes="$SYSROOT/usr/include"
55923          fi
55924        fi
55925        if test "x$x_libraries" = xNONE; then
55926          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55927            x_libraries="$SYSROOT/usr/X11R6/lib"
55928          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55929            x_libraries="$SYSROOT/usr/lib64"
55930          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55931            x_libraries="$SYSROOT/usr/lib"
55932          fi
55933        fi
55934      fi
55935    fi
55936
55937    # Now let autoconf do it's magic
55938    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55939$as_echo_n "checking for X... " >&6; }
55940
55941
55942# Check whether --with-x was given.
55943if test "${with_x+set}" = set; then :
55944  withval=$with_x;
55945fi
55946
55947# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55948if test "x$with_x" = xno; then
55949  # The user explicitly disabled X.
55950  have_x=disabled
55951else
55952  case $x_includes,$x_libraries in #(
55953    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55954    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55955  $as_echo_n "(cached) " >&6
55956else
55957  # One or both of the vars are not set, and there is no cached value.
55958ac_x_includes=no ac_x_libraries=no
55959rm -f -r conftest.dir
55960if mkdir conftest.dir; then
55961  cd conftest.dir
55962  cat >Imakefile <<'_ACEOF'
55963incroot:
55964	@echo incroot='${INCROOT}'
55965usrlibdir:
55966	@echo usrlibdir='${USRLIBDIR}'
55967libdir:
55968	@echo libdir='${LIBDIR}'
55969_ACEOF
55970  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55971    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55972    for ac_var in incroot usrlibdir libdir; do
55973      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55974    done
55975    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55976    for ac_extension in a so sl dylib la dll; do
55977      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55978	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55979	ac_im_usrlibdir=$ac_im_libdir; break
55980      fi
55981    done
55982    # Screen out bogus values from the imake configuration.  They are
55983    # bogus both because they are the default anyway, and because
55984    # using them would break gcc on systems where it needs fixed includes.
55985    case $ac_im_incroot in
55986	/usr/include) ac_x_includes= ;;
55987	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55988    esac
55989    case $ac_im_usrlibdir in
55990	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55991	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55992    esac
55993  fi
55994  cd ..
55995  rm -f -r conftest.dir
55996fi
55997
55998# Standard set of common directories for X headers.
55999# Check X11 before X11Rn because it is often a symlink to the current release.
56000ac_x_header_dirs='
56001/usr/X11/include
56002/usr/X11R7/include
56003/usr/X11R6/include
56004/usr/X11R5/include
56005/usr/X11R4/include
56006
56007/usr/include/X11
56008/usr/include/X11R7
56009/usr/include/X11R6
56010/usr/include/X11R5
56011/usr/include/X11R4
56012
56013/usr/local/X11/include
56014/usr/local/X11R7/include
56015/usr/local/X11R6/include
56016/usr/local/X11R5/include
56017/usr/local/X11R4/include
56018
56019/usr/local/include/X11
56020/usr/local/include/X11R7
56021/usr/local/include/X11R6
56022/usr/local/include/X11R5
56023/usr/local/include/X11R4
56024
56025/usr/X386/include
56026/usr/x386/include
56027/usr/XFree86/include/X11
56028
56029/usr/include
56030/usr/local/include
56031/usr/unsupported/include
56032/usr/athena/include
56033/usr/local/x11r5/include
56034/usr/lpp/Xamples/include
56035
56036/usr/openwin/include
56037/usr/openwin/share/include'
56038
56039if test "$ac_x_includes" = no; then
56040  # Guess where to find include files, by looking for Xlib.h.
56041  # First, try using that file with no special directory specified.
56042  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56043/* end confdefs.h.  */
56044#include <X11/Xlib.h>
56045_ACEOF
56046if ac_fn_cxx_try_cpp "$LINENO"; then :
56047  # We can compile using X headers with no special include directory.
56048ac_x_includes=
56049else
56050  for ac_dir in $ac_x_header_dirs; do
56051  if test -r "$ac_dir/X11/Xlib.h"; then
56052    ac_x_includes=$ac_dir
56053    break
56054  fi
56055done
56056fi
56057rm -f conftest.err conftest.i conftest.$ac_ext
56058fi # $ac_x_includes = no
56059
56060if test "$ac_x_libraries" = no; then
56061  # Check for the libraries.
56062  # See if we find them without any special options.
56063  # Don't add to $LIBS permanently.
56064  ac_save_LIBS=$LIBS
56065  LIBS="-lX11 $LIBS"
56066  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56067/* end confdefs.h.  */
56068#include <X11/Xlib.h>
56069int
56070main ()
56071{
56072XrmInitialize ()
56073  ;
56074  return 0;
56075}
56076_ACEOF
56077if ac_fn_cxx_try_link "$LINENO"; then :
56078  LIBS=$ac_save_LIBS
56079# We can link X programs with no special library path.
56080ac_x_libraries=
56081else
56082  LIBS=$ac_save_LIBS
56083for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56084do
56085  # Don't even attempt the hair of trying to link an X program!
56086  for ac_extension in a so sl dylib la dll; do
56087    if test -r "$ac_dir/libX11.$ac_extension"; then
56088      ac_x_libraries=$ac_dir
56089      break 2
56090    fi
56091  done
56092done
56093fi
56094rm -f core conftest.err conftest.$ac_objext \
56095    conftest$ac_exeext conftest.$ac_ext
56096fi # $ac_x_libraries = no
56097
56098case $ac_x_includes,$ac_x_libraries in #(
56099  no,* | *,no | *\'*)
56100    # Didn't find X, or a directory has "'" in its name.
56101    ac_cv_have_x="have_x=no";; #(
56102  *)
56103    # Record where we found X for the cache.
56104    ac_cv_have_x="have_x=yes\
56105	ac_x_includes='$ac_x_includes'\
56106	ac_x_libraries='$ac_x_libraries'"
56107esac
56108fi
56109;; #(
56110    *) have_x=yes;;
56111  esac
56112  eval "$ac_cv_have_x"
56113fi # $with_x != no
56114
56115if test "$have_x" != yes; then
56116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56117$as_echo "$have_x" >&6; }
56118  no_x=yes
56119else
56120  # If each of the values was on the command line, it overrides each guess.
56121  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56122  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56123  # Update the cache value to reflect the command line values.
56124  ac_cv_have_x="have_x=yes\
56125	ac_x_includes='$x_includes'\
56126	ac_x_libraries='$x_libraries'"
56127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56128$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56129fi
56130
56131    if test "$no_x" = yes; then
56132  # Not all programs may use this symbol, but it does not hurt to define it.
56133
56134$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56135
56136  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56137else
56138  if test -n "$x_includes"; then
56139    X_CFLAGS="$X_CFLAGS -I$x_includes"
56140  fi
56141
56142  # It would also be nice to do this for all -L options, not just this one.
56143  if test -n "$x_libraries"; then
56144    X_LIBS="$X_LIBS -L$x_libraries"
56145    # For Solaris; some versions of Sun CC require a space after -R and
56146    # others require no space.  Words are not sufficient . . . .
56147    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56148$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56149    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56150    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56151    ac_cxx_werror_flag=yes
56152    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56153/* end confdefs.h.  */
56154
56155int
56156main ()
56157{
56158
56159  ;
56160  return 0;
56161}
56162_ACEOF
56163if ac_fn_cxx_try_link "$LINENO"; then :
56164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56165$as_echo "no" >&6; }
56166       X_LIBS="$X_LIBS -R$x_libraries"
56167else
56168  LIBS="$ac_xsave_LIBS -R $x_libraries"
56169       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56170/* end confdefs.h.  */
56171
56172int
56173main ()
56174{
56175
56176  ;
56177  return 0;
56178}
56179_ACEOF
56180if ac_fn_cxx_try_link "$LINENO"; then :
56181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56182$as_echo "yes" >&6; }
56183	  X_LIBS="$X_LIBS -R $x_libraries"
56184else
56185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56186$as_echo "neither works" >&6; }
56187fi
56188rm -f core conftest.err conftest.$ac_objext \
56189    conftest$ac_exeext conftest.$ac_ext
56190fi
56191rm -f core conftest.err conftest.$ac_objext \
56192    conftest$ac_exeext conftest.$ac_ext
56193    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56194    LIBS=$ac_xsave_LIBS
56195  fi
56196
56197  # Check for system-dependent libraries X programs must link with.
56198  # Do this before checking for the system-independent R6 libraries
56199  # (-lICE), since we may need -lsocket or whatever for X linking.
56200
56201  if test "$ISC" = yes; then
56202    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56203  else
56204    # Martyn Johnson says this is needed for Ultrix, if the X
56205    # libraries were built with DECnet support.  And Karl Berry says
56206    # the Alpha needs dnet_stub (dnet does not exist).
56207    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56208    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56209/* end confdefs.h.  */
56210
56211/* Override any GCC internal prototype to avoid an error.
56212   Use char because int might match the return type of a GCC
56213   builtin and then its argument prototype would still apply.  */
56214#ifdef __cplusplus
56215extern "C"
56216#endif
56217char XOpenDisplay ();
56218int
56219main ()
56220{
56221return XOpenDisplay ();
56222  ;
56223  return 0;
56224}
56225_ACEOF
56226if ac_fn_cxx_try_link "$LINENO"; then :
56227
56228else
56229  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56230$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56231if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56232  $as_echo_n "(cached) " >&6
56233else
56234  ac_check_lib_save_LIBS=$LIBS
56235LIBS="-ldnet  $LIBS"
56236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56237/* end confdefs.h.  */
56238
56239/* Override any GCC internal prototype to avoid an error.
56240   Use char because int might match the return type of a GCC
56241   builtin and then its argument prototype would still apply.  */
56242#ifdef __cplusplus
56243extern "C"
56244#endif
56245char dnet_ntoa ();
56246int
56247main ()
56248{
56249return dnet_ntoa ();
56250  ;
56251  return 0;
56252}
56253_ACEOF
56254if ac_fn_cxx_try_link "$LINENO"; then :
56255  ac_cv_lib_dnet_dnet_ntoa=yes
56256else
56257  ac_cv_lib_dnet_dnet_ntoa=no
56258fi
56259rm -f core conftest.err conftest.$ac_objext \
56260    conftest$ac_exeext conftest.$ac_ext
56261LIBS=$ac_check_lib_save_LIBS
56262fi
56263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56264$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56265if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56266  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56267fi
56268
56269    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56270      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56271$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56272if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56273  $as_echo_n "(cached) " >&6
56274else
56275  ac_check_lib_save_LIBS=$LIBS
56276LIBS="-ldnet_stub  $LIBS"
56277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56278/* end confdefs.h.  */
56279
56280/* Override any GCC internal prototype to avoid an error.
56281   Use char because int might match the return type of a GCC
56282   builtin and then its argument prototype would still apply.  */
56283#ifdef __cplusplus
56284extern "C"
56285#endif
56286char dnet_ntoa ();
56287int
56288main ()
56289{
56290return dnet_ntoa ();
56291  ;
56292  return 0;
56293}
56294_ACEOF
56295if ac_fn_cxx_try_link "$LINENO"; then :
56296  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56297else
56298  ac_cv_lib_dnet_stub_dnet_ntoa=no
56299fi
56300rm -f core conftest.err conftest.$ac_objext \
56301    conftest$ac_exeext conftest.$ac_ext
56302LIBS=$ac_check_lib_save_LIBS
56303fi
56304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56305$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56306if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56307  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56308fi
56309
56310    fi
56311fi
56312rm -f core conftest.err conftest.$ac_objext \
56313    conftest$ac_exeext conftest.$ac_ext
56314    LIBS="$ac_xsave_LIBS"
56315
56316    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56317    # to get the SysV transport functions.
56318    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56319    # needs -lnsl.
56320    # The nsl library prevents programs from opening the X display
56321    # on Irix 5.2, according to T.E. Dickey.
56322    # The functions gethostbyname, getservbyname, and inet_addr are
56323    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56324    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56325if test "x$ac_cv_func_gethostbyname" = xyes; then :
56326
56327fi
56328
56329    if test $ac_cv_func_gethostbyname = no; then
56330      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56331$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56332if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56333  $as_echo_n "(cached) " >&6
56334else
56335  ac_check_lib_save_LIBS=$LIBS
56336LIBS="-lnsl  $LIBS"
56337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56338/* end confdefs.h.  */
56339
56340/* Override any GCC internal prototype to avoid an error.
56341   Use char because int might match the return type of a GCC
56342   builtin and then its argument prototype would still apply.  */
56343#ifdef __cplusplus
56344extern "C"
56345#endif
56346char gethostbyname ();
56347int
56348main ()
56349{
56350return gethostbyname ();
56351  ;
56352  return 0;
56353}
56354_ACEOF
56355if ac_fn_cxx_try_link "$LINENO"; then :
56356  ac_cv_lib_nsl_gethostbyname=yes
56357else
56358  ac_cv_lib_nsl_gethostbyname=no
56359fi
56360rm -f core conftest.err conftest.$ac_objext \
56361    conftest$ac_exeext conftest.$ac_ext
56362LIBS=$ac_check_lib_save_LIBS
56363fi
56364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56365$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56366if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56367  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56368fi
56369
56370      if test $ac_cv_lib_nsl_gethostbyname = no; then
56371	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56372$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56373if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56374  $as_echo_n "(cached) " >&6
56375else
56376  ac_check_lib_save_LIBS=$LIBS
56377LIBS="-lbsd  $LIBS"
56378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56379/* end confdefs.h.  */
56380
56381/* Override any GCC internal prototype to avoid an error.
56382   Use char because int might match the return type of a GCC
56383   builtin and then its argument prototype would still apply.  */
56384#ifdef __cplusplus
56385extern "C"
56386#endif
56387char gethostbyname ();
56388int
56389main ()
56390{
56391return gethostbyname ();
56392  ;
56393  return 0;
56394}
56395_ACEOF
56396if ac_fn_cxx_try_link "$LINENO"; then :
56397  ac_cv_lib_bsd_gethostbyname=yes
56398else
56399  ac_cv_lib_bsd_gethostbyname=no
56400fi
56401rm -f core conftest.err conftest.$ac_objext \
56402    conftest$ac_exeext conftest.$ac_ext
56403LIBS=$ac_check_lib_save_LIBS
56404fi
56405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56406$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56407if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56408  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56409fi
56410
56411      fi
56412    fi
56413
56414    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56415    # socket/setsockopt and other routines are undefined under SCO ODT
56416    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56417    # on later versions), says Simon Leinen: it contains gethostby*
56418    # variants that don't use the name server (or something).  -lsocket
56419    # must be given before -lnsl if both are needed.  We assume that
56420    # if connect needs -lnsl, so does gethostbyname.
56421    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56422if test "x$ac_cv_func_connect" = xyes; then :
56423
56424fi
56425
56426    if test $ac_cv_func_connect = no; then
56427      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56428$as_echo_n "checking for connect in -lsocket... " >&6; }
56429if ${ac_cv_lib_socket_connect+:} false; then :
56430  $as_echo_n "(cached) " >&6
56431else
56432  ac_check_lib_save_LIBS=$LIBS
56433LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56435/* end confdefs.h.  */
56436
56437/* Override any GCC internal prototype to avoid an error.
56438   Use char because int might match the return type of a GCC
56439   builtin and then its argument prototype would still apply.  */
56440#ifdef __cplusplus
56441extern "C"
56442#endif
56443char connect ();
56444int
56445main ()
56446{
56447return connect ();
56448  ;
56449  return 0;
56450}
56451_ACEOF
56452if ac_fn_cxx_try_link "$LINENO"; then :
56453  ac_cv_lib_socket_connect=yes
56454else
56455  ac_cv_lib_socket_connect=no
56456fi
56457rm -f core conftest.err conftest.$ac_objext \
56458    conftest$ac_exeext conftest.$ac_ext
56459LIBS=$ac_check_lib_save_LIBS
56460fi
56461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56462$as_echo "$ac_cv_lib_socket_connect" >&6; }
56463if test "x$ac_cv_lib_socket_connect" = xyes; then :
56464  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56465fi
56466
56467    fi
56468
56469    # Guillermo Gomez says -lposix is necessary on A/UX.
56470    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56471if test "x$ac_cv_func_remove" = xyes; then :
56472
56473fi
56474
56475    if test $ac_cv_func_remove = no; then
56476      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56477$as_echo_n "checking for remove in -lposix... " >&6; }
56478if ${ac_cv_lib_posix_remove+:} false; then :
56479  $as_echo_n "(cached) " >&6
56480else
56481  ac_check_lib_save_LIBS=$LIBS
56482LIBS="-lposix  $LIBS"
56483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56484/* end confdefs.h.  */
56485
56486/* Override any GCC internal prototype to avoid an error.
56487   Use char because int might match the return type of a GCC
56488   builtin and then its argument prototype would still apply.  */
56489#ifdef __cplusplus
56490extern "C"
56491#endif
56492char remove ();
56493int
56494main ()
56495{
56496return remove ();
56497  ;
56498  return 0;
56499}
56500_ACEOF
56501if ac_fn_cxx_try_link "$LINENO"; then :
56502  ac_cv_lib_posix_remove=yes
56503else
56504  ac_cv_lib_posix_remove=no
56505fi
56506rm -f core conftest.err conftest.$ac_objext \
56507    conftest$ac_exeext conftest.$ac_ext
56508LIBS=$ac_check_lib_save_LIBS
56509fi
56510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56511$as_echo "$ac_cv_lib_posix_remove" >&6; }
56512if test "x$ac_cv_lib_posix_remove" = xyes; then :
56513  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56514fi
56515
56516    fi
56517
56518    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56519    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56520if test "x$ac_cv_func_shmat" = xyes; then :
56521
56522fi
56523
56524    if test $ac_cv_func_shmat = no; then
56525      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56526$as_echo_n "checking for shmat in -lipc... " >&6; }
56527if ${ac_cv_lib_ipc_shmat+:} false; then :
56528  $as_echo_n "(cached) " >&6
56529else
56530  ac_check_lib_save_LIBS=$LIBS
56531LIBS="-lipc  $LIBS"
56532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56533/* end confdefs.h.  */
56534
56535/* Override any GCC internal prototype to avoid an error.
56536   Use char because int might match the return type of a GCC
56537   builtin and then its argument prototype would still apply.  */
56538#ifdef __cplusplus
56539extern "C"
56540#endif
56541char shmat ();
56542int
56543main ()
56544{
56545return shmat ();
56546  ;
56547  return 0;
56548}
56549_ACEOF
56550if ac_fn_cxx_try_link "$LINENO"; then :
56551  ac_cv_lib_ipc_shmat=yes
56552else
56553  ac_cv_lib_ipc_shmat=no
56554fi
56555rm -f core conftest.err conftest.$ac_objext \
56556    conftest$ac_exeext conftest.$ac_ext
56557LIBS=$ac_check_lib_save_LIBS
56558fi
56559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56560$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56561if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56562  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56563fi
56564
56565    fi
56566  fi
56567
56568  # Check for libraries that X11R6 Xt/Xaw programs need.
56569  ac_save_LDFLAGS=$LDFLAGS
56570  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56571  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56572  # check for ICE first), but we must link in the order -lSM -lICE or
56573  # we get undefined symbols.  So assume we have SM if we have ICE.
56574  # These have to be linked with before -lX11, unlike the other
56575  # libraries we check for below, so use a different variable.
56576  # John Interrante, Karl Berry
56577  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56578$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56579if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56580  $as_echo_n "(cached) " >&6
56581else
56582  ac_check_lib_save_LIBS=$LIBS
56583LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56585/* end confdefs.h.  */
56586
56587/* Override any GCC internal prototype to avoid an error.
56588   Use char because int might match the return type of a GCC
56589   builtin and then its argument prototype would still apply.  */
56590#ifdef __cplusplus
56591extern "C"
56592#endif
56593char IceConnectionNumber ();
56594int
56595main ()
56596{
56597return IceConnectionNumber ();
56598  ;
56599  return 0;
56600}
56601_ACEOF
56602if ac_fn_cxx_try_link "$LINENO"; then :
56603  ac_cv_lib_ICE_IceConnectionNumber=yes
56604else
56605  ac_cv_lib_ICE_IceConnectionNumber=no
56606fi
56607rm -f core conftest.err conftest.$ac_objext \
56608    conftest$ac_exeext conftest.$ac_ext
56609LIBS=$ac_check_lib_save_LIBS
56610fi
56611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56612$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56613if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56614  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56615fi
56616
56617  LDFLAGS=$ac_save_LDFLAGS
56618
56619fi
56620
56621
56622    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56623    # this doesn't make sense so we remove it.
56624    if test "x$COMPILE_TYPE" = xcross; then
56625      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56626    fi
56627
56628    if test "x$no_x" = xyes; then
56629
56630  # Print a helpful message on how to acquire the necessary build dependency.
56631  # x11 is the help tag: freetype, cups, alsa etc
56632  MISSING_DEPENDENCY=x11
56633
56634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56635    cygwin_help $MISSING_DEPENDENCY
56636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56637    msys_help $MISSING_DEPENDENCY
56638  else
56639    PKGHANDLER_COMMAND=
56640
56641    case $PKGHANDLER in
56642      apt-get)
56643        apt_help     $MISSING_DEPENDENCY ;;
56644      yum)
56645        yum_help     $MISSING_DEPENDENCY ;;
56646      port)
56647        port_help    $MISSING_DEPENDENCY ;;
56648      pkgutil)
56649        pkgutil_help $MISSING_DEPENDENCY ;;
56650      pkgadd)
56651        pkgadd_help  $MISSING_DEPENDENCY ;;
56652    esac
56653
56654    if test "x$PKGHANDLER_COMMAND" != x; then
56655      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56656    fi
56657  fi
56658
56659      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56660    fi
56661
56662    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56663      OPENWIN_HOME="/usr/openwin"
56664      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56665      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56666          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56667    fi
56668
56669    ac_ext=c
56670ac_cpp='$CPP $CPPFLAGS'
56671ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56672ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56673ac_compiler_gnu=$ac_cv_c_compiler_gnu
56674
56675    OLD_CFLAGS="$CFLAGS"
56676    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56677
56678    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56679    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56680do :
56681  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56682ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56683          # include <X11/Xlib.h>
56684          # include <X11/Xutil.h>
56685
56686
56687"
56688if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56689  cat >>confdefs.h <<_ACEOF
56690#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56691_ACEOF
56692 X11_HEADERS_OK=yes
56693else
56694  X11_HEADERS_OK=no; break
56695fi
56696
56697done
56698
56699
56700    if test "x$X11_HEADERS_OK" = xno; then
56701
56702  # Print a helpful message on how to acquire the necessary build dependency.
56703  # x11 is the help tag: freetype, cups, alsa etc
56704  MISSING_DEPENDENCY=x11
56705
56706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56707    cygwin_help $MISSING_DEPENDENCY
56708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56709    msys_help $MISSING_DEPENDENCY
56710  else
56711    PKGHANDLER_COMMAND=
56712
56713    case $PKGHANDLER in
56714      apt-get)
56715        apt_help     $MISSING_DEPENDENCY ;;
56716      yum)
56717        yum_help     $MISSING_DEPENDENCY ;;
56718      port)
56719        port_help    $MISSING_DEPENDENCY ;;
56720      pkgutil)
56721        pkgutil_help $MISSING_DEPENDENCY ;;
56722      pkgadd)
56723        pkgadd_help  $MISSING_DEPENDENCY ;;
56724    esac
56725
56726    if test "x$PKGHANDLER_COMMAND" != x; then
56727      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56728    fi
56729  fi
56730
56731      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56732    fi
56733
56734    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56735    # defined in libawt_xawt.
56736    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56737$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56738    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56739/* end confdefs.h.  */
56740#include <X11/extensions/Xrender.h>
56741int
56742main ()
56743{
56744XLinearGradient x;
56745  ;
56746  return 0;
56747}
56748_ACEOF
56749if ac_fn_c_try_compile "$LINENO"; then :
56750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56751$as_echo "yes" >&6; }
56752else
56753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56754$as_echo "no" >&6; }
56755         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56756fi
56757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56758
56759    CFLAGS="$OLD_CFLAGS"
56760    ac_ext=cpp
56761ac_cpp='$CXXCPP $CPPFLAGS'
56762ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56763ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56764ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56765
56766  fi # NEEDS_LIB_X11
56767
56768
56769
56770
56771
56772
56773# Check whether --with-cups was given.
56774if test "${with_cups+set}" = set; then :
56775  withval=$with_cups;
56776fi
56777
56778
56779# Check whether --with-cups-include was given.
56780if test "${with_cups_include+set}" = set; then :
56781  withval=$with_cups_include;
56782fi
56783
56784
56785  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56786    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56787        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56788      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56789$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56790    fi
56791    CUPS_CFLAGS=
56792  else
56793    CUPS_FOUND=no
56794
56795    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56796      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56797    fi
56798
56799    if test "x${with_cups}" != x; then
56800      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56801$as_echo_n "checking for cups headers... " >&6; }
56802      if test -s "${with_cups}/include/cups/cups.h"; then
56803        CUPS_CFLAGS="-I${with_cups}/include"
56804        CUPS_FOUND=yes
56805        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56806$as_echo "$CUPS_FOUND" >&6; }
56807      else
56808        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56809      fi
56810    fi
56811    if test "x${with_cups_include}" != x; then
56812      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56813$as_echo_n "checking for cups headers... " >&6; }
56814      if test -s "${with_cups_include}/cups/cups.h"; then
56815        CUPS_CFLAGS="-I${with_cups_include}"
56816        CUPS_FOUND=yes
56817        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56818$as_echo "$CUPS_FOUND" >&6; }
56819      else
56820        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56821      fi
56822    fi
56823    if test "x$CUPS_FOUND" = xno; then
56824      # Are the cups headers installed in the default /usr/include location?
56825      for ac_header in cups/cups.h cups/ppd.h
56826do :
56827  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56828ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56829if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56830  cat >>confdefs.h <<_ACEOF
56831#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56832_ACEOF
56833
56834          CUPS_FOUND=yes
56835          CUPS_CFLAGS=
56836          DEFAULT_CUPS=yes
56837
56838fi
56839
56840done
56841
56842    fi
56843    if test "x$CUPS_FOUND" = xno; then
56844
56845  # Print a helpful message on how to acquire the necessary build dependency.
56846  # cups is the help tag: freetype, cups, alsa etc
56847  MISSING_DEPENDENCY=cups
56848
56849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56850    cygwin_help $MISSING_DEPENDENCY
56851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56852    msys_help $MISSING_DEPENDENCY
56853  else
56854    PKGHANDLER_COMMAND=
56855
56856    case $PKGHANDLER in
56857      apt-get)
56858        apt_help     $MISSING_DEPENDENCY ;;
56859      yum)
56860        yum_help     $MISSING_DEPENDENCY ;;
56861      port)
56862        port_help    $MISSING_DEPENDENCY ;;
56863      pkgutil)
56864        pkgutil_help $MISSING_DEPENDENCY ;;
56865      pkgadd)
56866        pkgadd_help  $MISSING_DEPENDENCY ;;
56867    esac
56868
56869    if test "x$PKGHANDLER_COMMAND" != x; then
56870      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56871    fi
56872  fi
56873
56874      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56875    fi
56876  fi
56877
56878
56879
56880
56881
56882# Check whether --with-freetype was given.
56883if test "${with_freetype+set}" = set; then :
56884  withval=$with_freetype;
56885fi
56886
56887
56888# Check whether --with-freetype-include was given.
56889if test "${with_freetype_include+set}" = set; then :
56890  withval=$with_freetype_include;
56891fi
56892
56893
56894# Check whether --with-freetype-lib was given.
56895if test "${with_freetype_lib+set}" = set; then :
56896  withval=$with_freetype_lib;
56897fi
56898
56899
56900# Check whether --with-freetype-src was given.
56901if test "${with_freetype_src+set}" = set; then :
56902  withval=$with_freetype_src;
56903fi
56904
56905  # Check whether --enable-freetype-bundling was given.
56906if test "${enable_freetype_bundling+set}" = set; then :
56907  enableval=$enable_freetype_bundling;
56908fi
56909
56910
56911  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56912  FREETYPE_BASE_NAME=freetype
56913  FREETYPE_CFLAGS=
56914  FREETYPE_LIBS=
56915  FREETYPE_BUNDLE_LIB_PATH=
56916
56917  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56918    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56919        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56920        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56921        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56922      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56923$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56924    fi
56925    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56926      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56927$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56928    fi
56929  else
56930    # freetype is needed to build; go get it!
56931
56932    BUNDLE_FREETYPE="$enable_freetype_bundling"
56933
56934    if  test "x$with_freetype_src" != x; then
56935      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56936        # Try to build freetype if --with-freetype-src was given on Windows
56937
56938  FREETYPE_SRC_PATH="$with_freetype_src"
56939  BUILD_FREETYPE=yes
56940
56941  # Check if the freetype sources are acessible..
56942  if ! test -d $FREETYPE_SRC_PATH; then
56943    { $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
56944$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56945    BUILD_FREETYPE=no
56946  fi
56947  # ..and contain a vc2010 project file
56948  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56949  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56950    { $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
56951$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56952    BUILD_FREETYPE=no
56953  fi
56954  # Now check if configure found a version of 'msbuild.exe'
56955  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56956    { $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
56957$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;}
56958    BUILD_FREETYPE=no
56959  fi
56960
56961  # Ready to go..
56962  if test "x$BUILD_FREETYPE" = xyes; then
56963    # msbuild requires trailing slashes for output directories
56964    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56965    freetype_lib_path_unix="$freetype_lib_path"
56966    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56967
56968  unix_path="$vcxproj_path"
56969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56970    windows_path=`$CYGPATH -m "$unix_path"`
56971    vcxproj_path="$windows_path"
56972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56973    windows_path=`cmd //c echo $unix_path`
56974    vcxproj_path="$windows_path"
56975  fi
56976
56977
56978  unix_path="$freetype_lib_path"
56979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56980    windows_path=`$CYGPATH -m "$unix_path"`
56981    freetype_lib_path="$windows_path"
56982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56983    windows_path=`cmd //c echo $unix_path`
56984    freetype_lib_path="$windows_path"
56985  fi
56986
56987
56988  unix_path="$freetype_obj_path"
56989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56990    windows_path=`$CYGPATH -m "$unix_path"`
56991    freetype_obj_path="$windows_path"
56992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56993    windows_path=`cmd //c echo $unix_path`
56994    freetype_obj_path="$windows_path"
56995  fi
56996
56997    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56998      freetype_platform=x64
56999    else
57000      freetype_platform=win32
57001    fi
57002
57003    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57004    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57005    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57006    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57007    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57008$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57009
57010    # First we try to build the freetype.dll
57011    $ECHO -e "@echo off\n"\
57012        "$MSBUILD $vcxproj_path "\
57013        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57014        "/p:Configuration=\"Release Multithreaded\" "\
57015        "/p:Platform=$freetype_platform "\
57016        "/p:ConfigurationType=DynamicLibrary "\
57017        "/p:TargetName=freetype "\
57018        "/p:OutDir=\"$freetype_lib_path\" "\
57019        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57020    cmd /c freetype.bat
57021
57022    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57023      # If that succeeds we also build freetype.lib
57024      $ECHO -e "@echo off\n"\
57025          "$MSBUILD $vcxproj_path "\
57026          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57027          "/p:Configuration=\"Release Multithreaded\" "\
57028          "/p:Platform=$freetype_platform "\
57029          "/p:ConfigurationType=StaticLibrary "\
57030          "/p:TargetName=freetype "\
57031          "/p:OutDir=\"$freetype_lib_path\" "\
57032          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57033      cmd /c freetype.bat
57034
57035      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57036        # Once we build both, lib and dll, set freetype lib and include path appropriately
57037        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57038        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57039        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57040$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57041      else
57042        BUILD_FREETYPE=no
57043      fi
57044    else
57045      BUILD_FREETYPE=no
57046    fi
57047  fi
57048
57049        if test "x$BUILD_FREETYPE" = xyes; then
57050          # Okay, we built it. Check that it works.
57051
57052  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57053  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57054  METHOD="--with-freetype-src"
57055
57056  # Let's start with an optimistic view of the world :-)
57057  FOUND_FREETYPE=yes
57058
57059  # First look for the canonical freetype main include file ft2build.h.
57060  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57061    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57062    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57063    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57064      # Fail.
57065      FOUND_FREETYPE=no
57066    fi
57067  fi
57068
57069  if test "x$FOUND_FREETYPE" = xyes; then
57070    # Include file found, let's continue the sanity check.
57071    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57072$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57073
57074    # Reset to default value
57075    FREETYPE_BASE_NAME=freetype
57076    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57077    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57078      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57079          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57080        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57081        # for the .6 version explicitly.
57082        FREETYPE_BASE_NAME=freetype.6
57083        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57084        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57085$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57086      else
57087        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57088$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57089        FOUND_FREETYPE=no
57090      fi
57091    else
57092      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57093        # On Windows, we will need both .lib and .dll file.
57094        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57095          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57096$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57097          FOUND_FREETYPE=no
57098        fi
57099      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57100          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57101        # Found lib in isa dir, use that instead.
57102        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57103        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57104$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57105      fi
57106    fi
57107  fi
57108
57109  if test "x$FOUND_FREETYPE" = xyes; then
57110
57111  # Only process if variable expands to non-empty
57112
57113  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57114    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57115
57116  # Input might be given as Windows format, start by converting to
57117  # unix format.
57118  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57119  new_path=`$CYGPATH -u "$path"`
57120
57121  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57122  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57123  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57124  # "foo.exe" is OK but "foo" is an error.
57125  #
57126  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57127  # It is also a way to make sure we got the proper file name for the real test later on.
57128  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57129  if test "x$test_shortpath" = x; then
57130    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57131$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57132    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57133  fi
57134
57135  # Call helper function which possibly converts this using DOS-style short mode.
57136  # If so, the updated path is stored in $new_path.
57137
57138  input_path="$new_path"
57139  # Check if we need to convert this using DOS-style short mode. If the path
57140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57141  # take no chances and rewrite it.
57142  # Note: m4 eats our [], so we need to use [ and ] instead.
57143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57144  if test "x$has_forbidden_chars" != x; then
57145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57146    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57147    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57148    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57149      # Going to short mode and back again did indeed matter. Since short mode is
57150      # case insensitive, let's make it lowercase to improve readability.
57151      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57152      # Now convert it back to Unix-style (cygpath)
57153      input_path=`$CYGPATH -u "$shortmode_path"`
57154      new_path="$input_path"
57155    fi
57156  fi
57157
57158  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57159  if test "x$test_cygdrive_prefix" = x; then
57160    # As a simple fix, exclude /usr/bin since it's not a real path.
57161    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57162      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57163      # a path prefixed by /cygdrive for fixpath to work.
57164      new_path="$CYGWIN_ROOT_PATH$input_path"
57165    fi
57166  fi
57167
57168
57169  if test "x$path" != "x$new_path"; then
57170    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57172$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57173  fi
57174
57175    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57176
57177  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57178  has_colon=`$ECHO $path | $GREP ^.:`
57179  new_path="$path"
57180  if test "x$has_colon" = x; then
57181    # Not in mixed or Windows style, start by that.
57182    new_path=`cmd //c echo $path`
57183  fi
57184
57185
57186  input_path="$new_path"
57187  # Check if we need to convert this using DOS-style short mode. If the path
57188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57189  # take no chances and rewrite it.
57190  # Note: m4 eats our [], so we need to use [ and ] instead.
57191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57192  if test "x$has_forbidden_chars" != x; then
57193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57195  fi
57196
57197
57198  windows_path="$new_path"
57199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57200    unix_path=`$CYGPATH -u "$windows_path"`
57201    new_path="$unix_path"
57202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57204    new_path="$unix_path"
57205  fi
57206
57207  if test "x$path" != "x$new_path"; then
57208    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57210$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57211  fi
57212
57213  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57214  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57215
57216    else
57217      # We're on a unix platform. Hooray! :)
57218      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57219      has_space=`$ECHO "$path" | $GREP " "`
57220      if test "x$has_space" != x; then
57221        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57222$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57223        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57224      fi
57225
57226      # Use eval to expand a potential ~
57227      eval path="$path"
57228      if test ! -f "$path" && test ! -d "$path"; then
57229        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57230      fi
57231
57232      if test -d "$path"; then
57233        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57234      else
57235        dir="`$DIRNAME "$path"`"
57236        base="`$BASENAME "$path"`"
57237        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57238      fi
57239    fi
57240  fi
57241
57242
57243  # Only process if variable expands to non-empty
57244
57245  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57246    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57247
57248  # Input might be given as Windows format, start by converting to
57249  # unix format.
57250  path="$POTENTIAL_FREETYPE_LIB_PATH"
57251  new_path=`$CYGPATH -u "$path"`
57252
57253  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57254  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57255  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57256  # "foo.exe" is OK but "foo" is an error.
57257  #
57258  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57259  # It is also a way to make sure we got the proper file name for the real test later on.
57260  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57261  if test "x$test_shortpath" = x; then
57262    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57263$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57264    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57265  fi
57266
57267  # Call helper function which possibly converts this using DOS-style short mode.
57268  # If so, the updated path is stored in $new_path.
57269
57270  input_path="$new_path"
57271  # Check if we need to convert this using DOS-style short mode. If the path
57272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57273  # take no chances and rewrite it.
57274  # Note: m4 eats our [], so we need to use [ and ] instead.
57275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57276  if test "x$has_forbidden_chars" != x; then
57277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57278    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57279    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57280    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57281      # Going to short mode and back again did indeed matter. Since short mode is
57282      # case insensitive, let's make it lowercase to improve readability.
57283      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57284      # Now convert it back to Unix-style (cygpath)
57285      input_path=`$CYGPATH -u "$shortmode_path"`
57286      new_path="$input_path"
57287    fi
57288  fi
57289
57290  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57291  if test "x$test_cygdrive_prefix" = x; then
57292    # As a simple fix, exclude /usr/bin since it's not a real path.
57293    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57294      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57295      # a path prefixed by /cygdrive for fixpath to work.
57296      new_path="$CYGWIN_ROOT_PATH$input_path"
57297    fi
57298  fi
57299
57300
57301  if test "x$path" != "x$new_path"; then
57302    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57304$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57305  fi
57306
57307    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57308
57309  path="$POTENTIAL_FREETYPE_LIB_PATH"
57310  has_colon=`$ECHO $path | $GREP ^.:`
57311  new_path="$path"
57312  if test "x$has_colon" = x; then
57313    # Not in mixed or Windows style, start by that.
57314    new_path=`cmd //c echo $path`
57315  fi
57316
57317
57318  input_path="$new_path"
57319  # Check if we need to convert this using DOS-style short mode. If the path
57320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57321  # take no chances and rewrite it.
57322  # Note: m4 eats our [], so we need to use [ and ] instead.
57323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57324  if test "x$has_forbidden_chars" != x; then
57325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57326    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57327  fi
57328
57329
57330  windows_path="$new_path"
57331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57332    unix_path=`$CYGPATH -u "$windows_path"`
57333    new_path="$unix_path"
57334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57336    new_path="$unix_path"
57337  fi
57338
57339  if test "x$path" != "x$new_path"; then
57340    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57342$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57343  fi
57344
57345  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57346  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57347
57348    else
57349      # We're on a unix platform. Hooray! :)
57350      path="$POTENTIAL_FREETYPE_LIB_PATH"
57351      has_space=`$ECHO "$path" | $GREP " "`
57352      if test "x$has_space" != x; then
57353        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57354$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57355        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57356      fi
57357
57358      # Use eval to expand a potential ~
57359      eval path="$path"
57360      if test ! -f "$path" && test ! -d "$path"; then
57361        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57362      fi
57363
57364      if test -d "$path"; then
57365        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57366      else
57367        dir="`$DIRNAME "$path"`"
57368        base="`$BASENAME "$path"`"
57369        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57370      fi
57371    fi
57372  fi
57373
57374
57375    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57376    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57377$as_echo_n "checking for freetype includes... " >&6; }
57378    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57379$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57380    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57381    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57382$as_echo_n "checking for freetype libraries... " >&6; }
57383    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57384$as_echo "$FREETYPE_LIB_PATH" >&6; }
57385  fi
57386
57387          if test "x$FOUND_FREETYPE" != xyes; then
57388            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57389          fi
57390        else
57391          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57392$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57393          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57394        fi
57395      else
57396        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57397$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57398      fi
57399    fi
57400
57401    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57402      # User has specified settings
57403
57404      if test "x$BUNDLE_FREETYPE" = x; then
57405        # If not specified, default is to bundle freetype
57406        BUNDLE_FREETYPE=yes
57407      fi
57408
57409      if test "x$with_freetype" != x; then
57410        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57411        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57412      fi
57413
57414      # Allow --with-freetype-lib and --with-freetype-include to override
57415      if test "x$with_freetype_include" != x; then
57416        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57417      fi
57418      if test "x$with_freetype_lib" != x; then
57419        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57420      fi
57421
57422      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57423        # Okay, we got it. Check that it works.
57424
57425  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57426  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57427  METHOD="--with-freetype"
57428
57429  # Let's start with an optimistic view of the world :-)
57430  FOUND_FREETYPE=yes
57431
57432  # First look for the canonical freetype main include file ft2build.h.
57433  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57434    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57435    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57436    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57437      # Fail.
57438      FOUND_FREETYPE=no
57439    fi
57440  fi
57441
57442  if test "x$FOUND_FREETYPE" = xyes; then
57443    # Include file found, let's continue the sanity check.
57444    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57445$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57446
57447    # Reset to default value
57448    FREETYPE_BASE_NAME=freetype
57449    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57450    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57451      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57452          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57453        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57454        # for the .6 version explicitly.
57455        FREETYPE_BASE_NAME=freetype.6
57456        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57457        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57458$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57459      else
57460        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57461$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57462        FOUND_FREETYPE=no
57463      fi
57464    else
57465      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57466        # On Windows, we will need both .lib and .dll file.
57467        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57468          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57469$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57470          FOUND_FREETYPE=no
57471        fi
57472      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57473          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57474        # Found lib in isa dir, use that instead.
57475        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57476        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57477$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57478      fi
57479    fi
57480  fi
57481
57482  if test "x$FOUND_FREETYPE" = xyes; then
57483
57484  # Only process if variable expands to non-empty
57485
57486  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57487    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57488
57489  # Input might be given as Windows format, start by converting to
57490  # unix format.
57491  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57492  new_path=`$CYGPATH -u "$path"`
57493
57494  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57495  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57496  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57497  # "foo.exe" is OK but "foo" is an error.
57498  #
57499  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57500  # It is also a way to make sure we got the proper file name for the real test later on.
57501  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57502  if test "x$test_shortpath" = x; then
57503    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57504$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57505    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57506  fi
57507
57508  # Call helper function which possibly converts this using DOS-style short mode.
57509  # If so, the updated path is stored in $new_path.
57510
57511  input_path="$new_path"
57512  # Check if we need to convert this using DOS-style short mode. If the path
57513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57514  # take no chances and rewrite it.
57515  # Note: m4 eats our [], so we need to use [ and ] instead.
57516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57517  if test "x$has_forbidden_chars" != x; then
57518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57519    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57520    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57521    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57522      # Going to short mode and back again did indeed matter. Since short mode is
57523      # case insensitive, let's make it lowercase to improve readability.
57524      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57525      # Now convert it back to Unix-style (cygpath)
57526      input_path=`$CYGPATH -u "$shortmode_path"`
57527      new_path="$input_path"
57528    fi
57529  fi
57530
57531  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57532  if test "x$test_cygdrive_prefix" = x; then
57533    # As a simple fix, exclude /usr/bin since it's not a real path.
57534    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57535      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57536      # a path prefixed by /cygdrive for fixpath to work.
57537      new_path="$CYGWIN_ROOT_PATH$input_path"
57538    fi
57539  fi
57540
57541
57542  if test "x$path" != "x$new_path"; then
57543    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57544    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57545$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57546  fi
57547
57548    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57549
57550  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57551  has_colon=`$ECHO $path | $GREP ^.:`
57552  new_path="$path"
57553  if test "x$has_colon" = x; then
57554    # Not in mixed or Windows style, start by that.
57555    new_path=`cmd //c echo $path`
57556  fi
57557
57558
57559  input_path="$new_path"
57560  # Check if we need to convert this using DOS-style short mode. If the path
57561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57562  # take no chances and rewrite it.
57563  # Note: m4 eats our [], so we need to use [ and ] instead.
57564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57565  if test "x$has_forbidden_chars" != x; then
57566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57567    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57568  fi
57569
57570
57571  windows_path="$new_path"
57572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57573    unix_path=`$CYGPATH -u "$windows_path"`
57574    new_path="$unix_path"
57575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57577    new_path="$unix_path"
57578  fi
57579
57580  if test "x$path" != "x$new_path"; then
57581    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57582    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57583$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57584  fi
57585
57586  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57587  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57588
57589    else
57590      # We're on a unix platform. Hooray! :)
57591      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57592      has_space=`$ECHO "$path" | $GREP " "`
57593      if test "x$has_space" != x; then
57594        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57595$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57596        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57597      fi
57598
57599      # Use eval to expand a potential ~
57600      eval path="$path"
57601      if test ! -f "$path" && test ! -d "$path"; then
57602        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57603      fi
57604
57605      if test -d "$path"; then
57606        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57607      else
57608        dir="`$DIRNAME "$path"`"
57609        base="`$BASENAME "$path"`"
57610        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57611      fi
57612    fi
57613  fi
57614
57615
57616  # Only process if variable expands to non-empty
57617
57618  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57619    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57620
57621  # Input might be given as Windows format, start by converting to
57622  # unix format.
57623  path="$POTENTIAL_FREETYPE_LIB_PATH"
57624  new_path=`$CYGPATH -u "$path"`
57625
57626  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57627  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57628  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57629  # "foo.exe" is OK but "foo" is an error.
57630  #
57631  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57632  # It is also a way to make sure we got the proper file name for the real test later on.
57633  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57634  if test "x$test_shortpath" = x; then
57635    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57636$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57637    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57638  fi
57639
57640  # Call helper function which possibly converts this using DOS-style short mode.
57641  # If so, the updated path is stored in $new_path.
57642
57643  input_path="$new_path"
57644  # Check if we need to convert this using DOS-style short mode. If the path
57645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57646  # take no chances and rewrite it.
57647  # Note: m4 eats our [], so we need to use [ and ] instead.
57648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57649  if test "x$has_forbidden_chars" != x; then
57650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57651    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57652    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57653    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57654      # Going to short mode and back again did indeed matter. Since short mode is
57655      # case insensitive, let's make it lowercase to improve readability.
57656      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57657      # Now convert it back to Unix-style (cygpath)
57658      input_path=`$CYGPATH -u "$shortmode_path"`
57659      new_path="$input_path"
57660    fi
57661  fi
57662
57663  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57664  if test "x$test_cygdrive_prefix" = x; then
57665    # As a simple fix, exclude /usr/bin since it's not a real path.
57666    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57667      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57668      # a path prefixed by /cygdrive for fixpath to work.
57669      new_path="$CYGWIN_ROOT_PATH$input_path"
57670    fi
57671  fi
57672
57673
57674  if test "x$path" != "x$new_path"; then
57675    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57676    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57677$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57678  fi
57679
57680    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57681
57682  path="$POTENTIAL_FREETYPE_LIB_PATH"
57683  has_colon=`$ECHO $path | $GREP ^.:`
57684  new_path="$path"
57685  if test "x$has_colon" = x; then
57686    # Not in mixed or Windows style, start by that.
57687    new_path=`cmd //c echo $path`
57688  fi
57689
57690
57691  input_path="$new_path"
57692  # Check if we need to convert this using DOS-style short mode. If the path
57693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57694  # take no chances and rewrite it.
57695  # Note: m4 eats our [], so we need to use [ and ] instead.
57696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57697  if test "x$has_forbidden_chars" != x; then
57698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57699    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57700  fi
57701
57702
57703  windows_path="$new_path"
57704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57705    unix_path=`$CYGPATH -u "$windows_path"`
57706    new_path="$unix_path"
57707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57709    new_path="$unix_path"
57710  fi
57711
57712  if test "x$path" != "x$new_path"; then
57713    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57714    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57715$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57716  fi
57717
57718  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57719  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57720
57721    else
57722      # We're on a unix platform. Hooray! :)
57723      path="$POTENTIAL_FREETYPE_LIB_PATH"
57724      has_space=`$ECHO "$path" | $GREP " "`
57725      if test "x$has_space" != x; then
57726        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57727$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57728        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57729      fi
57730
57731      # Use eval to expand a potential ~
57732      eval path="$path"
57733      if test ! -f "$path" && test ! -d "$path"; then
57734        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57735      fi
57736
57737      if test -d "$path"; then
57738        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57739      else
57740        dir="`$DIRNAME "$path"`"
57741        base="`$BASENAME "$path"`"
57742        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57743      fi
57744    fi
57745  fi
57746
57747
57748    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57749    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57750$as_echo_n "checking for freetype includes... " >&6; }
57751    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57752$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57753    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57754    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57755$as_echo_n "checking for freetype libraries... " >&6; }
57756    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57757$as_echo "$FREETYPE_LIB_PATH" >&6; }
57758  fi
57759
57760        if test "x$FOUND_FREETYPE" != xyes; then
57761          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57762        fi
57763      else
57764        # User specified only one of lib or include. This is an error.
57765        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57766          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57767$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57768          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57769        else
57770          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57771$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57772          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57773        fi
57774      fi
57775    else
57776      # User did not specify settings, but we need freetype. Try to locate it.
57777
57778      if test "x$BUNDLE_FREETYPE" = x; then
57779        # If not specified, default is to bundle freetype only on windows
57780        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57781          BUNDLE_FREETYPE=yes
57782        else
57783          BUNDLE_FREETYPE=no
57784        fi
57785      fi
57786
57787      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57788      if test "x$SYSROOT" = x; then
57789        if test "x$FOUND_FREETYPE" != xyes; then
57790          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57791          if test "x$PKG_CONFIG" != x; then
57792
57793pkg_failed=no
57794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57795$as_echo_n "checking for FREETYPE... " >&6; }
57796
57797if test -n "$FREETYPE_CFLAGS"; then
57798    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57799 elif test -n "$PKG_CONFIG"; then
57800    if test -n "$PKG_CONFIG" && \
57801    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57802  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57803  ac_status=$?
57804  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57805  test $ac_status = 0; }; then
57806  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57807else
57808  pkg_failed=yes
57809fi
57810 else
57811    pkg_failed=untried
57812fi
57813if test -n "$FREETYPE_LIBS"; then
57814    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57815 elif test -n "$PKG_CONFIG"; then
57816    if test -n "$PKG_CONFIG" && \
57817    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57818  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57819  ac_status=$?
57820  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57821  test $ac_status = 0; }; then
57822  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57823else
57824  pkg_failed=yes
57825fi
57826 else
57827    pkg_failed=untried
57828fi
57829
57830
57831
57832if test $pkg_failed = yes; then
57833
57834if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57835        _pkg_short_errors_supported=yes
57836else
57837        _pkg_short_errors_supported=no
57838fi
57839        if test $_pkg_short_errors_supported = yes; then
57840	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57841        else
57842	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57843        fi
57844	# Put the nasty error message in config.log where it belongs
57845	echo "$FREETYPE_PKG_ERRORS" >&5
57846
57847	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57848$as_echo "no" >&6; }
57849                FOUND_FREETYPE=no
57850elif test $pkg_failed = untried; then
57851	FOUND_FREETYPE=no
57852else
57853	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57854	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57855        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57856$as_echo "yes" >&6; }
57857	FOUND_FREETYPE=yes
57858fi
57859            if test "x$FOUND_FREETYPE" = xyes; then
57860              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57861              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57862              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57863              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57864                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57865              fi
57866              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57867              if test "x$BUNDLE_FREETYPE" = xyes; then
57868                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57869$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57870                FOUND_FREETYPE=no
57871              else
57872                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57873$as_echo_n "checking for freetype... " >&6; }
57874                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57875$as_echo "yes (using pkg-config)" >&6; }
57876              fi
57877            fi
57878          fi
57879        fi
57880      fi
57881
57882      if test "x$FOUND_FREETYPE" != xyes; then
57883        # Check in well-known locations
57884        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57885          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57886
57887  windows_path="$FREETYPE_BASE_DIR"
57888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57889    unix_path=`$CYGPATH -u "$windows_path"`
57890    FREETYPE_BASE_DIR="$unix_path"
57891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57893    FREETYPE_BASE_DIR="$unix_path"
57894  fi
57895
57896
57897  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57898  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57899  METHOD="well-known location"
57900
57901  # Let's start with an optimistic view of the world :-)
57902  FOUND_FREETYPE=yes
57903
57904  # First look for the canonical freetype main include file ft2build.h.
57905  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57906    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57907    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57908    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57909      # Fail.
57910      FOUND_FREETYPE=no
57911    fi
57912  fi
57913
57914  if test "x$FOUND_FREETYPE" = xyes; then
57915    # Include file found, let's continue the sanity check.
57916    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57917$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57918
57919    # Reset to default value
57920    FREETYPE_BASE_NAME=freetype
57921    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57922    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57923      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57924          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57925        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57926        # for the .6 version explicitly.
57927        FREETYPE_BASE_NAME=freetype.6
57928        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57929        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57930$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57931      else
57932        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57933$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57934        FOUND_FREETYPE=no
57935      fi
57936    else
57937      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57938        # On Windows, we will need both .lib and .dll file.
57939        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57940          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57941$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57942          FOUND_FREETYPE=no
57943        fi
57944      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57945          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57946        # Found lib in isa dir, use that instead.
57947        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57948        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57949$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57950      fi
57951    fi
57952  fi
57953
57954  if test "x$FOUND_FREETYPE" = xyes; then
57955
57956  # Only process if variable expands to non-empty
57957
57958  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57959    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57960
57961  # Input might be given as Windows format, start by converting to
57962  # unix format.
57963  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57964  new_path=`$CYGPATH -u "$path"`
57965
57966  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57967  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57968  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57969  # "foo.exe" is OK but "foo" is an error.
57970  #
57971  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57972  # It is also a way to make sure we got the proper file name for the real test later on.
57973  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57974  if test "x$test_shortpath" = x; then
57975    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57976$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57977    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57978  fi
57979
57980  # Call helper function which possibly converts this using DOS-style short mode.
57981  # If so, the updated path is stored in $new_path.
57982
57983  input_path="$new_path"
57984  # Check if we need to convert this using DOS-style short mode. If the path
57985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57986  # take no chances and rewrite it.
57987  # Note: m4 eats our [], so we need to use [ and ] instead.
57988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57989  if test "x$has_forbidden_chars" != x; then
57990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57991    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57992    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57993    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57994      # Going to short mode and back again did indeed matter. Since short mode is
57995      # case insensitive, let's make it lowercase to improve readability.
57996      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57997      # Now convert it back to Unix-style (cygpath)
57998      input_path=`$CYGPATH -u "$shortmode_path"`
57999      new_path="$input_path"
58000    fi
58001  fi
58002
58003  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58004  if test "x$test_cygdrive_prefix" = x; then
58005    # As a simple fix, exclude /usr/bin since it's not a real path.
58006    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58007      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58008      # a path prefixed by /cygdrive for fixpath to work.
58009      new_path="$CYGWIN_ROOT_PATH$input_path"
58010    fi
58011  fi
58012
58013
58014  if test "x$path" != "x$new_path"; then
58015    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58017$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58018  fi
58019
58020    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58021
58022  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58023  has_colon=`$ECHO $path | $GREP ^.:`
58024  new_path="$path"
58025  if test "x$has_colon" = x; then
58026    # Not in mixed or Windows style, start by that.
58027    new_path=`cmd //c echo $path`
58028  fi
58029
58030
58031  input_path="$new_path"
58032  # Check if we need to convert this using DOS-style short mode. If the path
58033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58034  # take no chances and rewrite it.
58035  # Note: m4 eats our [], so we need to use [ and ] instead.
58036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58037  if test "x$has_forbidden_chars" != x; then
58038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58039    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58040  fi
58041
58042
58043  windows_path="$new_path"
58044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58045    unix_path=`$CYGPATH -u "$windows_path"`
58046    new_path="$unix_path"
58047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58049    new_path="$unix_path"
58050  fi
58051
58052  if test "x$path" != "x$new_path"; then
58053    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58054    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58055$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58056  fi
58057
58058  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58059  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58060
58061    else
58062      # We're on a unix platform. Hooray! :)
58063      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58064      has_space=`$ECHO "$path" | $GREP " "`
58065      if test "x$has_space" != x; then
58066        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58067$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58068        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58069      fi
58070
58071      # Use eval to expand a potential ~
58072      eval path="$path"
58073      if test ! -f "$path" && test ! -d "$path"; then
58074        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58075      fi
58076
58077      if test -d "$path"; then
58078        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58079      else
58080        dir="`$DIRNAME "$path"`"
58081        base="`$BASENAME "$path"`"
58082        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58083      fi
58084    fi
58085  fi
58086
58087
58088  # Only process if variable expands to non-empty
58089
58090  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58091    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58092
58093  # Input might be given as Windows format, start by converting to
58094  # unix format.
58095  path="$POTENTIAL_FREETYPE_LIB_PATH"
58096  new_path=`$CYGPATH -u "$path"`
58097
58098  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58099  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58100  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58101  # "foo.exe" is OK but "foo" is an error.
58102  #
58103  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58104  # It is also a way to make sure we got the proper file name for the real test later on.
58105  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58106  if test "x$test_shortpath" = x; then
58107    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58108$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58109    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58110  fi
58111
58112  # Call helper function which possibly converts this using DOS-style short mode.
58113  # If so, the updated path is stored in $new_path.
58114
58115  input_path="$new_path"
58116  # Check if we need to convert this using DOS-style short mode. If the path
58117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58118  # take no chances and rewrite it.
58119  # Note: m4 eats our [], so we need to use [ and ] instead.
58120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58121  if test "x$has_forbidden_chars" != x; then
58122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58123    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58124    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58125    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58126      # Going to short mode and back again did indeed matter. Since short mode is
58127      # case insensitive, let's make it lowercase to improve readability.
58128      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58129      # Now convert it back to Unix-style (cygpath)
58130      input_path=`$CYGPATH -u "$shortmode_path"`
58131      new_path="$input_path"
58132    fi
58133  fi
58134
58135  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58136  if test "x$test_cygdrive_prefix" = x; then
58137    # As a simple fix, exclude /usr/bin since it's not a real path.
58138    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58139      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58140      # a path prefixed by /cygdrive for fixpath to work.
58141      new_path="$CYGWIN_ROOT_PATH$input_path"
58142    fi
58143  fi
58144
58145
58146  if test "x$path" != "x$new_path"; then
58147    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58149$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58150  fi
58151
58152    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58153
58154  path="$POTENTIAL_FREETYPE_LIB_PATH"
58155  has_colon=`$ECHO $path | $GREP ^.:`
58156  new_path="$path"
58157  if test "x$has_colon" = x; then
58158    # Not in mixed or Windows style, start by that.
58159    new_path=`cmd //c echo $path`
58160  fi
58161
58162
58163  input_path="$new_path"
58164  # Check if we need to convert this using DOS-style short mode. If the path
58165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58166  # take no chances and rewrite it.
58167  # Note: m4 eats our [], so we need to use [ and ] instead.
58168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58169  if test "x$has_forbidden_chars" != x; then
58170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58171    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58172  fi
58173
58174
58175  windows_path="$new_path"
58176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58177    unix_path=`$CYGPATH -u "$windows_path"`
58178    new_path="$unix_path"
58179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58181    new_path="$unix_path"
58182  fi
58183
58184  if test "x$path" != "x$new_path"; then
58185    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58186    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58187$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58188  fi
58189
58190  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58191  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58192
58193    else
58194      # We're on a unix platform. Hooray! :)
58195      path="$POTENTIAL_FREETYPE_LIB_PATH"
58196      has_space=`$ECHO "$path" | $GREP " "`
58197      if test "x$has_space" != x; then
58198        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58199$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58200        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58201      fi
58202
58203      # Use eval to expand a potential ~
58204      eval path="$path"
58205      if test ! -f "$path" && test ! -d "$path"; then
58206        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58207      fi
58208
58209      if test -d "$path"; then
58210        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58211      else
58212        dir="`$DIRNAME "$path"`"
58213        base="`$BASENAME "$path"`"
58214        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58215      fi
58216    fi
58217  fi
58218
58219
58220    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58221    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58222$as_echo_n "checking for freetype includes... " >&6; }
58223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58224$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58225    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58226    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58227$as_echo_n "checking for freetype libraries... " >&6; }
58228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58229$as_echo "$FREETYPE_LIB_PATH" >&6; }
58230  fi
58231
58232          if test "x$FOUND_FREETYPE" != xyes; then
58233            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58234
58235  windows_path="$FREETYPE_BASE_DIR"
58236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58237    unix_path=`$CYGPATH -u "$windows_path"`
58238    FREETYPE_BASE_DIR="$unix_path"
58239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58241    FREETYPE_BASE_DIR="$unix_path"
58242  fi
58243
58244
58245  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58246  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58247  METHOD="well-known location"
58248
58249  # Let's start with an optimistic view of the world :-)
58250  FOUND_FREETYPE=yes
58251
58252  # First look for the canonical freetype main include file ft2build.h.
58253  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58254    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58255    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58256    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58257      # Fail.
58258      FOUND_FREETYPE=no
58259    fi
58260  fi
58261
58262  if test "x$FOUND_FREETYPE" = xyes; then
58263    # Include file found, let's continue the sanity check.
58264    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58265$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58266
58267    # Reset to default value
58268    FREETYPE_BASE_NAME=freetype
58269    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58270    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58271      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58272          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58273        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58274        # for the .6 version explicitly.
58275        FREETYPE_BASE_NAME=freetype.6
58276        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58277        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58278$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58279      else
58280        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58281$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58282        FOUND_FREETYPE=no
58283      fi
58284    else
58285      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58286        # On Windows, we will need both .lib and .dll file.
58287        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58288          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58289$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58290          FOUND_FREETYPE=no
58291        fi
58292      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58293          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58294        # Found lib in isa dir, use that instead.
58295        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58296        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58297$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58298      fi
58299    fi
58300  fi
58301
58302  if test "x$FOUND_FREETYPE" = xyes; then
58303
58304  # Only process if variable expands to non-empty
58305
58306  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58307    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58308
58309  # Input might be given as Windows format, start by converting to
58310  # unix format.
58311  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58312  new_path=`$CYGPATH -u "$path"`
58313
58314  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58315  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58316  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58317  # "foo.exe" is OK but "foo" is an error.
58318  #
58319  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58320  # It is also a way to make sure we got the proper file name for the real test later on.
58321  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58322  if test "x$test_shortpath" = x; then
58323    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58324$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58325    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58326  fi
58327
58328  # Call helper function which possibly converts this using DOS-style short mode.
58329  # If so, the updated path is stored in $new_path.
58330
58331  input_path="$new_path"
58332  # Check if we need to convert this using DOS-style short mode. If the path
58333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58334  # take no chances and rewrite it.
58335  # Note: m4 eats our [], so we need to use [ and ] instead.
58336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58337  if test "x$has_forbidden_chars" != x; then
58338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58339    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58340    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58341    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58342      # Going to short mode and back again did indeed matter. Since short mode is
58343      # case insensitive, let's make it lowercase to improve readability.
58344      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58345      # Now convert it back to Unix-style (cygpath)
58346      input_path=`$CYGPATH -u "$shortmode_path"`
58347      new_path="$input_path"
58348    fi
58349  fi
58350
58351  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58352  if test "x$test_cygdrive_prefix" = x; then
58353    # As a simple fix, exclude /usr/bin since it's not a real path.
58354    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58355      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58356      # a path prefixed by /cygdrive for fixpath to work.
58357      new_path="$CYGWIN_ROOT_PATH$input_path"
58358    fi
58359  fi
58360
58361
58362  if test "x$path" != "x$new_path"; then
58363    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58365$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58366  fi
58367
58368    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58369
58370  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58371  has_colon=`$ECHO $path | $GREP ^.:`
58372  new_path="$path"
58373  if test "x$has_colon" = x; then
58374    # Not in mixed or Windows style, start by that.
58375    new_path=`cmd //c echo $path`
58376  fi
58377
58378
58379  input_path="$new_path"
58380  # Check if we need to convert this using DOS-style short mode. If the path
58381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58382  # take no chances and rewrite it.
58383  # Note: m4 eats our [], so we need to use [ and ] instead.
58384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58385  if test "x$has_forbidden_chars" != x; then
58386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58387    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58388  fi
58389
58390
58391  windows_path="$new_path"
58392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58393    unix_path=`$CYGPATH -u "$windows_path"`
58394    new_path="$unix_path"
58395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58397    new_path="$unix_path"
58398  fi
58399
58400  if test "x$path" != "x$new_path"; then
58401    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58403$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58404  fi
58405
58406  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58407  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58408
58409    else
58410      # We're on a unix platform. Hooray! :)
58411      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58412      has_space=`$ECHO "$path" | $GREP " "`
58413      if test "x$has_space" != x; then
58414        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58415$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58416        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58417      fi
58418
58419      # Use eval to expand a potential ~
58420      eval path="$path"
58421      if test ! -f "$path" && test ! -d "$path"; then
58422        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58423      fi
58424
58425      if test -d "$path"; then
58426        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58427      else
58428        dir="`$DIRNAME "$path"`"
58429        base="`$BASENAME "$path"`"
58430        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58431      fi
58432    fi
58433  fi
58434
58435
58436  # Only process if variable expands to non-empty
58437
58438  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58439    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58440
58441  # Input might be given as Windows format, start by converting to
58442  # unix format.
58443  path="$POTENTIAL_FREETYPE_LIB_PATH"
58444  new_path=`$CYGPATH -u "$path"`
58445
58446  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58447  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58448  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58449  # "foo.exe" is OK but "foo" is an error.
58450  #
58451  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58452  # It is also a way to make sure we got the proper file name for the real test later on.
58453  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58454  if test "x$test_shortpath" = x; then
58455    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58456$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58457    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58458  fi
58459
58460  # Call helper function which possibly converts this using DOS-style short mode.
58461  # If so, the updated path is stored in $new_path.
58462
58463  input_path="$new_path"
58464  # Check if we need to convert this using DOS-style short mode. If the path
58465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58466  # take no chances and rewrite it.
58467  # Note: m4 eats our [], so we need to use [ and ] instead.
58468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58469  if test "x$has_forbidden_chars" != x; then
58470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58471    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58472    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58473    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58474      # Going to short mode and back again did indeed matter. Since short mode is
58475      # case insensitive, let's make it lowercase to improve readability.
58476      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58477      # Now convert it back to Unix-style (cygpath)
58478      input_path=`$CYGPATH -u "$shortmode_path"`
58479      new_path="$input_path"
58480    fi
58481  fi
58482
58483  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58484  if test "x$test_cygdrive_prefix" = x; then
58485    # As a simple fix, exclude /usr/bin since it's not a real path.
58486    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58487      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58488      # a path prefixed by /cygdrive for fixpath to work.
58489      new_path="$CYGWIN_ROOT_PATH$input_path"
58490    fi
58491  fi
58492
58493
58494  if test "x$path" != "x$new_path"; then
58495    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58497$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58498  fi
58499
58500    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58501
58502  path="$POTENTIAL_FREETYPE_LIB_PATH"
58503  has_colon=`$ECHO $path | $GREP ^.:`
58504  new_path="$path"
58505  if test "x$has_colon" = x; then
58506    # Not in mixed or Windows style, start by that.
58507    new_path=`cmd //c echo $path`
58508  fi
58509
58510
58511  input_path="$new_path"
58512  # Check if we need to convert this using DOS-style short mode. If the path
58513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58514  # take no chances and rewrite it.
58515  # Note: m4 eats our [], so we need to use [ and ] instead.
58516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58517  if test "x$has_forbidden_chars" != x; then
58518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58519    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58520  fi
58521
58522
58523  windows_path="$new_path"
58524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58525    unix_path=`$CYGPATH -u "$windows_path"`
58526    new_path="$unix_path"
58527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58529    new_path="$unix_path"
58530  fi
58531
58532  if test "x$path" != "x$new_path"; then
58533    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58535$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58536  fi
58537
58538  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58539  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58540
58541    else
58542      # We're on a unix platform. Hooray! :)
58543      path="$POTENTIAL_FREETYPE_LIB_PATH"
58544      has_space=`$ECHO "$path" | $GREP " "`
58545      if test "x$has_space" != x; then
58546        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58547$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58548        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58549      fi
58550
58551      # Use eval to expand a potential ~
58552      eval path="$path"
58553      if test ! -f "$path" && test ! -d "$path"; then
58554        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58555      fi
58556
58557      if test -d "$path"; then
58558        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58559      else
58560        dir="`$DIRNAME "$path"`"
58561        base="`$BASENAME "$path"`"
58562        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58563      fi
58564    fi
58565  fi
58566
58567
58568    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58569    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58570$as_echo_n "checking for freetype includes... " >&6; }
58571    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58572$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58573    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58574    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58575$as_echo_n "checking for freetype libraries... " >&6; }
58576    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58577$as_echo "$FREETYPE_LIB_PATH" >&6; }
58578  fi
58579
58580          fi
58581          if test "x$FOUND_FREETYPE" != xyes; then
58582            FREETYPE_BASE_DIR="$HOME/freetype"
58583
58584  windows_path="$FREETYPE_BASE_DIR"
58585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58586    unix_path=`$CYGPATH -u "$windows_path"`
58587    FREETYPE_BASE_DIR="$unix_path"
58588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58590    FREETYPE_BASE_DIR="$unix_path"
58591  fi
58592
58593            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58594
58595  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58596  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58597  METHOD="well-known location"
58598
58599  # Let's start with an optimistic view of the world :-)
58600  FOUND_FREETYPE=yes
58601
58602  # First look for the canonical freetype main include file ft2build.h.
58603  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58604    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58605    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58606    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58607      # Fail.
58608      FOUND_FREETYPE=no
58609    fi
58610  fi
58611
58612  if test "x$FOUND_FREETYPE" = xyes; then
58613    # Include file found, let's continue the sanity check.
58614    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58615$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58616
58617    # Reset to default value
58618    FREETYPE_BASE_NAME=freetype
58619    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58620    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58621      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58622          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58623        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58624        # for the .6 version explicitly.
58625        FREETYPE_BASE_NAME=freetype.6
58626        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58627        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58628$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58629      else
58630        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58631$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58632        FOUND_FREETYPE=no
58633      fi
58634    else
58635      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58636        # On Windows, we will need both .lib and .dll file.
58637        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58638          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58639$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58640          FOUND_FREETYPE=no
58641        fi
58642      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58643          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58644        # Found lib in isa dir, use that instead.
58645        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58646        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58647$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58648      fi
58649    fi
58650  fi
58651
58652  if test "x$FOUND_FREETYPE" = xyes; then
58653
58654  # Only process if variable expands to non-empty
58655
58656  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58657    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58658
58659  # Input might be given as Windows format, start by converting to
58660  # unix format.
58661  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58662  new_path=`$CYGPATH -u "$path"`
58663
58664  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58665  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58666  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58667  # "foo.exe" is OK but "foo" is an error.
58668  #
58669  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58670  # It is also a way to make sure we got the proper file name for the real test later on.
58671  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58672  if test "x$test_shortpath" = x; then
58673    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58674$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58675    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58676  fi
58677
58678  # Call helper function which possibly converts this using DOS-style short mode.
58679  # If so, the updated path is stored in $new_path.
58680
58681  input_path="$new_path"
58682  # Check if we need to convert this using DOS-style short mode. If the path
58683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58684  # take no chances and rewrite it.
58685  # Note: m4 eats our [], so we need to use [ and ] instead.
58686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58687  if test "x$has_forbidden_chars" != x; then
58688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58689    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58690    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58691    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58692      # Going to short mode and back again did indeed matter. Since short mode is
58693      # case insensitive, let's make it lowercase to improve readability.
58694      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58695      # Now convert it back to Unix-style (cygpath)
58696      input_path=`$CYGPATH -u "$shortmode_path"`
58697      new_path="$input_path"
58698    fi
58699  fi
58700
58701  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58702  if test "x$test_cygdrive_prefix" = x; then
58703    # As a simple fix, exclude /usr/bin since it's not a real path.
58704    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58705      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58706      # a path prefixed by /cygdrive for fixpath to work.
58707      new_path="$CYGWIN_ROOT_PATH$input_path"
58708    fi
58709  fi
58710
58711
58712  if test "x$path" != "x$new_path"; then
58713    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58714    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58715$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58716  fi
58717
58718    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58719
58720  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58721  has_colon=`$ECHO $path | $GREP ^.:`
58722  new_path="$path"
58723  if test "x$has_colon" = x; then
58724    # Not in mixed or Windows style, start by that.
58725    new_path=`cmd //c echo $path`
58726  fi
58727
58728
58729  input_path="$new_path"
58730  # Check if we need to convert this using DOS-style short mode. If the path
58731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58732  # take no chances and rewrite it.
58733  # Note: m4 eats our [], so we need to use [ and ] instead.
58734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58735  if test "x$has_forbidden_chars" != x; then
58736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58737    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58738  fi
58739
58740
58741  windows_path="$new_path"
58742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58743    unix_path=`$CYGPATH -u "$windows_path"`
58744    new_path="$unix_path"
58745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58747    new_path="$unix_path"
58748  fi
58749
58750  if test "x$path" != "x$new_path"; then
58751    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58753$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58754  fi
58755
58756  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58757  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58758
58759    else
58760      # We're on a unix platform. Hooray! :)
58761      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58762      has_space=`$ECHO "$path" | $GREP " "`
58763      if test "x$has_space" != x; then
58764        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58765$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58766        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58767      fi
58768
58769      # Use eval to expand a potential ~
58770      eval path="$path"
58771      if test ! -f "$path" && test ! -d "$path"; then
58772        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58773      fi
58774
58775      if test -d "$path"; then
58776        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58777      else
58778        dir="`$DIRNAME "$path"`"
58779        base="`$BASENAME "$path"`"
58780        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58781      fi
58782    fi
58783  fi
58784
58785
58786  # Only process if variable expands to non-empty
58787
58788  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58789    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58790
58791  # Input might be given as Windows format, start by converting to
58792  # unix format.
58793  path="$POTENTIAL_FREETYPE_LIB_PATH"
58794  new_path=`$CYGPATH -u "$path"`
58795
58796  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58797  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58798  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58799  # "foo.exe" is OK but "foo" is an error.
58800  #
58801  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58802  # It is also a way to make sure we got the proper file name for the real test later on.
58803  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58804  if test "x$test_shortpath" = x; then
58805    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58806$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58807    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58808  fi
58809
58810  # Call helper function which possibly converts this using DOS-style short mode.
58811  # If so, the updated path is stored in $new_path.
58812
58813  input_path="$new_path"
58814  # Check if we need to convert this using DOS-style short mode. If the path
58815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58816  # take no chances and rewrite it.
58817  # Note: m4 eats our [], so we need to use [ and ] instead.
58818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58819  if test "x$has_forbidden_chars" != x; then
58820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58824      # Going to short mode and back again did indeed matter. Since short mode is
58825      # case insensitive, let's make it lowercase to improve readability.
58826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58827      # Now convert it back to Unix-style (cygpath)
58828      input_path=`$CYGPATH -u "$shortmode_path"`
58829      new_path="$input_path"
58830    fi
58831  fi
58832
58833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58834  if test "x$test_cygdrive_prefix" = x; then
58835    # As a simple fix, exclude /usr/bin since it's not a real path.
58836    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58838      # a path prefixed by /cygdrive for fixpath to work.
58839      new_path="$CYGWIN_ROOT_PATH$input_path"
58840    fi
58841  fi
58842
58843
58844  if test "x$path" != "x$new_path"; then
58845    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58847$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58848  fi
58849
58850    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58851
58852  path="$POTENTIAL_FREETYPE_LIB_PATH"
58853  has_colon=`$ECHO $path | $GREP ^.:`
58854  new_path="$path"
58855  if test "x$has_colon" = x; then
58856    # Not in mixed or Windows style, start by that.
58857    new_path=`cmd //c echo $path`
58858  fi
58859
58860
58861  input_path="$new_path"
58862  # Check if we need to convert this using DOS-style short mode. If the path
58863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58864  # take no chances and rewrite it.
58865  # Note: m4 eats our [], so we need to use [ and ] instead.
58866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58867  if test "x$has_forbidden_chars" != x; then
58868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58869    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58870  fi
58871
58872
58873  windows_path="$new_path"
58874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58875    unix_path=`$CYGPATH -u "$windows_path"`
58876    new_path="$unix_path"
58877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58879    new_path="$unix_path"
58880  fi
58881
58882  if test "x$path" != "x$new_path"; then
58883    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58885$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58886  fi
58887
58888  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58889  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58890
58891    else
58892      # We're on a unix platform. Hooray! :)
58893      path="$POTENTIAL_FREETYPE_LIB_PATH"
58894      has_space=`$ECHO "$path" | $GREP " "`
58895      if test "x$has_space" != x; then
58896        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58897$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58898        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58899      fi
58900
58901      # Use eval to expand a potential ~
58902      eval path="$path"
58903      if test ! -f "$path" && test ! -d "$path"; then
58904        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58905      fi
58906
58907      if test -d "$path"; then
58908        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58909      else
58910        dir="`$DIRNAME "$path"`"
58911        base="`$BASENAME "$path"`"
58912        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58913      fi
58914    fi
58915  fi
58916
58917
58918    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58919    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58920$as_echo_n "checking for freetype includes... " >&6; }
58921    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58922$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58923    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58924    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58925$as_echo_n "checking for freetype libraries... " >&6; }
58926    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58927$as_echo "$FREETYPE_LIB_PATH" >&6; }
58928  fi
58929
58930            else
58931
58932  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58933  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58934  METHOD="well-known location"
58935
58936  # Let's start with an optimistic view of the world :-)
58937  FOUND_FREETYPE=yes
58938
58939  # First look for the canonical freetype main include file ft2build.h.
58940  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58941    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58942    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58943    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58944      # Fail.
58945      FOUND_FREETYPE=no
58946    fi
58947  fi
58948
58949  if test "x$FOUND_FREETYPE" = xyes; then
58950    # Include file found, let's continue the sanity check.
58951    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58952$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58953
58954    # Reset to default value
58955    FREETYPE_BASE_NAME=freetype
58956    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58957    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58958      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58959          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58960        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58961        # for the .6 version explicitly.
58962        FREETYPE_BASE_NAME=freetype.6
58963        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58964        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58965$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58966      else
58967        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58968$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58969        FOUND_FREETYPE=no
58970      fi
58971    else
58972      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58973        # On Windows, we will need both .lib and .dll file.
58974        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58975          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58976$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58977          FOUND_FREETYPE=no
58978        fi
58979      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58980          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58981        # Found lib in isa dir, use that instead.
58982        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58983        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58984$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58985      fi
58986    fi
58987  fi
58988
58989  if test "x$FOUND_FREETYPE" = xyes; then
58990
58991  # Only process if variable expands to non-empty
58992
58993  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58994    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58995
58996  # Input might be given as Windows format, start by converting to
58997  # unix format.
58998  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58999  new_path=`$CYGPATH -u "$path"`
59000
59001  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59002  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59003  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59004  # "foo.exe" is OK but "foo" is an error.
59005  #
59006  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59007  # It is also a way to make sure we got the proper file name for the real test later on.
59008  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59009  if test "x$test_shortpath" = x; then
59010    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59011$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59012    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59013  fi
59014
59015  # Call helper function which possibly converts this using DOS-style short mode.
59016  # If so, the updated path is stored in $new_path.
59017
59018  input_path="$new_path"
59019  # Check if we need to convert this using DOS-style short mode. If the path
59020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59021  # take no chances and rewrite it.
59022  # Note: m4 eats our [], so we need to use [ and ] instead.
59023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59024  if test "x$has_forbidden_chars" != x; then
59025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59026    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59027    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59028    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59029      # Going to short mode and back again did indeed matter. Since short mode is
59030      # case insensitive, let's make it lowercase to improve readability.
59031      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59032      # Now convert it back to Unix-style (cygpath)
59033      input_path=`$CYGPATH -u "$shortmode_path"`
59034      new_path="$input_path"
59035    fi
59036  fi
59037
59038  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59039  if test "x$test_cygdrive_prefix" = x; then
59040    # As a simple fix, exclude /usr/bin since it's not a real path.
59041    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59042      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59043      # a path prefixed by /cygdrive for fixpath to work.
59044      new_path="$CYGWIN_ROOT_PATH$input_path"
59045    fi
59046  fi
59047
59048
59049  if test "x$path" != "x$new_path"; then
59050    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59052$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59053  fi
59054
59055    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59056
59057  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59058  has_colon=`$ECHO $path | $GREP ^.:`
59059  new_path="$path"
59060  if test "x$has_colon" = x; then
59061    # Not in mixed or Windows style, start by that.
59062    new_path=`cmd //c echo $path`
59063  fi
59064
59065
59066  input_path="$new_path"
59067  # Check if we need to convert this using DOS-style short mode. If the path
59068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59069  # take no chances and rewrite it.
59070  # Note: m4 eats our [], so we need to use [ and ] instead.
59071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59072  if test "x$has_forbidden_chars" != x; then
59073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59074    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59075  fi
59076
59077
59078  windows_path="$new_path"
59079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59080    unix_path=`$CYGPATH -u "$windows_path"`
59081    new_path="$unix_path"
59082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59084    new_path="$unix_path"
59085  fi
59086
59087  if test "x$path" != "x$new_path"; then
59088    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59089    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59090$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59091  fi
59092
59093  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59094  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59095
59096    else
59097      # We're on a unix platform. Hooray! :)
59098      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59099      has_space=`$ECHO "$path" | $GREP " "`
59100      if test "x$has_space" != x; then
59101        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59102$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59103        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59104      fi
59105
59106      # Use eval to expand a potential ~
59107      eval path="$path"
59108      if test ! -f "$path" && test ! -d "$path"; then
59109        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59110      fi
59111
59112      if test -d "$path"; then
59113        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59114      else
59115        dir="`$DIRNAME "$path"`"
59116        base="`$BASENAME "$path"`"
59117        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59118      fi
59119    fi
59120  fi
59121
59122
59123  # Only process if variable expands to non-empty
59124
59125  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59126    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59127
59128  # Input might be given as Windows format, start by converting to
59129  # unix format.
59130  path="$POTENTIAL_FREETYPE_LIB_PATH"
59131  new_path=`$CYGPATH -u "$path"`
59132
59133  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59134  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59135  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59136  # "foo.exe" is OK but "foo" is an error.
59137  #
59138  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59139  # It is also a way to make sure we got the proper file name for the real test later on.
59140  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59141  if test "x$test_shortpath" = x; then
59142    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59143$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59144    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59145  fi
59146
59147  # Call helper function which possibly converts this using DOS-style short mode.
59148  # If so, the updated path is stored in $new_path.
59149
59150  input_path="$new_path"
59151  # Check if we need to convert this using DOS-style short mode. If the path
59152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59153  # take no chances and rewrite it.
59154  # Note: m4 eats our [], so we need to use [ and ] instead.
59155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59156  if test "x$has_forbidden_chars" != x; then
59157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59158    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59159    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59160    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59161      # Going to short mode and back again did indeed matter. Since short mode is
59162      # case insensitive, let's make it lowercase to improve readability.
59163      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59164      # Now convert it back to Unix-style (cygpath)
59165      input_path=`$CYGPATH -u "$shortmode_path"`
59166      new_path="$input_path"
59167    fi
59168  fi
59169
59170  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59171  if test "x$test_cygdrive_prefix" = x; then
59172    # As a simple fix, exclude /usr/bin since it's not a real path.
59173    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59174      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59175      # a path prefixed by /cygdrive for fixpath to work.
59176      new_path="$CYGWIN_ROOT_PATH$input_path"
59177    fi
59178  fi
59179
59180
59181  if test "x$path" != "x$new_path"; then
59182    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59184$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59185  fi
59186
59187    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59188
59189  path="$POTENTIAL_FREETYPE_LIB_PATH"
59190  has_colon=`$ECHO $path | $GREP ^.:`
59191  new_path="$path"
59192  if test "x$has_colon" = x; then
59193    # Not in mixed or Windows style, start by that.
59194    new_path=`cmd //c echo $path`
59195  fi
59196
59197
59198  input_path="$new_path"
59199  # Check if we need to convert this using DOS-style short mode. If the path
59200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59201  # take no chances and rewrite it.
59202  # Note: m4 eats our [], so we need to use [ and ] instead.
59203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59204  if test "x$has_forbidden_chars" != x; then
59205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59207  fi
59208
59209
59210  windows_path="$new_path"
59211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59212    unix_path=`$CYGPATH -u "$windows_path"`
59213    new_path="$unix_path"
59214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59216    new_path="$unix_path"
59217  fi
59218
59219  if test "x$path" != "x$new_path"; then
59220    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59222$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59223  fi
59224
59225  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59226  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59227
59228    else
59229      # We're on a unix platform. Hooray! :)
59230      path="$POTENTIAL_FREETYPE_LIB_PATH"
59231      has_space=`$ECHO "$path" | $GREP " "`
59232      if test "x$has_space" != x; then
59233        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59234$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59235        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59236      fi
59237
59238      # Use eval to expand a potential ~
59239      eval path="$path"
59240      if test ! -f "$path" && test ! -d "$path"; then
59241        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59242      fi
59243
59244      if test -d "$path"; then
59245        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59246      else
59247        dir="`$DIRNAME "$path"`"
59248        base="`$BASENAME "$path"`"
59249        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59250      fi
59251    fi
59252  fi
59253
59254
59255    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59256    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59257$as_echo_n "checking for freetype includes... " >&6; }
59258    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59259$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59260    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59261    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59262$as_echo_n "checking for freetype libraries... " >&6; }
59263    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59264$as_echo "$FREETYPE_LIB_PATH" >&6; }
59265  fi
59266
59267            fi
59268            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59269                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59270              # Source is available, as a last resort try to build freetype in default location
59271
59272  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59273  BUILD_FREETYPE=yes
59274
59275  # Check if the freetype sources are acessible..
59276  if ! test -d $FREETYPE_SRC_PATH; then
59277    { $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
59278$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59279    BUILD_FREETYPE=no
59280  fi
59281  # ..and contain a vc2010 project file
59282  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59283  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59284    { $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
59285$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59286    BUILD_FREETYPE=no
59287  fi
59288  # Now check if configure found a version of 'msbuild.exe'
59289  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59290    { $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
59291$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;}
59292    BUILD_FREETYPE=no
59293  fi
59294
59295  # Ready to go..
59296  if test "x$BUILD_FREETYPE" = xyes; then
59297    # msbuild requires trailing slashes for output directories
59298    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59299    freetype_lib_path_unix="$freetype_lib_path"
59300    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59301
59302  unix_path="$vcxproj_path"
59303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59304    windows_path=`$CYGPATH -m "$unix_path"`
59305    vcxproj_path="$windows_path"
59306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59307    windows_path=`cmd //c echo $unix_path`
59308    vcxproj_path="$windows_path"
59309  fi
59310
59311
59312  unix_path="$freetype_lib_path"
59313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59314    windows_path=`$CYGPATH -m "$unix_path"`
59315    freetype_lib_path="$windows_path"
59316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59317    windows_path=`cmd //c echo $unix_path`
59318    freetype_lib_path="$windows_path"
59319  fi
59320
59321
59322  unix_path="$freetype_obj_path"
59323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59324    windows_path=`$CYGPATH -m "$unix_path"`
59325    freetype_obj_path="$windows_path"
59326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59327    windows_path=`cmd //c echo $unix_path`
59328    freetype_obj_path="$windows_path"
59329  fi
59330
59331    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59332      freetype_platform=x64
59333    else
59334      freetype_platform=win32
59335    fi
59336
59337    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59338    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59339    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59340    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59341    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59342$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59343
59344    # First we try to build the freetype.dll
59345    $ECHO -e "@echo off\n"\
59346        "$MSBUILD $vcxproj_path "\
59347        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59348        "/p:Configuration=\"Release Multithreaded\" "\
59349        "/p:Platform=$freetype_platform "\
59350        "/p:ConfigurationType=DynamicLibrary "\
59351        "/p:TargetName=freetype "\
59352        "/p:OutDir=\"$freetype_lib_path\" "\
59353        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59354    cmd /c freetype.bat
59355
59356    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59357      # If that succeeds we also build freetype.lib
59358      $ECHO -e "@echo off\n"\
59359          "$MSBUILD $vcxproj_path "\
59360          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59361          "/p:Configuration=\"Release Multithreaded\" "\
59362          "/p:Platform=$freetype_platform "\
59363          "/p:ConfigurationType=StaticLibrary "\
59364          "/p:TargetName=freetype "\
59365          "/p:OutDir=\"$freetype_lib_path\" "\
59366          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59367      cmd /c freetype.bat
59368
59369      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59370        # Once we build both, lib and dll, set freetype lib and include path appropriately
59371        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59372        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59373        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59374$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59375      else
59376        BUILD_FREETYPE=no
59377      fi
59378    else
59379      BUILD_FREETYPE=no
59380    fi
59381  fi
59382
59383              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59384
59385  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59386  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59387  METHOD="well-known location"
59388
59389  # Let's start with an optimistic view of the world :-)
59390  FOUND_FREETYPE=yes
59391
59392  # First look for the canonical freetype main include file ft2build.h.
59393  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59394    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59395    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59396    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59397      # Fail.
59398      FOUND_FREETYPE=no
59399    fi
59400  fi
59401
59402  if test "x$FOUND_FREETYPE" = xyes; then
59403    # Include file found, let's continue the sanity check.
59404    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59405$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59406
59407    # Reset to default value
59408    FREETYPE_BASE_NAME=freetype
59409    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59410    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59411      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59412          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59413        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59414        # for the .6 version explicitly.
59415        FREETYPE_BASE_NAME=freetype.6
59416        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59417        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59418$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59419      else
59420        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59421$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59422        FOUND_FREETYPE=no
59423      fi
59424    else
59425      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59426        # On Windows, we will need both .lib and .dll file.
59427        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59428          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59429$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59430          FOUND_FREETYPE=no
59431        fi
59432      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59433          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59434        # Found lib in isa dir, use that instead.
59435        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59436        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59437$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59438      fi
59439    fi
59440  fi
59441
59442  if test "x$FOUND_FREETYPE" = xyes; then
59443
59444  # Only process if variable expands to non-empty
59445
59446  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59447    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59448
59449  # Input might be given as Windows format, start by converting to
59450  # unix format.
59451  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59452  new_path=`$CYGPATH -u "$path"`
59453
59454  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59455  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59456  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59457  # "foo.exe" is OK but "foo" is an error.
59458  #
59459  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59460  # It is also a way to make sure we got the proper file name for the real test later on.
59461  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59462  if test "x$test_shortpath" = x; then
59463    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59464$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59465    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59466  fi
59467
59468  # Call helper function which possibly converts this using DOS-style short mode.
59469  # If so, the updated path is stored in $new_path.
59470
59471  input_path="$new_path"
59472  # Check if we need to convert this using DOS-style short mode. If the path
59473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59474  # take no chances and rewrite it.
59475  # Note: m4 eats our [], so we need to use [ and ] instead.
59476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59477  if test "x$has_forbidden_chars" != x; then
59478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59479    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59480    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59481    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59482      # Going to short mode and back again did indeed matter. Since short mode is
59483      # case insensitive, let's make it lowercase to improve readability.
59484      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59485      # Now convert it back to Unix-style (cygpath)
59486      input_path=`$CYGPATH -u "$shortmode_path"`
59487      new_path="$input_path"
59488    fi
59489  fi
59490
59491  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59492  if test "x$test_cygdrive_prefix" = x; then
59493    # As a simple fix, exclude /usr/bin since it's not a real path.
59494    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59495      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59496      # a path prefixed by /cygdrive for fixpath to work.
59497      new_path="$CYGWIN_ROOT_PATH$input_path"
59498    fi
59499  fi
59500
59501
59502  if test "x$path" != "x$new_path"; then
59503    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59505$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59506  fi
59507
59508    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59509
59510  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59511  has_colon=`$ECHO $path | $GREP ^.:`
59512  new_path="$path"
59513  if test "x$has_colon" = x; then
59514    # Not in mixed or Windows style, start by that.
59515    new_path=`cmd //c echo $path`
59516  fi
59517
59518
59519  input_path="$new_path"
59520  # Check if we need to convert this using DOS-style short mode. If the path
59521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59522  # take no chances and rewrite it.
59523  # Note: m4 eats our [], so we need to use [ and ] instead.
59524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59525  if test "x$has_forbidden_chars" != x; then
59526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59527    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59528  fi
59529
59530
59531  windows_path="$new_path"
59532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59533    unix_path=`$CYGPATH -u "$windows_path"`
59534    new_path="$unix_path"
59535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59537    new_path="$unix_path"
59538  fi
59539
59540  if test "x$path" != "x$new_path"; then
59541    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59543$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59544  fi
59545
59546  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59547  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59548
59549    else
59550      # We're on a unix platform. Hooray! :)
59551      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59552      has_space=`$ECHO "$path" | $GREP " "`
59553      if test "x$has_space" != x; then
59554        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59555$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59556        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59557      fi
59558
59559      # Use eval to expand a potential ~
59560      eval path="$path"
59561      if test ! -f "$path" && test ! -d "$path"; then
59562        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59563      fi
59564
59565      if test -d "$path"; then
59566        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59567      else
59568        dir="`$DIRNAME "$path"`"
59569        base="`$BASENAME "$path"`"
59570        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59571      fi
59572    fi
59573  fi
59574
59575
59576  # Only process if variable expands to non-empty
59577
59578  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59579    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59580
59581  # Input might be given as Windows format, start by converting to
59582  # unix format.
59583  path="$POTENTIAL_FREETYPE_LIB_PATH"
59584  new_path=`$CYGPATH -u "$path"`
59585
59586  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59587  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59588  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59589  # "foo.exe" is OK but "foo" is an error.
59590  #
59591  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59592  # It is also a way to make sure we got the proper file name for the real test later on.
59593  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59594  if test "x$test_shortpath" = x; then
59595    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59596$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59597    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59598  fi
59599
59600  # Call helper function which possibly converts this using DOS-style short mode.
59601  # If so, the updated path is stored in $new_path.
59602
59603  input_path="$new_path"
59604  # Check if we need to convert this using DOS-style short mode. If the path
59605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59606  # take no chances and rewrite it.
59607  # Note: m4 eats our [], so we need to use [ and ] instead.
59608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59609  if test "x$has_forbidden_chars" != x; then
59610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59614      # Going to short mode and back again did indeed matter. Since short mode is
59615      # case insensitive, let's make it lowercase to improve readability.
59616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59617      # Now convert it back to Unix-style (cygpath)
59618      input_path=`$CYGPATH -u "$shortmode_path"`
59619      new_path="$input_path"
59620    fi
59621  fi
59622
59623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59624  if test "x$test_cygdrive_prefix" = x; then
59625    # As a simple fix, exclude /usr/bin since it's not a real path.
59626    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59628      # a path prefixed by /cygdrive for fixpath to work.
59629      new_path="$CYGWIN_ROOT_PATH$input_path"
59630    fi
59631  fi
59632
59633
59634  if test "x$path" != "x$new_path"; then
59635    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59637$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59638  fi
59639
59640    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59641
59642  path="$POTENTIAL_FREETYPE_LIB_PATH"
59643  has_colon=`$ECHO $path | $GREP ^.:`
59644  new_path="$path"
59645  if test "x$has_colon" = x; then
59646    # Not in mixed or Windows style, start by that.
59647    new_path=`cmd //c echo $path`
59648  fi
59649
59650
59651  input_path="$new_path"
59652  # Check if we need to convert this using DOS-style short mode. If the path
59653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59654  # take no chances and rewrite it.
59655  # Note: m4 eats our [], so we need to use [ and ] instead.
59656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59657  if test "x$has_forbidden_chars" != x; then
59658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59659    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59660  fi
59661
59662
59663  windows_path="$new_path"
59664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59665    unix_path=`$CYGPATH -u "$windows_path"`
59666    new_path="$unix_path"
59667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59669    new_path="$unix_path"
59670  fi
59671
59672  if test "x$path" != "x$new_path"; then
59673    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59675$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59676  fi
59677
59678  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59679  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59680
59681    else
59682      # We're on a unix platform. Hooray! :)
59683      path="$POTENTIAL_FREETYPE_LIB_PATH"
59684      has_space=`$ECHO "$path" | $GREP " "`
59685      if test "x$has_space" != x; then
59686        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59687$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59688        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59689      fi
59690
59691      # Use eval to expand a potential ~
59692      eval path="$path"
59693      if test ! -f "$path" && test ! -d "$path"; then
59694        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59695      fi
59696
59697      if test -d "$path"; then
59698        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59699      else
59700        dir="`$DIRNAME "$path"`"
59701        base="`$BASENAME "$path"`"
59702        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59703      fi
59704    fi
59705  fi
59706
59707
59708    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59710$as_echo_n "checking for freetype includes... " >&6; }
59711    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59712$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59713    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59714    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59715$as_echo_n "checking for freetype libraries... " >&6; }
59716    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59717$as_echo "$FREETYPE_LIB_PATH" >&6; }
59718  fi
59719
59720              else
59721
59722  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59723  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59724  METHOD="well-known location"
59725
59726  # Let's start with an optimistic view of the world :-)
59727  FOUND_FREETYPE=yes
59728
59729  # First look for the canonical freetype main include file ft2build.h.
59730  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59731    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59732    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59733    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59734      # Fail.
59735      FOUND_FREETYPE=no
59736    fi
59737  fi
59738
59739  if test "x$FOUND_FREETYPE" = xyes; then
59740    # Include file found, let's continue the sanity check.
59741    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59742$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59743
59744    # Reset to default value
59745    FREETYPE_BASE_NAME=freetype
59746    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59747    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59748      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59749          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59750        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59751        # for the .6 version explicitly.
59752        FREETYPE_BASE_NAME=freetype.6
59753        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59754        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59755$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59756      else
59757        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59758$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59759        FOUND_FREETYPE=no
59760      fi
59761    else
59762      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59763        # On Windows, we will need both .lib and .dll file.
59764        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59765          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59766$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59767          FOUND_FREETYPE=no
59768        fi
59769      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59770          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59771        # Found lib in isa dir, use that instead.
59772        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59773        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59774$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59775      fi
59776    fi
59777  fi
59778
59779  if test "x$FOUND_FREETYPE" = xyes; then
59780
59781  # Only process if variable expands to non-empty
59782
59783  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59784    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59785
59786  # Input might be given as Windows format, start by converting to
59787  # unix format.
59788  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59789  new_path=`$CYGPATH -u "$path"`
59790
59791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59794  # "foo.exe" is OK but "foo" is an error.
59795  #
59796  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59797  # It is also a way to make sure we got the proper file name for the real test later on.
59798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59799  if test "x$test_shortpath" = x; then
59800    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59801$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59802    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59803  fi
59804
59805  # Call helper function which possibly converts this using DOS-style short mode.
59806  # If so, the updated path is stored in $new_path.
59807
59808  input_path="$new_path"
59809  # Check if we need to convert this using DOS-style short mode. If the path
59810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59811  # take no chances and rewrite it.
59812  # Note: m4 eats our [], so we need to use [ and ] instead.
59813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59814  if test "x$has_forbidden_chars" != x; then
59815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59819      # Going to short mode and back again did indeed matter. Since short mode is
59820      # case insensitive, let's make it lowercase to improve readability.
59821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59822      # Now convert it back to Unix-style (cygpath)
59823      input_path=`$CYGPATH -u "$shortmode_path"`
59824      new_path="$input_path"
59825    fi
59826  fi
59827
59828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59829  if test "x$test_cygdrive_prefix" = x; then
59830    # As a simple fix, exclude /usr/bin since it's not a real path.
59831    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59833      # a path prefixed by /cygdrive for fixpath to work.
59834      new_path="$CYGWIN_ROOT_PATH$input_path"
59835    fi
59836  fi
59837
59838
59839  if test "x$path" != "x$new_path"; then
59840    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59842$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59843  fi
59844
59845    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59846
59847  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59848  has_colon=`$ECHO $path | $GREP ^.:`
59849  new_path="$path"
59850  if test "x$has_colon" = x; then
59851    # Not in mixed or Windows style, start by that.
59852    new_path=`cmd //c echo $path`
59853  fi
59854
59855
59856  input_path="$new_path"
59857  # Check if we need to convert this using DOS-style short mode. If the path
59858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59859  # take no chances and rewrite it.
59860  # Note: m4 eats our [], so we need to use [ and ] instead.
59861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59862  if test "x$has_forbidden_chars" != x; then
59863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59865  fi
59866
59867
59868  windows_path="$new_path"
59869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59870    unix_path=`$CYGPATH -u "$windows_path"`
59871    new_path="$unix_path"
59872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59874    new_path="$unix_path"
59875  fi
59876
59877  if test "x$path" != "x$new_path"; then
59878    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59880$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59881  fi
59882
59883  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59884  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59885
59886    else
59887      # We're on a unix platform. Hooray! :)
59888      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59889      has_space=`$ECHO "$path" | $GREP " "`
59890      if test "x$has_space" != x; then
59891        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59892$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59893        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59894      fi
59895
59896      # Use eval to expand a potential ~
59897      eval path="$path"
59898      if test ! -f "$path" && test ! -d "$path"; then
59899        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59900      fi
59901
59902      if test -d "$path"; then
59903        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59904      else
59905        dir="`$DIRNAME "$path"`"
59906        base="`$BASENAME "$path"`"
59907        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59908      fi
59909    fi
59910  fi
59911
59912
59913  # Only process if variable expands to non-empty
59914
59915  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59916    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59917
59918  # Input might be given as Windows format, start by converting to
59919  # unix format.
59920  path="$POTENTIAL_FREETYPE_LIB_PATH"
59921  new_path=`$CYGPATH -u "$path"`
59922
59923  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59924  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59925  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59926  # "foo.exe" is OK but "foo" is an error.
59927  #
59928  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59929  # It is also a way to make sure we got the proper file name for the real test later on.
59930  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59931  if test "x$test_shortpath" = x; then
59932    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59933$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59934    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59935  fi
59936
59937  # Call helper function which possibly converts this using DOS-style short mode.
59938  # If so, the updated path is stored in $new_path.
59939
59940  input_path="$new_path"
59941  # Check if we need to convert this using DOS-style short mode. If the path
59942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59943  # take no chances and rewrite it.
59944  # Note: m4 eats our [], so we need to use [ and ] instead.
59945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59946  if test "x$has_forbidden_chars" != x; then
59947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59948    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59949    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59950    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59951      # Going to short mode and back again did indeed matter. Since short mode is
59952      # case insensitive, let's make it lowercase to improve readability.
59953      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59954      # Now convert it back to Unix-style (cygpath)
59955      input_path=`$CYGPATH -u "$shortmode_path"`
59956      new_path="$input_path"
59957    fi
59958  fi
59959
59960  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59961  if test "x$test_cygdrive_prefix" = x; then
59962    # As a simple fix, exclude /usr/bin since it's not a real path.
59963    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59964      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59965      # a path prefixed by /cygdrive for fixpath to work.
59966      new_path="$CYGWIN_ROOT_PATH$input_path"
59967    fi
59968  fi
59969
59970
59971  if test "x$path" != "x$new_path"; then
59972    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59973    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59974$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59975  fi
59976
59977    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59978
59979  path="$POTENTIAL_FREETYPE_LIB_PATH"
59980  has_colon=`$ECHO $path | $GREP ^.:`
59981  new_path="$path"
59982  if test "x$has_colon" = x; then
59983    # Not in mixed or Windows style, start by that.
59984    new_path=`cmd //c echo $path`
59985  fi
59986
59987
59988  input_path="$new_path"
59989  # Check if we need to convert this using DOS-style short mode. If the path
59990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59991  # take no chances and rewrite it.
59992  # Note: m4 eats our [], so we need to use [ and ] instead.
59993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59994  if test "x$has_forbidden_chars" != x; then
59995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59996    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59997  fi
59998
59999
60000  windows_path="$new_path"
60001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60002    unix_path=`$CYGPATH -u "$windows_path"`
60003    new_path="$unix_path"
60004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60006    new_path="$unix_path"
60007  fi
60008
60009  if test "x$path" != "x$new_path"; then
60010    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60012$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60013  fi
60014
60015  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60016  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60017
60018    else
60019      # We're on a unix platform. Hooray! :)
60020      path="$POTENTIAL_FREETYPE_LIB_PATH"
60021      has_space=`$ECHO "$path" | $GREP " "`
60022      if test "x$has_space" != x; then
60023        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60024$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60025        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60026      fi
60027
60028      # Use eval to expand a potential ~
60029      eval path="$path"
60030      if test ! -f "$path" && test ! -d "$path"; then
60031        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60032      fi
60033
60034      if test -d "$path"; then
60035        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60036      else
60037        dir="`$DIRNAME "$path"`"
60038        base="`$BASENAME "$path"`"
60039        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60040      fi
60041    fi
60042  fi
60043
60044
60045    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60046    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60047$as_echo_n "checking for freetype includes... " >&6; }
60048    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60049$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60050    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60051    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60052$as_echo_n "checking for freetype libraries... " >&6; }
60053    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60054$as_echo "$FREETYPE_LIB_PATH" >&6; }
60055  fi
60056
60057              fi
60058            fi
60059          fi
60060        else
60061          FREETYPE_BASE_DIR="$SYSROOT/usr"
60062
60063  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60064  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60065  METHOD="well-known location"
60066
60067  # Let's start with an optimistic view of the world :-)
60068  FOUND_FREETYPE=yes
60069
60070  # First look for the canonical freetype main include file ft2build.h.
60071  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60072    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60073    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60074    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60075      # Fail.
60076      FOUND_FREETYPE=no
60077    fi
60078  fi
60079
60080  if test "x$FOUND_FREETYPE" = xyes; then
60081    # Include file found, let's continue the sanity check.
60082    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60083$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60084
60085    # Reset to default value
60086    FREETYPE_BASE_NAME=freetype
60087    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60088    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60089      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60090          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60091        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60092        # for the .6 version explicitly.
60093        FREETYPE_BASE_NAME=freetype.6
60094        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60095        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60096$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60097      else
60098        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60099$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60100        FOUND_FREETYPE=no
60101      fi
60102    else
60103      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60104        # On Windows, we will need both .lib and .dll file.
60105        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60106          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60107$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60108          FOUND_FREETYPE=no
60109        fi
60110      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60111          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60112        # Found lib in isa dir, use that instead.
60113        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60114        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60115$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60116      fi
60117    fi
60118  fi
60119
60120  if test "x$FOUND_FREETYPE" = xyes; then
60121
60122  # Only process if variable expands to non-empty
60123
60124  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60125    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60126
60127  # Input might be given as Windows format, start by converting to
60128  # unix format.
60129  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60130  new_path=`$CYGPATH -u "$path"`
60131
60132  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60133  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60134  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60135  # "foo.exe" is OK but "foo" is an error.
60136  #
60137  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60138  # It is also a way to make sure we got the proper file name for the real test later on.
60139  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60140  if test "x$test_shortpath" = x; then
60141    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60142$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60143    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60144  fi
60145
60146  # Call helper function which possibly converts this using DOS-style short mode.
60147  # If so, the updated path is stored in $new_path.
60148
60149  input_path="$new_path"
60150  # Check if we need to convert this using DOS-style short mode. If the path
60151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60152  # take no chances and rewrite it.
60153  # Note: m4 eats our [], so we need to use [ and ] instead.
60154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60155  if test "x$has_forbidden_chars" != x; then
60156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60157    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60158    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60159    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60160      # Going to short mode and back again did indeed matter. Since short mode is
60161      # case insensitive, let's make it lowercase to improve readability.
60162      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60163      # Now convert it back to Unix-style (cygpath)
60164      input_path=`$CYGPATH -u "$shortmode_path"`
60165      new_path="$input_path"
60166    fi
60167  fi
60168
60169  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60170  if test "x$test_cygdrive_prefix" = x; then
60171    # As a simple fix, exclude /usr/bin since it's not a real path.
60172    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60173      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60174      # a path prefixed by /cygdrive for fixpath to work.
60175      new_path="$CYGWIN_ROOT_PATH$input_path"
60176    fi
60177  fi
60178
60179
60180  if test "x$path" != "x$new_path"; then
60181    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60182    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60183$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60184  fi
60185
60186    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60187
60188  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60189  has_colon=`$ECHO $path | $GREP ^.:`
60190  new_path="$path"
60191  if test "x$has_colon" = x; then
60192    # Not in mixed or Windows style, start by that.
60193    new_path=`cmd //c echo $path`
60194  fi
60195
60196
60197  input_path="$new_path"
60198  # Check if we need to convert this using DOS-style short mode. If the path
60199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60200  # take no chances and rewrite it.
60201  # Note: m4 eats our [], so we need to use [ and ] instead.
60202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60203  if test "x$has_forbidden_chars" != x; then
60204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60205    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60206  fi
60207
60208
60209  windows_path="$new_path"
60210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60211    unix_path=`$CYGPATH -u "$windows_path"`
60212    new_path="$unix_path"
60213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60215    new_path="$unix_path"
60216  fi
60217
60218  if test "x$path" != "x$new_path"; then
60219    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60220    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60221$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60222  fi
60223
60224  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60225  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60226
60227    else
60228      # We're on a unix platform. Hooray! :)
60229      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60230      has_space=`$ECHO "$path" | $GREP " "`
60231      if test "x$has_space" != x; then
60232        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60233$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60234        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60235      fi
60236
60237      # Use eval to expand a potential ~
60238      eval path="$path"
60239      if test ! -f "$path" && test ! -d "$path"; then
60240        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60241      fi
60242
60243      if test -d "$path"; then
60244        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60245      else
60246        dir="`$DIRNAME "$path"`"
60247        base="`$BASENAME "$path"`"
60248        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60249      fi
60250    fi
60251  fi
60252
60253
60254  # Only process if variable expands to non-empty
60255
60256  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60257    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60258
60259  # Input might be given as Windows format, start by converting to
60260  # unix format.
60261  path="$POTENTIAL_FREETYPE_LIB_PATH"
60262  new_path=`$CYGPATH -u "$path"`
60263
60264  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60265  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60266  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60267  # "foo.exe" is OK but "foo" is an error.
60268  #
60269  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60270  # It is also a way to make sure we got the proper file name for the real test later on.
60271  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60272  if test "x$test_shortpath" = x; then
60273    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60274$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60275    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60276  fi
60277
60278  # Call helper function which possibly converts this using DOS-style short mode.
60279  # If so, the updated path is stored in $new_path.
60280
60281  input_path="$new_path"
60282  # Check if we need to convert this using DOS-style short mode. If the path
60283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60284  # take no chances and rewrite it.
60285  # Note: m4 eats our [], so we need to use [ and ] instead.
60286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60287  if test "x$has_forbidden_chars" != x; then
60288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60289    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60290    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60291    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60292      # Going to short mode and back again did indeed matter. Since short mode is
60293      # case insensitive, let's make it lowercase to improve readability.
60294      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60295      # Now convert it back to Unix-style (cygpath)
60296      input_path=`$CYGPATH -u "$shortmode_path"`
60297      new_path="$input_path"
60298    fi
60299  fi
60300
60301  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60302  if test "x$test_cygdrive_prefix" = x; then
60303    # As a simple fix, exclude /usr/bin since it's not a real path.
60304    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60305      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60306      # a path prefixed by /cygdrive for fixpath to work.
60307      new_path="$CYGWIN_ROOT_PATH$input_path"
60308    fi
60309  fi
60310
60311
60312  if test "x$path" != "x$new_path"; then
60313    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60315$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60316  fi
60317
60318    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60319
60320  path="$POTENTIAL_FREETYPE_LIB_PATH"
60321  has_colon=`$ECHO $path | $GREP ^.:`
60322  new_path="$path"
60323  if test "x$has_colon" = x; then
60324    # Not in mixed or Windows style, start by that.
60325    new_path=`cmd //c echo $path`
60326  fi
60327
60328
60329  input_path="$new_path"
60330  # Check if we need to convert this using DOS-style short mode. If the path
60331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60332  # take no chances and rewrite it.
60333  # Note: m4 eats our [], so we need to use [ and ] instead.
60334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60335  if test "x$has_forbidden_chars" != x; then
60336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60337    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60338  fi
60339
60340
60341  windows_path="$new_path"
60342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60343    unix_path=`$CYGPATH -u "$windows_path"`
60344    new_path="$unix_path"
60345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60347    new_path="$unix_path"
60348  fi
60349
60350  if test "x$path" != "x$new_path"; then
60351    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60353$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60354  fi
60355
60356  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60357  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60358
60359    else
60360      # We're on a unix platform. Hooray! :)
60361      path="$POTENTIAL_FREETYPE_LIB_PATH"
60362      has_space=`$ECHO "$path" | $GREP " "`
60363      if test "x$has_space" != x; then
60364        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60365$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60366        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60367      fi
60368
60369      # Use eval to expand a potential ~
60370      eval path="$path"
60371      if test ! -f "$path" && test ! -d "$path"; then
60372        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60373      fi
60374
60375      if test -d "$path"; then
60376        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60377      else
60378        dir="`$DIRNAME "$path"`"
60379        base="`$BASENAME "$path"`"
60380        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60381      fi
60382    fi
60383  fi
60384
60385
60386    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60387    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60388$as_echo_n "checking for freetype includes... " >&6; }
60389    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60390$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60391    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60392    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60393$as_echo_n "checking for freetype libraries... " >&6; }
60394    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60395$as_echo "$FREETYPE_LIB_PATH" >&6; }
60396  fi
60397
60398
60399          if test "x$FOUND_FREETYPE" != xyes; then
60400            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60401
60402  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60403  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60404  METHOD="well-known location"
60405
60406  # Let's start with an optimistic view of the world :-)
60407  FOUND_FREETYPE=yes
60408
60409  # First look for the canonical freetype main include file ft2build.h.
60410  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60411    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60412    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60413    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60414      # Fail.
60415      FOUND_FREETYPE=no
60416    fi
60417  fi
60418
60419  if test "x$FOUND_FREETYPE" = xyes; then
60420    # Include file found, let's continue the sanity check.
60421    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60422$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60423
60424    # Reset to default value
60425    FREETYPE_BASE_NAME=freetype
60426    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60427    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60428      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60429          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60430        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60431        # for the .6 version explicitly.
60432        FREETYPE_BASE_NAME=freetype.6
60433        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60434        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60435$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60436      else
60437        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60438$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60439        FOUND_FREETYPE=no
60440      fi
60441    else
60442      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60443        # On Windows, we will need both .lib and .dll file.
60444        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60445          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60446$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60447          FOUND_FREETYPE=no
60448        fi
60449      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60450          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60451        # Found lib in isa dir, use that instead.
60452        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60453        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60454$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60455      fi
60456    fi
60457  fi
60458
60459  if test "x$FOUND_FREETYPE" = xyes; then
60460
60461  # Only process if variable expands to non-empty
60462
60463  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60464    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60465
60466  # Input might be given as Windows format, start by converting to
60467  # unix format.
60468  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60469  new_path=`$CYGPATH -u "$path"`
60470
60471  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60472  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60473  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60474  # "foo.exe" is OK but "foo" is an error.
60475  #
60476  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60477  # It is also a way to make sure we got the proper file name for the real test later on.
60478  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60479  if test "x$test_shortpath" = x; then
60480    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60481$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60482    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60483  fi
60484
60485  # Call helper function which possibly converts this using DOS-style short mode.
60486  # If so, the updated path is stored in $new_path.
60487
60488  input_path="$new_path"
60489  # Check if we need to convert this using DOS-style short mode. If the path
60490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60491  # take no chances and rewrite it.
60492  # Note: m4 eats our [], so we need to use [ and ] instead.
60493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60494  if test "x$has_forbidden_chars" != x; then
60495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60496    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60497    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60498    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60499      # Going to short mode and back again did indeed matter. Since short mode is
60500      # case insensitive, let's make it lowercase to improve readability.
60501      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60502      # Now convert it back to Unix-style (cygpath)
60503      input_path=`$CYGPATH -u "$shortmode_path"`
60504      new_path="$input_path"
60505    fi
60506  fi
60507
60508  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60509  if test "x$test_cygdrive_prefix" = x; then
60510    # As a simple fix, exclude /usr/bin since it's not a real path.
60511    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60512      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60513      # a path prefixed by /cygdrive for fixpath to work.
60514      new_path="$CYGWIN_ROOT_PATH$input_path"
60515    fi
60516  fi
60517
60518
60519  if test "x$path" != "x$new_path"; then
60520    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60522$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60523  fi
60524
60525    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60526
60527  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60528  has_colon=`$ECHO $path | $GREP ^.:`
60529  new_path="$path"
60530  if test "x$has_colon" = x; then
60531    # Not in mixed or Windows style, start by that.
60532    new_path=`cmd //c echo $path`
60533  fi
60534
60535
60536  input_path="$new_path"
60537  # Check if we need to convert this using DOS-style short mode. If the path
60538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60539  # take no chances and rewrite it.
60540  # Note: m4 eats our [], so we need to use [ and ] instead.
60541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60542  if test "x$has_forbidden_chars" != x; then
60543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60544    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60545  fi
60546
60547
60548  windows_path="$new_path"
60549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60550    unix_path=`$CYGPATH -u "$windows_path"`
60551    new_path="$unix_path"
60552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60554    new_path="$unix_path"
60555  fi
60556
60557  if test "x$path" != "x$new_path"; then
60558    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60560$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60561  fi
60562
60563  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60564  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60565
60566    else
60567      # We're on a unix platform. Hooray! :)
60568      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60569      has_space=`$ECHO "$path" | $GREP " "`
60570      if test "x$has_space" != x; then
60571        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60572$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60573        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60574      fi
60575
60576      # Use eval to expand a potential ~
60577      eval path="$path"
60578      if test ! -f "$path" && test ! -d "$path"; then
60579        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60580      fi
60581
60582      if test -d "$path"; then
60583        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60584      else
60585        dir="`$DIRNAME "$path"`"
60586        base="`$BASENAME "$path"`"
60587        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60588      fi
60589    fi
60590  fi
60591
60592
60593  # Only process if variable expands to non-empty
60594
60595  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60596    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60597
60598  # Input might be given as Windows format, start by converting to
60599  # unix format.
60600  path="$POTENTIAL_FREETYPE_LIB_PATH"
60601  new_path=`$CYGPATH -u "$path"`
60602
60603  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60604  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60605  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60606  # "foo.exe" is OK but "foo" is an error.
60607  #
60608  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60609  # It is also a way to make sure we got the proper file name for the real test later on.
60610  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60611  if test "x$test_shortpath" = x; then
60612    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60613$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60614    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60615  fi
60616
60617  # Call helper function which possibly converts this using DOS-style short mode.
60618  # If so, the updated path is stored in $new_path.
60619
60620  input_path="$new_path"
60621  # Check if we need to convert this using DOS-style short mode. If the path
60622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60623  # take no chances and rewrite it.
60624  # Note: m4 eats our [], so we need to use [ and ] instead.
60625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60626  if test "x$has_forbidden_chars" != x; then
60627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60628    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60629    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60630    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60631      # Going to short mode and back again did indeed matter. Since short mode is
60632      # case insensitive, let's make it lowercase to improve readability.
60633      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60634      # Now convert it back to Unix-style (cygpath)
60635      input_path=`$CYGPATH -u "$shortmode_path"`
60636      new_path="$input_path"
60637    fi
60638  fi
60639
60640  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60641  if test "x$test_cygdrive_prefix" = x; then
60642    # As a simple fix, exclude /usr/bin since it's not a real path.
60643    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60644      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60645      # a path prefixed by /cygdrive for fixpath to work.
60646      new_path="$CYGWIN_ROOT_PATH$input_path"
60647    fi
60648  fi
60649
60650
60651  if test "x$path" != "x$new_path"; then
60652    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60654$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60655  fi
60656
60657    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60658
60659  path="$POTENTIAL_FREETYPE_LIB_PATH"
60660  has_colon=`$ECHO $path | $GREP ^.:`
60661  new_path="$path"
60662  if test "x$has_colon" = x; then
60663    # Not in mixed or Windows style, start by that.
60664    new_path=`cmd //c echo $path`
60665  fi
60666
60667
60668  input_path="$new_path"
60669  # Check if we need to convert this using DOS-style short mode. If the path
60670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60671  # take no chances and rewrite it.
60672  # Note: m4 eats our [], so we need to use [ and ] instead.
60673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60674  if test "x$has_forbidden_chars" != x; then
60675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60676    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60677  fi
60678
60679
60680  windows_path="$new_path"
60681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60682    unix_path=`$CYGPATH -u "$windows_path"`
60683    new_path="$unix_path"
60684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60686    new_path="$unix_path"
60687  fi
60688
60689  if test "x$path" != "x$new_path"; then
60690    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60692$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60693  fi
60694
60695  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60696  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60697
60698    else
60699      # We're on a unix platform. Hooray! :)
60700      path="$POTENTIAL_FREETYPE_LIB_PATH"
60701      has_space=`$ECHO "$path" | $GREP " "`
60702      if test "x$has_space" != x; then
60703        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60704$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60705        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60706      fi
60707
60708      # Use eval to expand a potential ~
60709      eval path="$path"
60710      if test ! -f "$path" && test ! -d "$path"; then
60711        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60712      fi
60713
60714      if test -d "$path"; then
60715        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60716      else
60717        dir="`$DIRNAME "$path"`"
60718        base="`$BASENAME "$path"`"
60719        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60720      fi
60721    fi
60722  fi
60723
60724
60725    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60726    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60727$as_echo_n "checking for freetype includes... " >&6; }
60728    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60729$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60730    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60731    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60732$as_echo_n "checking for freetype libraries... " >&6; }
60733    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60734$as_echo "$FREETYPE_LIB_PATH" >&6; }
60735  fi
60736
60737          fi
60738
60739          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60740            if test "x$FOUND_FREETYPE" != xyes; then
60741              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60742              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60743
60744  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60745  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60746  METHOD="well-known location"
60747
60748  # Let's start with an optimistic view of the world :-)
60749  FOUND_FREETYPE=yes
60750
60751  # First look for the canonical freetype main include file ft2build.h.
60752  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60753    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60754    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60755    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60756      # Fail.
60757      FOUND_FREETYPE=no
60758    fi
60759  fi
60760
60761  if test "x$FOUND_FREETYPE" = xyes; then
60762    # Include file found, let's continue the sanity check.
60763    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60764$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60765
60766    # Reset to default value
60767    FREETYPE_BASE_NAME=freetype
60768    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60769    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60770      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60771          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60772        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60773        # for the .6 version explicitly.
60774        FREETYPE_BASE_NAME=freetype.6
60775        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60776        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60777$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60778      else
60779        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60780$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60781        FOUND_FREETYPE=no
60782      fi
60783    else
60784      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60785        # On Windows, we will need both .lib and .dll file.
60786        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60787          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60788$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60789          FOUND_FREETYPE=no
60790        fi
60791      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60792          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60793        # Found lib in isa dir, use that instead.
60794        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60795        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60796$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60797      fi
60798    fi
60799  fi
60800
60801  if test "x$FOUND_FREETYPE" = xyes; then
60802
60803  # Only process if variable expands to non-empty
60804
60805  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60806    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60807
60808  # Input might be given as Windows format, start by converting to
60809  # unix format.
60810  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60811  new_path=`$CYGPATH -u "$path"`
60812
60813  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60814  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60815  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60816  # "foo.exe" is OK but "foo" is an error.
60817  #
60818  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60819  # It is also a way to make sure we got the proper file name for the real test later on.
60820  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60821  if test "x$test_shortpath" = x; then
60822    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60823$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60824    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60825  fi
60826
60827  # Call helper function which possibly converts this using DOS-style short mode.
60828  # If so, the updated path is stored in $new_path.
60829
60830  input_path="$new_path"
60831  # Check if we need to convert this using DOS-style short mode. If the path
60832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60833  # take no chances and rewrite it.
60834  # Note: m4 eats our [], so we need to use [ and ] instead.
60835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60836  if test "x$has_forbidden_chars" != x; then
60837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60841      # Going to short mode and back again did indeed matter. Since short mode is
60842      # case insensitive, let's make it lowercase to improve readability.
60843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60844      # Now convert it back to Unix-style (cygpath)
60845      input_path=`$CYGPATH -u "$shortmode_path"`
60846      new_path="$input_path"
60847    fi
60848  fi
60849
60850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60851  if test "x$test_cygdrive_prefix" = x; then
60852    # As a simple fix, exclude /usr/bin since it's not a real path.
60853    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60855      # a path prefixed by /cygdrive for fixpath to work.
60856      new_path="$CYGWIN_ROOT_PATH$input_path"
60857    fi
60858  fi
60859
60860
60861  if test "x$path" != "x$new_path"; then
60862    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60864$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60865  fi
60866
60867    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60868
60869  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60870  has_colon=`$ECHO $path | $GREP ^.:`
60871  new_path="$path"
60872  if test "x$has_colon" = x; then
60873    # Not in mixed or Windows style, start by that.
60874    new_path=`cmd //c echo $path`
60875  fi
60876
60877
60878  input_path="$new_path"
60879  # Check if we need to convert this using DOS-style short mode. If the path
60880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60881  # take no chances and rewrite it.
60882  # Note: m4 eats our [], so we need to use [ and ] instead.
60883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60884  if test "x$has_forbidden_chars" != x; then
60885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60887  fi
60888
60889
60890  windows_path="$new_path"
60891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60892    unix_path=`$CYGPATH -u "$windows_path"`
60893    new_path="$unix_path"
60894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60896    new_path="$unix_path"
60897  fi
60898
60899  if test "x$path" != "x$new_path"; then
60900    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60902$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60903  fi
60904
60905  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60906  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60907
60908    else
60909      # We're on a unix platform. Hooray! :)
60910      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60911      has_space=`$ECHO "$path" | $GREP " "`
60912      if test "x$has_space" != x; then
60913        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60914$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60915        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60916      fi
60917
60918      # Use eval to expand a potential ~
60919      eval path="$path"
60920      if test ! -f "$path" && test ! -d "$path"; then
60921        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60922      fi
60923
60924      if test -d "$path"; then
60925        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60926      else
60927        dir="`$DIRNAME "$path"`"
60928        base="`$BASENAME "$path"`"
60929        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60930      fi
60931    fi
60932  fi
60933
60934
60935  # Only process if variable expands to non-empty
60936
60937  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60938    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60939
60940  # Input might be given as Windows format, start by converting to
60941  # unix format.
60942  path="$POTENTIAL_FREETYPE_LIB_PATH"
60943  new_path=`$CYGPATH -u "$path"`
60944
60945  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60946  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60947  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60948  # "foo.exe" is OK but "foo" is an error.
60949  #
60950  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60951  # It is also a way to make sure we got the proper file name for the real test later on.
60952  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60953  if test "x$test_shortpath" = x; then
60954    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60955$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60956    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60957  fi
60958
60959  # Call helper function which possibly converts this using DOS-style short mode.
60960  # If so, the updated path is stored in $new_path.
60961
60962  input_path="$new_path"
60963  # Check if we need to convert this using DOS-style short mode. If the path
60964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60965  # take no chances and rewrite it.
60966  # Note: m4 eats our [], so we need to use [ and ] instead.
60967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60968  if test "x$has_forbidden_chars" != x; then
60969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60970    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60971    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60972    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60973      # Going to short mode and back again did indeed matter. Since short mode is
60974      # case insensitive, let's make it lowercase to improve readability.
60975      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60976      # Now convert it back to Unix-style (cygpath)
60977      input_path=`$CYGPATH -u "$shortmode_path"`
60978      new_path="$input_path"
60979    fi
60980  fi
60981
60982  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60983  if test "x$test_cygdrive_prefix" = x; then
60984    # As a simple fix, exclude /usr/bin since it's not a real path.
60985    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60986      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60987      # a path prefixed by /cygdrive for fixpath to work.
60988      new_path="$CYGWIN_ROOT_PATH$input_path"
60989    fi
60990  fi
60991
60992
60993  if test "x$path" != "x$new_path"; then
60994    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60996$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60997  fi
60998
60999    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61000
61001  path="$POTENTIAL_FREETYPE_LIB_PATH"
61002  has_colon=`$ECHO $path | $GREP ^.:`
61003  new_path="$path"
61004  if test "x$has_colon" = x; then
61005    # Not in mixed or Windows style, start by that.
61006    new_path=`cmd //c echo $path`
61007  fi
61008
61009
61010  input_path="$new_path"
61011  # Check if we need to convert this using DOS-style short mode. If the path
61012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61013  # take no chances and rewrite it.
61014  # Note: m4 eats our [], so we need to use [ and ] instead.
61015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61016  if test "x$has_forbidden_chars" != x; then
61017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61018    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61019  fi
61020
61021
61022  windows_path="$new_path"
61023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61024    unix_path=`$CYGPATH -u "$windows_path"`
61025    new_path="$unix_path"
61026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61028    new_path="$unix_path"
61029  fi
61030
61031  if test "x$path" != "x$new_path"; then
61032    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61034$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61035  fi
61036
61037  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61038  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61039
61040    else
61041      # We're on a unix platform. Hooray! :)
61042      path="$POTENTIAL_FREETYPE_LIB_PATH"
61043      has_space=`$ECHO "$path" | $GREP " "`
61044      if test "x$has_space" != x; then
61045        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61046$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61047        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61048      fi
61049
61050      # Use eval to expand a potential ~
61051      eval path="$path"
61052      if test ! -f "$path" && test ! -d "$path"; then
61053        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61054      fi
61055
61056      if test -d "$path"; then
61057        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61058      else
61059        dir="`$DIRNAME "$path"`"
61060        base="`$BASENAME "$path"`"
61061        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61062      fi
61063    fi
61064  fi
61065
61066
61067    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61068    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61069$as_echo_n "checking for freetype includes... " >&6; }
61070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61071$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61072    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61073    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61074$as_echo_n "checking for freetype libraries... " >&6; }
61075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61076$as_echo "$FREETYPE_LIB_PATH" >&6; }
61077  fi
61078
61079            fi
61080          fi
61081
61082          if test "x$FOUND_FREETYPE" != xyes; then
61083            FREETYPE_BASE_DIR="$SYSROOT/usr"
61084            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61085
61086  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61087  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61088  METHOD="well-known location"
61089
61090  # Let's start with an optimistic view of the world :-)
61091  FOUND_FREETYPE=yes
61092
61093  # First look for the canonical freetype main include file ft2build.h.
61094  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61095    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61096    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61097    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61098      # Fail.
61099      FOUND_FREETYPE=no
61100    fi
61101  fi
61102
61103  if test "x$FOUND_FREETYPE" = xyes; then
61104    # Include file found, let's continue the sanity check.
61105    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61106$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61107
61108    # Reset to default value
61109    FREETYPE_BASE_NAME=freetype
61110    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61111    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61112      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61113          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61114        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61115        # for the .6 version explicitly.
61116        FREETYPE_BASE_NAME=freetype.6
61117        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61118        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61119$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61120      else
61121        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61122$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61123        FOUND_FREETYPE=no
61124      fi
61125    else
61126      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61127        # On Windows, we will need both .lib and .dll file.
61128        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61129          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61130$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61131          FOUND_FREETYPE=no
61132        fi
61133      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61134          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61135        # Found lib in isa dir, use that instead.
61136        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61137        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61138$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61139      fi
61140    fi
61141  fi
61142
61143  if test "x$FOUND_FREETYPE" = xyes; then
61144
61145  # Only process if variable expands to non-empty
61146
61147  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61148    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61149
61150  # Input might be given as Windows format, start by converting to
61151  # unix format.
61152  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61153  new_path=`$CYGPATH -u "$path"`
61154
61155  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61156  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61157  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61158  # "foo.exe" is OK but "foo" is an error.
61159  #
61160  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61161  # It is also a way to make sure we got the proper file name for the real test later on.
61162  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61163  if test "x$test_shortpath" = x; then
61164    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61165$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61166    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61167  fi
61168
61169  # Call helper function which possibly converts this using DOS-style short mode.
61170  # If so, the updated path is stored in $new_path.
61171
61172  input_path="$new_path"
61173  # Check if we need to convert this using DOS-style short mode. If the path
61174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61175  # take no chances and rewrite it.
61176  # Note: m4 eats our [], so we need to use [ and ] instead.
61177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61178  if test "x$has_forbidden_chars" != x; then
61179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61180    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61181    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61182    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61183      # Going to short mode and back again did indeed matter. Since short mode is
61184      # case insensitive, let's make it lowercase to improve readability.
61185      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61186      # Now convert it back to Unix-style (cygpath)
61187      input_path=`$CYGPATH -u "$shortmode_path"`
61188      new_path="$input_path"
61189    fi
61190  fi
61191
61192  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61193  if test "x$test_cygdrive_prefix" = x; then
61194    # As a simple fix, exclude /usr/bin since it's not a real path.
61195    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61196      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61197      # a path prefixed by /cygdrive for fixpath to work.
61198      new_path="$CYGWIN_ROOT_PATH$input_path"
61199    fi
61200  fi
61201
61202
61203  if test "x$path" != "x$new_path"; then
61204    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61206$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61207  fi
61208
61209    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61210
61211  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61212  has_colon=`$ECHO $path | $GREP ^.:`
61213  new_path="$path"
61214  if test "x$has_colon" = x; then
61215    # Not in mixed or Windows style, start by that.
61216    new_path=`cmd //c echo $path`
61217  fi
61218
61219
61220  input_path="$new_path"
61221  # Check if we need to convert this using DOS-style short mode. If the path
61222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61223  # take no chances and rewrite it.
61224  # Note: m4 eats our [], so we need to use [ and ] instead.
61225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61226  if test "x$has_forbidden_chars" != x; then
61227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61228    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61229  fi
61230
61231
61232  windows_path="$new_path"
61233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61234    unix_path=`$CYGPATH -u "$windows_path"`
61235    new_path="$unix_path"
61236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61238    new_path="$unix_path"
61239  fi
61240
61241  if test "x$path" != "x$new_path"; then
61242    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61244$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61245  fi
61246
61247  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61248  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61249
61250    else
61251      # We're on a unix platform. Hooray! :)
61252      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61253      has_space=`$ECHO "$path" | $GREP " "`
61254      if test "x$has_space" != x; then
61255        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61256$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61257        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61258      fi
61259
61260      # Use eval to expand a potential ~
61261      eval path="$path"
61262      if test ! -f "$path" && test ! -d "$path"; then
61263        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61264      fi
61265
61266      if test -d "$path"; then
61267        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61268      else
61269        dir="`$DIRNAME "$path"`"
61270        base="`$BASENAME "$path"`"
61271        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61272      fi
61273    fi
61274  fi
61275
61276
61277  # Only process if variable expands to non-empty
61278
61279  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61280    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61281
61282  # Input might be given as Windows format, start by converting to
61283  # unix format.
61284  path="$POTENTIAL_FREETYPE_LIB_PATH"
61285  new_path=`$CYGPATH -u "$path"`
61286
61287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61290  # "foo.exe" is OK but "foo" is an error.
61291  #
61292  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61293  # It is also a way to make sure we got the proper file name for the real test later on.
61294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61295  if test "x$test_shortpath" = x; then
61296    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61297$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61298    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61299  fi
61300
61301  # Call helper function which possibly converts this using DOS-style short mode.
61302  # If so, the updated path is stored in $new_path.
61303
61304  input_path="$new_path"
61305  # Check if we need to convert this using DOS-style short mode. If the path
61306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61307  # take no chances and rewrite it.
61308  # Note: m4 eats our [], so we need to use [ and ] instead.
61309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61310  if test "x$has_forbidden_chars" != x; then
61311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61315      # Going to short mode and back again did indeed matter. Since short mode is
61316      # case insensitive, let's make it lowercase to improve readability.
61317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61318      # Now convert it back to Unix-style (cygpath)
61319      input_path=`$CYGPATH -u "$shortmode_path"`
61320      new_path="$input_path"
61321    fi
61322  fi
61323
61324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61325  if test "x$test_cygdrive_prefix" = x; then
61326    # As a simple fix, exclude /usr/bin since it's not a real path.
61327    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61329      # a path prefixed by /cygdrive for fixpath to work.
61330      new_path="$CYGWIN_ROOT_PATH$input_path"
61331    fi
61332  fi
61333
61334
61335  if test "x$path" != "x$new_path"; then
61336    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61338$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61339  fi
61340
61341    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61342
61343  path="$POTENTIAL_FREETYPE_LIB_PATH"
61344  has_colon=`$ECHO $path | $GREP ^.:`
61345  new_path="$path"
61346  if test "x$has_colon" = x; then
61347    # Not in mixed or Windows style, start by that.
61348    new_path=`cmd //c echo $path`
61349  fi
61350
61351
61352  input_path="$new_path"
61353  # Check if we need to convert this using DOS-style short mode. If the path
61354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61355  # take no chances and rewrite it.
61356  # Note: m4 eats our [], so we need to use [ and ] instead.
61357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61358  if test "x$has_forbidden_chars" != x; then
61359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61361  fi
61362
61363
61364  windows_path="$new_path"
61365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61366    unix_path=`$CYGPATH -u "$windows_path"`
61367    new_path="$unix_path"
61368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61370    new_path="$unix_path"
61371  fi
61372
61373  if test "x$path" != "x$new_path"; then
61374    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61376$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61377  fi
61378
61379  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61380  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61381
61382    else
61383      # We're on a unix platform. Hooray! :)
61384      path="$POTENTIAL_FREETYPE_LIB_PATH"
61385      has_space=`$ECHO "$path" | $GREP " "`
61386      if test "x$has_space" != x; then
61387        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61388$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61389        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61390      fi
61391
61392      # Use eval to expand a potential ~
61393      eval path="$path"
61394      if test ! -f "$path" && test ! -d "$path"; then
61395        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61396      fi
61397
61398      if test -d "$path"; then
61399        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61400      else
61401        dir="`$DIRNAME "$path"`"
61402        base="`$BASENAME "$path"`"
61403        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61404      fi
61405    fi
61406  fi
61407
61408
61409    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61410    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61411$as_echo_n "checking for freetype includes... " >&6; }
61412    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61413$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61414    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61415    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61416$as_echo_n "checking for freetype libraries... " >&6; }
61417    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61418$as_echo "$FREETYPE_LIB_PATH" >&6; }
61419  fi
61420
61421            else
61422
61423  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61424  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61425  METHOD="well-known location"
61426
61427  # Let's start with an optimistic view of the world :-)
61428  FOUND_FREETYPE=yes
61429
61430  # First look for the canonical freetype main include file ft2build.h.
61431  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61432    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61433    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61434    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61435      # Fail.
61436      FOUND_FREETYPE=no
61437    fi
61438  fi
61439
61440  if test "x$FOUND_FREETYPE" = xyes; then
61441    # Include file found, let's continue the sanity check.
61442    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61443$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61444
61445    # Reset to default value
61446    FREETYPE_BASE_NAME=freetype
61447    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61448    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61449      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61450          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61451        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61452        # for the .6 version explicitly.
61453        FREETYPE_BASE_NAME=freetype.6
61454        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61455        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61456$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61457      else
61458        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61459$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61460        FOUND_FREETYPE=no
61461      fi
61462    else
61463      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61464        # On Windows, we will need both .lib and .dll file.
61465        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61466          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61467$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61468          FOUND_FREETYPE=no
61469        fi
61470      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61471          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61472        # Found lib in isa dir, use that instead.
61473        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61474        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61475$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61476      fi
61477    fi
61478  fi
61479
61480  if test "x$FOUND_FREETYPE" = xyes; then
61481
61482  # Only process if variable expands to non-empty
61483
61484  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61485    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61486
61487  # Input might be given as Windows format, start by converting to
61488  # unix format.
61489  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61490  new_path=`$CYGPATH -u "$path"`
61491
61492  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61493  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61494  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61495  # "foo.exe" is OK but "foo" is an error.
61496  #
61497  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61498  # It is also a way to make sure we got the proper file name for the real test later on.
61499  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61500  if test "x$test_shortpath" = x; then
61501    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61502$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61503    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61504  fi
61505
61506  # Call helper function which possibly converts this using DOS-style short mode.
61507  # If so, the updated path is stored in $new_path.
61508
61509  input_path="$new_path"
61510  # Check if we need to convert this using DOS-style short mode. If the path
61511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61512  # take no chances and rewrite it.
61513  # Note: m4 eats our [], so we need to use [ and ] instead.
61514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61515  if test "x$has_forbidden_chars" != x; then
61516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61517    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61518    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61519    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61520      # Going to short mode and back again did indeed matter. Since short mode is
61521      # case insensitive, let's make it lowercase to improve readability.
61522      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61523      # Now convert it back to Unix-style (cygpath)
61524      input_path=`$CYGPATH -u "$shortmode_path"`
61525      new_path="$input_path"
61526    fi
61527  fi
61528
61529  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61530  if test "x$test_cygdrive_prefix" = x; then
61531    # As a simple fix, exclude /usr/bin since it's not a real path.
61532    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61533      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61534      # a path prefixed by /cygdrive for fixpath to work.
61535      new_path="$CYGWIN_ROOT_PATH$input_path"
61536    fi
61537  fi
61538
61539
61540  if test "x$path" != "x$new_path"; then
61541    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61543$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61544  fi
61545
61546    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61547
61548  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61549  has_colon=`$ECHO $path | $GREP ^.:`
61550  new_path="$path"
61551  if test "x$has_colon" = x; then
61552    # Not in mixed or Windows style, start by that.
61553    new_path=`cmd //c echo $path`
61554  fi
61555
61556
61557  input_path="$new_path"
61558  # Check if we need to convert this using DOS-style short mode. If the path
61559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61560  # take no chances and rewrite it.
61561  # Note: m4 eats our [], so we need to use [ and ] instead.
61562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61563  if test "x$has_forbidden_chars" != x; then
61564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61565    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61566  fi
61567
61568
61569  windows_path="$new_path"
61570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61571    unix_path=`$CYGPATH -u "$windows_path"`
61572    new_path="$unix_path"
61573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61575    new_path="$unix_path"
61576  fi
61577
61578  if test "x$path" != "x$new_path"; then
61579    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61581$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61582  fi
61583
61584  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61585  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61586
61587    else
61588      # We're on a unix platform. Hooray! :)
61589      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61590      has_space=`$ECHO "$path" | $GREP " "`
61591      if test "x$has_space" != x; then
61592        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61593$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61594        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61595      fi
61596
61597      # Use eval to expand a potential ~
61598      eval path="$path"
61599      if test ! -f "$path" && test ! -d "$path"; then
61600        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61601      fi
61602
61603      if test -d "$path"; then
61604        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61605      else
61606        dir="`$DIRNAME "$path"`"
61607        base="`$BASENAME "$path"`"
61608        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61609      fi
61610    fi
61611  fi
61612
61613
61614  # Only process if variable expands to non-empty
61615
61616  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61617    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61618
61619  # Input might be given as Windows format, start by converting to
61620  # unix format.
61621  path="$POTENTIAL_FREETYPE_LIB_PATH"
61622  new_path=`$CYGPATH -u "$path"`
61623
61624  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61625  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61626  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61627  # "foo.exe" is OK but "foo" is an error.
61628  #
61629  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61630  # It is also a way to make sure we got the proper file name for the real test later on.
61631  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61632  if test "x$test_shortpath" = x; then
61633    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61634$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61635    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61636  fi
61637
61638  # Call helper function which possibly converts this using DOS-style short mode.
61639  # If so, the updated path is stored in $new_path.
61640
61641  input_path="$new_path"
61642  # Check if we need to convert this using DOS-style short mode. If the path
61643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61644  # take no chances and rewrite it.
61645  # Note: m4 eats our [], so we need to use [ and ] instead.
61646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61647  if test "x$has_forbidden_chars" != x; then
61648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61649    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61650    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61651    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61652      # Going to short mode and back again did indeed matter. Since short mode is
61653      # case insensitive, let's make it lowercase to improve readability.
61654      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61655      # Now convert it back to Unix-style (cygpath)
61656      input_path=`$CYGPATH -u "$shortmode_path"`
61657      new_path="$input_path"
61658    fi
61659  fi
61660
61661  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61662  if test "x$test_cygdrive_prefix" = x; then
61663    # As a simple fix, exclude /usr/bin since it's not a real path.
61664    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61665      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61666      # a path prefixed by /cygdrive for fixpath to work.
61667      new_path="$CYGWIN_ROOT_PATH$input_path"
61668    fi
61669  fi
61670
61671
61672  if test "x$path" != "x$new_path"; then
61673    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61675$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61676  fi
61677
61678    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61679
61680  path="$POTENTIAL_FREETYPE_LIB_PATH"
61681  has_colon=`$ECHO $path | $GREP ^.:`
61682  new_path="$path"
61683  if test "x$has_colon" = x; then
61684    # Not in mixed or Windows style, start by that.
61685    new_path=`cmd //c echo $path`
61686  fi
61687
61688
61689  input_path="$new_path"
61690  # Check if we need to convert this using DOS-style short mode. If the path
61691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61692  # take no chances and rewrite it.
61693  # Note: m4 eats our [], so we need to use [ and ] instead.
61694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61695  if test "x$has_forbidden_chars" != x; then
61696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61697    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61698  fi
61699
61700
61701  windows_path="$new_path"
61702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61703    unix_path=`$CYGPATH -u "$windows_path"`
61704    new_path="$unix_path"
61705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61707    new_path="$unix_path"
61708  fi
61709
61710  if test "x$path" != "x$new_path"; then
61711    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61713$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61714  fi
61715
61716  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61717  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61718
61719    else
61720      # We're on a unix platform. Hooray! :)
61721      path="$POTENTIAL_FREETYPE_LIB_PATH"
61722      has_space=`$ECHO "$path" | $GREP " "`
61723      if test "x$has_space" != x; then
61724        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61725$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61726        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61727      fi
61728
61729      # Use eval to expand a potential ~
61730      eval path="$path"
61731      if test ! -f "$path" && test ! -d "$path"; then
61732        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61733      fi
61734
61735      if test -d "$path"; then
61736        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61737      else
61738        dir="`$DIRNAME "$path"`"
61739        base="`$BASENAME "$path"`"
61740        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61741      fi
61742    fi
61743  fi
61744
61745
61746    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61747    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61748$as_echo_n "checking for freetype includes... " >&6; }
61749    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61750$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61751    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61752    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61753$as_echo_n "checking for freetype libraries... " >&6; }
61754    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61755$as_echo "$FREETYPE_LIB_PATH" >&6; }
61756  fi
61757
61758              if test "x$FOUND_FREETYPE" != xyes; then
61759
61760  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61761  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61762  METHOD="well-known location"
61763
61764  # Let's start with an optimistic view of the world :-)
61765  FOUND_FREETYPE=yes
61766
61767  # First look for the canonical freetype main include file ft2build.h.
61768  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61769    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61770    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61771    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61772      # Fail.
61773      FOUND_FREETYPE=no
61774    fi
61775  fi
61776
61777  if test "x$FOUND_FREETYPE" = xyes; then
61778    # Include file found, let's continue the sanity check.
61779    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61780$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61781
61782    # Reset to default value
61783    FREETYPE_BASE_NAME=freetype
61784    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61785    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61786      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61787          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61788        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61789        # for the .6 version explicitly.
61790        FREETYPE_BASE_NAME=freetype.6
61791        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61792        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61793$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61794      else
61795        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61796$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61797        FOUND_FREETYPE=no
61798      fi
61799    else
61800      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61801        # On Windows, we will need both .lib and .dll file.
61802        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61803          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61804$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61805          FOUND_FREETYPE=no
61806        fi
61807      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61808          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61809        # Found lib in isa dir, use that instead.
61810        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61811        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61812$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61813      fi
61814    fi
61815  fi
61816
61817  if test "x$FOUND_FREETYPE" = xyes; then
61818
61819  # Only process if variable expands to non-empty
61820
61821  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61822    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61823
61824  # Input might be given as Windows format, start by converting to
61825  # unix format.
61826  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61827  new_path=`$CYGPATH -u "$path"`
61828
61829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61832  # "foo.exe" is OK but "foo" is an error.
61833  #
61834  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61835  # It is also a way to make sure we got the proper file name for the real test later on.
61836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61837  if test "x$test_shortpath" = x; then
61838    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61839$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61840    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61841  fi
61842
61843  # Call helper function which possibly converts this using DOS-style short mode.
61844  # If so, the updated path is stored in $new_path.
61845
61846  input_path="$new_path"
61847  # Check if we need to convert this using DOS-style short mode. If the path
61848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61849  # take no chances and rewrite it.
61850  # Note: m4 eats our [], so we need to use [ and ] instead.
61851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61852  if test "x$has_forbidden_chars" != x; then
61853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61857      # Going to short mode and back again did indeed matter. Since short mode is
61858      # case insensitive, let's make it lowercase to improve readability.
61859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61860      # Now convert it back to Unix-style (cygpath)
61861      input_path=`$CYGPATH -u "$shortmode_path"`
61862      new_path="$input_path"
61863    fi
61864  fi
61865
61866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61867  if test "x$test_cygdrive_prefix" = x; then
61868    # As a simple fix, exclude /usr/bin since it's not a real path.
61869    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61871      # a path prefixed by /cygdrive for fixpath to work.
61872      new_path="$CYGWIN_ROOT_PATH$input_path"
61873    fi
61874  fi
61875
61876
61877  if test "x$path" != "x$new_path"; then
61878    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61880$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61881  fi
61882
61883    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61884
61885  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61886  has_colon=`$ECHO $path | $GREP ^.:`
61887  new_path="$path"
61888  if test "x$has_colon" = x; then
61889    # Not in mixed or Windows style, start by that.
61890    new_path=`cmd //c echo $path`
61891  fi
61892
61893
61894  input_path="$new_path"
61895  # Check if we need to convert this using DOS-style short mode. If the path
61896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61897  # take no chances and rewrite it.
61898  # Note: m4 eats our [], so we need to use [ and ] instead.
61899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61900  if test "x$has_forbidden_chars" != x; then
61901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61903  fi
61904
61905
61906  windows_path="$new_path"
61907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61908    unix_path=`$CYGPATH -u "$windows_path"`
61909    new_path="$unix_path"
61910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61912    new_path="$unix_path"
61913  fi
61914
61915  if test "x$path" != "x$new_path"; then
61916    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61918$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61919  fi
61920
61921  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61922  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61923
61924    else
61925      # We're on a unix platform. Hooray! :)
61926      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61927      has_space=`$ECHO "$path" | $GREP " "`
61928      if test "x$has_space" != x; then
61929        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61930$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61931        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61932      fi
61933
61934      # Use eval to expand a potential ~
61935      eval path="$path"
61936      if test ! -f "$path" && test ! -d "$path"; then
61937        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61938      fi
61939
61940      if test -d "$path"; then
61941        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61942      else
61943        dir="`$DIRNAME "$path"`"
61944        base="`$BASENAME "$path"`"
61945        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61946      fi
61947    fi
61948  fi
61949
61950
61951  # Only process if variable expands to non-empty
61952
61953  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61954    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61955
61956  # Input might be given as Windows format, start by converting to
61957  # unix format.
61958  path="$POTENTIAL_FREETYPE_LIB_PATH"
61959  new_path=`$CYGPATH -u "$path"`
61960
61961  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61962  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61963  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61964  # "foo.exe" is OK but "foo" is an error.
61965  #
61966  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61967  # It is also a way to make sure we got the proper file name for the real test later on.
61968  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61969  if test "x$test_shortpath" = x; then
61970    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61971$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61972    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61973  fi
61974
61975  # Call helper function which possibly converts this using DOS-style short mode.
61976  # If so, the updated path is stored in $new_path.
61977
61978  input_path="$new_path"
61979  # Check if we need to convert this using DOS-style short mode. If the path
61980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61981  # take no chances and rewrite it.
61982  # Note: m4 eats our [], so we need to use [ and ] instead.
61983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61984  if test "x$has_forbidden_chars" != x; then
61985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61986    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61987    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61988    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61989      # Going to short mode and back again did indeed matter. Since short mode is
61990      # case insensitive, let's make it lowercase to improve readability.
61991      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61992      # Now convert it back to Unix-style (cygpath)
61993      input_path=`$CYGPATH -u "$shortmode_path"`
61994      new_path="$input_path"
61995    fi
61996  fi
61997
61998  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61999  if test "x$test_cygdrive_prefix" = x; then
62000    # As a simple fix, exclude /usr/bin since it's not a real path.
62001    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62002      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62003      # a path prefixed by /cygdrive for fixpath to work.
62004      new_path="$CYGWIN_ROOT_PATH$input_path"
62005    fi
62006  fi
62007
62008
62009  if test "x$path" != "x$new_path"; then
62010    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62012$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62013  fi
62014
62015    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62016
62017  path="$POTENTIAL_FREETYPE_LIB_PATH"
62018  has_colon=`$ECHO $path | $GREP ^.:`
62019  new_path="$path"
62020  if test "x$has_colon" = x; then
62021    # Not in mixed or Windows style, start by that.
62022    new_path=`cmd //c echo $path`
62023  fi
62024
62025
62026  input_path="$new_path"
62027  # Check if we need to convert this using DOS-style short mode. If the path
62028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62029  # take no chances and rewrite it.
62030  # Note: m4 eats our [], so we need to use [ and ] instead.
62031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62032  if test "x$has_forbidden_chars" != x; then
62033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62034    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62035  fi
62036
62037
62038  windows_path="$new_path"
62039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62040    unix_path=`$CYGPATH -u "$windows_path"`
62041    new_path="$unix_path"
62042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62044    new_path="$unix_path"
62045  fi
62046
62047  if test "x$path" != "x$new_path"; then
62048    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62049    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62050$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62051  fi
62052
62053  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62054  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62055
62056    else
62057      # We're on a unix platform. Hooray! :)
62058      path="$POTENTIAL_FREETYPE_LIB_PATH"
62059      has_space=`$ECHO "$path" | $GREP " "`
62060      if test "x$has_space" != x; then
62061        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62062$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62063        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62064      fi
62065
62066      # Use eval to expand a potential ~
62067      eval path="$path"
62068      if test ! -f "$path" && test ! -d "$path"; then
62069        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62070      fi
62071
62072      if test -d "$path"; then
62073        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62074      else
62075        dir="`$DIRNAME "$path"`"
62076        base="`$BASENAME "$path"`"
62077        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62078      fi
62079    fi
62080  fi
62081
62082
62083    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62084    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62085$as_echo_n "checking for freetype includes... " >&6; }
62086    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62087$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62088    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62090$as_echo_n "checking for freetype libraries... " >&6; }
62091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62092$as_echo "$FREETYPE_LIB_PATH" >&6; }
62093  fi
62094
62095              fi
62096            fi
62097          fi
62098        fi
62099      fi # end check in well-known locations
62100
62101      if test "x$FOUND_FREETYPE" != xyes; then
62102
62103  # Print a helpful message on how to acquire the necessary build dependency.
62104  # freetype is the help tag: freetype, cups, alsa etc
62105  MISSING_DEPENDENCY=freetype
62106
62107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62108    cygwin_help $MISSING_DEPENDENCY
62109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62110    msys_help $MISSING_DEPENDENCY
62111  else
62112    PKGHANDLER_COMMAND=
62113
62114    case $PKGHANDLER in
62115      apt-get)
62116        apt_help     $MISSING_DEPENDENCY ;;
62117      yum)
62118        yum_help     $MISSING_DEPENDENCY ;;
62119      port)
62120        port_help    $MISSING_DEPENDENCY ;;
62121      pkgutil)
62122        pkgutil_help $MISSING_DEPENDENCY ;;
62123      pkgadd)
62124        pkgadd_help  $MISSING_DEPENDENCY ;;
62125    esac
62126
62127    if test "x$PKGHANDLER_COMMAND" != x; then
62128      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62129    fi
62130  fi
62131
62132        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62133      fi
62134    fi # end user specified settings
62135
62136    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62137    if test "x$FREETYPE_CFLAGS" = x; then
62138
62139  # Only process if variable expands to non-empty
62140
62141  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62142    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62143
62144  # Input might be given as Windows format, start by converting to
62145  # unix format.
62146  path="$FREETYPE_INCLUDE_PATH"
62147  new_path=`$CYGPATH -u "$path"`
62148
62149  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62150  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62151  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62152  # "foo.exe" is OK but "foo" is an error.
62153  #
62154  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62155  # It is also a way to make sure we got the proper file name for the real test later on.
62156  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62157  if test "x$test_shortpath" = x; then
62158    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62159$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62160    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62161  fi
62162
62163  # Call helper function which possibly converts this using DOS-style short mode.
62164  # If so, the updated path is stored in $new_path.
62165
62166  input_path="$new_path"
62167  # Check if we need to convert this using DOS-style short mode. If the path
62168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62169  # take no chances and rewrite it.
62170  # Note: m4 eats our [], so we need to use [ and ] instead.
62171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62172  if test "x$has_forbidden_chars" != x; then
62173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62174    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62175    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62176    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62177      # Going to short mode and back again did indeed matter. Since short mode is
62178      # case insensitive, let's make it lowercase to improve readability.
62179      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62180      # Now convert it back to Unix-style (cygpath)
62181      input_path=`$CYGPATH -u "$shortmode_path"`
62182      new_path="$input_path"
62183    fi
62184  fi
62185
62186  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62187  if test "x$test_cygdrive_prefix" = x; then
62188    # As a simple fix, exclude /usr/bin since it's not a real path.
62189    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62190      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62191      # a path prefixed by /cygdrive for fixpath to work.
62192      new_path="$CYGWIN_ROOT_PATH$input_path"
62193    fi
62194  fi
62195
62196
62197  if test "x$path" != "x$new_path"; then
62198    FREETYPE_INCLUDE_PATH="$new_path"
62199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62200$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62201  fi
62202
62203    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62204
62205  path="$FREETYPE_INCLUDE_PATH"
62206  has_colon=`$ECHO $path | $GREP ^.:`
62207  new_path="$path"
62208  if test "x$has_colon" = x; then
62209    # Not in mixed or Windows style, start by that.
62210    new_path=`cmd //c echo $path`
62211  fi
62212
62213
62214  input_path="$new_path"
62215  # Check if we need to convert this using DOS-style short mode. If the path
62216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62217  # take no chances and rewrite it.
62218  # Note: m4 eats our [], so we need to use [ and ] instead.
62219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62220  if test "x$has_forbidden_chars" != x; then
62221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62222    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62223  fi
62224
62225
62226  windows_path="$new_path"
62227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62228    unix_path=`$CYGPATH -u "$windows_path"`
62229    new_path="$unix_path"
62230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62232    new_path="$unix_path"
62233  fi
62234
62235  if test "x$path" != "x$new_path"; then
62236    FREETYPE_INCLUDE_PATH="$new_path"
62237    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62238$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62239  fi
62240
62241  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62242  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62243
62244    else
62245      # We're on a unix platform. Hooray! :)
62246      path="$FREETYPE_INCLUDE_PATH"
62247      has_space=`$ECHO "$path" | $GREP " "`
62248      if test "x$has_space" != x; then
62249        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62250$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62251        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62252      fi
62253
62254      # Use eval to expand a potential ~
62255      eval path="$path"
62256      if test ! -f "$path" && test ! -d "$path"; then
62257        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62258      fi
62259
62260      if test -d "$path"; then
62261        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62262      else
62263        dir="`$DIRNAME "$path"`"
62264        base="`$BASENAME "$path"`"
62265        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62266      fi
62267    fi
62268  fi
62269
62270      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62271        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62272      else
62273        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62274      fi
62275    fi
62276
62277    if test "x$FREETYPE_LIBS" = x; then
62278
62279  # Only process if variable expands to non-empty
62280
62281  if test "x$FREETYPE_LIB_PATH" != x; then
62282    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62283
62284  # Input might be given as Windows format, start by converting to
62285  # unix format.
62286  path="$FREETYPE_LIB_PATH"
62287  new_path=`$CYGPATH -u "$path"`
62288
62289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62292  # "foo.exe" is OK but "foo" is an error.
62293  #
62294  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62295  # It is also a way to make sure we got the proper file name for the real test later on.
62296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62297  if test "x$test_shortpath" = x; then
62298    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62299$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62300    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62301  fi
62302
62303  # Call helper function which possibly converts this using DOS-style short mode.
62304  # If so, the updated path is stored in $new_path.
62305
62306  input_path="$new_path"
62307  # Check if we need to convert this using DOS-style short mode. If the path
62308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62309  # take no chances and rewrite it.
62310  # Note: m4 eats our [], so we need to use [ and ] instead.
62311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62312  if test "x$has_forbidden_chars" != x; then
62313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62317      # Going to short mode and back again did indeed matter. Since short mode is
62318      # case insensitive, let's make it lowercase to improve readability.
62319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62320      # Now convert it back to Unix-style (cygpath)
62321      input_path=`$CYGPATH -u "$shortmode_path"`
62322      new_path="$input_path"
62323    fi
62324  fi
62325
62326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62327  if test "x$test_cygdrive_prefix" = x; then
62328    # As a simple fix, exclude /usr/bin since it's not a real path.
62329    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62331      # a path prefixed by /cygdrive for fixpath to work.
62332      new_path="$CYGWIN_ROOT_PATH$input_path"
62333    fi
62334  fi
62335
62336
62337  if test "x$path" != "x$new_path"; then
62338    FREETYPE_LIB_PATH="$new_path"
62339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62340$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62341  fi
62342
62343    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62344
62345  path="$FREETYPE_LIB_PATH"
62346  has_colon=`$ECHO $path | $GREP ^.:`
62347  new_path="$path"
62348  if test "x$has_colon" = x; then
62349    # Not in mixed or Windows style, start by that.
62350    new_path=`cmd //c echo $path`
62351  fi
62352
62353
62354  input_path="$new_path"
62355  # Check if we need to convert this using DOS-style short mode. If the path
62356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62357  # take no chances and rewrite it.
62358  # Note: m4 eats our [], so we need to use [ and ] instead.
62359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62360  if test "x$has_forbidden_chars" != x; then
62361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62362    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62363  fi
62364
62365
62366  windows_path="$new_path"
62367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62368    unix_path=`$CYGPATH -u "$windows_path"`
62369    new_path="$unix_path"
62370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62372    new_path="$unix_path"
62373  fi
62374
62375  if test "x$path" != "x$new_path"; then
62376    FREETYPE_LIB_PATH="$new_path"
62377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62378$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62379  fi
62380
62381  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62382  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62383
62384    else
62385      # We're on a unix platform. Hooray! :)
62386      path="$FREETYPE_LIB_PATH"
62387      has_space=`$ECHO "$path" | $GREP " "`
62388      if test "x$has_space" != x; then
62389        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62390$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62391        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62392      fi
62393
62394      # Use eval to expand a potential ~
62395      eval path="$path"
62396      if test ! -f "$path" && test ! -d "$path"; then
62397        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62398      fi
62399
62400      if test -d "$path"; then
62401        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62402      else
62403        dir="`$DIRNAME "$path"`"
62404        base="`$BASENAME "$path"`"
62405        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62406      fi
62407    fi
62408  fi
62409
62410      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62411        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62412      else
62413        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62414      fi
62415    fi
62416
62417    # Try to compile it
62418    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62419$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62420    ac_ext=cpp
62421ac_cpp='$CXXCPP $CPPFLAGS'
62422ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62423ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62424ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62425
62426    PREV_CXXCFLAGS="$CXXFLAGS"
62427    PREV_LIBS="$LIBS"
62428    PREV_CXX="$CXX"
62429    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62430    LIBS="$LIBS $FREETYPE_LIBS"
62431    CXX="$FIXPATH $CXX"
62432    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62433/* end confdefs.h.  */
62434
62435          #include<ft2build.h>
62436          #include FT_FREETYPE_H
62437          int main () {
62438            FT_Init_FreeType(NULL);
62439            return 0;
62440          }
62441
62442_ACEOF
62443if ac_fn_cxx_try_link "$LINENO"; then :
62444
62445          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62446$as_echo "yes" >&6; }
62447
62448else
62449
62450          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62451$as_echo "no" >&6; }
62452          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62453$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62454          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62455$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62456
62457
62458  # Print a helpful message on how to acquire the necessary build dependency.
62459  # freetype is the help tag: freetype, cups, alsa etc
62460  MISSING_DEPENDENCY=freetype
62461
62462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62463    cygwin_help $MISSING_DEPENDENCY
62464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62465    msys_help $MISSING_DEPENDENCY
62466  else
62467    PKGHANDLER_COMMAND=
62468
62469    case $PKGHANDLER in
62470      apt-get)
62471        apt_help     $MISSING_DEPENDENCY ;;
62472      yum)
62473        yum_help     $MISSING_DEPENDENCY ;;
62474      port)
62475        port_help    $MISSING_DEPENDENCY ;;
62476      pkgutil)
62477        pkgutil_help $MISSING_DEPENDENCY ;;
62478      pkgadd)
62479        pkgadd_help  $MISSING_DEPENDENCY ;;
62480    esac
62481
62482    if test "x$PKGHANDLER_COMMAND" != x; then
62483      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62484    fi
62485  fi
62486
62487
62488          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62489
62490
62491fi
62492rm -f core conftest.err conftest.$ac_objext \
62493    conftest$ac_exeext conftest.$ac_ext
62494    CXXCFLAGS="$PREV_CXXFLAGS"
62495    LIBS="$PREV_LIBS"
62496    CXX="$PREV_CXX"
62497    ac_ext=cpp
62498ac_cpp='$CXXCPP $CPPFLAGS'
62499ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62500ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62501ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62502
62503
62504    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62505$as_echo_n "checking if we should bundle freetype... " >&6; }
62506    if test "x$BUNDLE_FREETYPE" = xyes; then
62507      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62508    fi
62509    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62510$as_echo "$BUNDLE_FREETYPE" >&6; }
62511
62512  fi # end freetype needed
62513
62514
62515
62516
62517
62518
62519
62520# Check whether --with-alsa was given.
62521if test "${with_alsa+set}" = set; then :
62522  withval=$with_alsa;
62523fi
62524
62525
62526# Check whether --with-alsa-include was given.
62527if test "${with_alsa_include+set}" = set; then :
62528  withval=$with_alsa_include;
62529fi
62530
62531
62532# Check whether --with-alsa-lib was given.
62533if test "${with_alsa_lib+set}" = set; then :
62534  withval=$with_alsa_lib;
62535fi
62536
62537
62538  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62539    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62540        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62541        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62542      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62543$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62544    fi
62545    ALSA_CFLAGS=
62546    ALSA_LIBS=
62547  else
62548    ALSA_FOUND=no
62549
62550    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62551      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62552    fi
62553
62554    if test "x${with_alsa}" != x; then
62555      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62556      ALSA_CFLAGS="-I${with_alsa}/include"
62557      ALSA_FOUND=yes
62558    fi
62559    if test "x${with_alsa_include}" != x; then
62560      ALSA_CFLAGS="-I${with_alsa_include}"
62561      ALSA_FOUND=yes
62562    fi
62563    if test "x${with_alsa_lib}" != x; then
62564      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62565      ALSA_FOUND=yes
62566    fi
62567    # Do not try pkg-config if we have a sysroot set.
62568    if test "x$SYSROOT" = x; then
62569      if test "x$ALSA_FOUND" = xno; then
62570
62571pkg_failed=no
62572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62573$as_echo_n "checking for ALSA... " >&6; }
62574
62575if test -n "$ALSA_CFLAGS"; then
62576    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62577 elif test -n "$PKG_CONFIG"; then
62578    if test -n "$PKG_CONFIG" && \
62579    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62580  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62581  ac_status=$?
62582  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62583  test $ac_status = 0; }; then
62584  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62585else
62586  pkg_failed=yes
62587fi
62588 else
62589    pkg_failed=untried
62590fi
62591if test -n "$ALSA_LIBS"; then
62592    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62593 elif test -n "$PKG_CONFIG"; then
62594    if test -n "$PKG_CONFIG" && \
62595    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62596  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62597  ac_status=$?
62598  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62599  test $ac_status = 0; }; then
62600  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62601else
62602  pkg_failed=yes
62603fi
62604 else
62605    pkg_failed=untried
62606fi
62607
62608
62609
62610if test $pkg_failed = yes; then
62611
62612if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62613        _pkg_short_errors_supported=yes
62614else
62615        _pkg_short_errors_supported=no
62616fi
62617        if test $_pkg_short_errors_supported = yes; then
62618	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62619        else
62620	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62621        fi
62622	# Put the nasty error message in config.log where it belongs
62623	echo "$ALSA_PKG_ERRORS" >&5
62624
62625	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62626$as_echo "no" >&6; }
62627                ALSA_FOUND=no
62628elif test $pkg_failed = untried; then
62629	ALSA_FOUND=no
62630else
62631	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62632	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62633        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62634$as_echo "yes" >&6; }
62635	ALSA_FOUND=yes
62636fi
62637      fi
62638    fi
62639    if test "x$ALSA_FOUND" = xno; then
62640      for ac_header in alsa/asoundlib.h
62641do :
62642  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62643if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62644  cat >>confdefs.h <<_ACEOF
62645#define HAVE_ALSA_ASOUNDLIB_H 1
62646_ACEOF
62647
62648            ALSA_FOUND=yes
62649            ALSA_CFLAGS=-Iignoreme
62650            ALSA_LIBS=-lasound
62651            DEFAULT_ALSA=yes
62652
62653else
62654  ALSA_FOUND=no
62655
62656fi
62657
62658done
62659
62660    fi
62661    if test "x$ALSA_FOUND" = xno; then
62662
62663  # Print a helpful message on how to acquire the necessary build dependency.
62664  # alsa is the help tag: freetype, cups, alsa etc
62665  MISSING_DEPENDENCY=alsa
62666
62667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62668    cygwin_help $MISSING_DEPENDENCY
62669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62670    msys_help $MISSING_DEPENDENCY
62671  else
62672    PKGHANDLER_COMMAND=
62673
62674    case $PKGHANDLER in
62675      apt-get)
62676        apt_help     $MISSING_DEPENDENCY ;;
62677      yum)
62678        yum_help     $MISSING_DEPENDENCY ;;
62679      port)
62680        port_help    $MISSING_DEPENDENCY ;;
62681      pkgutil)
62682        pkgutil_help $MISSING_DEPENDENCY ;;
62683      pkgadd)
62684        pkgadd_help  $MISSING_DEPENDENCY ;;
62685    esac
62686
62687    if test "x$PKGHANDLER_COMMAND" != x; then
62688      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62689    fi
62690  fi
62691
62692      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62693    fi
62694  fi
62695
62696
62697
62698
62699
62700
62701# Check whether --with-libffi was given.
62702if test "${with_libffi+set}" = set; then :
62703  withval=$with_libffi;
62704fi
62705
62706
62707# Check whether --with-libffi-include was given.
62708if test "${with_libffi_include+set}" = set; then :
62709  withval=$with_libffi_include;
62710fi
62711
62712
62713# Check whether --with-libffi-lib was given.
62714if test "${with_libffi_lib+set}" = set; then :
62715  withval=$with_libffi_lib;
62716fi
62717
62718
62719  if test "x$NEEDS_LIB_FFI" = xfalse; then
62720    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62721        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62722        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62723      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62724$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62725    fi
62726    LIBFFI_CFLAGS=
62727    LIBFFI_LIBS=
62728  else
62729    LIBFFI_FOUND=no
62730
62731    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62732      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62733    fi
62734
62735    if test "x${with_libffi}" != x; then
62736      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62737      LIBFFI_CFLAGS="-I${with_libffi}/include"
62738      LIBFFI_FOUND=yes
62739    fi
62740    if test "x${with_libffi_include}" != x; then
62741      LIBFFI_CFLAGS="-I${with_libffi_include}"
62742      LIBFFI_FOUND=yes
62743    fi
62744    if test "x${with_libffi_lib}" != x; then
62745      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62746      LIBFFI_FOUND=yes
62747    fi
62748    # Do not try pkg-config if we have a sysroot set.
62749    if test "x$SYSROOT" = x; then
62750      if test "x$LIBFFI_FOUND" = xno; then
62751        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62752
62753pkg_failed=no
62754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62755$as_echo_n "checking for LIBFFI... " >&6; }
62756
62757if test -n "$LIBFFI_CFLAGS"; then
62758    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62759 elif test -n "$PKG_CONFIG"; then
62760    if test -n "$PKG_CONFIG" && \
62761    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62762  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62763  ac_status=$?
62764  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62765  test $ac_status = 0; }; then
62766  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62767else
62768  pkg_failed=yes
62769fi
62770 else
62771    pkg_failed=untried
62772fi
62773if test -n "$LIBFFI_LIBS"; then
62774    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62775 elif test -n "$PKG_CONFIG"; then
62776    if test -n "$PKG_CONFIG" && \
62777    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62778  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62779  ac_status=$?
62780  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62781  test $ac_status = 0; }; then
62782  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62783else
62784  pkg_failed=yes
62785fi
62786 else
62787    pkg_failed=untried
62788fi
62789
62790
62791
62792if test $pkg_failed = yes; then
62793
62794if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62795        _pkg_short_errors_supported=yes
62796else
62797        _pkg_short_errors_supported=no
62798fi
62799        if test $_pkg_short_errors_supported = yes; then
62800	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62801        else
62802	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62803        fi
62804	# Put the nasty error message in config.log where it belongs
62805	echo "$LIBFFI_PKG_ERRORS" >&5
62806
62807	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62808$as_echo "no" >&6; }
62809                LIBFFI_FOUND=no
62810elif test $pkg_failed = untried; then
62811	LIBFFI_FOUND=no
62812else
62813	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62814	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62816$as_echo "yes" >&6; }
62817	LIBFFI_FOUND=yes
62818fi
62819      fi
62820    fi
62821    if test "x$LIBFFI_FOUND" = xno; then
62822      for ac_header in ffi.h
62823do :
62824  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62825if test "x$ac_cv_header_ffi_h" = xyes; then :
62826  cat >>confdefs.h <<_ACEOF
62827#define HAVE_FFI_H 1
62828_ACEOF
62829
62830            LIBFFI_FOUND=yes
62831            LIBFFI_CFLAGS=
62832            LIBFFI_LIBS=-lffi
62833
62834else
62835  LIBFFI_FOUND=no
62836
62837fi
62838
62839done
62840
62841    fi
62842    if test "x$LIBFFI_FOUND" = xno; then
62843
62844  # Print a helpful message on how to acquire the necessary build dependency.
62845  # ffi is the help tag: freetype, cups, alsa etc
62846  MISSING_DEPENDENCY=ffi
62847
62848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62849    cygwin_help $MISSING_DEPENDENCY
62850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62851    msys_help $MISSING_DEPENDENCY
62852  else
62853    PKGHANDLER_COMMAND=
62854
62855    case $PKGHANDLER in
62856      apt-get)
62857        apt_help     $MISSING_DEPENDENCY ;;
62858      yum)
62859        yum_help     $MISSING_DEPENDENCY ;;
62860      port)
62861        port_help    $MISSING_DEPENDENCY ;;
62862      pkgutil)
62863        pkgutil_help $MISSING_DEPENDENCY ;;
62864      pkgadd)
62865        pkgadd_help  $MISSING_DEPENDENCY ;;
62866    esac
62867
62868    if test "x$PKGHANDLER_COMMAND" != x; then
62869      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62870    fi
62871  fi
62872
62873      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62874    fi
62875
62876    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62877$as_echo_n "checking if libffi works... " >&6; }
62878    ac_ext=c
62879ac_cpp='$CPP $CPPFLAGS'
62880ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62881ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62882ac_compiler_gnu=$ac_cv_c_compiler_gnu
62883
62884    OLD_CFLAGS="$CFLAGS"
62885    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62886    OLD_LIBS="$LIBS"
62887    LIBS="$LIBS $LIBFFI_LIBS"
62888    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62889/* end confdefs.h.  */
62890#include <ffi.h>
62891int
62892main ()
62893{
62894
62895          ffi_call(NULL, NULL, NULL, NULL);
62896          return 0;
62897
62898  ;
62899  return 0;
62900}
62901_ACEOF
62902if ac_fn_c_try_link "$LINENO"; then :
62903  LIBFFI_WORKS=yes
62904else
62905  LIBFFI_WORKS=no
62906
62907fi
62908rm -f core conftest.err conftest.$ac_objext \
62909    conftest$ac_exeext conftest.$ac_ext
62910    CFLAGS="$OLD_CFLAGS"
62911    LIBS="$OLD_LIBS"
62912    ac_ext=cpp
62913ac_cpp='$CXXCPP $CPPFLAGS'
62914ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62915ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62916ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62917
62918    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62919$as_echo "$LIBFFI_WORKS" >&6; }
62920
62921    if test "x$LIBFFI_WORKS" = xno; then
62922
62923  # Print a helpful message on how to acquire the necessary build dependency.
62924  # ffi is the help tag: freetype, cups, alsa etc
62925  MISSING_DEPENDENCY=ffi
62926
62927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62928    cygwin_help $MISSING_DEPENDENCY
62929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62930    msys_help $MISSING_DEPENDENCY
62931  else
62932    PKGHANDLER_COMMAND=
62933
62934    case $PKGHANDLER in
62935      apt-get)
62936        apt_help     $MISSING_DEPENDENCY ;;
62937      yum)
62938        yum_help     $MISSING_DEPENDENCY ;;
62939      port)
62940        port_help    $MISSING_DEPENDENCY ;;
62941      pkgutil)
62942        pkgutil_help $MISSING_DEPENDENCY ;;
62943      pkgadd)
62944        pkgadd_help  $MISSING_DEPENDENCY ;;
62945    esac
62946
62947    if test "x$PKGHANDLER_COMMAND" != x; then
62948      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62949    fi
62950  fi
62951
62952      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
62953    fi
62954  fi
62955
62956
62957
62958
62959
62960  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
62961    # Extract the first word of "llvm-config", so it can be a program name with args.
62962set dummy llvm-config; ac_word=$2
62963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62964$as_echo_n "checking for $ac_word... " >&6; }
62965if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
62966  $as_echo_n "(cached) " >&6
62967else
62968  if test -n "$LLVM_CONFIG"; then
62969  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
62970else
62971as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62972for as_dir in $PATH
62973do
62974  IFS=$as_save_IFS
62975  test -z "$as_dir" && as_dir=.
62976    for ac_exec_ext in '' $ac_executable_extensions; do
62977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62978    ac_cv_prog_LLVM_CONFIG="llvm-config"
62979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62980    break 2
62981  fi
62982done
62983  done
62984IFS=$as_save_IFS
62985
62986fi
62987fi
62988LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
62989if test -n "$LLVM_CONFIG"; then
62990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
62991$as_echo "$LLVM_CONFIG" >&6; }
62992else
62993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62994$as_echo "no" >&6; }
62995fi
62996
62997
62998
62999    if test "x$LLVM_CONFIG" != xllvm-config; then
63000      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63001    fi
63002
63003    llvm_components="jit mcjit engine nativecodegen native"
63004    unset LLVM_CFLAGS
63005    for flag in $("$LLVM_CONFIG" --cxxflags); do
63006      if echo "${flag}" | grep -q '^-[ID]'; then
63007        if test "${flag}" != "-D_DEBUG" ; then
63008          if test "${LLVM_CFLAGS}" != "" ; then
63009            LLVM_CFLAGS="${LLVM_CFLAGS} "
63010          fi
63011          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63012        fi
63013      fi
63014    done
63015    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63016    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63017
63018    unset LLVM_LDFLAGS
63019    for flag in $("${LLVM_CONFIG}" --ldflags); do
63020      if echo "${flag}" | grep -q '^-L'; then
63021        if test "${LLVM_LDFLAGS}" != ""; then
63022          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63023        fi
63024        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63025      fi
63026    done
63027
63028    unset LLVM_LIBS
63029    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63030      if echo "${flag}" | grep -q '^-l'; then
63031        if test "${LLVM_LIBS}" != ""; then
63032          LLVM_LIBS="${LLVM_LIBS} "
63033        fi
63034        LLVM_LIBS="${LLVM_LIBS}${flag}"
63035      fi
63036    done
63037
63038    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63039    # always properly detect -ltinfo
63040    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63041
63042
63043
63044
63045  fi
63046
63047
63048
63049# Check whether --with-libjpeg was given.
63050if test "${with_libjpeg+set}" = set; then :
63051  withval=$with_libjpeg;
63052fi
63053
63054
63055  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63056$as_echo_n "checking for which libjpeg to use... " >&6; }
63057  # default is bundled
63058  DEFAULT_LIBJPEG=bundled
63059  # if user didn't specify, use DEFAULT_LIBJPEG
63060  if test "x${with_libjpeg}" = "x"; then
63061    with_libjpeg=${DEFAULT_LIBJPEG}
63062  fi
63063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63064$as_echo "${with_libjpeg}" >&6; }
63065
63066  if test "x${with_libjpeg}" = "xbundled"; then
63067    USE_EXTERNAL_LIBJPEG=false
63068  elif test "x${with_libjpeg}" = "xsystem"; then
63069    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63070if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63071
63072else
63073   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63074fi
63075
63076
63077    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63078$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63079if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63080  $as_echo_n "(cached) " >&6
63081else
63082  ac_check_lib_save_LIBS=$LIBS
63083LIBS="-ljpeg  $LIBS"
63084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63085/* end confdefs.h.  */
63086
63087/* Override any GCC internal prototype to avoid an error.
63088   Use char because int might match the return type of a GCC
63089   builtin and then its argument prototype would still apply.  */
63090#ifdef __cplusplus
63091extern "C"
63092#endif
63093char jpeg_CreateDecompress ();
63094int
63095main ()
63096{
63097return jpeg_CreateDecompress ();
63098  ;
63099  return 0;
63100}
63101_ACEOF
63102if ac_fn_cxx_try_link "$LINENO"; then :
63103  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63104else
63105  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63106fi
63107rm -f core conftest.err conftest.$ac_objext \
63108    conftest$ac_exeext conftest.$ac_ext
63109LIBS=$ac_check_lib_save_LIBS
63110fi
63111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63112$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63113if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63114  cat >>confdefs.h <<_ACEOF
63115#define HAVE_LIBJPEG 1
63116_ACEOF
63117
63118  LIBS="-ljpeg $LIBS"
63119
63120else
63121   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63122fi
63123
63124
63125    USE_EXTERNAL_LIBJPEG=true
63126  else
63127    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63128  fi
63129
63130
63131
63132
63133
63134# Check whether --with-giflib was given.
63135if test "${with_giflib+set}" = set; then :
63136  withval=$with_giflib;
63137fi
63138
63139
63140  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63141$as_echo_n "checking for which giflib to use... " >&6; }
63142  # default is bundled
63143  DEFAULT_GIFLIB=bundled
63144  # if user didn't specify, use DEFAULT_GIFLIB
63145  if test "x${with_giflib}" = "x"; then
63146    with_giflib=${DEFAULT_GIFLIB}
63147  fi
63148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63149$as_echo "${with_giflib}" >&6; }
63150
63151  if test "x${with_giflib}" = "xbundled"; then
63152    USE_EXTERNAL_LIBGIF=false
63153  elif test "x${with_giflib}" = "xsystem"; then
63154    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63155if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63156
63157else
63158   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63159fi
63160
63161
63162    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63163$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63164if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63165  $as_echo_n "(cached) " >&6
63166else
63167  ac_check_lib_save_LIBS=$LIBS
63168LIBS="-lgif  $LIBS"
63169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63170/* end confdefs.h.  */
63171
63172/* Override any GCC internal prototype to avoid an error.
63173   Use char because int might match the return type of a GCC
63174   builtin and then its argument prototype would still apply.  */
63175#ifdef __cplusplus
63176extern "C"
63177#endif
63178char DGifGetCode ();
63179int
63180main ()
63181{
63182return DGifGetCode ();
63183  ;
63184  return 0;
63185}
63186_ACEOF
63187if ac_fn_cxx_try_link "$LINENO"; then :
63188  ac_cv_lib_gif_DGifGetCode=yes
63189else
63190  ac_cv_lib_gif_DGifGetCode=no
63191fi
63192rm -f core conftest.err conftest.$ac_objext \
63193    conftest$ac_exeext conftest.$ac_ext
63194LIBS=$ac_check_lib_save_LIBS
63195fi
63196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63197$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63198if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63199  cat >>confdefs.h <<_ACEOF
63200#define HAVE_LIBGIF 1
63201_ACEOF
63202
63203  LIBS="-lgif $LIBS"
63204
63205else
63206   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63207fi
63208
63209
63210    USE_EXTERNAL_LIBGIF=true
63211  else
63212    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63213  fi
63214
63215
63216
63217
63218
63219# Check whether --with-libpng was given.
63220if test "${with_libpng+set}" = set; then :
63221  withval=$with_libpng;
63222fi
63223
63224
63225  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63226$as_echo_n "checking for which libpng to use... " >&6; }
63227
63228  # default is bundled
63229  DEFAULT_LIBPNG=bundled
63230  # if user didn't specify, use DEFAULT_LIBPNG
63231  if test "x${with_libpng}" = "x"; then
63232      with_libpng=${DEFAULT_LIBPNG}
63233  fi
63234
63235  if test "x${with_libpng}" = "xbundled"; then
63236      USE_EXTERNAL_LIBPNG=false
63237      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63238$as_echo "bundled" >&6; }
63239  elif test "x${with_libpng}" = "xsystem"; then
63240
63241pkg_failed=no
63242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63243$as_echo_n "checking for PNG... " >&6; }
63244
63245if test -n "$PNG_CFLAGS"; then
63246    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63247 elif test -n "$PKG_CONFIG"; then
63248    if test -n "$PKG_CONFIG" && \
63249    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63250  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63251  ac_status=$?
63252  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63253  test $ac_status = 0; }; then
63254  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63255else
63256  pkg_failed=yes
63257fi
63258 else
63259    pkg_failed=untried
63260fi
63261if test -n "$PNG_LIBS"; then
63262    pkg_cv_PNG_LIBS="$PNG_LIBS"
63263 elif test -n "$PKG_CONFIG"; then
63264    if test -n "$PKG_CONFIG" && \
63265    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63266  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63267  ac_status=$?
63268  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63269  test $ac_status = 0; }; then
63270  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63271else
63272  pkg_failed=yes
63273fi
63274 else
63275    pkg_failed=untried
63276fi
63277
63278
63279
63280if test $pkg_failed = yes; then
63281
63282if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63283        _pkg_short_errors_supported=yes
63284else
63285        _pkg_short_errors_supported=no
63286fi
63287        if test $_pkg_short_errors_supported = yes; then
63288	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63289        else
63290	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63291        fi
63292	# Put the nasty error message in config.log where it belongs
63293	echo "$PNG_PKG_ERRORS" >&5
63294
63295	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63296$as_echo "no" >&6; }
63297                 LIBPNG_FOUND=no
63298elif test $pkg_failed = untried; then
63299	 LIBPNG_FOUND=no
63300else
63301	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63302	PNG_LIBS=$pkg_cv_PNG_LIBS
63303        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63304$as_echo "yes" >&6; }
63305	 LIBPNG_FOUND=yes
63306fi
63307      if test "x${LIBPNG_FOUND}" = "xyes"; then
63308          USE_EXTERNAL_LIBPNG=true
63309          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63310$as_echo "system" >&6; }
63311      else
63312          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63313$as_echo "system not found" >&6; }
63314          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63315      fi
63316  else
63317      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63318  fi
63319
63320
63321
63322
63323
63324# Check whether --with-zlib was given.
63325if test "${with_zlib+set}" = set; then :
63326  withval=$with_zlib;
63327fi
63328
63329
63330  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63331$as_echo_n "checking for compress in -lz... " >&6; }
63332if ${ac_cv_lib_z_compress+:} false; then :
63333  $as_echo_n "(cached) " >&6
63334else
63335  ac_check_lib_save_LIBS=$LIBS
63336LIBS="-lz  $LIBS"
63337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63338/* end confdefs.h.  */
63339
63340/* Override any GCC internal prototype to avoid an error.
63341   Use char because int might match the return type of a GCC
63342   builtin and then its argument prototype would still apply.  */
63343#ifdef __cplusplus
63344extern "C"
63345#endif
63346char compress ();
63347int
63348main ()
63349{
63350return compress ();
63351  ;
63352  return 0;
63353}
63354_ACEOF
63355if ac_fn_cxx_try_link "$LINENO"; then :
63356  ac_cv_lib_z_compress=yes
63357else
63358  ac_cv_lib_z_compress=no
63359fi
63360rm -f core conftest.err conftest.$ac_objext \
63361    conftest$ac_exeext conftest.$ac_ext
63362LIBS=$ac_check_lib_save_LIBS
63363fi
63364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63365$as_echo "$ac_cv_lib_z_compress" >&6; }
63366if test "x$ac_cv_lib_z_compress" = xyes; then :
63367   ZLIB_FOUND=yes
63368else
63369   ZLIB_FOUND=no
63370fi
63371
63372
63373  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63374$as_echo_n "checking for which zlib to use... " >&6; }
63375
63376  DEFAULT_ZLIB=system
63377  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63378    # On windows default is bundled...on others default is system
63379    DEFAULT_ZLIB=bundled
63380  fi
63381
63382  if test "x${ZLIB_FOUND}" != "xyes"; then
63383    # If we don't find any system...set default to bundled
63384    DEFAULT_ZLIB=bundled
63385  fi
63386
63387  # If user didn't specify, use DEFAULT_ZLIB
63388  if test "x${with_zlib}" = "x"; then
63389    with_zlib=${DEFAULT_ZLIB}
63390  fi
63391
63392  if test "x${with_zlib}" = "xbundled"; then
63393    USE_EXTERNAL_LIBZ=false
63394    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63395$as_echo "bundled" >&6; }
63396  elif test "x${with_zlib}" = "xsystem"; then
63397    if test "x${ZLIB_FOUND}" = "xyes"; then
63398      USE_EXTERNAL_LIBZ=true
63399      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63400$as_echo "system" >&6; }
63401    else
63402      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63403$as_echo "system not found" >&6; }
63404      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63405    fi
63406  else
63407    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63408  fi
63409
63410
63411
63412
63413
63414# Check whether --with-lcms was given.
63415if test "${with_lcms+set}" = set; then :
63416  withval=$with_lcms;
63417fi
63418
63419
63420  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63421$as_echo_n "checking for which lcms to use... " >&6; }
63422
63423  DEFAULT_LCMS=bundled
63424  # If user didn't specify, use DEFAULT_LCMS
63425  if test "x${with_lcms}" = "x"; then
63426      with_lcms=${DEFAULT_LCMS}
63427  fi
63428
63429  if test "x${with_lcms}" = "xbundled"; then
63430    USE_EXTERNAL_LCMS=false
63431    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63432$as_echo "bundled" >&6; }
63433  elif test "x${with_lcms}" = "xsystem"; then
63434    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63435$as_echo "system" >&6; }
63436
63437pkg_failed=no
63438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63439$as_echo_n "checking for LCMS... " >&6; }
63440
63441if test -n "$LCMS_CFLAGS"; then
63442    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63443 elif test -n "$PKG_CONFIG"; then
63444    if test -n "$PKG_CONFIG" && \
63445    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63446  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63447  ac_status=$?
63448  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63449  test $ac_status = 0; }; then
63450  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63451else
63452  pkg_failed=yes
63453fi
63454 else
63455    pkg_failed=untried
63456fi
63457if test -n "$LCMS_LIBS"; then
63458    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63459 elif test -n "$PKG_CONFIG"; then
63460    if test -n "$PKG_CONFIG" && \
63461    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63462  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63463  ac_status=$?
63464  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63465  test $ac_status = 0; }; then
63466  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63467else
63468  pkg_failed=yes
63469fi
63470 else
63471    pkg_failed=untried
63472fi
63473
63474
63475
63476if test $pkg_failed = yes; then
63477
63478if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63479        _pkg_short_errors_supported=yes
63480else
63481        _pkg_short_errors_supported=no
63482fi
63483        if test $_pkg_short_errors_supported = yes; then
63484	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63485        else
63486	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63487        fi
63488	# Put the nasty error message in config.log where it belongs
63489	echo "$LCMS_PKG_ERRORS" >&5
63490
63491	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63492$as_echo "no" >&6; }
63493                LCMS_FOUND=no
63494elif test $pkg_failed = untried; then
63495	LCMS_FOUND=no
63496else
63497	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63498	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63499        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63500$as_echo "yes" >&6; }
63501	LCMS_FOUND=yes
63502fi
63503    if test "x${LCMS_FOUND}" = "xyes"; then
63504      USE_EXTERNAL_LCMS=true
63505    else
63506      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63507    fi
63508  else
63509    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63510  fi
63511
63512
63513
63514
63515
63516
63517
63518
63519
63520
63521
63522  # Setup libm (the maths library)
63523  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63524    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63525$as_echo_n "checking for cos in -lm... " >&6; }
63526if ${ac_cv_lib_m_cos+:} false; then :
63527  $as_echo_n "(cached) " >&6
63528else
63529  ac_check_lib_save_LIBS=$LIBS
63530LIBS="-lm  $LIBS"
63531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63532/* end confdefs.h.  */
63533
63534/* Override any GCC internal prototype to avoid an error.
63535   Use char because int might match the return type of a GCC
63536   builtin and then its argument prototype would still apply.  */
63537#ifdef __cplusplus
63538extern "C"
63539#endif
63540char cos ();
63541int
63542main ()
63543{
63544return cos ();
63545  ;
63546  return 0;
63547}
63548_ACEOF
63549if ac_fn_cxx_try_link "$LINENO"; then :
63550  ac_cv_lib_m_cos=yes
63551else
63552  ac_cv_lib_m_cos=no
63553fi
63554rm -f core conftest.err conftest.$ac_objext \
63555    conftest$ac_exeext conftest.$ac_ext
63556LIBS=$ac_check_lib_save_LIBS
63557fi
63558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63559$as_echo "$ac_cv_lib_m_cos" >&6; }
63560if test "x$ac_cv_lib_m_cos" = xyes; then :
63561  cat >>confdefs.h <<_ACEOF
63562#define HAVE_LIBM 1
63563_ACEOF
63564
63565  LIBS="-lm $LIBS"
63566
63567else
63568
63569        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63570$as_echo "$as_me: Maths library was not found" >&6;}
63571
63572fi
63573
63574    LIBM="-lm"
63575  else
63576    LIBM=""
63577  fi
63578
63579
63580  # Setup libdl (for dynamic library loading)
63581  save_LIBS="$LIBS"
63582  LIBS=""
63583  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63584$as_echo_n "checking for dlopen in -ldl... " >&6; }
63585if ${ac_cv_lib_dl_dlopen+:} false; then :
63586  $as_echo_n "(cached) " >&6
63587else
63588  ac_check_lib_save_LIBS=$LIBS
63589LIBS="-ldl  $LIBS"
63590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63591/* end confdefs.h.  */
63592
63593/* Override any GCC internal prototype to avoid an error.
63594   Use char because int might match the return type of a GCC
63595   builtin and then its argument prototype would still apply.  */
63596#ifdef __cplusplus
63597extern "C"
63598#endif
63599char dlopen ();
63600int
63601main ()
63602{
63603return dlopen ();
63604  ;
63605  return 0;
63606}
63607_ACEOF
63608if ac_fn_cxx_try_link "$LINENO"; then :
63609  ac_cv_lib_dl_dlopen=yes
63610else
63611  ac_cv_lib_dl_dlopen=no
63612fi
63613rm -f core conftest.err conftest.$ac_objext \
63614    conftest$ac_exeext conftest.$ac_ext
63615LIBS=$ac_check_lib_save_LIBS
63616fi
63617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63618$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63619if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63620  cat >>confdefs.h <<_ACEOF
63621#define HAVE_LIBDL 1
63622_ACEOF
63623
63624  LIBS="-ldl $LIBS"
63625
63626fi
63627
63628  LIBDL="$LIBS"
63629
63630  LIBS="$save_LIBS"
63631
63632  # Deprecated libraries, keep the flags for backwards compatibility
63633  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63634
63635
63636# Check whether --with-dxsdk was given.
63637if test "${with_dxsdk+set}" = set; then :
63638  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63639$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63640fi
63641
63642
63643
63644
63645# Check whether --with-dxsdk-lib was given.
63646if test "${with_dxsdk_lib+set}" = set; then :
63647  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63648$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63649fi
63650
63651
63652
63653
63654# Check whether --with-dxsdk-include was given.
63655if test "${with_dxsdk_include+set}" = set; then :
63656  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63657$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63658fi
63659
63660
63661  fi
63662
63663  # Control if libzip can use mmap. Available for purposes of overriding.
63664  LIBZIP_CAN_USE_MMAP=true
63665
63666
63667
63668  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
63669    # Find the root of the Solaris Studio installation from the compiler path
63670    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63671    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63672    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63673$as_echo_n "checking for libstlport.so.1... " >&6; }
63674    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
63675      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
63676      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
63677    fi
63678    if test -f "$STLPORT_LIB"; then
63679      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63680$as_echo "yes, $STLPORT_LIB" >&6; }
63681
63682  # Only process if variable expands to non-empty
63683
63684  if test "x$STLPORT_LIB" != x; then
63685    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63686
63687  # Input might be given as Windows format, start by converting to
63688  # unix format.
63689  path="$STLPORT_LIB"
63690  new_path=`$CYGPATH -u "$path"`
63691
63692  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63693  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63694  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63695  # "foo.exe" is OK but "foo" is an error.
63696  #
63697  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63698  # It is also a way to make sure we got the proper file name for the real test later on.
63699  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63700  if test "x$test_shortpath" = x; then
63701    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63702$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63703    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63704  fi
63705
63706  # Call helper function which possibly converts this using DOS-style short mode.
63707  # If so, the updated path is stored in $new_path.
63708
63709  input_path="$new_path"
63710  # Check if we need to convert this using DOS-style short mode. If the path
63711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63712  # take no chances and rewrite it.
63713  # Note: m4 eats our [], so we need to use [ and ] instead.
63714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63715  if test "x$has_forbidden_chars" != x; then
63716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63717    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63718    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63719    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63720      # Going to short mode and back again did indeed matter. Since short mode is
63721      # case insensitive, let's make it lowercase to improve readability.
63722      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63723      # Now convert it back to Unix-style (cygpath)
63724      input_path=`$CYGPATH -u "$shortmode_path"`
63725      new_path="$input_path"
63726    fi
63727  fi
63728
63729  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63730  if test "x$test_cygdrive_prefix" = x; then
63731    # As a simple fix, exclude /usr/bin since it's not a real path.
63732    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63733      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63734      # a path prefixed by /cygdrive for fixpath to work.
63735      new_path="$CYGWIN_ROOT_PATH$input_path"
63736    fi
63737  fi
63738
63739
63740  if test "x$path" != "x$new_path"; then
63741    STLPORT_LIB="$new_path"
63742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63743$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63744  fi
63745
63746    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63747
63748  path="$STLPORT_LIB"
63749  has_colon=`$ECHO $path | $GREP ^.:`
63750  new_path="$path"
63751  if test "x$has_colon" = x; then
63752    # Not in mixed or Windows style, start by that.
63753    new_path=`cmd //c echo $path`
63754  fi
63755
63756
63757  input_path="$new_path"
63758  # Check if we need to convert this using DOS-style short mode. If the path
63759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63760  # take no chances and rewrite it.
63761  # Note: m4 eats our [], so we need to use [ and ] instead.
63762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63763  if test "x$has_forbidden_chars" != x; then
63764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63765    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63766  fi
63767
63768
63769  windows_path="$new_path"
63770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63771    unix_path=`$CYGPATH -u "$windows_path"`
63772    new_path="$unix_path"
63773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63775    new_path="$unix_path"
63776  fi
63777
63778  if test "x$path" != "x$new_path"; then
63779    STLPORT_LIB="$new_path"
63780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63781$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63782  fi
63783
63784  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63785  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63786
63787    else
63788      # We're on a unix platform. Hooray! :)
63789      path="$STLPORT_LIB"
63790      has_space=`$ECHO "$path" | $GREP " "`
63791      if test "x$has_space" != x; then
63792        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63793$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63794        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63795      fi
63796
63797      # Use eval to expand a potential ~
63798      eval path="$path"
63799      if test ! -f "$path" && test ! -d "$path"; then
63800        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63801      fi
63802
63803      if test -d "$path"; then
63804        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63805      else
63806        dir="`$DIRNAME "$path"`"
63807        base="`$BASENAME "$path"`"
63808        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63809      fi
63810    fi
63811  fi
63812
63813    else
63814      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63815$as_echo "no, not found at $STLPORT_LIB" >&6; }
63816      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63817    fi
63818
63819  fi
63820
63821
63822
63823
63824
63825
63826
63827
63828
63829
63830
63831
63832
63833
63834###############################################################################
63835#
63836# We need to do some final tweaking, when everything else is done.
63837#
63838###############################################################################
63839
63840
63841  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63842$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63843
63844  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63845    ENABLE_INTREE_EC=yes
63846    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63847$as_echo "yes" >&6; }
63848  else
63849    ENABLE_INTREE_EC=no
63850    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63851$as_echo "no" >&6; }
63852  fi
63853
63854
63855
63856
63857  # Check whether --enable-jtreg-failure-handler was given.
63858if test "${enable_jtreg_failure_handler+set}" = set; then :
63859  enableval=$enable_jtreg_failure_handler;
63860fi
63861
63862
63863  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
63864$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
63865
63866  if test "x$enable_jtreg_failure_handler" = "xyes"; then
63867    if test "x$JT_HOME" = "x"; then
63868      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
63869    else
63870      BUILD_FAILURE_HANDLER=true
63871      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63872$as_echo "yes, forced" >&6; }
63873    fi
63874  elif test "x$enable_jtreg_failure_handler" = "xno"; then
63875    BUILD_FAILURE_HANDLER=false
63876    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63877$as_echo "no, forced" >&6; }
63878  elif test "x$enable_jtreg_failure_handler" = "xauto" \
63879      || test "x$enable_jtreg_failure_handler" = "x"; then
63880    if test "x$JT_HOME" = "x"; then
63881      BUILD_FAILURE_HANDLER=false
63882      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
63883$as_echo "no, missing jtreg" >&6; }
63884    else
63885      BUILD_FAILURE_HANDLER=true
63886      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
63887$as_echo "yes, jtreg present" >&6; }
63888    fi
63889  else
63890    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
63891  fi
63892
63893
63894
63895
63896  # Check whether --enable-generate-classlist was given.
63897if test "${enable_generate_classlist+set}" = set; then :
63898  enableval=$enable_generate_classlist;
63899fi
63900
63901
63902  # Check if it's likely that it's possible to generate the classlist. Depending
63903  # on exact jvm configuration it could be possible anyway.
63904  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
63905    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
63906  else
63907    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
63908  fi
63909
63910  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
63911$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
63912  if test "x$enable_generate_classlist" = "xyes"; then
63913    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63914$as_echo "yes, forced" >&6; }
63915    ENABLE_GENERATE_CLASSLIST="true"
63916    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
63917      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
63918$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
63919    fi
63920  elif test "x$enable_generate_classlist" = "xno"; then
63921    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63922$as_echo "no, forced" >&6; }
63923    ENABLE_GENERATE_CLASSLIST="false"
63924  elif test "x$enable_generate_classlist" = "x"; then
63925    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
63926      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63927$as_echo "yes" >&6; }
63928      ENABLE_GENERATE_CLASSLIST="true"
63929    else
63930      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63931$as_echo "no" >&6; }
63932      ENABLE_GENERATE_CLASSLIST="false"
63933    fi
63934  else
63935    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
63936  fi
63937
63938
63939
63940
63941###############################################################################
63942#
63943# Configure parts of the build that only affect the build performance,
63944# not the result.
63945#
63946###############################################################################
63947
63948
63949  # How many cores do we have on this build system?
63950
63951# Check whether --with-num-cores was given.
63952if test "${with_num_cores+set}" = set; then :
63953  withval=$with_num_cores;
63954fi
63955
63956  if test "x$with_num_cores" = x; then
63957    # The number of cores were not specified, try to probe them.
63958
63959  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63960$as_echo_n "checking for number of cores... " >&6; }
63961  NUM_CORES=1
63962  FOUND_CORES=no
63963
63964  if test -f /proc/cpuinfo; then
63965    # Looks like a Linux (or cygwin) system
63966    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63967    FOUND_CORES=yes
63968  elif test -x /usr/sbin/psrinfo; then
63969    # Looks like a Solaris system
63970    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63971    FOUND_CORES=yes
63972  elif test -x /usr/sbin/sysctl; then
63973    # Looks like a MacOSX system
63974    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63975    FOUND_CORES=yes
63976  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63977    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63978    FOUND_CORES=yes
63979  elif test -n "$NUMBER_OF_PROCESSORS"; then
63980    # On windows, look in the env
63981    NUM_CORES=$NUMBER_OF_PROCESSORS
63982    FOUND_CORES=yes
63983  fi
63984
63985  if test "x$FOUND_CORES" = xyes; then
63986    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63987$as_echo "$NUM_CORES" >&6; }
63988  else
63989    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
63990$as_echo "could not detect number of cores, defaulting to 1" >&6; }
63991    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
63992$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
63993  fi
63994
63995  else
63996    NUM_CORES=$with_num_cores
63997  fi
63998
63999
64000
64001  # How much memory do we have on this build system?
64002
64003# Check whether --with-memory-size was given.
64004if test "${with_memory_size+set}" = set; then :
64005  withval=$with_memory_size;
64006fi
64007
64008  if test "x$with_memory_size" = x; then
64009    # The memory size was not specified, try to probe it.
64010
64011  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64012$as_echo_n "checking for memory size... " >&6; }
64013  # Default to 1024 MB
64014  MEMORY_SIZE=1024
64015  FOUND_MEM=no
64016
64017  if test -f /proc/meminfo; then
64018    # Looks like a Linux (or cygwin) system
64019    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64020    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64021    FOUND_MEM=yes
64022  elif test -x /usr/sbin/prtconf; then
64023    # Looks like a Solaris or AIX system
64024    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64025    FOUND_MEM=yes
64026  elif test -x /usr/sbin/sysctl; then
64027    # Looks like a MacOSX system
64028    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64029    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64030    FOUND_MEM=yes
64031  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64032    # Windows, but without cygwin
64033    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64034    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64035    FOUND_MEM=yes
64036  fi
64037
64038  if test "x$FOUND_MEM" = xyes; then
64039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64040$as_echo "$MEMORY_SIZE MB" >&6; }
64041  else
64042    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64043$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64044    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64045$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64046  fi
64047
64048  else
64049    MEMORY_SIZE=$with_memory_size
64050  fi
64051
64052
64053
64054  # Provide a decent default number of parallel jobs for make depending on
64055  # number of cores, amount of memory and machine architecture.
64056
64057# Check whether --with-jobs was given.
64058if test "${with_jobs+set}" = set; then :
64059  withval=$with_jobs;
64060fi
64061
64062  if test "x$with_jobs" = x; then
64063    # Number of jobs was not specified, calculate.
64064    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64065$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64066    # Approximate memory in GB.
64067    memory_gb=`expr $MEMORY_SIZE / 1024`
64068    # Pick the lowest of memory in gb and number of cores.
64069    if test "$memory_gb" -lt "$NUM_CORES"; then
64070      JOBS="$memory_gb"
64071    else
64072      JOBS="$NUM_CORES"
64073    fi
64074    if test "$JOBS" -eq "0"; then
64075      JOBS=1
64076    fi
64077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64078$as_echo "$JOBS" >&6; }
64079  else
64080    JOBS=$with_jobs
64081  fi
64082
64083
64084
64085  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64086
64087# Check whether --with-test-jobs was given.
64088if test "${with_test_jobs+set}" = set; then :
64089  withval=$with_test_jobs;
64090fi
64091
64092  if test "x$with_test_jobs" = x; then
64093      TEST_JOBS=0
64094  else
64095      TEST_JOBS=$with_test_jobs
64096  fi
64097
64098
64099
64100# Setup arguments for the boot jdk (after cores and memory have been setup)
64101
64102  ##############################################################################
64103  #
64104  # Specify jvm options for anything that is run with the Boot JDK.
64105  # Not all JVM:s accept the same arguments on the command line.
64106  #
64107
64108# Check whether --with-boot-jdk-jvmargs was given.
64109if test "${with_boot_jdk_jvmargs+set}" = set; then :
64110  withval=$with_boot_jdk_jvmargs;
64111fi
64112
64113
64114  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64115$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64116
64117  # Disable special log output when a debug build is used as Boot JDK...
64118
64119  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64120  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64121  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64122  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64123  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64124  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64125    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64126    JVM_ARG_OK=true
64127  else
64128    $ECHO "Arg failed:" >&5
64129    $ECHO "$OUTPUT" >&5
64130    JVM_ARG_OK=false
64131  fi
64132
64133
64134  # Force en-US environment
64135
64136  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64137  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64138  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64139  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64140  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64141  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64142    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64143    JVM_ARG_OK=true
64144  else
64145    $ECHO "Arg failed:" >&5
64146    $ECHO "$OUTPUT" >&5
64147    JVM_ARG_OK=false
64148  fi
64149
64150
64151  # Apply user provided options.
64152
64153  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64154  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64155  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64156  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64157  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64158  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64159    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64160    JVM_ARG_OK=true
64161  else
64162    $ECHO "Arg failed:" >&5
64163    $ECHO "$OUTPUT" >&5
64164    JVM_ARG_OK=false
64165  fi
64166
64167
64168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64169$as_echo "$boot_jdk_jvmargs" >&6; }
64170
64171  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64172  JAVA_FLAGS=$boot_jdk_jvmargs
64173
64174
64175
64176  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64177$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64178
64179  # Starting amount of heap memory.
64180
64181  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64182  $ECHO "Command: $JAVA -Xms64M -version" >&5
64183  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64184  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64185  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64186  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64187    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64188    JVM_ARG_OK=true
64189  else
64190    $ECHO "Arg failed:" >&5
64191    $ECHO "$OUTPUT" >&5
64192    JVM_ARG_OK=false
64193  fi
64194
64195  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64196
64197  # Maximum amount of heap memory and stack size.
64198  JVM_HEAP_LIMIT_32="1024"
64199  # Running a 64 bit JVM allows for and requires a bigger heap
64200  JVM_HEAP_LIMIT_64="1600"
64201  STACK_SIZE_32=768
64202  STACK_SIZE_64=1536
64203  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64204  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64205    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64206  fi
64207  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64208    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64209  fi
64210  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64211    JVM_HEAP_LIMIT_32=512
64212    JVM_HEAP_LIMIT_64=512
64213  fi
64214
64215  if test "x$BOOT_JDK_BITS" = "x32"; then
64216    STACK_SIZE=$STACK_SIZE_32
64217    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64218  else
64219    STACK_SIZE=$STACK_SIZE_64
64220    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64221  fi
64222
64223  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64224  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64225  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64226  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64227  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64228  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64229    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64230    JVM_ARG_OK=true
64231  else
64232    $ECHO "Arg failed:" >&5
64233    $ECHO "$OUTPUT" >&5
64234    JVM_ARG_OK=false
64235  fi
64236
64237
64238  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64239  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64240  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64241  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64242  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64243  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64244    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64245    JVM_ARG_OK=true
64246  else
64247    $ECHO "Arg failed:" >&5
64248    $ECHO "$OUTPUT" >&5
64249    JVM_ARG_OK=false
64250  fi
64251
64252
64253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64254$as_echo "$boot_jdk_jvmargs_big" >&6; }
64255
64256  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64257
64258
64259  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64260    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64261    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64262  else
64263    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64264    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64265  fi
64266  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64267  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64268  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64269$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64271$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64272
64273
64274  # By default, the main javac compilations use big
64275  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64276
64277
64278  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64279$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64280
64281  # Use serial gc for small short lived tools if possible
64282
64283  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64284  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64285  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64286  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64287  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64288  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64289    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64290    JVM_ARG_OK=true
64291  else
64292    $ECHO "Arg failed:" >&5
64293    $ECHO "$OUTPUT" >&5
64294    JVM_ARG_OK=false
64295  fi
64296
64297
64298  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64299  $ECHO "Command: $JAVA -Xms32M -version" >&5
64300  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64301  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64302  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64303  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64304    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64305    JVM_ARG_OK=true
64306  else
64307    $ECHO "Arg failed:" >&5
64308    $ECHO "$OUTPUT" >&5
64309    JVM_ARG_OK=false
64310  fi
64311
64312
64313  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64314  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64315  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64316  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64317  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64318  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64319    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64320    JVM_ARG_OK=true
64321  else
64322    $ECHO "Arg failed:" >&5
64323    $ECHO "$OUTPUT" >&5
64324    JVM_ARG_OK=false
64325  fi
64326
64327
64328  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64329  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64330  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64331  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64332  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64333  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64334    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64335    JVM_ARG_OK=true
64336  else
64337    $ECHO "Arg failed:" >&5
64338    $ECHO "$OUTPUT" >&5
64339    JVM_ARG_OK=false
64340  fi
64341
64342
64343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64344$as_echo "$boot_jdk_jvmargs_small" >&6; }
64345
64346  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64347
64348
64349  JAVA_TOOL_FLAGS_SMALL=""
64350  for f in $JAVA_FLAGS_SMALL; do
64351    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64352  done
64353
64354
64355
64356# Setup smart javac (after cores and memory have been setup)
64357
64358
64359# Check whether --with-sjavac-server-java was given.
64360if test "${with_sjavac_server_java+set}" = set; then :
64361  withval=$with_sjavac_server_java;
64362fi
64363
64364
64365  if test "x$with_sjavac_server_java" != x; then
64366    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64367    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64368    if test "x$FOUND_VERSION" = x; then
64369      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64370    fi
64371  else
64372    SJAVAC_SERVER_JAVA="$JAVA"
64373  fi
64374
64375
64376  if test "$MEMORY_SIZE" -gt "3000"; then
64377
64378  $ECHO "Check if jvm arg is ok: -d64" >&5
64379  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64380  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64381  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64382  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64383  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64384    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64385    JVM_ARG_OK=true
64386  else
64387    $ECHO "Arg failed:" >&5
64388    $ECHO "$OUTPUT" >&5
64389    JVM_ARG_OK=false
64390  fi
64391
64392    if test "$JVM_ARG_OK" = true; then
64393      JVM_64BIT=true
64394      JVM_ARG_OK=false
64395    fi
64396  fi
64397
64398  MX_VALUE=`expr $MEMORY_SIZE / 2`
64399  if test "$JVM_64BIT" = true; then
64400    # Set ms lower than mx since more than one instance of the server might
64401    # get launched at the same time before they figure out which instance won.
64402    MS_VALUE=512
64403    if test "$MX_VALUE" -gt "2048"; then
64404      MX_VALUE=2048
64405    fi
64406  else
64407    MS_VALUE=256
64408    if test "$MX_VALUE" -gt "1500"; then
64409      MX_VALUE=1500
64410    fi
64411  fi
64412  if test "$MX_VALUE" -lt "512"; then
64413    MX_VALUE=512
64414  fi
64415
64416  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64417  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64418  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64419  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64420  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64421  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64422    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64423    JVM_ARG_OK=true
64424  else
64425    $ECHO "Arg failed:" >&5
64426    $ECHO "$OUTPUT" >&5
64427    JVM_ARG_OK=false
64428  fi
64429
64430
64431
64432  # Check whether --enable-sjavac was given.
64433if test "${enable_sjavac+set}" = set; then :
64434  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64435else
64436  ENABLE_SJAVAC="no"
64437fi
64438
64439  if test "x$JVM_ARG_OK" = "xfalse"; then
64440    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64441$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64442    ENABLE_SJAVAC="no"
64443  fi
64444  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64445$as_echo_n "checking whether to use sjavac... " >&6; }
64446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64447$as_echo "$ENABLE_SJAVAC" >&6; }
64448
64449
64450  # Check whether --enable-javac-server was given.
64451if test "${enable_javac_server+set}" = set; then :
64452  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64453else
64454  ENABLE_JAVAC_SERVER="yes"
64455fi
64456
64457  if test "x$JVM_ARG_OK" = "xfalse"; then
64458    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64459$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64460    ENABLE_JAVAC_SERVER="no"
64461  fi
64462  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64463$as_echo_n "checking whether to use javac server... " >&6; }
64464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64465$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64466
64467
64468  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64469    # When using a server javac, the small client instances do not need much
64470    # resources.
64471    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64472  fi
64473
64474
64475# Setup use of icecc if requested
64476
64477  # Check whether --enable-icecc was given.
64478if test "${enable_icecc+set}" = set; then :
64479  enableval=$enable_icecc;
64480fi
64481
64482
64483  if test "x${enable_icecc}" = "xyes"; then
64484
64485
64486
64487  # Publish this variable in the help.
64488
64489
64490  if [ -z "${ICECC_CMD+x}" ]; then
64491    # The variable is not set by user, try to locate tool using the code snippet
64492    for ac_prog in icecc
64493do
64494  # Extract the first word of "$ac_prog", so it can be a program name with args.
64495set dummy $ac_prog; ac_word=$2
64496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64497$as_echo_n "checking for $ac_word... " >&6; }
64498if ${ac_cv_path_ICECC_CMD+:} false; then :
64499  $as_echo_n "(cached) " >&6
64500else
64501  case $ICECC_CMD in
64502  [\\/]* | ?:[\\/]*)
64503  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64504  ;;
64505  *)
64506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64507for as_dir in $PATH
64508do
64509  IFS=$as_save_IFS
64510  test -z "$as_dir" && as_dir=.
64511    for ac_exec_ext in '' $ac_executable_extensions; do
64512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64513    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64515    break 2
64516  fi
64517done
64518  done
64519IFS=$as_save_IFS
64520
64521  ;;
64522esac
64523fi
64524ICECC_CMD=$ac_cv_path_ICECC_CMD
64525if test -n "$ICECC_CMD"; then
64526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64527$as_echo "$ICECC_CMD" >&6; }
64528else
64529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64530$as_echo "no" >&6; }
64531fi
64532
64533
64534  test -n "$ICECC_CMD" && break
64535done
64536
64537  else
64538    # The variable is set, but is it from the command line or the environment?
64539
64540    # Try to remove the string !ICECC_CMD! from our list.
64541    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64542    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64543      # If it failed, the variable was not from the command line. Ignore it,
64544      # but warn the user (except for BASH, which is always set by the calling BASH).
64545      if test "xICECC_CMD" != xBASH; then
64546        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64547$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64548      fi
64549      # Try to locate tool using the code snippet
64550      for ac_prog in icecc
64551do
64552  # Extract the first word of "$ac_prog", so it can be a program name with args.
64553set dummy $ac_prog; ac_word=$2
64554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64555$as_echo_n "checking for $ac_word... " >&6; }
64556if ${ac_cv_path_ICECC_CMD+:} false; then :
64557  $as_echo_n "(cached) " >&6
64558else
64559  case $ICECC_CMD in
64560  [\\/]* | ?:[\\/]*)
64561  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64562  ;;
64563  *)
64564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64565for as_dir in $PATH
64566do
64567  IFS=$as_save_IFS
64568  test -z "$as_dir" && as_dir=.
64569    for ac_exec_ext in '' $ac_executable_extensions; do
64570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64571    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64573    break 2
64574  fi
64575done
64576  done
64577IFS=$as_save_IFS
64578
64579  ;;
64580esac
64581fi
64582ICECC_CMD=$ac_cv_path_ICECC_CMD
64583if test -n "$ICECC_CMD"; then
64584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64585$as_echo "$ICECC_CMD" >&6; }
64586else
64587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64588$as_echo "no" >&6; }
64589fi
64590
64591
64592  test -n "$ICECC_CMD" && break
64593done
64594
64595    else
64596      # If it succeeded, then it was overridden by the user. We will use it
64597      # for the tool.
64598
64599      # First remove it from the list of overridden variables, so we can test
64600      # for unknown variables in the end.
64601      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64602
64603      # Check if we try to supply an empty value
64604      if test "x$ICECC_CMD" = x; then
64605        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64606$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64607        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64608$as_echo_n "checking for ICECC_CMD... " >&6; }
64609        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64610$as_echo "disabled" >&6; }
64611      else
64612        # Check if the provided tool contains a complete path.
64613        tool_specified="$ICECC_CMD"
64614        tool_basename="${tool_specified##*/}"
64615        if test "x$tool_basename" = "x$tool_specified"; then
64616          # A command without a complete path is provided, search $PATH.
64617          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64618$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64619          # Extract the first word of "$tool_basename", so it can be a program name with args.
64620set dummy $tool_basename; ac_word=$2
64621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64622$as_echo_n "checking for $ac_word... " >&6; }
64623if ${ac_cv_path_ICECC_CMD+:} false; then :
64624  $as_echo_n "(cached) " >&6
64625else
64626  case $ICECC_CMD in
64627  [\\/]* | ?:[\\/]*)
64628  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64629  ;;
64630  *)
64631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64632for as_dir in $PATH
64633do
64634  IFS=$as_save_IFS
64635  test -z "$as_dir" && as_dir=.
64636    for ac_exec_ext in '' $ac_executable_extensions; do
64637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64638    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64640    break 2
64641  fi
64642done
64643  done
64644IFS=$as_save_IFS
64645
64646  ;;
64647esac
64648fi
64649ICECC_CMD=$ac_cv_path_ICECC_CMD
64650if test -n "$ICECC_CMD"; then
64651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64652$as_echo "$ICECC_CMD" >&6; }
64653else
64654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64655$as_echo "no" >&6; }
64656fi
64657
64658
64659          if test "x$ICECC_CMD" = x; then
64660            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64661          fi
64662        else
64663          # Otherwise we believe it is a complete path. Use it as it is.
64664          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64665$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64666          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64667$as_echo_n "checking for ICECC_CMD... " >&6; }
64668          if test ! -x "$tool_specified"; then
64669            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64670$as_echo "not found" >&6; }
64671            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64672          fi
64673          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64674$as_echo "$tool_specified" >&6; }
64675        fi
64676      fi
64677    fi
64678
64679  fi
64680
64681
64682
64683  if test "x$ICECC_CMD" = x; then
64684    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64685  fi
64686
64687
64688    old_path="$PATH"
64689
64690    # Look for icecc-create-env in some known places
64691    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64692
64693
64694
64695  # Publish this variable in the help.
64696
64697
64698  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64699    # The variable is not set by user, try to locate tool using the code snippet
64700    for ac_prog in icecc-create-env
64701do
64702  # Extract the first word of "$ac_prog", so it can be a program name with args.
64703set dummy $ac_prog; ac_word=$2
64704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64705$as_echo_n "checking for $ac_word... " >&6; }
64706if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64707  $as_echo_n "(cached) " >&6
64708else
64709  case $ICECC_CREATE_ENV in
64710  [\\/]* | ?:[\\/]*)
64711  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64712  ;;
64713  *)
64714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64715for as_dir in $PATH
64716do
64717  IFS=$as_save_IFS
64718  test -z "$as_dir" && as_dir=.
64719    for ac_exec_ext in '' $ac_executable_extensions; do
64720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64721    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64723    break 2
64724  fi
64725done
64726  done
64727IFS=$as_save_IFS
64728
64729  ;;
64730esac
64731fi
64732ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64733if test -n "$ICECC_CREATE_ENV"; then
64734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64735$as_echo "$ICECC_CREATE_ENV" >&6; }
64736else
64737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64738$as_echo "no" >&6; }
64739fi
64740
64741
64742  test -n "$ICECC_CREATE_ENV" && break
64743done
64744
64745  else
64746    # The variable is set, but is it from the command line or the environment?
64747
64748    # Try to remove the string !ICECC_CREATE_ENV! from our list.
64749    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64750    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64751      # If it failed, the variable was not from the command line. Ignore it,
64752      # but warn the user (except for BASH, which is always set by the calling BASH).
64753      if test "xICECC_CREATE_ENV" != xBASH; then
64754        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64755$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64756      fi
64757      # Try to locate tool using the code snippet
64758      for ac_prog in icecc-create-env
64759do
64760  # Extract the first word of "$ac_prog", so it can be a program name with args.
64761set dummy $ac_prog; ac_word=$2
64762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64763$as_echo_n "checking for $ac_word... " >&6; }
64764if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64765  $as_echo_n "(cached) " >&6
64766else
64767  case $ICECC_CREATE_ENV in
64768  [\\/]* | ?:[\\/]*)
64769  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64770  ;;
64771  *)
64772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64773for as_dir in $PATH
64774do
64775  IFS=$as_save_IFS
64776  test -z "$as_dir" && as_dir=.
64777    for ac_exec_ext in '' $ac_executable_extensions; do
64778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64779    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64781    break 2
64782  fi
64783done
64784  done
64785IFS=$as_save_IFS
64786
64787  ;;
64788esac
64789fi
64790ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64791if test -n "$ICECC_CREATE_ENV"; then
64792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64793$as_echo "$ICECC_CREATE_ENV" >&6; }
64794else
64795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64796$as_echo "no" >&6; }
64797fi
64798
64799
64800  test -n "$ICECC_CREATE_ENV" && break
64801done
64802
64803    else
64804      # If it succeeded, then it was overridden by the user. We will use it
64805      # for the tool.
64806
64807      # First remove it from the list of overridden variables, so we can test
64808      # for unknown variables in the end.
64809      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64810
64811      # Check if we try to supply an empty value
64812      if test "x$ICECC_CREATE_ENV" = x; then
64813        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64814$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64815        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64816$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64817        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64818$as_echo "disabled" >&6; }
64819      else
64820        # Check if the provided tool contains a complete path.
64821        tool_specified="$ICECC_CREATE_ENV"
64822        tool_basename="${tool_specified##*/}"
64823        if test "x$tool_basename" = "x$tool_specified"; then
64824          # A command without a complete path is provided, search $PATH.
64825          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64826$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64827          # Extract the first word of "$tool_basename", so it can be a program name with args.
64828set dummy $tool_basename; ac_word=$2
64829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64830$as_echo_n "checking for $ac_word... " >&6; }
64831if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64832  $as_echo_n "(cached) " >&6
64833else
64834  case $ICECC_CREATE_ENV in
64835  [\\/]* | ?:[\\/]*)
64836  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64837  ;;
64838  *)
64839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64840for as_dir in $PATH
64841do
64842  IFS=$as_save_IFS
64843  test -z "$as_dir" && as_dir=.
64844    for ac_exec_ext in '' $ac_executable_extensions; do
64845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64846    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64848    break 2
64849  fi
64850done
64851  done
64852IFS=$as_save_IFS
64853
64854  ;;
64855esac
64856fi
64857ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64858if test -n "$ICECC_CREATE_ENV"; then
64859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64860$as_echo "$ICECC_CREATE_ENV" >&6; }
64861else
64862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64863$as_echo "no" >&6; }
64864fi
64865
64866
64867          if test "x$ICECC_CREATE_ENV" = x; then
64868            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64869          fi
64870        else
64871          # Otherwise we believe it is a complete path. Use it as it is.
64872          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64873$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64874          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64875$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64876          if test ! -x "$tool_specified"; then
64877            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64878$as_echo "not found" >&6; }
64879            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64880          fi
64881          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64882$as_echo "$tool_specified" >&6; }
64883        fi
64884      fi
64885    fi
64886
64887  fi
64888
64889
64890
64891  if test "x$ICECC_CREATE_ENV" = x; then
64892    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64893  fi
64894
64895
64896    # Use icecc-create-env to create a minimal compilation environment that can
64897    # be sent to the other hosts in the icecream cluster.
64898    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64899    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64900    # Older versions of icecc does not have the --gcc parameter
64901    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64902      icecc_gcc_arg="--gcc"
64903    fi
64904    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64905
64906  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64907      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64908          ${icecc_create_env_log} 2>&1 )
64909  if test "$?" != "0"; then
64910    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64911$as_echo "$as_me: icecc-create-env output:" >&6;}
64912    cat \
64913          ${icecc_create_env_log}
64914    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64915  fi
64916
64917    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64918      # For clang, the icecc compilerwrapper is needed. It usually resides next
64919      # to icecc-create-env.
64920
64921
64922
64923  # Publish this variable in the help.
64924
64925
64926  if [ -z "${ICECC_WRAPPER+x}" ]; then
64927    # The variable is not set by user, try to locate tool using the code snippet
64928    for ac_prog in compilerwrapper
64929do
64930  # Extract the first word of "$ac_prog", so it can be a program name with args.
64931set dummy $ac_prog; ac_word=$2
64932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64933$as_echo_n "checking for $ac_word... " >&6; }
64934if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64935  $as_echo_n "(cached) " >&6
64936else
64937  case $ICECC_WRAPPER in
64938  [\\/]* | ?:[\\/]*)
64939  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64940  ;;
64941  *)
64942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64943for as_dir in $PATH
64944do
64945  IFS=$as_save_IFS
64946  test -z "$as_dir" && as_dir=.
64947    for ac_exec_ext in '' $ac_executable_extensions; do
64948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64949    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64951    break 2
64952  fi
64953done
64954  done
64955IFS=$as_save_IFS
64956
64957  ;;
64958esac
64959fi
64960ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64961if test -n "$ICECC_WRAPPER"; then
64962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64963$as_echo "$ICECC_WRAPPER" >&6; }
64964else
64965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64966$as_echo "no" >&6; }
64967fi
64968
64969
64970  test -n "$ICECC_WRAPPER" && break
64971done
64972
64973  else
64974    # The variable is set, but is it from the command line or the environment?
64975
64976    # Try to remove the string !ICECC_WRAPPER! from our list.
64977    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64978    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64979      # If it failed, the variable was not from the command line. Ignore it,
64980      # but warn the user (except for BASH, which is always set by the calling BASH).
64981      if test "xICECC_WRAPPER" != xBASH; then
64982        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64983$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64984      fi
64985      # Try to locate tool using the code snippet
64986      for ac_prog in compilerwrapper
64987do
64988  # Extract the first word of "$ac_prog", so it can be a program name with args.
64989set dummy $ac_prog; ac_word=$2
64990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64991$as_echo_n "checking for $ac_word... " >&6; }
64992if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64993  $as_echo_n "(cached) " >&6
64994else
64995  case $ICECC_WRAPPER in
64996  [\\/]* | ?:[\\/]*)
64997  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64998  ;;
64999  *)
65000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65001for as_dir in $PATH
65002do
65003  IFS=$as_save_IFS
65004  test -z "$as_dir" && as_dir=.
65005    for ac_exec_ext in '' $ac_executable_extensions; do
65006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65007    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65009    break 2
65010  fi
65011done
65012  done
65013IFS=$as_save_IFS
65014
65015  ;;
65016esac
65017fi
65018ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65019if test -n "$ICECC_WRAPPER"; then
65020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65021$as_echo "$ICECC_WRAPPER" >&6; }
65022else
65023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65024$as_echo "no" >&6; }
65025fi
65026
65027
65028  test -n "$ICECC_WRAPPER" && break
65029done
65030
65031    else
65032      # If it succeeded, then it was overridden by the user. We will use it
65033      # for the tool.
65034
65035      # First remove it from the list of overridden variables, so we can test
65036      # for unknown variables in the end.
65037      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65038
65039      # Check if we try to supply an empty value
65040      if test "x$ICECC_WRAPPER" = x; then
65041        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65042$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65043        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65044$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65045        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65046$as_echo "disabled" >&6; }
65047      else
65048        # Check if the provided tool contains a complete path.
65049        tool_specified="$ICECC_WRAPPER"
65050        tool_basename="${tool_specified##*/}"
65051        if test "x$tool_basename" = "x$tool_specified"; then
65052          # A command without a complete path is provided, search $PATH.
65053          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65054$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65055          # Extract the first word of "$tool_basename", so it can be a program name with args.
65056set dummy $tool_basename; ac_word=$2
65057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65058$as_echo_n "checking for $ac_word... " >&6; }
65059if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65060  $as_echo_n "(cached) " >&6
65061else
65062  case $ICECC_WRAPPER in
65063  [\\/]* | ?:[\\/]*)
65064  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65065  ;;
65066  *)
65067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65068for as_dir in $PATH
65069do
65070  IFS=$as_save_IFS
65071  test -z "$as_dir" && as_dir=.
65072    for ac_exec_ext in '' $ac_executable_extensions; do
65073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65074    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65076    break 2
65077  fi
65078done
65079  done
65080IFS=$as_save_IFS
65081
65082  ;;
65083esac
65084fi
65085ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65086if test -n "$ICECC_WRAPPER"; then
65087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65088$as_echo "$ICECC_WRAPPER" >&6; }
65089else
65090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65091$as_echo "no" >&6; }
65092fi
65093
65094
65095          if test "x$ICECC_WRAPPER" = x; then
65096            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65097          fi
65098        else
65099          # Otherwise we believe it is a complete path. Use it as it is.
65100          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65101$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65102          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65103$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65104          if test ! -x "$tool_specified"; then
65105            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65106$as_echo "not found" >&6; }
65107            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65108          fi
65109          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65110$as_echo "$tool_specified" >&6; }
65111        fi
65112      fi
65113    fi
65114
65115  fi
65116
65117
65118
65119  if test "x$ICECC_WRAPPER" = x; then
65120    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65121  fi
65122
65123
65124
65125  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65126      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65127  if test "$?" != "0"; then
65128    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65129$as_echo "$as_me: icecc-create-env output:" >&6;}
65130    cat ${icecc_create_env_log}
65131    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65132  fi
65133
65134    else
65135      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65136    fi
65137    PATH="$old_path"
65138    # The bundle with the compiler gets a name based on checksums. Parse log file
65139    # to find it.
65140    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65141    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65142    if test ! -f ${ICECC_ENV_BUNDLE}; then
65143      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65144    fi
65145    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65146$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65147    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65148$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65149    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65150
65151    if test "x${COMPILE_TYPE}" = "xcross"; then
65152      # If cross compiling, create a separate env package for the build compiler
65153      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65154      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65155      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65156
65157  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65158      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65159            ${icecc_create_env_log_build} 2>&1 )
65160  if test "$?" != "0"; then
65161    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65162$as_echo "$as_me: icecc-create-env output:" >&6;}
65163    cat \
65164            ${icecc_create_env_log_build}
65165    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65166  fi
65167
65168      elif test "x${BUILD_CC##*/}" = "xclang"; then
65169
65170  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65171      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65172  if test "$?" != "0"; then
65173    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65174$as_echo "$as_me: icecc-create-env output:" >&6;}
65175    cat ${icecc_create_env_log_build}
65176    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65177  fi
65178
65179      else
65180        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65181      fi
65182      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65183      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65184      if test ! -f ${ICECC_ENV_BUNDLE}; then
65185        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65186      fi
65187      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65188$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65189      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65190$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65191      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65192          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65193    else
65194      BUILD_ICECC="${ICECC}"
65195    fi
65196
65197
65198  fi
65199
65200
65201# Can the C/C++ compiler use precompiled headers?
65202
65203
65204  ###############################################################################
65205  #
65206  # Can the C/C++ compiler use precompiled headers?
65207  #
65208  # Check whether --enable-precompiled-headers was given.
65209if test "${enable_precompiled_headers+set}" = set; then :
65210  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65211else
65212  ENABLE_PRECOMPH=yes
65213fi
65214
65215
65216  USE_PRECOMPILED_HEADER=1
65217  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65218$as_echo_n "checking If precompiled header is enabled... " >&6; }
65219  if test "x$ENABLE_PRECOMPH" = xno; then
65220    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65221$as_echo "no, forced" >&6; }
65222    USE_PRECOMPILED_HEADER=0
65223  elif test "x$ICECC" != "x"; then
65224    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65225$as_echo "no, does not work effectively with icecc" >&6; }
65226    USE_PRECOMPILED_HEADER=0
65227  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65229$as_echo "no, does not work with Solaris Studio" >&6; }
65230    USE_PRECOMPILED_HEADER=0
65231  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65233$as_echo "no, does not work with xlc" >&6; }
65234    USE_PRECOMPILED_HEADER=0
65235  else
65236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65237$as_echo "yes" >&6; }
65238  fi
65239
65240  if test "x$ENABLE_PRECOMPH" = xyes; then
65241    # Check that the compiler actually supports precomp headers.
65242    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65243      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65244$as_echo_n "checking that precompiled headers work... " >&6; }
65245      echo "int alfa();" > conftest.h
65246      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65247      if test ! -f conftest.hpp.gch; then
65248        USE_PRECOMPILED_HEADER=0
65249        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65250$as_echo "no" >&6; }
65251      else
65252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65253$as_echo "yes" >&6; }
65254      fi
65255      $RM conftest.h conftest.hpp.gch
65256    fi
65257  fi
65258
65259
65260
65261
65262# Setup use of ccache, if available
65263
65264  # Check whether --enable-ccache was given.
65265if test "${enable_ccache+set}" = set; then :
65266  enableval=$enable_ccache;
65267fi
65268
65269
65270  CCACHE_STATUS=
65271  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65272$as_echo_n "checking is ccache enabled... " >&6; }
65273  if test "x$enable_ccache" = xyes; then
65274    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65275      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65276$as_echo "yes" >&6; }
65277      OLD_PATH="$PATH"
65278      if test "x$TOOLCHAIN_PATH" != x; then
65279        PATH=$TOOLCHAIN_PATH:$PATH
65280      fi
65281
65282
65283
65284  # Publish this variable in the help.
65285
65286
65287  if [ -z "${CCACHE+x}" ]; then
65288    # The variable is not set by user, try to locate tool using the code snippet
65289    for ac_prog in ccache
65290do
65291  # Extract the first word of "$ac_prog", so it can be a program name with args.
65292set dummy $ac_prog; ac_word=$2
65293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65294$as_echo_n "checking for $ac_word... " >&6; }
65295if ${ac_cv_path_CCACHE+:} false; then :
65296  $as_echo_n "(cached) " >&6
65297else
65298  case $CCACHE in
65299  [\\/]* | ?:[\\/]*)
65300  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65301  ;;
65302  *)
65303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65304for as_dir in $PATH
65305do
65306  IFS=$as_save_IFS
65307  test -z "$as_dir" && as_dir=.
65308    for ac_exec_ext in '' $ac_executable_extensions; do
65309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65310    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65312    break 2
65313  fi
65314done
65315  done
65316IFS=$as_save_IFS
65317
65318  ;;
65319esac
65320fi
65321CCACHE=$ac_cv_path_CCACHE
65322if test -n "$CCACHE"; then
65323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65324$as_echo "$CCACHE" >&6; }
65325else
65326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65327$as_echo "no" >&6; }
65328fi
65329
65330
65331  test -n "$CCACHE" && break
65332done
65333
65334  else
65335    # The variable is set, but is it from the command line or the environment?
65336
65337    # Try to remove the string !CCACHE! from our list.
65338    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65339    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65340      # If it failed, the variable was not from the command line. Ignore it,
65341      # but warn the user (except for BASH, which is always set by the calling BASH).
65342      if test "xCCACHE" != xBASH; then
65343        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65344$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65345      fi
65346      # Try to locate tool using the code snippet
65347      for ac_prog in ccache
65348do
65349  # Extract the first word of "$ac_prog", so it can be a program name with args.
65350set dummy $ac_prog; ac_word=$2
65351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65352$as_echo_n "checking for $ac_word... " >&6; }
65353if ${ac_cv_path_CCACHE+:} false; then :
65354  $as_echo_n "(cached) " >&6
65355else
65356  case $CCACHE in
65357  [\\/]* | ?:[\\/]*)
65358  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65359  ;;
65360  *)
65361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65362for as_dir in $PATH
65363do
65364  IFS=$as_save_IFS
65365  test -z "$as_dir" && as_dir=.
65366    for ac_exec_ext in '' $ac_executable_extensions; do
65367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65368    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65370    break 2
65371  fi
65372done
65373  done
65374IFS=$as_save_IFS
65375
65376  ;;
65377esac
65378fi
65379CCACHE=$ac_cv_path_CCACHE
65380if test -n "$CCACHE"; then
65381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65382$as_echo "$CCACHE" >&6; }
65383else
65384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65385$as_echo "no" >&6; }
65386fi
65387
65388
65389  test -n "$CCACHE" && break
65390done
65391
65392    else
65393      # If it succeeded, then it was overridden by the user. We will use it
65394      # for the tool.
65395
65396      # First remove it from the list of overridden variables, so we can test
65397      # for unknown variables in the end.
65398      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65399
65400      # Check if we try to supply an empty value
65401      if test "x$CCACHE" = x; then
65402        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65403$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65404        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65405$as_echo_n "checking for CCACHE... " >&6; }
65406        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65407$as_echo "disabled" >&6; }
65408      else
65409        # Check if the provided tool contains a complete path.
65410        tool_specified="$CCACHE"
65411        tool_basename="${tool_specified##*/}"
65412        if test "x$tool_basename" = "x$tool_specified"; then
65413          # A command without a complete path is provided, search $PATH.
65414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65415$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65416          # Extract the first word of "$tool_basename", so it can be a program name with args.
65417set dummy $tool_basename; ac_word=$2
65418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65419$as_echo_n "checking for $ac_word... " >&6; }
65420if ${ac_cv_path_CCACHE+:} false; then :
65421  $as_echo_n "(cached) " >&6
65422else
65423  case $CCACHE in
65424  [\\/]* | ?:[\\/]*)
65425  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65426  ;;
65427  *)
65428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65429for as_dir in $PATH
65430do
65431  IFS=$as_save_IFS
65432  test -z "$as_dir" && as_dir=.
65433    for ac_exec_ext in '' $ac_executable_extensions; do
65434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65435    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65437    break 2
65438  fi
65439done
65440  done
65441IFS=$as_save_IFS
65442
65443  ;;
65444esac
65445fi
65446CCACHE=$ac_cv_path_CCACHE
65447if test -n "$CCACHE"; then
65448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65449$as_echo "$CCACHE" >&6; }
65450else
65451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65452$as_echo "no" >&6; }
65453fi
65454
65455
65456          if test "x$CCACHE" = x; then
65457            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65458          fi
65459        else
65460          # Otherwise we believe it is a complete path. Use it as it is.
65461          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65462$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65463          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65464$as_echo_n "checking for CCACHE... " >&6; }
65465          if test ! -x "$tool_specified"; then
65466            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65467$as_echo "not found" >&6; }
65468            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65469          fi
65470          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65471$as_echo "$tool_specified" >&6; }
65472        fi
65473      fi
65474    fi
65475
65476  fi
65477
65478
65479
65480  if test "x$CCACHE" = x; then
65481    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65482  fi
65483
65484
65485      PATH="$OLD_PATH"
65486      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65487      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65488    else
65489      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65490$as_echo "no" >&6; }
65491      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65492$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65493    fi
65494  elif test "x$enable_ccache" = xno; then
65495    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65496$as_echo "no, explicitly disabled" >&6; }
65497    CCACHE_STATUS="Disabled"
65498  elif test "x$enable_ccache" = x; then
65499    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65500$as_echo "no" >&6; }
65501  else
65502    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65503$as_echo "unknown" >&6; }
65504    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65505  fi
65506
65507
65508
65509# Check whether --with-ccache-dir was given.
65510if test "${with_ccache_dir+set}" = set; then :
65511  withval=$with_ccache_dir;
65512fi
65513
65514
65515  if test "x$with_ccache_dir" != x; then
65516    # When using a non home ccache directory, assume the use is to share ccache files
65517    # with other users. Thus change the umask.
65518    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65519    if test "x$CCACHE" = x; then
65520      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65521$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65522    fi
65523  fi
65524
65525  if test "x$CCACHE" != x; then
65526
65527  if test "x$CCACHE" != x; then
65528    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65529      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65530          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65531      if test "x$HAS_BAD_CCACHE" != "x"; then
65532        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65533      fi
65534      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65535$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65536      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65537      PUSHED_FLAGS="$CXXFLAGS"
65538      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65539      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65540/* end confdefs.h.  */
65541
65542int
65543main ()
65544{
65545
65546  ;
65547  return 0;
65548}
65549_ACEOF
65550if ac_fn_cxx_try_compile "$LINENO"; then :
65551  CC_KNOWS_CCACHE_TRICK=yes
65552else
65553  CC_KNOWS_CCACHE_TRICK=no
65554fi
65555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65556      CXXFLAGS="$PUSHED_FLAGS"
65557      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65559$as_echo "yes" >&6; }
65560        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65561
65562        CCACHE_SLOPPINESS=pch_defines,time_macros
65563      else
65564        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65565$as_echo "no" >&6; }
65566        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65567      fi
65568    fi
65569
65570    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65571        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65572
65573    if test "x$SET_CCACHE_DIR" != x; then
65574      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65575      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65576    fi
65577  fi
65578
65579  fi
65580
65581
65582###############################################################################
65583#
65584# And now the finish...
65585#
65586###############################################################################
65587
65588# Check for some common pitfalls
65589
65590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65591    file_to_test="$SRC_ROOT/LICENSE"
65592    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65593      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
65594    fi
65595  fi
65596
65597
65598  # Did user specify any unknown variables?
65599
65600  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65601    # Replace the separating ! with spaces before presenting for end user.
65602    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65603    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65604$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65605  fi
65606
65607
65608  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65609$as_echo_n "checking if build directory is on local disk... " >&6; }
65610
65611  # df -l lists only local disks; if the given directory is not found then
65612  # a non-zero exit code is given
65613  if test "x$DF" = x; then
65614    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65615      # msys does not have df; use Windows "net use" instead.
65616      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65617      if test "x$IS_NETWORK_DISK" = x; then
65618        OUTPUT_DIR_IS_LOCAL="yes"
65619      else
65620        OUTPUT_DIR_IS_LOCAL="no"
65621      fi
65622    else
65623      # No df here, say it's local
65624      OUTPUT_DIR_IS_LOCAL="yes"
65625    fi
65626  else
65627    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65628      OUTPUT_DIR_IS_LOCAL="yes"
65629    else
65630      OUTPUT_DIR_IS_LOCAL="no"
65631    fi
65632  fi
65633
65634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65635$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65636
65637
65638
65639  # Check if the user has any old-style ALT_ variables set.
65640  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65641
65642  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65643  # Since we can't properly handle the dependencies for this, warn the user about the situation
65644  if test -e $OUTPUT_ROOT/spec.gmk; then
65645    IS_RECONFIGURE=yes
65646  else
65647    IS_RECONFIGURE=no
65648  fi
65649
65650
65651# At the end, call the custom hook. (Dummy macro if no custom sources available)
65652
65653
65654# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65655
65656  # Keep feature lists sorted and free of duplicates
65657  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65658  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65659  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65660  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65661  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65662  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65663  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65664
65665  # Validate features
65666  for variant in $JVM_VARIANTS; do
65667    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65668$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65669    features_var_name=JVM_FEATURES_$variant
65670    JVM_FEATURES_TO_TEST=${!features_var_name}
65671    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65672$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65673    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
65674    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
65675    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
65676    if test "x$INVALID_FEATURES" != x; then
65677      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65678    fi
65679  done
65680
65681
65682# We're messing a bit with internal autoconf variables to put the config.status
65683# in the output directory instead of the current directory.
65684CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65685
65686# Create the actual output files. Now the main work of configure is done.
65687cat >confcache <<\_ACEOF
65688# This file is a shell script that caches the results of configure
65689# tests run on this system so they can be shared between configure
65690# scripts and configure runs, see configure's option --config-cache.
65691# It is not useful on other systems.  If it contains results you don't
65692# want to keep, you may remove or edit it.
65693#
65694# config.status only pays attention to the cache file if you give it
65695# the --recheck option to rerun configure.
65696#
65697# `ac_cv_env_foo' variables (set or unset) will be overridden when
65698# loading this file, other *unset* `ac_cv_foo' will be assigned the
65699# following values.
65700
65701_ACEOF
65702
65703# The following way of writing the cache mishandles newlines in values,
65704# but we know of no workaround that is simple, portable, and efficient.
65705# So, we kill variables containing newlines.
65706# Ultrix sh set writes to stderr and can't be redirected directly,
65707# and sets the high bit in the cache file unless we assign to the vars.
65708(
65709  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65710    eval ac_val=\$$ac_var
65711    case $ac_val in #(
65712    *${as_nl}*)
65713      case $ac_var in #(
65714      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65715$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65716      esac
65717      case $ac_var in #(
65718      _ | IFS | as_nl) ;; #(
65719      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65720      *) { eval $ac_var=; unset $ac_var;} ;;
65721      esac ;;
65722    esac
65723  done
65724
65725  (set) 2>&1 |
65726    case $as_nl`(ac_space=' '; set) 2>&1` in #(
65727    *${as_nl}ac_space=\ *)
65728      # `set' does not quote correctly, so add quotes: double-quote
65729      # substitution turns \\\\ into \\, and sed turns \\ into \.
65730      sed -n \
65731	"s/'/'\\\\''/g;
65732	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65733      ;; #(
65734    *)
65735      # `set' quotes correctly as required by POSIX, so do not add quotes.
65736      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65737      ;;
65738    esac |
65739    sort
65740) |
65741  sed '
65742     /^ac_cv_env_/b end
65743     t clear
65744     :clear
65745     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65746     t end
65747     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65748     :end' >>confcache
65749if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65750  if test -w "$cache_file"; then
65751    if test "x$cache_file" != "x/dev/null"; then
65752      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65753$as_echo "$as_me: updating cache $cache_file" >&6;}
65754      if test ! -f "$cache_file" || test -h "$cache_file"; then
65755	cat confcache >"$cache_file"
65756      else
65757        case $cache_file in #(
65758        */* | ?:*)
65759	  mv -f confcache "$cache_file"$$ &&
65760	  mv -f "$cache_file"$$ "$cache_file" ;; #(
65761        *)
65762	  mv -f confcache "$cache_file" ;;
65763	esac
65764      fi
65765    fi
65766  else
65767    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65768$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65769  fi
65770fi
65771rm -f confcache
65772
65773test "x$prefix" = xNONE && prefix=$ac_default_prefix
65774# Let make expand exec_prefix.
65775test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65776
65777# Transform confdefs.h into DEFS.
65778# Protect against shell expansion while executing Makefile rules.
65779# Protect against Makefile macro expansion.
65780#
65781# If the first sed substitution is executed (which looks for macros that
65782# take arguments), then branch to the quote section.  Otherwise,
65783# look for a macro that doesn't take arguments.
65784ac_script='
65785:mline
65786/\\$/{
65787 N
65788 s,\\\n,,
65789 b mline
65790}
65791t clear
65792:clear
65793s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
65794t quote
65795s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
65796t quote
65797b any
65798:quote
65799s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65800s/\[/\\&/g
65801s/\]/\\&/g
65802s/\$/$$/g
65803H
65804:any
65805${
65806	g
65807	s/^\n//
65808	s/\n/ /g
65809	p
65810}
65811'
65812DEFS=`sed -n "$ac_script" confdefs.h`
65813
65814
65815ac_libobjs=
65816ac_ltlibobjs=
65817U=
65818for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65819  # 1. Remove the extension, and $U if already installed.
65820  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65821  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65822  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65823  #    will be set to the directory where LIBOBJS objects are built.
65824  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65825  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65826done
65827LIBOBJS=$ac_libobjs
65828
65829LTLIBOBJS=$ac_ltlibobjs
65830
65831
65832
65833: "${CONFIG_STATUS=./config.status}"
65834ac_write_fail=0
65835ac_clean_files_save=$ac_clean_files
65836ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65837{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65838$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65839as_write_fail=0
65840cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65841#! $SHELL
65842# Generated by $as_me.
65843# Run this file to recreate the current configuration.
65844# Compiler output produced by configure, useful for debugging
65845# configure, is in config.log if it exists.
65846
65847debug=false
65848ac_cs_recheck=false
65849ac_cs_silent=false
65850
65851SHELL=\${CONFIG_SHELL-$SHELL}
65852export SHELL
65853_ASEOF
65854cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65855## -------------------- ##
65856## M4sh Initialization. ##
65857## -------------------- ##
65858
65859# Be more Bourne compatible
65860DUALCASE=1; export DUALCASE # for MKS sh
65861if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65862  emulate sh
65863  NULLCMD=:
65864  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65865  # is contrary to our usage.  Disable this feature.
65866  alias -g '${1+"$@"}'='"$@"'
65867  setopt NO_GLOB_SUBST
65868else
65869  case `(set -o) 2>/dev/null` in #(
65870  *posix*) :
65871    set -o posix ;; #(
65872  *) :
65873     ;;
65874esac
65875fi
65876
65877
65878as_nl='
65879'
65880export as_nl
65881# Printing a long string crashes Solaris 7 /usr/bin/printf.
65882as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65883as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65884as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65885# Prefer a ksh shell builtin over an external printf program on Solaris,
65886# but without wasting forks for bash or zsh.
65887if test -z "$BASH_VERSION$ZSH_VERSION" \
65888    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65889  as_echo='print -r --'
65890  as_echo_n='print -rn --'
65891elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65892  as_echo='printf %s\n'
65893  as_echo_n='printf %s'
65894else
65895  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65896    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65897    as_echo_n='/usr/ucb/echo -n'
65898  else
65899    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65900    as_echo_n_body='eval
65901      arg=$1;
65902      case $arg in #(
65903      *"$as_nl"*)
65904	expr "X$arg" : "X\\(.*\\)$as_nl";
65905	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65906      esac;
65907      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65908    '
65909    export as_echo_n_body
65910    as_echo_n='sh -c $as_echo_n_body as_echo'
65911  fi
65912  export as_echo_body
65913  as_echo='sh -c $as_echo_body as_echo'
65914fi
65915
65916# The user is always right.
65917if test "${PATH_SEPARATOR+set}" != set; then
65918  PATH_SEPARATOR=:
65919  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65920    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65921      PATH_SEPARATOR=';'
65922  }
65923fi
65924
65925
65926# IFS
65927# We need space, tab and new line, in precisely that order.  Quoting is
65928# there to prevent editors from complaining about space-tab.
65929# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65930# splitting by setting IFS to empty value.)
65931IFS=" ""	$as_nl"
65932
65933# Find who we are.  Look in the path if we contain no directory separator.
65934as_myself=
65935case $0 in #((
65936  *[\\/]* ) as_myself=$0 ;;
65937  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65938for as_dir in $PATH
65939do
65940  IFS=$as_save_IFS
65941  test -z "$as_dir" && as_dir=.
65942    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65943  done
65944IFS=$as_save_IFS
65945
65946     ;;
65947esac
65948# We did not find ourselves, most probably we were run as `sh COMMAND'
65949# in which case we are not to be found in the path.
65950if test "x$as_myself" = x; then
65951  as_myself=$0
65952fi
65953if test ! -f "$as_myself"; then
65954  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65955  exit 1
65956fi
65957
65958# Unset variables that we do not need and which cause bugs (e.g. in
65959# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65960# suppresses any "Segmentation fault" message there.  '((' could
65961# trigger a bug in pdksh 5.2.14.
65962for as_var in BASH_ENV ENV MAIL MAILPATH
65963do eval test x\${$as_var+set} = xset \
65964  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65965done
65966PS1='$ '
65967PS2='> '
65968PS4='+ '
65969
65970# NLS nuisances.
65971LC_ALL=C
65972export LC_ALL
65973LANGUAGE=C
65974export LANGUAGE
65975
65976# CDPATH.
65977(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65978
65979
65980# as_fn_error STATUS ERROR [LINENO LOG_FD]
65981# ----------------------------------------
65982# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65983# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65984# script with STATUS, using 1 if that was 0.
65985as_fn_error ()
65986{
65987  as_status=$1; test $as_status -eq 0 && as_status=1
65988  if test "$4"; then
65989    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65990    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65991  fi
65992  $as_echo "$as_me: error: $2" >&2
65993  as_fn_exit $as_status
65994} # as_fn_error
65995
65996
65997# as_fn_set_status STATUS
65998# -----------------------
65999# Set $? to STATUS, without forking.
66000as_fn_set_status ()
66001{
66002  return $1
66003} # as_fn_set_status
66004
66005# as_fn_exit STATUS
66006# -----------------
66007# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66008as_fn_exit ()
66009{
66010  set +e
66011  as_fn_set_status $1
66012  exit $1
66013} # as_fn_exit
66014
66015# as_fn_unset VAR
66016# ---------------
66017# Portably unset VAR.
66018as_fn_unset ()
66019{
66020  { eval $1=; unset $1;}
66021}
66022as_unset=as_fn_unset
66023# as_fn_append VAR VALUE
66024# ----------------------
66025# Append the text in VALUE to the end of the definition contained in VAR. Take
66026# advantage of any shell optimizations that allow amortized linear growth over
66027# repeated appends, instead of the typical quadratic growth present in naive
66028# implementations.
66029if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66030  eval 'as_fn_append ()
66031  {
66032    eval $1+=\$2
66033  }'
66034else
66035  as_fn_append ()
66036  {
66037    eval $1=\$$1\$2
66038  }
66039fi # as_fn_append
66040
66041# as_fn_arith ARG...
66042# ------------------
66043# Perform arithmetic evaluation on the ARGs, and store the result in the
66044# global $as_val. Take advantage of shells that can avoid forks. The arguments
66045# must be portable across $(()) and expr.
66046if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66047  eval 'as_fn_arith ()
66048  {
66049    as_val=$(( $* ))
66050  }'
66051else
66052  as_fn_arith ()
66053  {
66054    as_val=`expr "$@" || test $? -eq 1`
66055  }
66056fi # as_fn_arith
66057
66058
66059if expr a : '\(a\)' >/dev/null 2>&1 &&
66060   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66061  as_expr=expr
66062else
66063  as_expr=false
66064fi
66065
66066if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66067  as_basename=basename
66068else
66069  as_basename=false
66070fi
66071
66072if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66073  as_dirname=dirname
66074else
66075  as_dirname=false
66076fi
66077
66078as_me=`$as_basename -- "$0" ||
66079$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66080	 X"$0" : 'X\(//\)$' \| \
66081	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66082$as_echo X/"$0" |
66083    sed '/^.*\/\([^/][^/]*\)\/*$/{
66084	    s//\1/
66085	    q
66086	  }
66087	  /^X\/\(\/\/\)$/{
66088	    s//\1/
66089	    q
66090	  }
66091	  /^X\/\(\/\).*/{
66092	    s//\1/
66093	    q
66094	  }
66095	  s/.*/./; q'`
66096
66097# Avoid depending upon Character Ranges.
66098as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66099as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66100as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66101as_cr_digits='0123456789'
66102as_cr_alnum=$as_cr_Letters$as_cr_digits
66103
66104ECHO_C= ECHO_N= ECHO_T=
66105case `echo -n x` in #(((((
66106-n*)
66107  case `echo 'xy\c'` in
66108  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66109  xy)  ECHO_C='\c';;
66110  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66111       ECHO_T='	';;
66112  esac;;
66113*)
66114  ECHO_N='-n';;
66115esac
66116
66117rm -f conf$$ conf$$.exe conf$$.file
66118if test -d conf$$.dir; then
66119  rm -f conf$$.dir/conf$$.file
66120else
66121  rm -f conf$$.dir
66122  mkdir conf$$.dir 2>/dev/null
66123fi
66124if (echo >conf$$.file) 2>/dev/null; then
66125  if ln -s conf$$.file conf$$ 2>/dev/null; then
66126    as_ln_s='ln -s'
66127    # ... but there are two gotchas:
66128    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66129    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66130    # In both cases, we have to default to `cp -pR'.
66131    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66132      as_ln_s='cp -pR'
66133  elif ln conf$$.file conf$$ 2>/dev/null; then
66134    as_ln_s=ln
66135  else
66136    as_ln_s='cp -pR'
66137  fi
66138else
66139  as_ln_s='cp -pR'
66140fi
66141rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66142rmdir conf$$.dir 2>/dev/null
66143
66144
66145# as_fn_mkdir_p
66146# -------------
66147# Create "$as_dir" as a directory, including parents if necessary.
66148as_fn_mkdir_p ()
66149{
66150
66151  case $as_dir in #(
66152  -*) as_dir=./$as_dir;;
66153  esac
66154  test -d "$as_dir" || eval $as_mkdir_p || {
66155    as_dirs=
66156    while :; do
66157      case $as_dir in #(
66158      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66159      *) as_qdir=$as_dir;;
66160      esac
66161      as_dirs="'$as_qdir' $as_dirs"
66162      as_dir=`$as_dirname -- "$as_dir" ||
66163$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66164	 X"$as_dir" : 'X\(//\)[^/]' \| \
66165	 X"$as_dir" : 'X\(//\)$' \| \
66166	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66167$as_echo X"$as_dir" |
66168    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66169	    s//\1/
66170	    q
66171	  }
66172	  /^X\(\/\/\)[^/].*/{
66173	    s//\1/
66174	    q
66175	  }
66176	  /^X\(\/\/\)$/{
66177	    s//\1/
66178	    q
66179	  }
66180	  /^X\(\/\).*/{
66181	    s//\1/
66182	    q
66183	  }
66184	  s/.*/./; q'`
66185      test -d "$as_dir" && break
66186    done
66187    test -z "$as_dirs" || eval "mkdir $as_dirs"
66188  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66189
66190
66191} # as_fn_mkdir_p
66192if mkdir -p . 2>/dev/null; then
66193  as_mkdir_p='mkdir -p "$as_dir"'
66194else
66195  test -d ./-p && rmdir ./-p
66196  as_mkdir_p=false
66197fi
66198
66199
66200# as_fn_executable_p FILE
66201# -----------------------
66202# Test if FILE is an executable regular file.
66203as_fn_executable_p ()
66204{
66205  test -f "$1" && test -x "$1"
66206} # as_fn_executable_p
66207as_test_x='test -x'
66208as_executable_p=as_fn_executable_p
66209
66210# Sed expression to map a string onto a valid CPP name.
66211as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66212
66213# Sed expression to map a string onto a valid variable name.
66214as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66215
66216
66217exec 6>&1
66218## ----------------------------------- ##
66219## Main body of $CONFIG_STATUS script. ##
66220## ----------------------------------- ##
66221_ASEOF
66222test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66223
66224cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66225# Save the log message, to keep $0 and so on meaningful, and to
66226# report actual input values of CONFIG_FILES etc. instead of their
66227# values after options handling.
66228ac_log="
66229This file was extended by OpenJDK $as_me jdk9, which was
66230generated by GNU Autoconf 2.69.  Invocation command line was
66231
66232  CONFIG_FILES    = $CONFIG_FILES
66233  CONFIG_HEADERS  = $CONFIG_HEADERS
66234  CONFIG_LINKS    = $CONFIG_LINKS
66235  CONFIG_COMMANDS = $CONFIG_COMMANDS
66236  $ $0 $@
66237
66238on `(hostname || uname -n) 2>/dev/null | sed 1q`
66239"
66240
66241_ACEOF
66242
66243case $ac_config_files in *"
66244"*) set x $ac_config_files; shift; ac_config_files=$*;;
66245esac
66246
66247
66248
66249cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66250# Files that config.status was made for.
66251config_files="$ac_config_files"
66252
66253_ACEOF
66254
66255cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66256ac_cs_usage="\
66257\`$as_me' instantiates files and other configuration actions
66258from templates according to the current configuration.  Unless the files
66259and actions are specified as TAGs, all are instantiated by default.
66260
66261Usage: $0 [OPTION]... [TAG]...
66262
66263  -h, --help       print this help, then exit
66264  -V, --version    print version number and configuration settings, then exit
66265      --config     print configuration, then exit
66266  -q, --quiet, --silent
66267                   do not print progress messages
66268  -d, --debug      don't remove temporary files
66269      --recheck    update $as_me by reconfiguring in the same conditions
66270      --file=FILE[:TEMPLATE]
66271                   instantiate the configuration file FILE
66272
66273Configuration files:
66274$config_files
66275
66276Report bugs to <build-dev@openjdk.java.net>.
66277OpenJDK home page: <http://openjdk.java.net>."
66278
66279_ACEOF
66280cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66281ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66282ac_cs_version="\\
66283OpenJDK config.status jdk9
66284configured by $0, generated by GNU Autoconf 2.69,
66285  with options \\"\$ac_cs_config\\"
66286
66287Copyright (C) 2012 Free Software Foundation, Inc.
66288This config.status script is free software; the Free Software Foundation
66289gives unlimited permission to copy, distribute and modify it."
66290
66291ac_pwd='$ac_pwd'
66292srcdir='$srcdir'
66293AWK='$AWK'
66294test -n "\$AWK" || AWK=awk
66295_ACEOF
66296
66297cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66298# The default lists apply if the user does not specify any file.
66299ac_need_defaults=:
66300while test $# != 0
66301do
66302  case $1 in
66303  --*=?*)
66304    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66305    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66306    ac_shift=:
66307    ;;
66308  --*=)
66309    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66310    ac_optarg=
66311    ac_shift=:
66312    ;;
66313  *)
66314    ac_option=$1
66315    ac_optarg=$2
66316    ac_shift=shift
66317    ;;
66318  esac
66319
66320  case $ac_option in
66321  # Handling of the options.
66322  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66323    ac_cs_recheck=: ;;
66324  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66325    $as_echo "$ac_cs_version"; exit ;;
66326  --config | --confi | --conf | --con | --co | --c )
66327    $as_echo "$ac_cs_config"; exit ;;
66328  --debug | --debu | --deb | --de | --d | -d )
66329    debug=: ;;
66330  --file | --fil | --fi | --f )
66331    $ac_shift
66332    case $ac_optarg in
66333    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66334    '') as_fn_error $? "missing file argument" ;;
66335    esac
66336    as_fn_append CONFIG_FILES " '$ac_optarg'"
66337    ac_need_defaults=false;;
66338  --he | --h |  --help | --hel | -h )
66339    $as_echo "$ac_cs_usage"; exit ;;
66340  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66341  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66342    ac_cs_silent=: ;;
66343
66344  # This is an error.
66345  -*) as_fn_error $? "unrecognized option: \`$1'
66346Try \`$0 --help' for more information." ;;
66347
66348  *) as_fn_append ac_config_targets " $1"
66349     ac_need_defaults=false ;;
66350
66351  esac
66352  shift
66353done
66354
66355ac_configure_extra_args=
66356
66357if $ac_cs_silent; then
66358  exec 6>/dev/null
66359  ac_configure_extra_args="$ac_configure_extra_args --silent"
66360fi
66361
66362_ACEOF
66363cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66364if \$ac_cs_recheck; then
66365  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66366  shift
66367  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66368  CONFIG_SHELL='$SHELL'
66369  export CONFIG_SHELL
66370  exec "\$@"
66371fi
66372
66373_ACEOF
66374cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66375exec 5>>config.log
66376{
66377  echo
66378  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66379## Running $as_me. ##
66380_ASBOX
66381  $as_echo "$ac_log"
66382} >&5
66383
66384_ACEOF
66385cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66386_ACEOF
66387
66388cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66389
66390# Handling of arguments.
66391for ac_config_target in $ac_config_targets
66392do
66393  case $ac_config_target in
66394    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66395    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66396    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66397    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66398    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66399
66400  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66401  esac
66402done
66403
66404
66405# If the user did not use the arguments to specify the items to instantiate,
66406# then the envvar interface is used.  Set only those that are not.
66407# We use the long form for the default assignment because of an extremely
66408# bizarre bug on SunOS 4.1.3.
66409if $ac_need_defaults; then
66410  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66411fi
66412
66413# Have a temporary directory for convenience.  Make it in the build tree
66414# simply because there is no reason against having it here, and in addition,
66415# creating and moving files from /tmp can sometimes cause problems.
66416# Hook for its removal unless debugging.
66417# Note that there is a small window in which the directory will not be cleaned:
66418# after its creation but before its name has been assigned to `$tmp'.
66419$debug ||
66420{
66421  tmp= ac_tmp=
66422  trap 'exit_status=$?
66423  : "${ac_tmp:=$tmp}"
66424  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66425' 0
66426  trap 'as_fn_exit 1' 1 2 13 15
66427}
66428# Create a (secure) tmp directory for tmp files.
66429
66430{
66431  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66432  test -d "$tmp"
66433}  ||
66434{
66435  tmp=./conf$$-$RANDOM
66436  (umask 077 && mkdir "$tmp")
66437} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66438ac_tmp=$tmp
66439
66440# Set up the scripts for CONFIG_FILES section.
66441# No need to generate them if there are no CONFIG_FILES.
66442# This happens for instance with `./config.status config.h'.
66443if test -n "$CONFIG_FILES"; then
66444
66445
66446ac_cr=`echo X | tr X '\015'`
66447# On cygwin, bash can eat \r inside `` if the user requested igncr.
66448# But we know of no other shell where ac_cr would be empty at this
66449# point, so we can use a bashism as a fallback.
66450if test "x$ac_cr" = x; then
66451  eval ac_cr=\$\'\\r\'
66452fi
66453ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66454if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66455  ac_cs_awk_cr='\\r'
66456else
66457  ac_cs_awk_cr=$ac_cr
66458fi
66459
66460echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66461_ACEOF
66462
66463
66464{
66465  echo "cat >conf$$subs.awk <<_ACEOF" &&
66466  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66467  echo "_ACEOF"
66468} >conf$$subs.sh ||
66469  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66470ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66471ac_delim='%!_!# '
66472for ac_last_try in false false false false false :; do
66473  . ./conf$$subs.sh ||
66474    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66475
66476  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66477  if test $ac_delim_n = $ac_delim_num; then
66478    break
66479  elif $ac_last_try; then
66480    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66481  else
66482    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66483  fi
66484done
66485rm -f conf$$subs.sh
66486
66487cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66488cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66489_ACEOF
66490sed -n '
66491h
66492s/^/S["/; s/!.*/"]=/
66493p
66494g
66495s/^[^!]*!//
66496:repl
66497t repl
66498s/'"$ac_delim"'$//
66499t delim
66500:nl
66501h
66502s/\(.\{148\}\)..*/\1/
66503t more1
66504s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66505p
66506n
66507b repl
66508:more1
66509s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66510p
66511g
66512s/.\{148\}//
66513t nl
66514:delim
66515h
66516s/\(.\{148\}\)..*/\1/
66517t more2
66518s/["\\]/\\&/g; s/^/"/; s/$/"/
66519p
66520b
66521:more2
66522s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66523p
66524g
66525s/.\{148\}//
66526t delim
66527' <conf$$subs.awk | sed '
66528/^[^""]/{
66529  N
66530  s/\n//
66531}
66532' >>$CONFIG_STATUS || ac_write_fail=1
66533rm -f conf$$subs.awk
66534cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66535_ACAWK
66536cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66537  for (key in S) S_is_set[key] = 1
66538  FS = ""
66539
66540}
66541{
66542  line = $ 0
66543  nfields = split(line, field, "@")
66544  substed = 0
66545  len = length(field[1])
66546  for (i = 2; i < nfields; i++) {
66547    key = field[i]
66548    keylen = length(key)
66549    if (S_is_set[key]) {
66550      value = S[key]
66551      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66552      len += length(value) + length(field[++i])
66553      substed = 1
66554    } else
66555      len += 1 + keylen
66556  }
66557
66558  print line
66559}
66560
66561_ACAWK
66562_ACEOF
66563cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66564if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66565  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66566else
66567  cat
66568fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66569  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66570_ACEOF
66571
66572# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66573# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66574# trailing colons and then remove the whole line if VPATH becomes empty
66575# (actually we leave an empty line to preserve line numbers).
66576if test "x$srcdir" = x.; then
66577  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66578h
66579s///
66580s/^/:/
66581s/[	 ]*$/:/
66582s/:\$(srcdir):/:/g
66583s/:\${srcdir}:/:/g
66584s/:@srcdir@:/:/g
66585s/^:*//
66586s/:*$//
66587x
66588s/\(=[	 ]*\).*/\1/
66589G
66590s/\n//
66591s/^[^=]*=[	 ]*$//
66592}'
66593fi
66594
66595cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66596fi # test -n "$CONFIG_FILES"
66597
66598
66599eval set X "  :F $CONFIG_FILES      "
66600shift
66601for ac_tag
66602do
66603  case $ac_tag in
66604  :[FHLC]) ac_mode=$ac_tag; continue;;
66605  esac
66606  case $ac_mode$ac_tag in
66607  :[FHL]*:*);;
66608  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66609  :[FH]-) ac_tag=-:-;;
66610  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66611  esac
66612  ac_save_IFS=$IFS
66613  IFS=:
66614  set x $ac_tag
66615  IFS=$ac_save_IFS
66616  shift
66617  ac_file=$1
66618  shift
66619
66620  case $ac_mode in
66621  :L) ac_source=$1;;
66622  :[FH])
66623    ac_file_inputs=
66624    for ac_f
66625    do
66626      case $ac_f in
66627      -) ac_f="$ac_tmp/stdin";;
66628      *) # Look for the file first in the build tree, then in the source tree
66629	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66630	 # because $ac_f cannot contain `:'.
66631	 test -f "$ac_f" ||
66632	   case $ac_f in
66633	   [\\/$]*) false;;
66634	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66635	   esac ||
66636	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66637      esac
66638      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66639      as_fn_append ac_file_inputs " '$ac_f'"
66640    done
66641
66642    # Let's still pretend it is `configure' which instantiates (i.e., don't
66643    # use $as_me), people would be surprised to read:
66644    #    /* config.h.  Generated by config.status.  */
66645    configure_input='Generated from '`
66646	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66647	`' by configure.'
66648    if test x"$ac_file" != x-; then
66649      configure_input="$ac_file.  $configure_input"
66650      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66651$as_echo "$as_me: creating $ac_file" >&6;}
66652    fi
66653    # Neutralize special characters interpreted by sed in replacement strings.
66654    case $configure_input in #(
66655    *\&* | *\|* | *\\* )
66656       ac_sed_conf_input=`$as_echo "$configure_input" |
66657       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66658    *) ac_sed_conf_input=$configure_input;;
66659    esac
66660
66661    case $ac_tag in
66662    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66663      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66664    esac
66665    ;;
66666  esac
66667
66668  ac_dir=`$as_dirname -- "$ac_file" ||
66669$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66670	 X"$ac_file" : 'X\(//\)[^/]' \| \
66671	 X"$ac_file" : 'X\(//\)$' \| \
66672	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66673$as_echo X"$ac_file" |
66674    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66675	    s//\1/
66676	    q
66677	  }
66678	  /^X\(\/\/\)[^/].*/{
66679	    s//\1/
66680	    q
66681	  }
66682	  /^X\(\/\/\)$/{
66683	    s//\1/
66684	    q
66685	  }
66686	  /^X\(\/\).*/{
66687	    s//\1/
66688	    q
66689	  }
66690	  s/.*/./; q'`
66691  as_dir="$ac_dir"; as_fn_mkdir_p
66692  ac_builddir=.
66693
66694case "$ac_dir" in
66695.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66696*)
66697  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66698  # A ".." for each directory in $ac_dir_suffix.
66699  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66700  case $ac_top_builddir_sub in
66701  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66702  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66703  esac ;;
66704esac
66705ac_abs_top_builddir=$ac_pwd
66706ac_abs_builddir=$ac_pwd$ac_dir_suffix
66707# for backward compatibility:
66708ac_top_builddir=$ac_top_build_prefix
66709
66710case $srcdir in
66711  .)  # We are building in place.
66712    ac_srcdir=.
66713    ac_top_srcdir=$ac_top_builddir_sub
66714    ac_abs_top_srcdir=$ac_pwd ;;
66715  [\\/]* | ?:[\\/]* )  # Absolute name.
66716    ac_srcdir=$srcdir$ac_dir_suffix;
66717    ac_top_srcdir=$srcdir
66718    ac_abs_top_srcdir=$srcdir ;;
66719  *) # Relative name.
66720    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66721    ac_top_srcdir=$ac_top_build_prefix$srcdir
66722    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66723esac
66724ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66725
66726
66727  case $ac_mode in
66728  :F)
66729  #
66730  # CONFIG_FILE
66731  #
66732
66733_ACEOF
66734
66735cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66736# If the template does not know about datarootdir, expand it.
66737# FIXME: This hack should be removed a few years after 2.60.
66738ac_datarootdir_hack=; ac_datarootdir_seen=
66739ac_sed_dataroot='
66740/datarootdir/ {
66741  p
66742  q
66743}
66744/@datadir@/p
66745/@docdir@/p
66746/@infodir@/p
66747/@localedir@/p
66748/@mandir@/p'
66749case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66750*datarootdir*) ac_datarootdir_seen=yes;;
66751*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66752  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66753$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66754_ACEOF
66755cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66756  ac_datarootdir_hack='
66757  s&@datadir@&$datadir&g
66758  s&@docdir@&$docdir&g
66759  s&@infodir@&$infodir&g
66760  s&@localedir@&$localedir&g
66761  s&@mandir@&$mandir&g
66762  s&\\\${datarootdir}&$datarootdir&g' ;;
66763esac
66764_ACEOF
66765
66766# Neutralize VPATH when `$srcdir' = `.'.
66767# Shell code in configure.ac might set extrasub.
66768# FIXME: do we really want to maintain this feature?
66769cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66770ac_sed_extra="$ac_vpsub
66771$extrasub
66772_ACEOF
66773cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66774:t
66775/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66776s|@configure_input@|$ac_sed_conf_input|;t t
66777s&@top_builddir@&$ac_top_builddir_sub&;t t
66778s&@top_build_prefix@&$ac_top_build_prefix&;t t
66779s&@srcdir@&$ac_srcdir&;t t
66780s&@abs_srcdir@&$ac_abs_srcdir&;t t
66781s&@top_srcdir@&$ac_top_srcdir&;t t
66782s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66783s&@builddir@&$ac_builddir&;t t
66784s&@abs_builddir@&$ac_abs_builddir&;t t
66785s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66786$ac_datarootdir_hack
66787"
66788eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66789  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66790
66791test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66792  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66793  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
66794      "$ac_tmp/out"`; test -z "$ac_out"; } &&
66795  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66796which seems to be undefined.  Please make sure it is defined" >&5
66797$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66798which seems to be undefined.  Please make sure it is defined" >&2;}
66799
66800  rm -f "$ac_tmp/stdin"
66801  case $ac_file in
66802  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66803  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66804  esac \
66805  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66806 ;;
66807
66808
66809
66810  esac
66811
66812done # for ac_tag
66813
66814
66815as_fn_exit 0
66816_ACEOF
66817ac_clean_files=$ac_clean_files_save
66818
66819test $ac_write_fail = 0 ||
66820  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66821
66822
66823# configure is writing to config.log, and then calls config.status.
66824# config.status does its own redirection, appending to config.log.
66825# Unfortunately, on DOS this fails, as config.log is still kept open
66826# by configure, so config.status won't be able to write to it; its
66827# output is simply discarded.  So we exec the FD to /dev/null,
66828# effectively closing config.log, so it can be properly (re)opened and
66829# appended to by config.status.  When coming back to configure, we
66830# need to make the FD available again.
66831if test "$no_create" != yes; then
66832  ac_cs_success=:
66833  ac_config_status_args=
66834  test "$silent" = yes &&
66835    ac_config_status_args="$ac_config_status_args --quiet"
66836  exec 5>/dev/null
66837  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66838  exec 5>>config.log
66839  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66840  # would make configure fail if this is the last instruction.
66841  $ac_cs_success || as_fn_exit 1
66842fi
66843if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66844  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66845$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66846fi
66847
66848
66849# After AC_OUTPUT, we need to do final work
66850
66851
66852  # Try to move config.log (generated by autoconf) to the configure-support directory.
66853  if test -e ./config.log; then
66854    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66855  fi
66856
66857  # Rotate our log file (configure.log)
66858  if test -e "$OUTPUT_ROOT/configure.log.old"; then
66859    $RM -f "$OUTPUT_ROOT/configure.log.old"
66860  fi
66861  if test -e "$OUTPUT_ROOT/configure.log"; then
66862    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66863  fi
66864
66865  # Move configure.log from current directory to the build output root
66866  if test -e ./configure.log; then
66867    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66868  fi
66869
66870  # Make the compare script executable
66871  $CHMOD +x $OUTPUT_ROOT/compare.sh
66872
66873
66874# Finally output some useful information to the user
66875
66876  # Finally output some useful information to the user
66877
66878  printf "\n"
66879  printf "====================================================\n"
66880  if test "x$no_create" != "xyes"; then
66881    if test "x$IS_RECONFIGURE" != "xyes"; then
66882      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66883    else
66884      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66885    fi
66886  else
66887    if test "x$IS_RECONFIGURE" != "xyes"; then
66888      printf "A configuration has been successfully checked but not created\n"
66889    else
66890      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66891    fi
66892  fi
66893  if test "x$CONFIGURE_COMMAND_LINE" != x; then
66894    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66895  else
66896    printf "using default settings.\n"
66897  fi
66898
66899  printf "\n"
66900  printf "Configuration summary:\n"
66901  printf "* Debug level:    $DEBUG_LEVEL\n"
66902  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66903  printf "* JDK variant:    $JDK_VARIANT\n"
66904  printf "* JVM variants:   $JVM_VARIANTS\n"
66905  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66906  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66907
66908  printf "\n"
66909  printf "Tools summary:\n"
66910  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66911    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66912  fi
66913  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66914  if test "x$TOOLCHAIN_VERSION" != "x"; then
66915    print_version=" $TOOLCHAIN_VERSION"
66916  fi
66917  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66918  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66919  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66920
66921  printf "\n"
66922  printf "Build performance summary:\n"
66923  printf "* Cores to use:   $JOBS\n"
66924  printf "* Memory limit:   $MEMORY_SIZE MB\n"
66925  if test "x$CCACHE_STATUS" != "x"; then
66926    printf "* ccache status:  $CCACHE_STATUS\n"
66927  fi
66928  printf "\n"
66929
66930  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66931    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66932    printf "will result in longer build times.\n"
66933    printf "\n"
66934  fi
66935
66936  if test "x$FOUND_ALT_VARIABLES" != "x"; then
66937    printf "WARNING: You have old-style ALT_ environment variables set.\n"
66938    printf "These are not respected, and will be ignored. It is recommended\n"
66939    printf "that you clean your environment. The following variables are set:\n"
66940    printf "$FOUND_ALT_VARIABLES\n"
66941    printf "\n"
66942  fi
66943
66944  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66945    printf "WARNING: Your build output directory is not on a local disk.\n"
66946    printf "This will severely degrade build performance!\n"
66947    printf "It is recommended that you create an output directory on a local disk,\n"
66948    printf "and run the configure script again from that directory.\n"
66949    printf "\n"
66950  fi
66951
66952  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66953    printf "WARNING: The result of this configuration has overridden an older\n"
66954    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66955    printf "proper build. Failure to do so might result in strange build problems.\n"
66956    printf "\n"
66957  fi
66958
66959  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66960    printf "WARNING: The result of this configuration was not saved.\n"
66961    printf "You should run without '--no-create | -n' to create the configuration.\n"
66962    printf "\n"
66963  fi
66964
66965
66966
66967  # Locate config.log.
66968  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66969    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66970  elif test -e "./config.log"; then
66971    CONFIG_LOG_PATH="."
66972  fi
66973
66974  if test -e "$CONFIG_LOG_PATH/config.log"; then
66975    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66976    if test $? -eq 0; then
66977      printf "The following warnings were produced. Repeated here for convenience:\n"
66978      # We must quote sed expression (using []) to stop m4 from eating the [].
66979      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66980      printf "\n"
66981    fi
66982  fi
66983
66984