generated-configure.sh revision 2350:f74da64ee053
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=1480584361
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  # Workaround for using different imported module-info.java in Jake due to a
31202  # change in format. Remove once new format is standard in JDK 9 and javafx
31203  # delivers just that.
31204  if test -d "$IMPORT_MODULES_TOPDIR/modules_src_jake"; then
31205    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src_jake $IMPORT_MODULES_SRC"
31206  fi
31207  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31208    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31209  fi
31210
31211
31212
31213
31214
31215
31216
31217
31218
31219###############################################################################
31220#
31221# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31222# native code.
31223#
31224###############################################################################
31225
31226# See if we are doing a complete static build or not
31227
31228  # Check whether --enable-static-build was given.
31229if test "${enable_static_build+set}" = set; then :
31230  enableval=$enable_static_build;
31231fi
31232
31233  STATIC_BUILD=false
31234  if test "x$enable_static_build" = "xyes"; then
31235    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31236$as_echo_n "checking if static build is enabled... " >&6; }
31237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31238$as_echo "yes" >&6; }
31239    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31240      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31241    fi
31242    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31243    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31244    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31245    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31246    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31247    STATIC_BUILD=true
31248  elif test "x$enable_static_build" = "xno"; then
31249    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31250$as_echo_n "checking if static build is enabled... " >&6; }
31251    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31252$as_echo "no" >&6; }
31253  elif test "x$enable_static_build" != "x"; then
31254    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31255  fi
31256
31257
31258
31259
31260# First determine the toolchain type (compiler family)
31261
31262
31263# Check whether --with-toolchain-type was given.
31264if test "${with_toolchain_type+set}" = set; then :
31265  withval=$with_toolchain_type;
31266fi
31267
31268
31269  # Use indirect variable referencing
31270  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31271  VALID_TOOLCHAINS=${!toolchain_var_name}
31272
31273  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31274    if test -n "$XCODEBUILD"; then
31275      # On Mac OS X, default toolchain to clang after Xcode 5
31276      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31277      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31278      if test $? -ne 0; then
31279        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31280      fi
31281      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31282          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31283          $CUT -f 1 -d .`
31284      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31285$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31286      if test $XCODE_MAJOR_VERSION -ge 5; then
31287          DEFAULT_TOOLCHAIN="clang"
31288      else
31289          DEFAULT_TOOLCHAIN="gcc"
31290      fi
31291    else
31292      # If Xcode is not installed, but the command line tools are
31293      # then we can't run xcodebuild. On these systems we should
31294      # default to clang
31295      DEFAULT_TOOLCHAIN="clang"
31296    fi
31297  else
31298    # First toolchain type in the list is the default
31299    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31300  fi
31301
31302  if test "x$with_toolchain_type" = xlist; then
31303    # List all toolchains
31304    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31305$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31306    for toolchain in $VALID_TOOLCHAINS; do
31307      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31308      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31309      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31310    done
31311
31312    exit 0
31313  elif test "x$with_toolchain_type" != x; then
31314    # User override; check that it is valid
31315    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31316      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31317$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31318      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31319$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31320      as_fn_error $? "Cannot continue." "$LINENO" 5
31321    fi
31322    TOOLCHAIN_TYPE=$with_toolchain_type
31323  else
31324    # No flag given, use default
31325    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31326  fi
31327
31328
31329  TOOLCHAIN_CC_BINARY_clang="clang"
31330  TOOLCHAIN_CC_BINARY_gcc="gcc"
31331  TOOLCHAIN_CC_BINARY_microsoft="cl"
31332  TOOLCHAIN_CC_BINARY_solstudio="cc"
31333  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31334
31335  TOOLCHAIN_CXX_BINARY_clang="clang++"
31336  TOOLCHAIN_CXX_BINARY_gcc="g++"
31337  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31338  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31339  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31340
31341  # Use indirect variable referencing
31342  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31343  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31344  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31345  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31346  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31347  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31348  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31349  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31350
31351
31352  # Define filename patterns
31353  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31354    LIBRARY_PREFIX=
31355    SHARED_LIBRARY_SUFFIX='.dll'
31356    STATIC_LIBRARY_SUFFIX='.lib'
31357    SHARED_LIBRARY='$1.dll'
31358    STATIC_LIBRARY='$1.lib'
31359    OBJ_SUFFIX='.obj'
31360    EXE_SUFFIX='.exe'
31361  else
31362    LIBRARY_PREFIX=lib
31363    SHARED_LIBRARY_SUFFIX='.so'
31364    STATIC_LIBRARY_SUFFIX='.a'
31365    SHARED_LIBRARY='lib$1.so'
31366    STATIC_LIBRARY='lib$1.a'
31367    OBJ_SUFFIX='.o'
31368    EXE_SUFFIX=''
31369    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31370      # For full static builds, we're overloading the SHARED_LIBRARY
31371      # variables in order to limit the amount of changes required.
31372      # It would be better to remove SHARED and just use LIBRARY and
31373      # LIBRARY_SUFFIX for libraries that can be built either
31374      # shared or static and use STATIC_* for libraries that are
31375      # always built statically.
31376      if test "x$STATIC_BUILD" = xtrue; then
31377        SHARED_LIBRARY='lib$1.a'
31378        SHARED_LIBRARY_SUFFIX='.a'
31379      else
31380        SHARED_LIBRARY='lib$1.dylib'
31381        SHARED_LIBRARY_SUFFIX='.dylib'
31382      fi
31383    fi
31384  fi
31385
31386
31387
31388
31389
31390
31391
31392
31393
31394
31395  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31396    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31397$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31398  else
31399    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31400$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31401  fi
31402
31403
31404# User supplied flags should be used when configure detects compilers
31405
31406  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31407    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31408$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31409  fi
31410
31411  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31412    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31413$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31414  fi
31415
31416  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31417    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31418$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31419  fi
31420
31421
31422# Check whether --with-extra-cflags was given.
31423if test "${with_extra_cflags+set}" = set; then :
31424  withval=$with_extra_cflags;
31425fi
31426
31427
31428
31429# Check whether --with-extra-cxxflags was given.
31430if test "${with_extra_cxxflags+set}" = set; then :
31431  withval=$with_extra_cxxflags;
31432fi
31433
31434
31435
31436# Check whether --with-extra-ldflags was given.
31437if test "${with_extra_ldflags+set}" = set; then :
31438  withval=$with_extra_ldflags;
31439fi
31440
31441
31442  EXTRA_CFLAGS="$with_extra_cflags"
31443  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31444  EXTRA_LDFLAGS="$with_extra_ldflags"
31445
31446  # Hotspot needs these set in their legacy form
31447  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31448  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31449  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31450
31451
31452
31453
31454
31455
31456
31457
31458
31459  # The global CFLAGS and LDLAGS variables are used by configure tests and
31460  # should include the extra parameters
31461  CFLAGS="$EXTRA_CFLAGS"
31462  CXXFLAGS="$EXTRA_CXXFLAGS"
31463  LDFLAGS="$EXTRA_LDFLAGS"
31464  CPPFLAGS=""
31465
31466# The sysroot cflags are needed for configure to be able to run the compilers
31467
31468  if test "x$SYSROOT" != "x"; then
31469    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31470      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31471        # Solaris Studio does not have a concept of sysroot. Instead we must
31472        # make sure the default include and lib dirs are appended to each
31473        # compile and link command line. Must also add -I-xbuiltin to enable
31474        # inlining of system functions and intrinsics.
31475        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31476        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31477            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31478      fi
31479    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31480      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31481      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31482    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31483      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31484      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31485    fi
31486    # Propagate the sysroot args to hotspot
31487    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31488    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31489    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31490    # The global CFLAGS and LDFLAGS variables need these for configure to function
31491    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31492    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31493    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31494    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31495  fi
31496
31497  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31498    # We also need -iframework<path>/System/Library/Frameworks
31499    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31500    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31501    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31502    # set this here so it doesn't have to be peppered throughout the forest
31503    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31504    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31505  fi
31506
31507
31508
31509
31510
31511# Then detect the actual binaries needed
31512
31513  # FIXME: Is this needed?
31514  ac_ext=cpp
31515ac_cpp='$CXXCPP $CPPFLAGS'
31516ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31517ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31518ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31519
31520
31521  # Store the CFLAGS etc passed to the configure script.
31522  ORG_CFLAGS="$CFLAGS"
31523  ORG_CXXFLAGS="$CXXFLAGS"
31524
31525  # autoconf magic only relies on PATH, so update it if tools dir is specified
31526  OLD_PATH="$PATH"
31527
31528  # On Windows, we need to detect the visual studio installation first.
31529  # This will change the PATH, but we need to keep that new PATH even
31530  # after toolchain detection is done, since the compiler (on x86) uses
31531  # it for DLL resolution in runtime.
31532  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31533      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31534
31535  # Store path to cygwin link.exe to help excluding it when searching for
31536  # VS linker. This must be done before changing the PATH when looking for VS.
31537  # Extract the first word of "link", so it can be a program name with args.
31538set dummy link; ac_word=$2
31539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31540$as_echo_n "checking for $ac_word... " >&6; }
31541if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31542  $as_echo_n "(cached) " >&6
31543else
31544  case $CYGWIN_LINK in
31545  [\\/]* | ?:[\\/]*)
31546  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31547  ;;
31548  *)
31549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31550for as_dir in $PATH
31551do
31552  IFS=$as_save_IFS
31553  test -z "$as_dir" && as_dir=.
31554    for ac_exec_ext in '' $ac_executable_extensions; do
31555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31556    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31558    break 2
31559  fi
31560done
31561  done
31562IFS=$as_save_IFS
31563
31564  ;;
31565esac
31566fi
31567CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31568if test -n "$CYGWIN_LINK"; then
31569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31570$as_echo "$CYGWIN_LINK" >&6; }
31571else
31572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31573$as_echo "no" >&6; }
31574fi
31575
31576
31577  if test "x$CYGWIN_LINK" != x; then
31578    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31579$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31580    "$CYGWIN_LINK" --version > /dev/null
31581    if test $? -eq 0 ; then
31582      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31583$as_echo "yes" >&6; }
31584    else
31585      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31586$as_echo "no" >&6; }
31587      # This might be the VS linker. Don't exclude it later on.
31588      CYGWIN_LINK=""
31589    fi
31590  fi
31591
31592  # First-hand choice is to locate and run the vsvars bat file.
31593
31594
31595# Check whether --with-toolchain-version was given.
31596if test "${with_toolchain_version+set}" = set; then :
31597  withval=$with_toolchain_version;
31598fi
31599
31600
31601  if test "x$with_toolchain_version" = xlist; then
31602    # List all toolchains
31603    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31604$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31605    for version in $VALID_VS_VERSIONS; do
31606      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31607      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31608    done
31609
31610    exit 0
31611  elif test "x$DEVKIT_VS_VERSION" != x; then
31612    VS_VERSION=$DEVKIT_VS_VERSION
31613    TOOLCHAIN_VERSION=$VS_VERSION
31614    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31615    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31616    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31617    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31618    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31619    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31620
31621    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31622    # can still be exported as INCLUDE for compiler invocations without
31623    # SYSROOT_CFLAGS
31624    OLDIFS="$IFS"
31625    IFS=";"
31626    for i in $DEVKIT_VS_INCLUDE; do
31627      ipath=$i
31628
31629  unix_path="$ipath"
31630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31631    windows_path=`$CYGPATH -m "$unix_path"`
31632    ipath="$windows_path"
31633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31634    windows_path=`cmd //c echo $unix_path`
31635    ipath="$windows_path"
31636  fi
31637
31638      VS_INCLUDE="$VS_INCLUDE;$ipath"
31639    done
31640    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31641    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31642    for i in $DEVKIT_VS_LIB; do
31643      libpath=$i
31644
31645  unix_path="$libpath"
31646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31647    windows_path=`$CYGPATH -m "$unix_path"`
31648    libpath="$windows_path"
31649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31650    windows_path=`cmd //c echo $unix_path`
31651    libpath="$windows_path"
31652  fi
31653
31654      VS_LIB="$VS_LIB;$libpath"
31655    done
31656    IFS="$OLDIFS"
31657
31658    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31659$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31660
31661  elif test "x$with_toolchain_version" != x; then
31662    # User override; check that it is valid
31663    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31664      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31665$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31666      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31667$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31668      as_fn_error $? "Cannot continue." "$LINENO" 5
31669    fi
31670    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31671  else
31672    # No flag given, use default
31673    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31674  fi
31675
31676  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31677
31678  VS_VERSION="$VS_VERSION"
31679  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31680  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31681  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31682  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31683
31684  # When using --with-tools-dir, assume it points to the correct and default
31685  # version of Visual Studio or that --with-toolchain-version was also set.
31686  if test "x$with_tools_dir" != x; then
31687
31688  if test "x$VS_ENV_CMD" = x; then
31689    VS_VERSION="${VS_VERSION}"
31690    VS_BASE="$with_tools_dir/../.."
31691    METHOD="--with-tools-dir"
31692
31693    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31694      VCVARSFILE="vc/bin/vcvars32.bat"
31695    else
31696      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31697    fi
31698
31699
31700  windows_path="$VS_BASE"
31701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31702    unix_path=`$CYGPATH -u "$windows_path"`
31703    VS_BASE="$unix_path"
31704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31706    VS_BASE="$unix_path"
31707  fi
31708
31709    if test -d "$VS_BASE"; then
31710      if test -f "$VS_BASE/$VCVARSFILE"; then
31711        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31712$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31713        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31714        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31715        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31716        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31717      else
31718        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31719$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31720        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31721$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31722      fi
31723    fi
31724  fi
31725
31726
31727  if test "x$VS_ENV_CMD" = x; then
31728    VS_VERSION="${VS_VERSION}"
31729    VS_BASE="$with_tools_dir/../../.."
31730    METHOD="--with-tools-dir"
31731
31732    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31733      VCVARSFILE="vc/bin/vcvars32.bat"
31734    else
31735      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31736    fi
31737
31738
31739  windows_path="$VS_BASE"
31740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31741    unix_path=`$CYGPATH -u "$windows_path"`
31742    VS_BASE="$unix_path"
31743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31745    VS_BASE="$unix_path"
31746  fi
31747
31748    if test -d "$VS_BASE"; then
31749      if test -f "$VS_BASE/$VCVARSFILE"; then
31750        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31751$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31752        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31753        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31754        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31755        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31756      else
31757        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31758$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31759        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31760$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31761      fi
31762    fi
31763  fi
31764
31765    if test "x$VS_ENV_CMD" = x; then
31766      # Having specified an argument which is incorrect will produce an instant failure;
31767      # we should not go on looking
31768      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31769$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31770      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31771$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31772      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31773$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31774      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31775    fi
31776  fi
31777
31778  VS_ENV_CMD=""
31779  VS_ENV_ARGS=""
31780
31781  if test "x$VS_COMNTOOLS" != x; then
31782
31783  if test "x$VS_ENV_CMD" = x; then
31784    VS_VERSION="${VS_VERSION}"
31785    VS_BASE="$VS_COMNTOOLS/../.."
31786    METHOD="$VS_COMNTOOLS_VAR variable"
31787
31788    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31789      VCVARSFILE="vc/bin/vcvars32.bat"
31790    else
31791      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31792    fi
31793
31794
31795  windows_path="$VS_BASE"
31796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31797    unix_path=`$CYGPATH -u "$windows_path"`
31798    VS_BASE="$unix_path"
31799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31801    VS_BASE="$unix_path"
31802  fi
31803
31804    if test -d "$VS_BASE"; then
31805      if test -f "$VS_BASE/$VCVARSFILE"; then
31806        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31807$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31808        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31809        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31810        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31811        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31812      else
31813        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31814$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31815        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31816$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31817      fi
31818    fi
31819  fi
31820
31821  fi
31822  if test "x$PROGRAMFILES" != x; then
31823
31824  if test "x$VS_ENV_CMD" = x; then
31825    VS_VERSION="${VS_VERSION}"
31826    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31827    METHOD="well-known name"
31828
31829    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31830      VCVARSFILE="vc/bin/vcvars32.bat"
31831    else
31832      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31833    fi
31834
31835
31836  windows_path="$VS_BASE"
31837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31838    unix_path=`$CYGPATH -u "$windows_path"`
31839    VS_BASE="$unix_path"
31840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31842    VS_BASE="$unix_path"
31843  fi
31844
31845    if test -d "$VS_BASE"; then
31846      if test -f "$VS_BASE/$VCVARSFILE"; then
31847        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31848$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31849        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31850        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31851        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31852        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31853      else
31854        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31855$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31856        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31857$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31858      fi
31859    fi
31860  fi
31861
31862  fi
31863  # Work around the insanely named ProgramFiles(x86) env variable
31864  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31865  if test "x$PROGRAMFILES_X86" != x; then
31866
31867  if test "x$VS_ENV_CMD" = x; then
31868    VS_VERSION="${VS_VERSION}"
31869    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31870    METHOD="well-known name"
31871
31872    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31873      VCVARSFILE="vc/bin/vcvars32.bat"
31874    else
31875      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31876    fi
31877
31878
31879  windows_path="$VS_BASE"
31880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31881    unix_path=`$CYGPATH -u "$windows_path"`
31882    VS_BASE="$unix_path"
31883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31885    VS_BASE="$unix_path"
31886  fi
31887
31888    if test -d "$VS_BASE"; then
31889      if test -f "$VS_BASE/$VCVARSFILE"; then
31890        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31891$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31892        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31893        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31894        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31895        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31896      else
31897        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31898$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31899        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31900$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31901      fi
31902    fi
31903  fi
31904
31905  fi
31906
31907  if test "x$VS_ENV_CMD" = x; then
31908    VS_VERSION="${VS_VERSION}"
31909    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31910    METHOD="well-known name"
31911
31912    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31913      VCVARSFILE="vc/bin/vcvars32.bat"
31914    else
31915      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31916    fi
31917
31918
31919  windows_path="$VS_BASE"
31920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31921    unix_path=`$CYGPATH -u "$windows_path"`
31922    VS_BASE="$unix_path"
31923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31925    VS_BASE="$unix_path"
31926  fi
31927
31928    if test -d "$VS_BASE"; then
31929      if test -f "$VS_BASE/$VCVARSFILE"; then
31930        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31931$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31932        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31933        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31934        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31935        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31936      else
31937        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31938$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31939        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31940$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31941      fi
31942    fi
31943  fi
31944
31945
31946  if test "x$VS_ENV_CMD" = x; then
31947    VS_VERSION="${VS_VERSION}"
31948    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31949    METHOD="well-known name"
31950
31951    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31952      VCVARSFILE="vc/bin/vcvars32.bat"
31953    else
31954      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31955    fi
31956
31957
31958  windows_path="$VS_BASE"
31959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31960    unix_path=`$CYGPATH -u "$windows_path"`
31961    VS_BASE="$unix_path"
31962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31964    VS_BASE="$unix_path"
31965  fi
31966
31967    if test -d "$VS_BASE"; then
31968      if test -f "$VS_BASE/$VCVARSFILE"; then
31969        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31970$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31971        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31972        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31973        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31974        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31975      else
31976        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31977$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31978        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31979$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31980      fi
31981    fi
31982  fi
31983
31984
31985  if test "x$SDK_INSTALL_DIR" != x; then
31986    if test "x$ProgramW6432" != x; then
31987
31988  if test "x$VS_ENV_CMD" = x; then
31989    VS_VERSION="${VS_VERSION}"
31990    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31991    METHOD="well-known name"
31992
31993  windows_path="$WIN_SDK_BASE"
31994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31995    unix_path=`$CYGPATH -u "$windows_path"`
31996    WIN_SDK_BASE="$unix_path"
31997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31999    WIN_SDK_BASE="$unix_path"
32000  fi
32001
32002    if test -d "$WIN_SDK_BASE"; then
32003      # There have been cases of partial or broken SDK installations. A missing
32004      # lib dir is not going to work.
32005      if test ! -d "$WIN_SDK_BASE/lib"; then
32006        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32007$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32008        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32009$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32010      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32011        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32012$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32013        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32014        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32015          VS_ENV_ARGS="/x86"
32016        else
32017          VS_ENV_ARGS="/x64"
32018        fi
32019        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32020        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32021        # TODO: improve detection for other versions of SDK
32022        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32023      else
32024        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32025$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32026        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32027$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32028      fi
32029    fi
32030  fi
32031
32032    fi
32033    if test "x$PROGRAMW6432" != x; then
32034
32035  if test "x$VS_ENV_CMD" = x; then
32036    VS_VERSION="${VS_VERSION}"
32037    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32038    METHOD="well-known name"
32039
32040  windows_path="$WIN_SDK_BASE"
32041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32042    unix_path=`$CYGPATH -u "$windows_path"`
32043    WIN_SDK_BASE="$unix_path"
32044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32046    WIN_SDK_BASE="$unix_path"
32047  fi
32048
32049    if test -d "$WIN_SDK_BASE"; then
32050      # There have been cases of partial or broken SDK installations. A missing
32051      # lib dir is not going to work.
32052      if test ! -d "$WIN_SDK_BASE/lib"; then
32053        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32054$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32055        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32056$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32057      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32058        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32059$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32060        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32061        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32062          VS_ENV_ARGS="/x86"
32063        else
32064          VS_ENV_ARGS="/x64"
32065        fi
32066        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32067        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32068        # TODO: improve detection for other versions of SDK
32069        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32070      else
32071        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32072$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32073        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32074$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32075      fi
32076    fi
32077  fi
32078
32079    fi
32080    if test "x$PROGRAMFILES" != x; then
32081
32082  if test "x$VS_ENV_CMD" = x; then
32083    VS_VERSION="${VS_VERSION}"
32084    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32085    METHOD="well-known name"
32086
32087  windows_path="$WIN_SDK_BASE"
32088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32089    unix_path=`$CYGPATH -u "$windows_path"`
32090    WIN_SDK_BASE="$unix_path"
32091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32093    WIN_SDK_BASE="$unix_path"
32094  fi
32095
32096    if test -d "$WIN_SDK_BASE"; then
32097      # There have been cases of partial or broken SDK installations. A missing
32098      # lib dir is not going to work.
32099      if test ! -d "$WIN_SDK_BASE/lib"; then
32100        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32101$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32102        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32103$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32104      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32105        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32106$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32107        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32108        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32109          VS_ENV_ARGS="/x86"
32110        else
32111          VS_ENV_ARGS="/x64"
32112        fi
32113        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32114        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32115        # TODO: improve detection for other versions of SDK
32116        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32117      else
32118        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32119$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32120        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32121$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32122      fi
32123    fi
32124  fi
32125
32126    fi
32127
32128  if test "x$VS_ENV_CMD" = x; then
32129    VS_VERSION="${VS_VERSION}"
32130    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32131    METHOD="well-known name"
32132
32133  windows_path="$WIN_SDK_BASE"
32134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32135    unix_path=`$CYGPATH -u "$windows_path"`
32136    WIN_SDK_BASE="$unix_path"
32137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32139    WIN_SDK_BASE="$unix_path"
32140  fi
32141
32142    if test -d "$WIN_SDK_BASE"; then
32143      # There have been cases of partial or broken SDK installations. A missing
32144      # lib dir is not going to work.
32145      if test ! -d "$WIN_SDK_BASE/lib"; then
32146        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32147$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32148        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32149$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32150      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32151        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32152$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32153        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32154        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32155          VS_ENV_ARGS="/x86"
32156        else
32157          VS_ENV_ARGS="/x64"
32158        fi
32159        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32160        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32161        # TODO: improve detection for other versions of SDK
32162        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32163      else
32164        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32165$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32166        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32167$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32168      fi
32169    fi
32170  fi
32171
32172
32173  if test "x$VS_ENV_CMD" = x; then
32174    VS_VERSION="${VS_VERSION}"
32175    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32176    METHOD="well-known name"
32177
32178  windows_path="$WIN_SDK_BASE"
32179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32180    unix_path=`$CYGPATH -u "$windows_path"`
32181    WIN_SDK_BASE="$unix_path"
32182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32184    WIN_SDK_BASE="$unix_path"
32185  fi
32186
32187    if test -d "$WIN_SDK_BASE"; then
32188      # There have been cases of partial or broken SDK installations. A missing
32189      # lib dir is not going to work.
32190      if test ! -d "$WIN_SDK_BASE/lib"; then
32191        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32192$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32193        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32194$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32195      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32196        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32197$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32198        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32199        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32200          VS_ENV_ARGS="/x86"
32201        else
32202          VS_ENV_ARGS="/x64"
32203        fi
32204        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32205        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32206        # TODO: improve detection for other versions of SDK
32207        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32208      else
32209        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32210$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32211        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32212$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32213      fi
32214    fi
32215  fi
32216
32217  fi
32218
32219    if test "x$VS_ENV_CMD" != x; then
32220      TOOLCHAIN_VERSION=$VS_VERSION
32221      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32222      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32223      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32224      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32225      # The rest of the variables are already evaled while probing
32226      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32227$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32228      break
32229    fi
32230  done
32231
32232
32233  # If we have a devkit, skip all of the below.
32234  if test "x$DEVKIT_VS_VERSION" = x; then
32235    if test "x$VS_ENV_CMD" != x; then
32236      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32237
32238  # Only process if variable expands to non-empty
32239
32240  if test "x$VS_ENV_CMD" != x; then
32241    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32242
32243  # First separate the path from the arguments. This will split at the first
32244  # space.
32245  complete="$VS_ENV_CMD"
32246  path="${complete%% *}"
32247  tmp="$complete EOL"
32248  arguments="${tmp#* }"
32249
32250  # Input might be given as Windows format, start by converting to
32251  # unix format.
32252  new_path=`$CYGPATH -u "$path"`
32253
32254  # Now try to locate executable using which
32255  new_path=`$WHICH "$new_path" 2> /dev/null`
32256  # bat and cmd files are not always considered executable in cygwin causing which
32257  # to not find them
32258  if test "x$new_path" = x \
32259      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32260      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32261    new_path=`$CYGPATH -u "$path"`
32262  fi
32263  if test "x$new_path" = x; then
32264    # Oops. Which didn't find the executable.
32265    # The splitting of arguments from the executable at a space might have been incorrect,
32266    # since paths with space are more likely in Windows. Give it another try with the whole
32267    # argument.
32268    path="$complete"
32269    arguments="EOL"
32270    new_path=`$CYGPATH -u "$path"`
32271    new_path=`$WHICH "$new_path" 2> /dev/null`
32272    # bat and cmd files are not always considered executable in cygwin causing which
32273    # to not find them
32274    if test "x$new_path" = x \
32275        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32276        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32277      new_path=`$CYGPATH -u "$path"`
32278    fi
32279    if test "x$new_path" = x; then
32280      # It's still not found. Now this is an unrecoverable error.
32281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32282$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32283      has_space=`$ECHO "$complete" | $GREP " "`
32284      if test "x$has_space" != x; then
32285        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32286$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32287      fi
32288      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32289    fi
32290  fi
32291
32292  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32293  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32294  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32295  # "foo.exe" is OK but "foo" is an error.
32296  #
32297  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32298  # It is also a way to make sure we got the proper file name for the real test later on.
32299  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32300  if test "x$test_shortpath" = x; then
32301    # Short path failed, file does not exist as specified.
32302    # Try adding .exe or .cmd
32303    if test -f "${new_path}.exe"; then
32304      input_to_shortpath="${new_path}.exe"
32305    elif test -f "${new_path}.cmd"; then
32306      input_to_shortpath="${new_path}.cmd"
32307    else
32308      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32309$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32310      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32311$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32312      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32313    fi
32314  else
32315    input_to_shortpath="$new_path"
32316  fi
32317
32318  # Call helper function which possibly converts this using DOS-style short mode.
32319  # If so, the updated path is stored in $new_path.
32320  new_path="$input_to_shortpath"
32321
32322  input_path="$input_to_shortpath"
32323  # Check if we need to convert this using DOS-style short mode. If the path
32324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32325  # take no chances and rewrite it.
32326  # Note: m4 eats our [], so we need to use [ and ] instead.
32327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32328  if test "x$has_forbidden_chars" != x; then
32329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32330    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32331    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32332    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32333      # Going to short mode and back again did indeed matter. Since short mode is
32334      # case insensitive, let's make it lowercase to improve readability.
32335      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32336      # Now convert it back to Unix-style (cygpath)
32337      input_path=`$CYGPATH -u "$shortmode_path"`
32338      new_path="$input_path"
32339    fi
32340  fi
32341
32342  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32343  if test "x$test_cygdrive_prefix" = x; then
32344    # As a simple fix, exclude /usr/bin since it's not a real path.
32345    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32346      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32347      # a path prefixed by /cygdrive for fixpath to work.
32348      new_path="$CYGWIN_ROOT_PATH$input_path"
32349    fi
32350  fi
32351
32352  # remove trailing .exe if any
32353  new_path="${new_path/%.exe/}"
32354
32355    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32356
32357  # First separate the path from the arguments. This will split at the first
32358  # space.
32359  complete="$VS_ENV_CMD"
32360  path="${complete%% *}"
32361  tmp="$complete EOL"
32362  arguments="${tmp#* }"
32363
32364  # Input might be given as Windows format, start by converting to
32365  # unix format.
32366  new_path="$path"
32367
32368  windows_path="$new_path"
32369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32370    unix_path=`$CYGPATH -u "$windows_path"`
32371    new_path="$unix_path"
32372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32374    new_path="$unix_path"
32375  fi
32376
32377
32378  # Now try to locate executable using which
32379  new_path=`$WHICH "$new_path" 2> /dev/null`
32380
32381  if test "x$new_path" = x; then
32382    # Oops. Which didn't find the executable.
32383    # The splitting of arguments from the executable at a space might have been incorrect,
32384    # since paths with space are more likely in Windows. Give it another try with the whole
32385    # argument.
32386    path="$complete"
32387    arguments="EOL"
32388    new_path="$path"
32389
32390  windows_path="$new_path"
32391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32392    unix_path=`$CYGPATH -u "$windows_path"`
32393    new_path="$unix_path"
32394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32396    new_path="$unix_path"
32397  fi
32398
32399
32400    new_path=`$WHICH "$new_path" 2> /dev/null`
32401    # bat and cmd files are not always considered executable in MSYS causing which
32402    # to not find them
32403    if test "x$new_path" = x \
32404        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32405        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32406      new_path="$path"
32407
32408  windows_path="$new_path"
32409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32410    unix_path=`$CYGPATH -u "$windows_path"`
32411    new_path="$unix_path"
32412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32414    new_path="$unix_path"
32415  fi
32416
32417    fi
32418
32419    if test "x$new_path" = x; then
32420      # It's still not found. Now this is an unrecoverable error.
32421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32422$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32423      has_space=`$ECHO "$complete" | $GREP " "`
32424      if test "x$has_space" != x; then
32425        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32426$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32427      fi
32428      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32429    fi
32430  fi
32431
32432  # Now new_path has a complete unix path to the binary
32433  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32434    # Keep paths in /bin as-is, but remove trailing .exe if any
32435    new_path="${new_path/%.exe/}"
32436    # Do not save /bin paths to all_fixpath_prefixes!
32437  else
32438    # Not in mixed or Windows style, start by that.
32439    new_path=`cmd //c echo $new_path`
32440
32441  input_path="$new_path"
32442  # Check if we need to convert this using DOS-style short mode. If the path
32443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32444  # take no chances and rewrite it.
32445  # Note: m4 eats our [], so we need to use [ and ] instead.
32446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32447  if test "x$has_forbidden_chars" != x; then
32448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32449    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32450  fi
32451
32452    # Output is in $new_path
32453
32454  windows_path="$new_path"
32455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32456    unix_path=`$CYGPATH -u "$windows_path"`
32457    new_path="$unix_path"
32458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32460    new_path="$unix_path"
32461  fi
32462
32463    # remove trailing .exe if any
32464    new_path="${new_path/%.exe/}"
32465
32466    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32467    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32468  fi
32469
32470    else
32471      # We're on a unix platform. Hooray! :)
32472      # First separate the path from the arguments. This will split at the first
32473      # space.
32474      complete="$VS_ENV_CMD"
32475      path="${complete%% *}"
32476      tmp="$complete EOL"
32477      arguments="${tmp#* }"
32478
32479      # Cannot rely on the command "which" here since it doesn't always work.
32480      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32481      if test -z "$is_absolute_path"; then
32482        # Path to executable is not absolute. Find it.
32483        IFS_save="$IFS"
32484        IFS=:
32485        for p in $PATH; do
32486          if test -f "$p/$path" && test -x "$p/$path"; then
32487            new_path="$p/$path"
32488            break
32489          fi
32490        done
32491        IFS="$IFS_save"
32492      else
32493        # This is an absolute path, we can use it without further modifications.
32494        new_path="$path"
32495      fi
32496
32497      if test "x$new_path" = x; then
32498        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32499$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32500        has_space=`$ECHO "$complete" | $GREP " "`
32501        if test "x$has_space" != x; then
32502          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32503$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32504        fi
32505        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32506      fi
32507    fi
32508
32509    # Now join together the path and the arguments once again
32510    if test "x$arguments" != xEOL; then
32511      new_complete="$new_path ${arguments% *}"
32512    else
32513      new_complete="$new_path"
32514    fi
32515
32516    if test "x$complete" != "x$new_complete"; then
32517      VS_ENV_CMD="$new_complete"
32518      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32519$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32520    fi
32521  fi
32522
32523
32524      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32525      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32526$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32527
32528      # We need to create a couple of temporary files.
32529      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32530      $MKDIR -p $VS_ENV_TMP_DIR
32531
32532      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32533      # Instead create a shell script which will set the relevant variables when run.
32534      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32535
32536  unix_path="$WINPATH_VS_ENV_CMD"
32537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32538    windows_path=`$CYGPATH -m "$unix_path"`
32539    WINPATH_VS_ENV_CMD="$windows_path"
32540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32541    windows_path=`cmd //c echo $unix_path`
32542    WINPATH_VS_ENV_CMD="$windows_path"
32543  fi
32544
32545      WINPATH_BASH="$BASH"
32546
32547  unix_path="$WINPATH_BASH"
32548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32549    windows_path=`$CYGPATH -m "$unix_path"`
32550    WINPATH_BASH="$windows_path"
32551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32552    windows_path=`cmd //c echo $unix_path`
32553    WINPATH_BASH="$windows_path"
32554  fi
32555
32556
32557      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32558      # script (executable by bash) that will setup the important variables.
32559      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32560      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32561      # This will end up something like:
32562      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32563      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32564      # These will end up something like:
32565      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32566      # The trailing space for everyone except PATH is no typo, but is needed due
32567      # to trailing \ in the Windows paths. These will be stripped later.
32568      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32569          >> $EXTRACT_VC_ENV_BAT_FILE
32570      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32571          >> $EXTRACT_VC_ENV_BAT_FILE
32572      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32573          >> $EXTRACT_VC_ENV_BAT_FILE
32574      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32575          >> $EXTRACT_VC_ENV_BAT_FILE
32576      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32577          >> $EXTRACT_VC_ENV_BAT_FILE
32578      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32579          >> $EXTRACT_VC_ENV_BAT_FILE
32580
32581      # Now execute the newly created bat file.
32582      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32583      # Change directory so we don't need to mess with Windows paths in redirects.
32584      cd $VS_ENV_TMP_DIR
32585      cmd /c extract-vs-env.bat | $CAT
32586      cd $CURDIR
32587
32588      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32589        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32590$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32591        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32592$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32593        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32594$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32595        as_fn_error $? "Cannot continue" "$LINENO" 5
32596      fi
32597
32598      # Now set all paths and other env variables. This will allow the rest of
32599      # the configure script to find and run the compiler in the proper way.
32600      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32601$as_echo "$as_me: Setting extracted environment variables" >&6;}
32602      . $VS_ENV_TMP_DIR/set-vs-env.sh
32603      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32604      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32605    else
32606      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32607      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32608$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32609    fi
32610  fi
32611
32612  # At this point, we should have correct variables in the environment, or we can't continue.
32613  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32614$as_echo_n "checking for Visual Studio variables... " >&6; }
32615
32616  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32617      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32618    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32619      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32620$as_echo "present but broken" >&6; }
32621      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32622    else
32623      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32624$as_echo "ok" >&6; }
32625      # Remove any trailing "\" ";" and " " from the variables.
32626      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32627      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32628      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32629      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32630      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32631      # Remove any paths containing # (typically F#) as that messes up make. This
32632      # is needed if visual studio was installed with F# support.
32633      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32634
32635
32636
32637
32638
32639      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32640      OLDIFS="$IFS"
32641      IFS=";"
32642      for i in $VS_INCLUDE; do
32643        ipath=$i
32644        # Only process non-empty elements
32645        if test "x$ipath" != x; then
32646          IFS="$OLDIFS"
32647          # Check that directory exists before calling fixup_path
32648          testpath=$ipath
32649
32650  windows_path="$testpath"
32651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32652    unix_path=`$CYGPATH -u "$windows_path"`
32653    testpath="$unix_path"
32654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32656    testpath="$unix_path"
32657  fi
32658
32659          if test -d "$testpath"; then
32660
32661  # Only process if variable expands to non-empty
32662
32663  if test "x$ipath" != x; then
32664    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32665
32666  # Input might be given as Windows format, start by converting to
32667  # unix format.
32668  path="$ipath"
32669  new_path=`$CYGPATH -u "$path"`
32670
32671  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32672  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32673  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32674  # "foo.exe" is OK but "foo" is an error.
32675  #
32676  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32677  # It is also a way to make sure we got the proper file name for the real test later on.
32678  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32679  if test "x$test_shortpath" = x; then
32680    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32681$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32682    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32683  fi
32684
32685  # Call helper function which possibly converts this using DOS-style short mode.
32686  # If so, the updated path is stored in $new_path.
32687
32688  input_path="$new_path"
32689  # Check if we need to convert this using DOS-style short mode. If the path
32690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32691  # take no chances and rewrite it.
32692  # Note: m4 eats our [], so we need to use [ and ] instead.
32693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32694  if test "x$has_forbidden_chars" != x; then
32695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32696    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32697    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32698    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32699      # Going to short mode and back again did indeed matter. Since short mode is
32700      # case insensitive, let's make it lowercase to improve readability.
32701      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32702      # Now convert it back to Unix-style (cygpath)
32703      input_path=`$CYGPATH -u "$shortmode_path"`
32704      new_path="$input_path"
32705    fi
32706  fi
32707
32708  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32709  if test "x$test_cygdrive_prefix" = x; then
32710    # As a simple fix, exclude /usr/bin since it's not a real path.
32711    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32712      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32713      # a path prefixed by /cygdrive for fixpath to work.
32714      new_path="$CYGWIN_ROOT_PATH$input_path"
32715    fi
32716  fi
32717
32718
32719  if test "x$path" != "x$new_path"; then
32720    ipath="$new_path"
32721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32722$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32723  fi
32724
32725    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32726
32727  path="$ipath"
32728  has_colon=`$ECHO $path | $GREP ^.:`
32729  new_path="$path"
32730  if test "x$has_colon" = x; then
32731    # Not in mixed or Windows style, start by that.
32732    new_path=`cmd //c echo $path`
32733  fi
32734
32735
32736  input_path="$new_path"
32737  # Check if we need to convert this using DOS-style short mode. If the path
32738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32739  # take no chances and rewrite it.
32740  # Note: m4 eats our [], so we need to use [ and ] instead.
32741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32742  if test "x$has_forbidden_chars" != x; then
32743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32744    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32745  fi
32746
32747
32748  windows_path="$new_path"
32749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32750    unix_path=`$CYGPATH -u "$windows_path"`
32751    new_path="$unix_path"
32752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32754    new_path="$unix_path"
32755  fi
32756
32757  if test "x$path" != "x$new_path"; then
32758    ipath="$new_path"
32759    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32760$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32761  fi
32762
32763  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32764  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32765
32766    else
32767      # We're on a unix platform. Hooray! :)
32768      path="$ipath"
32769      has_space=`$ECHO "$path" | $GREP " "`
32770      if test "x$has_space" != x; then
32771        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32772$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32773        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32774      fi
32775
32776      # Use eval to expand a potential ~
32777      eval path="$path"
32778      if test ! -f "$path" && test ! -d "$path"; then
32779        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32780      fi
32781
32782      if test -d "$path"; then
32783        ipath="`cd "$path"; $THEPWDCMD -L`"
32784      else
32785        dir="`$DIRNAME "$path"`"
32786        base="`$BASENAME "$path"`"
32787        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32788      fi
32789    fi
32790  fi
32791
32792            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32793          fi
32794          IFS=";"
32795        fi
32796      done
32797      # Convert VS_LIB into SYSROOT_LDFLAGS
32798      for i in $VS_LIB; do
32799        libpath=$i
32800        # Only process non-empty elements
32801        if test "x$libpath" != x; then
32802          IFS="$OLDIFS"
32803          # Check that directory exists before calling fixup_path
32804          testpath=$libpath
32805
32806  windows_path="$testpath"
32807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32808    unix_path=`$CYGPATH -u "$windows_path"`
32809    testpath="$unix_path"
32810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32812    testpath="$unix_path"
32813  fi
32814
32815          if test -d "$testpath"; then
32816
32817  # Only process if variable expands to non-empty
32818
32819  if test "x$libpath" != x; then
32820    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32821
32822  # Input might be given as Windows format, start by converting to
32823  # unix format.
32824  path="$libpath"
32825  new_path=`$CYGPATH -u "$path"`
32826
32827  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32828  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32829  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32830  # "foo.exe" is OK but "foo" is an error.
32831  #
32832  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32833  # It is also a way to make sure we got the proper file name for the real test later on.
32834  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32835  if test "x$test_shortpath" = x; then
32836    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32837$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32838    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32839  fi
32840
32841  # Call helper function which possibly converts this using DOS-style short mode.
32842  # If so, the updated path is stored in $new_path.
32843
32844  input_path="$new_path"
32845  # Check if we need to convert this using DOS-style short mode. If the path
32846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32847  # take no chances and rewrite it.
32848  # Note: m4 eats our [], so we need to use [ and ] instead.
32849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32850  if test "x$has_forbidden_chars" != x; then
32851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32852    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32853    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32854    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32855      # Going to short mode and back again did indeed matter. Since short mode is
32856      # case insensitive, let's make it lowercase to improve readability.
32857      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32858      # Now convert it back to Unix-style (cygpath)
32859      input_path=`$CYGPATH -u "$shortmode_path"`
32860      new_path="$input_path"
32861    fi
32862  fi
32863
32864  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32865  if test "x$test_cygdrive_prefix" = x; then
32866    # As a simple fix, exclude /usr/bin since it's not a real path.
32867    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32868      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32869      # a path prefixed by /cygdrive for fixpath to work.
32870      new_path="$CYGWIN_ROOT_PATH$input_path"
32871    fi
32872  fi
32873
32874
32875  if test "x$path" != "x$new_path"; then
32876    libpath="$new_path"
32877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32878$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32879  fi
32880
32881    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32882
32883  path="$libpath"
32884  has_colon=`$ECHO $path | $GREP ^.:`
32885  new_path="$path"
32886  if test "x$has_colon" = x; then
32887    # Not in mixed or Windows style, start by that.
32888    new_path=`cmd //c echo $path`
32889  fi
32890
32891
32892  input_path="$new_path"
32893  # Check if we need to convert this using DOS-style short mode. If the path
32894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32895  # take no chances and rewrite it.
32896  # Note: m4 eats our [], so we need to use [ and ] instead.
32897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32898  if test "x$has_forbidden_chars" != x; then
32899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32900    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32901  fi
32902
32903
32904  windows_path="$new_path"
32905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32906    unix_path=`$CYGPATH -u "$windows_path"`
32907    new_path="$unix_path"
32908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32910    new_path="$unix_path"
32911  fi
32912
32913  if test "x$path" != "x$new_path"; then
32914    libpath="$new_path"
32915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32916$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32917  fi
32918
32919  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32920  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32921
32922    else
32923      # We're on a unix platform. Hooray! :)
32924      path="$libpath"
32925      has_space=`$ECHO "$path" | $GREP " "`
32926      if test "x$has_space" != x; then
32927        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32928$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32929        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32930      fi
32931
32932      # Use eval to expand a potential ~
32933      eval path="$path"
32934      if test ! -f "$path" && test ! -d "$path"; then
32935        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32936      fi
32937
32938      if test -d "$path"; then
32939        libpath="`cd "$path"; $THEPWDCMD -L`"
32940      else
32941        dir="`$DIRNAME "$path"`"
32942        base="`$BASENAME "$path"`"
32943        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32944      fi
32945    fi
32946  fi
32947
32948            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32949          fi
32950          IFS=";"
32951        fi
32952      done
32953      IFS="$OLDIFS"
32954    fi
32955  else
32956    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32957$as_echo "not found" >&6; }
32958
32959    if test "x$VS_ENV_CMD" = x; then
32960      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32961$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32962      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32963$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32964    else
32965      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32966$as_echo "$as_me: Running the extraction script failed." >&6;}
32967    fi
32968    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32969$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32970    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32971$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32972    as_fn_error $? "Cannot continue" "$LINENO" 5
32973  fi
32974
32975    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32976    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32977    PATH="$VS_PATH"
32978    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32979    export INCLUDE="$VS_INCLUDE"
32980    export LIB="$VS_LIB"
32981  else
32982    if test "x$XCODE_VERSION_OUTPUT" != x; then
32983      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32984      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32985      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32986    else
32987      # Currently we do not define this for other toolchains. This might change as the need arise.
32988      TOOLCHAIN_VERSION=
32989    fi
32990  fi
32991
32992
32993  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32994  # override all other locations.
32995  if test "x$TOOLCHAIN_PATH" != x; then
32996    PATH=$TOOLCHAIN_PATH:$PATH
32997  fi
32998
32999
33000  #
33001  # Setup the compilers (CC and CXX)
33002  #
33003
33004  COMPILER_NAME=C
33005  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33006
33007  if test "x$CC" != x; then
33008    # User has supplied compiler name already, always let that override.
33009    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33010$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33011    if test "x`basename $CC`" = "x$CC"; then
33012      # A command without a complete path is provided, search $PATH.
33013
33014      for ac_prog in $CC
33015do
33016  # Extract the first word of "$ac_prog", so it can be a program name with args.
33017set dummy $ac_prog; ac_word=$2
33018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33019$as_echo_n "checking for $ac_word... " >&6; }
33020if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33021  $as_echo_n "(cached) " >&6
33022else
33023  case $POTENTIAL_CC in
33024  [\\/]* | ?:[\\/]*)
33025  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33026  ;;
33027  *)
33028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33029for as_dir in $PATH
33030do
33031  IFS=$as_save_IFS
33032  test -z "$as_dir" && as_dir=.
33033    for ac_exec_ext in '' $ac_executable_extensions; do
33034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33035    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33037    break 2
33038  fi
33039done
33040  done
33041IFS=$as_save_IFS
33042
33043  ;;
33044esac
33045fi
33046POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33047if test -n "$POTENTIAL_CC"; then
33048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33049$as_echo "$POTENTIAL_CC" >&6; }
33050else
33051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33052$as_echo "no" >&6; }
33053fi
33054
33055
33056  test -n "$POTENTIAL_CC" && break
33057done
33058
33059      if test "x$POTENTIAL_CC" != x; then
33060        CC=$POTENTIAL_CC
33061      else
33062        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33063      fi
33064    else
33065      # Otherwise it might already be a complete path
33066      if test ! -x "$CC"; then
33067        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33068      fi
33069    fi
33070  else
33071    # No user supplied value. Locate compiler ourselves.
33072
33073    # If we are cross compiling, assume cross compilation tools follows the
33074    # cross compilation standard where they are prefixed with the autoconf
33075    # standard name for the target. For example the binary
33076    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33077    # If we are not cross compiling, then the default compiler name will be
33078    # used.
33079
33080    CC=
33081    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33082    # before checking the rest of the PATH.
33083    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33084    # step, this should not be necessary.
33085    if test -n "$TOOLCHAIN_PATH"; then
33086      PATH_save="$PATH"
33087      PATH="$TOOLCHAIN_PATH"
33088      for ac_prog in $SEARCH_LIST
33089do
33090  # Extract the first word of "$ac_prog", so it can be a program name with args.
33091set dummy $ac_prog; ac_word=$2
33092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33093$as_echo_n "checking for $ac_word... " >&6; }
33094if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33095  $as_echo_n "(cached) " >&6
33096else
33097  case $TOOLCHAIN_PATH_CC in
33098  [\\/]* | ?:[\\/]*)
33099  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33100  ;;
33101  *)
33102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33103for as_dir in $PATH
33104do
33105  IFS=$as_save_IFS
33106  test -z "$as_dir" && as_dir=.
33107    for ac_exec_ext in '' $ac_executable_extensions; do
33108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33109    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33111    break 2
33112  fi
33113done
33114  done
33115IFS=$as_save_IFS
33116
33117  ;;
33118esac
33119fi
33120TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33121if test -n "$TOOLCHAIN_PATH_CC"; then
33122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33123$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33124else
33125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33126$as_echo "no" >&6; }
33127fi
33128
33129
33130  test -n "$TOOLCHAIN_PATH_CC" && break
33131done
33132
33133      CC=$TOOLCHAIN_PATH_CC
33134      PATH="$PATH_save"
33135    fi
33136
33137    # AC_PATH_PROGS can't be run multiple times with the same variable,
33138    # so create a new name for this run.
33139    if test "x$CC" = x; then
33140      for ac_prog in $SEARCH_LIST
33141do
33142  # Extract the first word of "$ac_prog", so it can be a program name with args.
33143set dummy $ac_prog; ac_word=$2
33144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33145$as_echo_n "checking for $ac_word... " >&6; }
33146if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33147  $as_echo_n "(cached) " >&6
33148else
33149  case $POTENTIAL_CC in
33150  [\\/]* | ?:[\\/]*)
33151  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33152  ;;
33153  *)
33154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33155for as_dir in $PATH
33156do
33157  IFS=$as_save_IFS
33158  test -z "$as_dir" && as_dir=.
33159    for ac_exec_ext in '' $ac_executable_extensions; do
33160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33161    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33163    break 2
33164  fi
33165done
33166  done
33167IFS=$as_save_IFS
33168
33169  ;;
33170esac
33171fi
33172POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33173if test -n "$POTENTIAL_CC"; then
33174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33175$as_echo "$POTENTIAL_CC" >&6; }
33176else
33177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33178$as_echo "no" >&6; }
33179fi
33180
33181
33182  test -n "$POTENTIAL_CC" && break
33183done
33184
33185      CC=$POTENTIAL_CC
33186    fi
33187
33188    if test "x$CC" = x; then
33189
33190  # Print a helpful message on how to acquire the necessary build dependency.
33191  # devkit is the help tag: freetype, cups, alsa etc
33192  MISSING_DEPENDENCY=devkit
33193
33194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33195    cygwin_help $MISSING_DEPENDENCY
33196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33197    msys_help $MISSING_DEPENDENCY
33198  else
33199    PKGHANDLER_COMMAND=
33200
33201    case $PKGHANDLER in
33202      apt-get)
33203        apt_help     $MISSING_DEPENDENCY ;;
33204      yum)
33205        yum_help     $MISSING_DEPENDENCY ;;
33206      port)
33207        port_help    $MISSING_DEPENDENCY ;;
33208      pkgutil)
33209        pkgutil_help $MISSING_DEPENDENCY ;;
33210      pkgadd)
33211        pkgadd_help  $MISSING_DEPENDENCY ;;
33212    esac
33213
33214    if test "x$PKGHANDLER_COMMAND" != x; then
33215      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33216    fi
33217  fi
33218
33219      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33220    fi
33221  fi
33222
33223  # Now we have a compiler binary in CC. Make sure it's okay.
33224
33225  # Only process if variable expands to non-empty
33226
33227  if test "x$CC" != x; then
33228    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33229
33230  # First separate the path from the arguments. This will split at the first
33231  # space.
33232  complete="$CC"
33233  path="${complete%% *}"
33234  tmp="$complete EOL"
33235  arguments="${tmp#* }"
33236
33237  # Input might be given as Windows format, start by converting to
33238  # unix format.
33239  new_path=`$CYGPATH -u "$path"`
33240
33241  # Now try to locate executable using which
33242  new_path=`$WHICH "$new_path" 2> /dev/null`
33243  # bat and cmd files are not always considered executable in cygwin causing which
33244  # to not find them
33245  if test "x$new_path" = x \
33246      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33247      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33248    new_path=`$CYGPATH -u "$path"`
33249  fi
33250  if test "x$new_path" = x; then
33251    # Oops. Which didn't find the executable.
33252    # The splitting of arguments from the executable at a space might have been incorrect,
33253    # since paths with space are more likely in Windows. Give it another try with the whole
33254    # argument.
33255    path="$complete"
33256    arguments="EOL"
33257    new_path=`$CYGPATH -u "$path"`
33258    new_path=`$WHICH "$new_path" 2> /dev/null`
33259    # bat and cmd files are not always considered executable in cygwin causing which
33260    # to not find them
33261    if test "x$new_path" = x \
33262        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33263        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33264      new_path=`$CYGPATH -u "$path"`
33265    fi
33266    if test "x$new_path" = x; then
33267      # It's still not found. Now this is an unrecoverable error.
33268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33269$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33270      has_space=`$ECHO "$complete" | $GREP " "`
33271      if test "x$has_space" != x; then
33272        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33273$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33274      fi
33275      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33276    fi
33277  fi
33278
33279  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33280  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33281  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33282  # "foo.exe" is OK but "foo" is an error.
33283  #
33284  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33285  # It is also a way to make sure we got the proper file name for the real test later on.
33286  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33287  if test "x$test_shortpath" = x; then
33288    # Short path failed, file does not exist as specified.
33289    # Try adding .exe or .cmd
33290    if test -f "${new_path}.exe"; then
33291      input_to_shortpath="${new_path}.exe"
33292    elif test -f "${new_path}.cmd"; then
33293      input_to_shortpath="${new_path}.cmd"
33294    else
33295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33296$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33297      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33298$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33299      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33300    fi
33301  else
33302    input_to_shortpath="$new_path"
33303  fi
33304
33305  # Call helper function which possibly converts this using DOS-style short mode.
33306  # If so, the updated path is stored in $new_path.
33307  new_path="$input_to_shortpath"
33308
33309  input_path="$input_to_shortpath"
33310  # Check if we need to convert this using DOS-style short mode. If the path
33311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33312  # take no chances and rewrite it.
33313  # Note: m4 eats our [], so we need to use [ and ] instead.
33314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33315  if test "x$has_forbidden_chars" != x; then
33316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33317    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33318    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33319    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33320      # Going to short mode and back again did indeed matter. Since short mode is
33321      # case insensitive, let's make it lowercase to improve readability.
33322      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33323      # Now convert it back to Unix-style (cygpath)
33324      input_path=`$CYGPATH -u "$shortmode_path"`
33325      new_path="$input_path"
33326    fi
33327  fi
33328
33329  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33330  if test "x$test_cygdrive_prefix" = x; then
33331    # As a simple fix, exclude /usr/bin since it's not a real path.
33332    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33333      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33334      # a path prefixed by /cygdrive for fixpath to work.
33335      new_path="$CYGWIN_ROOT_PATH$input_path"
33336    fi
33337  fi
33338
33339  # remove trailing .exe if any
33340  new_path="${new_path/%.exe/}"
33341
33342    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33343
33344  # First separate the path from the arguments. This will split at the first
33345  # space.
33346  complete="$CC"
33347  path="${complete%% *}"
33348  tmp="$complete EOL"
33349  arguments="${tmp#* }"
33350
33351  # Input might be given as Windows format, start by converting to
33352  # unix format.
33353  new_path="$path"
33354
33355  windows_path="$new_path"
33356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33357    unix_path=`$CYGPATH -u "$windows_path"`
33358    new_path="$unix_path"
33359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33361    new_path="$unix_path"
33362  fi
33363
33364
33365  # Now try to locate executable using which
33366  new_path=`$WHICH "$new_path" 2> /dev/null`
33367
33368  if test "x$new_path" = x; then
33369    # Oops. Which didn't find the executable.
33370    # The splitting of arguments from the executable at a space might have been incorrect,
33371    # since paths with space are more likely in Windows. Give it another try with the whole
33372    # argument.
33373    path="$complete"
33374    arguments="EOL"
33375    new_path="$path"
33376
33377  windows_path="$new_path"
33378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33379    unix_path=`$CYGPATH -u "$windows_path"`
33380    new_path="$unix_path"
33381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33383    new_path="$unix_path"
33384  fi
33385
33386
33387    new_path=`$WHICH "$new_path" 2> /dev/null`
33388    # bat and cmd files are not always considered executable in MSYS causing which
33389    # to not find them
33390    if test "x$new_path" = x \
33391        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33392        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33393      new_path="$path"
33394
33395  windows_path="$new_path"
33396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33397    unix_path=`$CYGPATH -u "$windows_path"`
33398    new_path="$unix_path"
33399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33401    new_path="$unix_path"
33402  fi
33403
33404    fi
33405
33406    if test "x$new_path" = x; then
33407      # It's still not found. Now this is an unrecoverable error.
33408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33409$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33410      has_space=`$ECHO "$complete" | $GREP " "`
33411      if test "x$has_space" != x; then
33412        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33413$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33414      fi
33415      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33416    fi
33417  fi
33418
33419  # Now new_path has a complete unix path to the binary
33420  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33421    # Keep paths in /bin as-is, but remove trailing .exe if any
33422    new_path="${new_path/%.exe/}"
33423    # Do not save /bin paths to all_fixpath_prefixes!
33424  else
33425    # Not in mixed or Windows style, start by that.
33426    new_path=`cmd //c echo $new_path`
33427
33428  input_path="$new_path"
33429  # Check if we need to convert this using DOS-style short mode. If the path
33430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33431  # take no chances and rewrite it.
33432  # Note: m4 eats our [], so we need to use [ and ] instead.
33433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33434  if test "x$has_forbidden_chars" != x; then
33435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33436    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33437  fi
33438
33439    # Output is in $new_path
33440
33441  windows_path="$new_path"
33442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33443    unix_path=`$CYGPATH -u "$windows_path"`
33444    new_path="$unix_path"
33445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33447    new_path="$unix_path"
33448  fi
33449
33450    # remove trailing .exe if any
33451    new_path="${new_path/%.exe/}"
33452
33453    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33454    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33455  fi
33456
33457    else
33458      # We're on a unix platform. Hooray! :)
33459      # First separate the path from the arguments. This will split at the first
33460      # space.
33461      complete="$CC"
33462      path="${complete%% *}"
33463      tmp="$complete EOL"
33464      arguments="${tmp#* }"
33465
33466      # Cannot rely on the command "which" here since it doesn't always work.
33467      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33468      if test -z "$is_absolute_path"; then
33469        # Path to executable is not absolute. Find it.
33470        IFS_save="$IFS"
33471        IFS=:
33472        for p in $PATH; do
33473          if test -f "$p/$path" && test -x "$p/$path"; then
33474            new_path="$p/$path"
33475            break
33476          fi
33477        done
33478        IFS="$IFS_save"
33479      else
33480        # This is an absolute path, we can use it without further modifications.
33481        new_path="$path"
33482      fi
33483
33484      if test "x$new_path" = x; then
33485        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33486$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33487        has_space=`$ECHO "$complete" | $GREP " "`
33488        if test "x$has_space" != x; then
33489          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33490$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33491        fi
33492        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33493      fi
33494    fi
33495
33496    # Now join together the path and the arguments once again
33497    if test "x$arguments" != xEOL; then
33498      new_complete="$new_path ${arguments% *}"
33499    else
33500      new_complete="$new_path"
33501    fi
33502
33503    if test "x$complete" != "x$new_complete"; then
33504      CC="$new_complete"
33505      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33506$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33507    fi
33508  fi
33509
33510  TEST_COMPILER="$CC"
33511
33512  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33513$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33514  SYMLINK_ORIGINAL="$TEST_COMPILER"
33515
33516  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33517    # Follow a chain of symbolic links. Use readlink
33518    # where it exists, else fall back to horribly
33519    # complicated shell code.
33520    if test "x$READLINK_TESTED" != yes; then
33521      # On MacOSX there is a readlink tool with a different
33522      # purpose than the GNU readlink tool. Check the found readlink.
33523      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33524      if test "x$ISGNU" = x; then
33525        # A readlink that we do not know how to use.
33526        # Are there other non-GNU readlinks out there?
33527        READLINK_TESTED=yes
33528        READLINK=
33529      fi
33530    fi
33531
33532    if test "x$READLINK" != x; then
33533      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33534    else
33535      # Save the current directory for restoring afterwards
33536      STARTDIR=$PWD
33537      COUNTER=0
33538      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33539      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33540      cd $sym_link_dir
33541      # Use -P flag to resolve symlinks in directories.
33542      cd `$THEPWDCMD -P`
33543      sym_link_dir=`$THEPWDCMD -P`
33544      # Resolve file symlinks
33545      while test $COUNTER -lt 20; do
33546        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33547        if test "x$ISLINK" == x; then
33548          # This is not a symbolic link! We are done!
33549          break
33550        fi
33551        # Again resolve directory symlinks since the target of the just found
33552        # link could be in a different directory
33553        cd `$DIRNAME $ISLINK`
33554        sym_link_dir=`$THEPWDCMD -P`
33555        sym_link_file=`$BASENAME $ISLINK`
33556        let COUNTER=COUNTER+1
33557      done
33558      cd $STARTDIR
33559      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33560    fi
33561  fi
33562
33563  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33564    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33565$as_echo "no symlink" >&6; }
33566  else
33567    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33568$as_echo "$SYMLINK_ORIGINAL" >&6; }
33569
33570    # We can't handle ccache by gcc wrappers, since we need to know if we're
33571    # using ccache. Instead ccache usage must be controlled by a configure option.
33572    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33573    if test "x$COMPILER_BASENAME" = "xccache"; then
33574      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33575$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33576      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33577    fi
33578  fi
33579
33580
33581  COMPILER=$CC
33582  COMPILER_NAME=$COMPILER_NAME
33583
33584  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33585    # cc -V output typically looks like
33586    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33587    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33588    # Check that this is likely to be the Solaris Studio cc.
33589    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33590    if test $? -ne 0; then
33591      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33592      { $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
33593$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33594      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33595$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33596      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33597$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33598      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33599    fi
33600    # Remove usage instructions (if present), and
33601    # collapse compiler output into a single line
33602    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33603        $SED -e 's/ *[Uu]sage:.*//'`
33604    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33605        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33606  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33607    # xlc -qversion output typically looks like
33608    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33609    #     Version: 11.01.0000.0015
33610    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33611    # Check that this is likely to be the IBM XL C compiler.
33612    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33613    if test $? -ne 0; then
33614      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33615      { $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
33616$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33617      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33618$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33619      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33620$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33621      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33622    fi
33623    # Collapse compiler output into a single line
33624    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33625    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33626        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33627  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33628    # There is no specific version flag, but all output starts with a version string.
33629    # First line typically looks something like:
33630    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33631    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33632    # Check that this is likely to be Microsoft CL.EXE.
33633    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33634    if test $? -ne 0; then
33635      { $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
33636$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33637      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33638$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33639      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33640    fi
33641    # Collapse compiler output into a single line
33642    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33643    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33644        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33645  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33646    # gcc --version output typically looks like
33647    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33648    #     Copyright (C) 2013 Free Software Foundation, Inc.
33649    #     This is free software; see the source for copying conditions.  There is NO
33650    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33651    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33652    # Check that this is likely to be GCC.
33653    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33654    if test $? -ne 0; then
33655      { $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
33656$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33657      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33658$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33659      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33660    fi
33661    # Remove Copyright and legalese from version string, and
33662    # collapse into a single line
33663    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33664        $SED -e 's/ *Copyright .*//'`
33665    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33666        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33667  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33668    # clang --version output typically looks like
33669    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33670    #    clang version 3.3 (tags/RELEASE_33/final)
33671    # or
33672    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33673    #    Target: x86_64-pc-linux-gnu
33674    #    Thread model: posix
33675    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33676    # Check that this is likely to be clang
33677    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33678    if test $? -ne 0; then
33679      { $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
33680$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33681      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33682$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33683      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33684    fi
33685    # Collapse compiler output into a single line
33686    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33687    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33688        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33689  else
33690      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33691  fi
33692  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33693  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33694  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33695  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33696
33697  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33698$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33699
33700
33701  # Now that we have resolved CC ourself, let autoconf have its go at it
33702  ac_ext=c
33703ac_cpp='$CPP $CPPFLAGS'
33704ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33705ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33706ac_compiler_gnu=$ac_cv_c_compiler_gnu
33707if test -n "$ac_tool_prefix"; then
33708  for ac_prog in $CC
33709  do
33710    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33711set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33713$as_echo_n "checking for $ac_word... " >&6; }
33714if ${ac_cv_prog_CC+:} false; then :
33715  $as_echo_n "(cached) " >&6
33716else
33717  if test -n "$CC"; then
33718  ac_cv_prog_CC="$CC" # Let the user override the test.
33719else
33720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33721for as_dir in $PATH
33722do
33723  IFS=$as_save_IFS
33724  test -z "$as_dir" && as_dir=.
33725    for ac_exec_ext in '' $ac_executable_extensions; do
33726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33727    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33729    break 2
33730  fi
33731done
33732  done
33733IFS=$as_save_IFS
33734
33735fi
33736fi
33737CC=$ac_cv_prog_CC
33738if test -n "$CC"; then
33739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33740$as_echo "$CC" >&6; }
33741else
33742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33743$as_echo "no" >&6; }
33744fi
33745
33746
33747    test -n "$CC" && break
33748  done
33749fi
33750if test -z "$CC"; then
33751  ac_ct_CC=$CC
33752  for ac_prog in $CC
33753do
33754  # Extract the first word of "$ac_prog", so it can be a program name with args.
33755set dummy $ac_prog; ac_word=$2
33756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33757$as_echo_n "checking for $ac_word... " >&6; }
33758if ${ac_cv_prog_ac_ct_CC+:} false; then :
33759  $as_echo_n "(cached) " >&6
33760else
33761  if test -n "$ac_ct_CC"; then
33762  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33763else
33764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33765for as_dir in $PATH
33766do
33767  IFS=$as_save_IFS
33768  test -z "$as_dir" && as_dir=.
33769    for ac_exec_ext in '' $ac_executable_extensions; do
33770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33771    ac_cv_prog_ac_ct_CC="$ac_prog"
33772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33773    break 2
33774  fi
33775done
33776  done
33777IFS=$as_save_IFS
33778
33779fi
33780fi
33781ac_ct_CC=$ac_cv_prog_ac_ct_CC
33782if test -n "$ac_ct_CC"; then
33783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33784$as_echo "$ac_ct_CC" >&6; }
33785else
33786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33787$as_echo "no" >&6; }
33788fi
33789
33790
33791  test -n "$ac_ct_CC" && break
33792done
33793
33794  if test "x$ac_ct_CC" = x; then
33795    CC=""
33796  else
33797    case $cross_compiling:$ac_tool_warned in
33798yes:)
33799{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33800$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33801ac_tool_warned=yes ;;
33802esac
33803    CC=$ac_ct_CC
33804  fi
33805fi
33806
33807
33808test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33809$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33810as_fn_error $? "no acceptable C compiler found in \$PATH
33811See \`config.log' for more details" "$LINENO" 5; }
33812
33813# Provide some information about the compiler.
33814$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33815set X $ac_compile
33816ac_compiler=$2
33817for ac_option in --version -v -V -qversion; do
33818  { { ac_try="$ac_compiler $ac_option >&5"
33819case "(($ac_try" in
33820  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33821  *) ac_try_echo=$ac_try;;
33822esac
33823eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33824$as_echo "$ac_try_echo"; } >&5
33825  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33826  ac_status=$?
33827  if test -s conftest.err; then
33828    sed '10a\
33829... rest of stderr output deleted ...
33830         10q' conftest.err >conftest.er1
33831    cat conftest.er1 >&5
33832  fi
33833  rm -f conftest.er1 conftest.err
33834  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33835  test $ac_status = 0; }
33836done
33837
33838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33839/* end confdefs.h.  */
33840
33841int
33842main ()
33843{
33844
33845  ;
33846  return 0;
33847}
33848_ACEOF
33849ac_clean_files_save=$ac_clean_files
33850ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33851# Try to create an executable without -o first, disregard a.out.
33852# It will help us diagnose broken compilers, and finding out an intuition
33853# of exeext.
33854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33855$as_echo_n "checking whether the C compiler works... " >&6; }
33856ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33857
33858# The possible output files:
33859ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33860
33861ac_rmfiles=
33862for ac_file in $ac_files
33863do
33864  case $ac_file in
33865    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33866    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33867  esac
33868done
33869rm -f $ac_rmfiles
33870
33871if { { ac_try="$ac_link_default"
33872case "(($ac_try" in
33873  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33874  *) ac_try_echo=$ac_try;;
33875esac
33876eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33877$as_echo "$ac_try_echo"; } >&5
33878  (eval "$ac_link_default") 2>&5
33879  ac_status=$?
33880  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33881  test $ac_status = 0; }; then :
33882  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33883# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33884# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33885# so that the user can short-circuit this test for compilers unknown to
33886# Autoconf.
33887for ac_file in $ac_files ''
33888do
33889  test -f "$ac_file" || continue
33890  case $ac_file in
33891    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33892	;;
33893    [ab].out )
33894	# We found the default executable, but exeext='' is most
33895	# certainly right.
33896	break;;
33897    *.* )
33898	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33899	then :; else
33900	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33901	fi
33902	# We set ac_cv_exeext here because the later test for it is not
33903	# safe: cross compilers may not add the suffix if given an `-o'
33904	# argument, so we may need to know it at that point already.
33905	# Even if this section looks crufty: it has the advantage of
33906	# actually working.
33907	break;;
33908    * )
33909	break;;
33910  esac
33911done
33912test "$ac_cv_exeext" = no && ac_cv_exeext=
33913
33914else
33915  ac_file=''
33916fi
33917if test -z "$ac_file"; then :
33918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33919$as_echo "no" >&6; }
33920$as_echo "$as_me: failed program was:" >&5
33921sed 's/^/| /' conftest.$ac_ext >&5
33922
33923{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33924$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33925as_fn_error 77 "C compiler cannot create executables
33926See \`config.log' for more details" "$LINENO" 5; }
33927else
33928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33929$as_echo "yes" >&6; }
33930fi
33931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33932$as_echo_n "checking for C compiler default output file name... " >&6; }
33933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33934$as_echo "$ac_file" >&6; }
33935ac_exeext=$ac_cv_exeext
33936
33937rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33938ac_clean_files=$ac_clean_files_save
33939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33940$as_echo_n "checking for suffix of executables... " >&6; }
33941if { { ac_try="$ac_link"
33942case "(($ac_try" in
33943  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33944  *) ac_try_echo=$ac_try;;
33945esac
33946eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33947$as_echo "$ac_try_echo"; } >&5
33948  (eval "$ac_link") 2>&5
33949  ac_status=$?
33950  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33951  test $ac_status = 0; }; then :
33952  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33953# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33954# work properly (i.e., refer to `conftest.exe'), while it won't with
33955# `rm'.
33956for ac_file in conftest.exe conftest conftest.*; do
33957  test -f "$ac_file" || continue
33958  case $ac_file in
33959    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33960    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33961	  break;;
33962    * ) break;;
33963  esac
33964done
33965else
33966  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33967$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33968as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33969See \`config.log' for more details" "$LINENO" 5; }
33970fi
33971rm -f conftest conftest$ac_cv_exeext
33972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33973$as_echo "$ac_cv_exeext" >&6; }
33974
33975rm -f conftest.$ac_ext
33976EXEEXT=$ac_cv_exeext
33977ac_exeext=$EXEEXT
33978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33979/* end confdefs.h.  */
33980#include <stdio.h>
33981int
33982main ()
33983{
33984FILE *f = fopen ("conftest.out", "w");
33985 return ferror (f) || fclose (f) != 0;
33986
33987  ;
33988  return 0;
33989}
33990_ACEOF
33991ac_clean_files="$ac_clean_files conftest.out"
33992# Check that the compiler produces executables we can run.  If not, either
33993# the compiler is broken, or we cross compile.
33994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33995$as_echo_n "checking whether we are cross compiling... " >&6; }
33996if test "$cross_compiling" != yes; then
33997  { { ac_try="$ac_link"
33998case "(($ac_try" in
33999  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34000  *) ac_try_echo=$ac_try;;
34001esac
34002eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34003$as_echo "$ac_try_echo"; } >&5
34004  (eval "$ac_link") 2>&5
34005  ac_status=$?
34006  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34007  test $ac_status = 0; }
34008  if { ac_try='./conftest$ac_cv_exeext'
34009  { { case "(($ac_try" in
34010  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34011  *) ac_try_echo=$ac_try;;
34012esac
34013eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34014$as_echo "$ac_try_echo"; } >&5
34015  (eval "$ac_try") 2>&5
34016  ac_status=$?
34017  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34018  test $ac_status = 0; }; }; then
34019    cross_compiling=no
34020  else
34021    if test "$cross_compiling" = maybe; then
34022	cross_compiling=yes
34023    else
34024	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34025$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34026as_fn_error $? "cannot run C compiled programs.
34027If you meant to cross compile, use \`--host'.
34028See \`config.log' for more details" "$LINENO" 5; }
34029    fi
34030  fi
34031fi
34032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34033$as_echo "$cross_compiling" >&6; }
34034
34035rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34036ac_clean_files=$ac_clean_files_save
34037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34038$as_echo_n "checking for suffix of object files... " >&6; }
34039if ${ac_cv_objext+:} false; then :
34040  $as_echo_n "(cached) " >&6
34041else
34042  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34043/* end confdefs.h.  */
34044
34045int
34046main ()
34047{
34048
34049  ;
34050  return 0;
34051}
34052_ACEOF
34053rm -f conftest.o conftest.obj
34054if { { ac_try="$ac_compile"
34055case "(($ac_try" in
34056  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34057  *) ac_try_echo=$ac_try;;
34058esac
34059eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34060$as_echo "$ac_try_echo"; } >&5
34061  (eval "$ac_compile") 2>&5
34062  ac_status=$?
34063  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34064  test $ac_status = 0; }; then :
34065  for ac_file in conftest.o conftest.obj conftest.*; do
34066  test -f "$ac_file" || continue;
34067  case $ac_file in
34068    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34069    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34070       break;;
34071  esac
34072done
34073else
34074  $as_echo "$as_me: failed program was:" >&5
34075sed 's/^/| /' conftest.$ac_ext >&5
34076
34077{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34078$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34079as_fn_error $? "cannot compute suffix of object files: cannot compile
34080See \`config.log' for more details" "$LINENO" 5; }
34081fi
34082rm -f conftest.$ac_cv_objext conftest.$ac_ext
34083fi
34084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34085$as_echo "$ac_cv_objext" >&6; }
34086OBJEXT=$ac_cv_objext
34087ac_objext=$OBJEXT
34088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34089$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34090if ${ac_cv_c_compiler_gnu+:} false; then :
34091  $as_echo_n "(cached) " >&6
34092else
34093  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34094/* end confdefs.h.  */
34095
34096int
34097main ()
34098{
34099#ifndef __GNUC__
34100       choke me
34101#endif
34102
34103  ;
34104  return 0;
34105}
34106_ACEOF
34107if ac_fn_c_try_compile "$LINENO"; then :
34108  ac_compiler_gnu=yes
34109else
34110  ac_compiler_gnu=no
34111fi
34112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34113ac_cv_c_compiler_gnu=$ac_compiler_gnu
34114
34115fi
34116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34117$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34118if test $ac_compiler_gnu = yes; then
34119  GCC=yes
34120else
34121  GCC=
34122fi
34123ac_test_CFLAGS=${CFLAGS+set}
34124ac_save_CFLAGS=$CFLAGS
34125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34126$as_echo_n "checking whether $CC accepts -g... " >&6; }
34127if ${ac_cv_prog_cc_g+:} false; then :
34128  $as_echo_n "(cached) " >&6
34129else
34130  ac_save_c_werror_flag=$ac_c_werror_flag
34131   ac_c_werror_flag=yes
34132   ac_cv_prog_cc_g=no
34133   CFLAGS="-g"
34134   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34135/* end confdefs.h.  */
34136
34137int
34138main ()
34139{
34140
34141  ;
34142  return 0;
34143}
34144_ACEOF
34145if ac_fn_c_try_compile "$LINENO"; then :
34146  ac_cv_prog_cc_g=yes
34147else
34148  CFLAGS=""
34149      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34150/* end confdefs.h.  */
34151
34152int
34153main ()
34154{
34155
34156  ;
34157  return 0;
34158}
34159_ACEOF
34160if ac_fn_c_try_compile "$LINENO"; then :
34161
34162else
34163  ac_c_werror_flag=$ac_save_c_werror_flag
34164	 CFLAGS="-g"
34165	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34166/* end confdefs.h.  */
34167
34168int
34169main ()
34170{
34171
34172  ;
34173  return 0;
34174}
34175_ACEOF
34176if ac_fn_c_try_compile "$LINENO"; then :
34177  ac_cv_prog_cc_g=yes
34178fi
34179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34180fi
34181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34182fi
34183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34184   ac_c_werror_flag=$ac_save_c_werror_flag
34185fi
34186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34187$as_echo "$ac_cv_prog_cc_g" >&6; }
34188if test "$ac_test_CFLAGS" = set; then
34189  CFLAGS=$ac_save_CFLAGS
34190elif test $ac_cv_prog_cc_g = yes; then
34191  if test "$GCC" = yes; then
34192    CFLAGS="-g -O2"
34193  else
34194    CFLAGS="-g"
34195  fi
34196else
34197  if test "$GCC" = yes; then
34198    CFLAGS="-O2"
34199  else
34200    CFLAGS=
34201  fi
34202fi
34203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34204$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34205if ${ac_cv_prog_cc_c89+:} false; then :
34206  $as_echo_n "(cached) " >&6
34207else
34208  ac_cv_prog_cc_c89=no
34209ac_save_CC=$CC
34210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34211/* end confdefs.h.  */
34212#include <stdarg.h>
34213#include <stdio.h>
34214struct stat;
34215/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34216struct buf { int x; };
34217FILE * (*rcsopen) (struct buf *, struct stat *, int);
34218static char *e (p, i)
34219     char **p;
34220     int i;
34221{
34222  return p[i];
34223}
34224static char *f (char * (*g) (char **, int), char **p, ...)
34225{
34226  char *s;
34227  va_list v;
34228  va_start (v,p);
34229  s = g (p, va_arg (v,int));
34230  va_end (v);
34231  return s;
34232}
34233
34234/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34235   function prototypes and stuff, but not '\xHH' hex character constants.
34236   These don't provoke an error unfortunately, instead are silently treated
34237   as 'x'.  The following induces an error, until -std is added to get
34238   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34239   array size at least.  It's necessary to write '\x00'==0 to get something
34240   that's true only with -std.  */
34241int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34242
34243/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34244   inside strings and character constants.  */
34245#define FOO(x) 'x'
34246int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34247
34248int test (int i, double x);
34249struct s1 {int (*f) (int a);};
34250struct s2 {int (*f) (double a);};
34251int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34252int argc;
34253char **argv;
34254int
34255main ()
34256{
34257return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34258  ;
34259  return 0;
34260}
34261_ACEOF
34262for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34263	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34264do
34265  CC="$ac_save_CC $ac_arg"
34266  if ac_fn_c_try_compile "$LINENO"; then :
34267  ac_cv_prog_cc_c89=$ac_arg
34268fi
34269rm -f core conftest.err conftest.$ac_objext
34270  test "x$ac_cv_prog_cc_c89" != "xno" && break
34271done
34272rm -f conftest.$ac_ext
34273CC=$ac_save_CC
34274
34275fi
34276# AC_CACHE_VAL
34277case "x$ac_cv_prog_cc_c89" in
34278  x)
34279    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34280$as_echo "none needed" >&6; } ;;
34281  xno)
34282    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34283$as_echo "unsupported" >&6; } ;;
34284  *)
34285    CC="$CC $ac_cv_prog_cc_c89"
34286    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34287$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34288esac
34289if test "x$ac_cv_prog_cc_c89" != xno; then :
34290
34291fi
34292
34293ac_ext=cpp
34294ac_cpp='$CXXCPP $CPPFLAGS'
34295ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34296ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34297ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34298
34299
34300
34301  COMPILER_NAME=C++
34302  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34303
34304  if test "x$CXX" != x; then
34305    # User has supplied compiler name already, always let that override.
34306    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34307$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34308    if test "x`basename $CXX`" = "x$CXX"; then
34309      # A command without a complete path is provided, search $PATH.
34310
34311      for ac_prog in $CXX
34312do
34313  # Extract the first word of "$ac_prog", so it can be a program name with args.
34314set dummy $ac_prog; ac_word=$2
34315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34316$as_echo_n "checking for $ac_word... " >&6; }
34317if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34318  $as_echo_n "(cached) " >&6
34319else
34320  case $POTENTIAL_CXX in
34321  [\\/]* | ?:[\\/]*)
34322  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34323  ;;
34324  *)
34325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34326for as_dir in $PATH
34327do
34328  IFS=$as_save_IFS
34329  test -z "$as_dir" && as_dir=.
34330    for ac_exec_ext in '' $ac_executable_extensions; do
34331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34332    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34334    break 2
34335  fi
34336done
34337  done
34338IFS=$as_save_IFS
34339
34340  ;;
34341esac
34342fi
34343POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34344if test -n "$POTENTIAL_CXX"; then
34345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34346$as_echo "$POTENTIAL_CXX" >&6; }
34347else
34348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34349$as_echo "no" >&6; }
34350fi
34351
34352
34353  test -n "$POTENTIAL_CXX" && break
34354done
34355
34356      if test "x$POTENTIAL_CXX" != x; then
34357        CXX=$POTENTIAL_CXX
34358      else
34359        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34360      fi
34361    else
34362      # Otherwise it might already be a complete path
34363      if test ! -x "$CXX"; then
34364        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34365      fi
34366    fi
34367  else
34368    # No user supplied value. Locate compiler ourselves.
34369
34370    # If we are cross compiling, assume cross compilation tools follows the
34371    # cross compilation standard where they are prefixed with the autoconf
34372    # standard name for the target. For example the binary
34373    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34374    # If we are not cross compiling, then the default compiler name will be
34375    # used.
34376
34377    CXX=
34378    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34379    # before checking the rest of the PATH.
34380    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34381    # step, this should not be necessary.
34382    if test -n "$TOOLCHAIN_PATH"; then
34383      PATH_save="$PATH"
34384      PATH="$TOOLCHAIN_PATH"
34385      for ac_prog in $SEARCH_LIST
34386do
34387  # Extract the first word of "$ac_prog", so it can be a program name with args.
34388set dummy $ac_prog; ac_word=$2
34389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34390$as_echo_n "checking for $ac_word... " >&6; }
34391if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34392  $as_echo_n "(cached) " >&6
34393else
34394  case $TOOLCHAIN_PATH_CXX in
34395  [\\/]* | ?:[\\/]*)
34396  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34397  ;;
34398  *)
34399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34400for as_dir in $PATH
34401do
34402  IFS=$as_save_IFS
34403  test -z "$as_dir" && as_dir=.
34404    for ac_exec_ext in '' $ac_executable_extensions; do
34405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34406    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34408    break 2
34409  fi
34410done
34411  done
34412IFS=$as_save_IFS
34413
34414  ;;
34415esac
34416fi
34417TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34418if test -n "$TOOLCHAIN_PATH_CXX"; then
34419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34420$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34421else
34422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34423$as_echo "no" >&6; }
34424fi
34425
34426
34427  test -n "$TOOLCHAIN_PATH_CXX" && break
34428done
34429
34430      CXX=$TOOLCHAIN_PATH_CXX
34431      PATH="$PATH_save"
34432    fi
34433
34434    # AC_PATH_PROGS can't be run multiple times with the same variable,
34435    # so create a new name for this run.
34436    if test "x$CXX" = x; then
34437      for ac_prog in $SEARCH_LIST
34438do
34439  # Extract the first word of "$ac_prog", so it can be a program name with args.
34440set dummy $ac_prog; ac_word=$2
34441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34442$as_echo_n "checking for $ac_word... " >&6; }
34443if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34444  $as_echo_n "(cached) " >&6
34445else
34446  case $POTENTIAL_CXX in
34447  [\\/]* | ?:[\\/]*)
34448  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34449  ;;
34450  *)
34451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34452for as_dir in $PATH
34453do
34454  IFS=$as_save_IFS
34455  test -z "$as_dir" && as_dir=.
34456    for ac_exec_ext in '' $ac_executable_extensions; do
34457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34458    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34460    break 2
34461  fi
34462done
34463  done
34464IFS=$as_save_IFS
34465
34466  ;;
34467esac
34468fi
34469POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34470if test -n "$POTENTIAL_CXX"; then
34471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34472$as_echo "$POTENTIAL_CXX" >&6; }
34473else
34474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34475$as_echo "no" >&6; }
34476fi
34477
34478
34479  test -n "$POTENTIAL_CXX" && break
34480done
34481
34482      CXX=$POTENTIAL_CXX
34483    fi
34484
34485    if test "x$CXX" = x; then
34486
34487  # Print a helpful message on how to acquire the necessary build dependency.
34488  # devkit is the help tag: freetype, cups, alsa etc
34489  MISSING_DEPENDENCY=devkit
34490
34491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34492    cygwin_help $MISSING_DEPENDENCY
34493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34494    msys_help $MISSING_DEPENDENCY
34495  else
34496    PKGHANDLER_COMMAND=
34497
34498    case $PKGHANDLER in
34499      apt-get)
34500        apt_help     $MISSING_DEPENDENCY ;;
34501      yum)
34502        yum_help     $MISSING_DEPENDENCY ;;
34503      port)
34504        port_help    $MISSING_DEPENDENCY ;;
34505      pkgutil)
34506        pkgutil_help $MISSING_DEPENDENCY ;;
34507      pkgadd)
34508        pkgadd_help  $MISSING_DEPENDENCY ;;
34509    esac
34510
34511    if test "x$PKGHANDLER_COMMAND" != x; then
34512      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34513    fi
34514  fi
34515
34516      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34517    fi
34518  fi
34519
34520  # Now we have a compiler binary in CXX. Make sure it's okay.
34521
34522  # Only process if variable expands to non-empty
34523
34524  if test "x$CXX" != x; then
34525    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34526
34527  # First separate the path from the arguments. This will split at the first
34528  # space.
34529  complete="$CXX"
34530  path="${complete%% *}"
34531  tmp="$complete EOL"
34532  arguments="${tmp#* }"
34533
34534  # Input might be given as Windows format, start by converting to
34535  # unix format.
34536  new_path=`$CYGPATH -u "$path"`
34537
34538  # Now try to locate executable using which
34539  new_path=`$WHICH "$new_path" 2> /dev/null`
34540  # bat and cmd files are not always considered executable in cygwin causing which
34541  # to not find them
34542  if test "x$new_path" = x \
34543      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34544      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34545    new_path=`$CYGPATH -u "$path"`
34546  fi
34547  if test "x$new_path" = x; then
34548    # Oops. Which didn't find the executable.
34549    # The splitting of arguments from the executable at a space might have been incorrect,
34550    # since paths with space are more likely in Windows. Give it another try with the whole
34551    # argument.
34552    path="$complete"
34553    arguments="EOL"
34554    new_path=`$CYGPATH -u "$path"`
34555    new_path=`$WHICH "$new_path" 2> /dev/null`
34556    # bat and cmd files are not always considered executable in cygwin causing which
34557    # to not find them
34558    if test "x$new_path" = x \
34559        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34560        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34561      new_path=`$CYGPATH -u "$path"`
34562    fi
34563    if test "x$new_path" = x; then
34564      # It's still not found. Now this is an unrecoverable error.
34565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34566$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34567      has_space=`$ECHO "$complete" | $GREP " "`
34568      if test "x$has_space" != x; then
34569        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34570$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34571      fi
34572      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34573    fi
34574  fi
34575
34576  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34577  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34578  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34579  # "foo.exe" is OK but "foo" is an error.
34580  #
34581  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34582  # It is also a way to make sure we got the proper file name for the real test later on.
34583  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34584  if test "x$test_shortpath" = x; then
34585    # Short path failed, file does not exist as specified.
34586    # Try adding .exe or .cmd
34587    if test -f "${new_path}.exe"; then
34588      input_to_shortpath="${new_path}.exe"
34589    elif test -f "${new_path}.cmd"; then
34590      input_to_shortpath="${new_path}.cmd"
34591    else
34592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34593$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34594      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34595$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34596      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34597    fi
34598  else
34599    input_to_shortpath="$new_path"
34600  fi
34601
34602  # Call helper function which possibly converts this using DOS-style short mode.
34603  # If so, the updated path is stored in $new_path.
34604  new_path="$input_to_shortpath"
34605
34606  input_path="$input_to_shortpath"
34607  # Check if we need to convert this using DOS-style short mode. If the path
34608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34609  # take no chances and rewrite it.
34610  # Note: m4 eats our [], so we need to use [ and ] instead.
34611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34612  if test "x$has_forbidden_chars" != x; then
34613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34614    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34615    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34616    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34617      # Going to short mode and back again did indeed matter. Since short mode is
34618      # case insensitive, let's make it lowercase to improve readability.
34619      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34620      # Now convert it back to Unix-style (cygpath)
34621      input_path=`$CYGPATH -u "$shortmode_path"`
34622      new_path="$input_path"
34623    fi
34624  fi
34625
34626  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34627  if test "x$test_cygdrive_prefix" = x; then
34628    # As a simple fix, exclude /usr/bin since it's not a real path.
34629    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34630      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34631      # a path prefixed by /cygdrive for fixpath to work.
34632      new_path="$CYGWIN_ROOT_PATH$input_path"
34633    fi
34634  fi
34635
34636  # remove trailing .exe if any
34637  new_path="${new_path/%.exe/}"
34638
34639    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34640
34641  # First separate the path from the arguments. This will split at the first
34642  # space.
34643  complete="$CXX"
34644  path="${complete%% *}"
34645  tmp="$complete EOL"
34646  arguments="${tmp#* }"
34647
34648  # Input might be given as Windows format, start by converting to
34649  # unix format.
34650  new_path="$path"
34651
34652  windows_path="$new_path"
34653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34654    unix_path=`$CYGPATH -u "$windows_path"`
34655    new_path="$unix_path"
34656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34658    new_path="$unix_path"
34659  fi
34660
34661
34662  # Now try to locate executable using which
34663  new_path=`$WHICH "$new_path" 2> /dev/null`
34664
34665  if test "x$new_path" = x; then
34666    # Oops. Which didn't find the executable.
34667    # The splitting of arguments from the executable at a space might have been incorrect,
34668    # since paths with space are more likely in Windows. Give it another try with the whole
34669    # argument.
34670    path="$complete"
34671    arguments="EOL"
34672    new_path="$path"
34673
34674  windows_path="$new_path"
34675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34676    unix_path=`$CYGPATH -u "$windows_path"`
34677    new_path="$unix_path"
34678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34680    new_path="$unix_path"
34681  fi
34682
34683
34684    new_path=`$WHICH "$new_path" 2> /dev/null`
34685    # bat and cmd files are not always considered executable in MSYS causing which
34686    # to not find them
34687    if test "x$new_path" = x \
34688        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34689        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34690      new_path="$path"
34691
34692  windows_path="$new_path"
34693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34694    unix_path=`$CYGPATH -u "$windows_path"`
34695    new_path="$unix_path"
34696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34698    new_path="$unix_path"
34699  fi
34700
34701    fi
34702
34703    if test "x$new_path" = x; then
34704      # It's still not found. Now this is an unrecoverable error.
34705      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34706$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34707      has_space=`$ECHO "$complete" | $GREP " "`
34708      if test "x$has_space" != x; then
34709        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34710$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34711      fi
34712      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34713    fi
34714  fi
34715
34716  # Now new_path has a complete unix path to the binary
34717  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34718    # Keep paths in /bin as-is, but remove trailing .exe if any
34719    new_path="${new_path/%.exe/}"
34720    # Do not save /bin paths to all_fixpath_prefixes!
34721  else
34722    # Not in mixed or Windows style, start by that.
34723    new_path=`cmd //c echo $new_path`
34724
34725  input_path="$new_path"
34726  # Check if we need to convert this using DOS-style short mode. If the path
34727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34728  # take no chances and rewrite it.
34729  # Note: m4 eats our [], so we need to use [ and ] instead.
34730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34731  if test "x$has_forbidden_chars" != x; then
34732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34733    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34734  fi
34735
34736    # Output is in $new_path
34737
34738  windows_path="$new_path"
34739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34740    unix_path=`$CYGPATH -u "$windows_path"`
34741    new_path="$unix_path"
34742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34744    new_path="$unix_path"
34745  fi
34746
34747    # remove trailing .exe if any
34748    new_path="${new_path/%.exe/}"
34749
34750    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34751    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34752  fi
34753
34754    else
34755      # We're on a unix platform. Hooray! :)
34756      # First separate the path from the arguments. This will split at the first
34757      # space.
34758      complete="$CXX"
34759      path="${complete%% *}"
34760      tmp="$complete EOL"
34761      arguments="${tmp#* }"
34762
34763      # Cannot rely on the command "which" here since it doesn't always work.
34764      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34765      if test -z "$is_absolute_path"; then
34766        # Path to executable is not absolute. Find it.
34767        IFS_save="$IFS"
34768        IFS=:
34769        for p in $PATH; do
34770          if test -f "$p/$path" && test -x "$p/$path"; then
34771            new_path="$p/$path"
34772            break
34773          fi
34774        done
34775        IFS="$IFS_save"
34776      else
34777        # This is an absolute path, we can use it without further modifications.
34778        new_path="$path"
34779      fi
34780
34781      if test "x$new_path" = x; then
34782        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34783$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34784        has_space=`$ECHO "$complete" | $GREP " "`
34785        if test "x$has_space" != x; then
34786          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34787$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34788        fi
34789        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34790      fi
34791    fi
34792
34793    # Now join together the path and the arguments once again
34794    if test "x$arguments" != xEOL; then
34795      new_complete="$new_path ${arguments% *}"
34796    else
34797      new_complete="$new_path"
34798    fi
34799
34800    if test "x$complete" != "x$new_complete"; then
34801      CXX="$new_complete"
34802      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34803$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34804    fi
34805  fi
34806
34807  TEST_COMPILER="$CXX"
34808
34809  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34810$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34811  SYMLINK_ORIGINAL="$TEST_COMPILER"
34812
34813  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34814    # Follow a chain of symbolic links. Use readlink
34815    # where it exists, else fall back to horribly
34816    # complicated shell code.
34817    if test "x$READLINK_TESTED" != yes; then
34818      # On MacOSX there is a readlink tool with a different
34819      # purpose than the GNU readlink tool. Check the found readlink.
34820      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34821      if test "x$ISGNU" = x; then
34822        # A readlink that we do not know how to use.
34823        # Are there other non-GNU readlinks out there?
34824        READLINK_TESTED=yes
34825        READLINK=
34826      fi
34827    fi
34828
34829    if test "x$READLINK" != x; then
34830      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34831    else
34832      # Save the current directory for restoring afterwards
34833      STARTDIR=$PWD
34834      COUNTER=0
34835      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34836      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34837      cd $sym_link_dir
34838      # Use -P flag to resolve symlinks in directories.
34839      cd `$THEPWDCMD -P`
34840      sym_link_dir=`$THEPWDCMD -P`
34841      # Resolve file symlinks
34842      while test $COUNTER -lt 20; do
34843        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34844        if test "x$ISLINK" == x; then
34845          # This is not a symbolic link! We are done!
34846          break
34847        fi
34848        # Again resolve directory symlinks since the target of the just found
34849        # link could be in a different directory
34850        cd `$DIRNAME $ISLINK`
34851        sym_link_dir=`$THEPWDCMD -P`
34852        sym_link_file=`$BASENAME $ISLINK`
34853        let COUNTER=COUNTER+1
34854      done
34855      cd $STARTDIR
34856      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34857    fi
34858  fi
34859
34860  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34861    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34862$as_echo "no symlink" >&6; }
34863  else
34864    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34865$as_echo "$SYMLINK_ORIGINAL" >&6; }
34866
34867    # We can't handle ccache by gcc wrappers, since we need to know if we're
34868    # using ccache. Instead ccache usage must be controlled by a configure option.
34869    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34870    if test "x$COMPILER_BASENAME" = "xccache"; then
34871      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34872$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34873      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34874    fi
34875  fi
34876
34877
34878  COMPILER=$CXX
34879  COMPILER_NAME=$COMPILER_NAME
34880
34881  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34882    # cc -V output typically looks like
34883    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34884    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34885    # Check that this is likely to be the Solaris Studio cc.
34886    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34887    if test $? -ne 0; then
34888      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34889      { $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
34890$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34891      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34892$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34893      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34894$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34895      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34896    fi
34897    # Remove usage instructions (if present), and
34898    # collapse compiler output into a single line
34899    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34900        $SED -e 's/ *[Uu]sage:.*//'`
34901    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34902        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34903  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34904    # xlc -qversion output typically looks like
34905    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34906    #     Version: 11.01.0000.0015
34907    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34908    # Check that this is likely to be the IBM XL C compiler.
34909    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34910    if test $? -ne 0; then
34911      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34912      { $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
34913$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34914      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34915$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34916      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34917$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34918      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34919    fi
34920    # Collapse compiler output into a single line
34921    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34922    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34923        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34924  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34925    # There is no specific version flag, but all output starts with a version string.
34926    # First line typically looks something like:
34927    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34928    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34929    # Check that this is likely to be Microsoft CL.EXE.
34930    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34931    if test $? -ne 0; then
34932      { $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
34933$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34934      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34935$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34936      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34937    fi
34938    # Collapse compiler output into a single line
34939    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34940    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34941        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34942  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34943    # gcc --version output typically looks like
34944    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34945    #     Copyright (C) 2013 Free Software Foundation, Inc.
34946    #     This is free software; see the source for copying conditions.  There is NO
34947    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34948    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34949    # Check that this is likely to be GCC.
34950    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34951    if test $? -ne 0; then
34952      { $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
34953$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34954      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34955$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34956      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34957    fi
34958    # Remove Copyright and legalese from version string, and
34959    # collapse into a single line
34960    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34961        $SED -e 's/ *Copyright .*//'`
34962    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34963        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34964  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34965    # clang --version output typically looks like
34966    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34967    #    clang version 3.3 (tags/RELEASE_33/final)
34968    # or
34969    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34970    #    Target: x86_64-pc-linux-gnu
34971    #    Thread model: posix
34972    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34973    # Check that this is likely to be clang
34974    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34975    if test $? -ne 0; then
34976      { $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
34977$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34978      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34979$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34980      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34981    fi
34982    # Collapse compiler output into a single line
34983    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34984    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34985        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34986  else
34987      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34988  fi
34989  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34990  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34991  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34992  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34993
34994  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34995$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34996
34997
34998  # Now that we have resolved CXX ourself, let autoconf have its go at it
34999  ac_ext=cpp
35000ac_cpp='$CXXCPP $CPPFLAGS'
35001ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35002ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35003ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35004if test -z "$CXX"; then
35005  if test -n "$CCC"; then
35006    CXX=$CCC
35007  else
35008    if test -n "$ac_tool_prefix"; then
35009  for ac_prog in $CXX
35010  do
35011    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35012set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35014$as_echo_n "checking for $ac_word... " >&6; }
35015if ${ac_cv_prog_CXX+:} false; then :
35016  $as_echo_n "(cached) " >&6
35017else
35018  if test -n "$CXX"; then
35019  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35020else
35021as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35022for as_dir in $PATH
35023do
35024  IFS=$as_save_IFS
35025  test -z "$as_dir" && as_dir=.
35026    for ac_exec_ext in '' $ac_executable_extensions; do
35027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35028    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35030    break 2
35031  fi
35032done
35033  done
35034IFS=$as_save_IFS
35035
35036fi
35037fi
35038CXX=$ac_cv_prog_CXX
35039if test -n "$CXX"; then
35040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35041$as_echo "$CXX" >&6; }
35042else
35043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35044$as_echo "no" >&6; }
35045fi
35046
35047
35048    test -n "$CXX" && break
35049  done
35050fi
35051if test -z "$CXX"; then
35052  ac_ct_CXX=$CXX
35053  for ac_prog in $CXX
35054do
35055  # Extract the first word of "$ac_prog", so it can be a program name with args.
35056set dummy $ac_prog; ac_word=$2
35057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35058$as_echo_n "checking for $ac_word... " >&6; }
35059if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35060  $as_echo_n "(cached) " >&6
35061else
35062  if test -n "$ac_ct_CXX"; then
35063  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35064else
35065as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35066for as_dir in $PATH
35067do
35068  IFS=$as_save_IFS
35069  test -z "$as_dir" && as_dir=.
35070    for ac_exec_ext in '' $ac_executable_extensions; do
35071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35072    ac_cv_prog_ac_ct_CXX="$ac_prog"
35073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35074    break 2
35075  fi
35076done
35077  done
35078IFS=$as_save_IFS
35079
35080fi
35081fi
35082ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35083if test -n "$ac_ct_CXX"; then
35084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35085$as_echo "$ac_ct_CXX" >&6; }
35086else
35087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35088$as_echo "no" >&6; }
35089fi
35090
35091
35092  test -n "$ac_ct_CXX" && break
35093done
35094
35095  if test "x$ac_ct_CXX" = x; then
35096    CXX="g++"
35097  else
35098    case $cross_compiling:$ac_tool_warned in
35099yes:)
35100{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35101$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35102ac_tool_warned=yes ;;
35103esac
35104    CXX=$ac_ct_CXX
35105  fi
35106fi
35107
35108  fi
35109fi
35110# Provide some information about the compiler.
35111$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35112set X $ac_compile
35113ac_compiler=$2
35114for ac_option in --version -v -V -qversion; do
35115  { { ac_try="$ac_compiler $ac_option >&5"
35116case "(($ac_try" in
35117  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35118  *) ac_try_echo=$ac_try;;
35119esac
35120eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35121$as_echo "$ac_try_echo"; } >&5
35122  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35123  ac_status=$?
35124  if test -s conftest.err; then
35125    sed '10a\
35126... rest of stderr output deleted ...
35127         10q' conftest.err >conftest.er1
35128    cat conftest.er1 >&5
35129  fi
35130  rm -f conftest.er1 conftest.err
35131  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35132  test $ac_status = 0; }
35133done
35134
35135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35136$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35137if ${ac_cv_cxx_compiler_gnu+:} false; then :
35138  $as_echo_n "(cached) " >&6
35139else
35140  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35141/* end confdefs.h.  */
35142
35143int
35144main ()
35145{
35146#ifndef __GNUC__
35147       choke me
35148#endif
35149
35150  ;
35151  return 0;
35152}
35153_ACEOF
35154if ac_fn_cxx_try_compile "$LINENO"; then :
35155  ac_compiler_gnu=yes
35156else
35157  ac_compiler_gnu=no
35158fi
35159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35160ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35161
35162fi
35163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35164$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35165if test $ac_compiler_gnu = yes; then
35166  GXX=yes
35167else
35168  GXX=
35169fi
35170ac_test_CXXFLAGS=${CXXFLAGS+set}
35171ac_save_CXXFLAGS=$CXXFLAGS
35172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35173$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35174if ${ac_cv_prog_cxx_g+:} false; then :
35175  $as_echo_n "(cached) " >&6
35176else
35177  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35178   ac_cxx_werror_flag=yes
35179   ac_cv_prog_cxx_g=no
35180   CXXFLAGS="-g"
35181   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35182/* end confdefs.h.  */
35183
35184int
35185main ()
35186{
35187
35188  ;
35189  return 0;
35190}
35191_ACEOF
35192if ac_fn_cxx_try_compile "$LINENO"; then :
35193  ac_cv_prog_cxx_g=yes
35194else
35195  CXXFLAGS=""
35196      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35197/* end confdefs.h.  */
35198
35199int
35200main ()
35201{
35202
35203  ;
35204  return 0;
35205}
35206_ACEOF
35207if ac_fn_cxx_try_compile "$LINENO"; then :
35208
35209else
35210  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35211	 CXXFLAGS="-g"
35212	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35213/* end confdefs.h.  */
35214
35215int
35216main ()
35217{
35218
35219  ;
35220  return 0;
35221}
35222_ACEOF
35223if ac_fn_cxx_try_compile "$LINENO"; then :
35224  ac_cv_prog_cxx_g=yes
35225fi
35226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35227fi
35228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35229fi
35230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35231   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35232fi
35233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35234$as_echo "$ac_cv_prog_cxx_g" >&6; }
35235if test "$ac_test_CXXFLAGS" = set; then
35236  CXXFLAGS=$ac_save_CXXFLAGS
35237elif test $ac_cv_prog_cxx_g = yes; then
35238  if test "$GXX" = yes; then
35239    CXXFLAGS="-g -O2"
35240  else
35241    CXXFLAGS="-g"
35242  fi
35243else
35244  if test "$GXX" = yes; then
35245    CXXFLAGS="-O2"
35246  else
35247    CXXFLAGS=
35248  fi
35249fi
35250ac_ext=cpp
35251ac_cpp='$CXXCPP $CPPFLAGS'
35252ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35253ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35254ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35255
35256
35257  # This is the compiler version number on the form X.Y[.Z]
35258
35259
35260
35261
35262  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35263    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35264$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35265    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35266$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35267  fi
35268
35269  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35270  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
35271    { $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
35272$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;}
35273  fi
35274
35275  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35276    { $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
35277$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35278  fi
35279
35280  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
35281
35282
35283  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
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
35328
35329
35330
35331
35332
35333    # Execute function body
35334
35335  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35336  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35337
35338  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
35339    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
35340  fi
35341
35342  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35343    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35344  fi
35345
35346  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35347  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
35348
35349  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35350    :
35351
35352  else
35353    :
35354
35355          { $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
35356$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35357
35358
35359  fi
35360
35361
35362
35363
35364
35365
35366
35367
35368
35369
35370
35371
35372
35373
35374  fi
35375
35376  #
35377  # Setup the preprocessor (CPP and CXXCPP)
35378  #
35379  ac_ext=c
35380ac_cpp='$CPP $CPPFLAGS'
35381ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35382ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35383ac_compiler_gnu=$ac_cv_c_compiler_gnu
35384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35385$as_echo_n "checking how to run the C preprocessor... " >&6; }
35386# On Suns, sometimes $CPP names a directory.
35387if test -n "$CPP" && test -d "$CPP"; then
35388  CPP=
35389fi
35390if test -z "$CPP"; then
35391  if ${ac_cv_prog_CPP+:} false; then :
35392  $as_echo_n "(cached) " >&6
35393else
35394      # Double quotes because CPP needs to be expanded
35395    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35396    do
35397      ac_preproc_ok=false
35398for ac_c_preproc_warn_flag in '' yes
35399do
35400  # Use a header file that comes with gcc, so configuring glibc
35401  # with a fresh cross-compiler works.
35402  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35403  # <limits.h> exists even on freestanding compilers.
35404  # On the NeXT, cc -E runs the code through the compiler's parser,
35405  # not just through cpp. "Syntax error" is here to catch this case.
35406  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35407/* end confdefs.h.  */
35408#ifdef __STDC__
35409# include <limits.h>
35410#else
35411# include <assert.h>
35412#endif
35413		     Syntax error
35414_ACEOF
35415if ac_fn_c_try_cpp "$LINENO"; then :
35416
35417else
35418  # Broken: fails on valid input.
35419continue
35420fi
35421rm -f conftest.err conftest.i conftest.$ac_ext
35422
35423  # OK, works on sane cases.  Now check whether nonexistent headers
35424  # can be detected and how.
35425  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35426/* end confdefs.h.  */
35427#include <ac_nonexistent.h>
35428_ACEOF
35429if ac_fn_c_try_cpp "$LINENO"; then :
35430  # Broken: success on invalid input.
35431continue
35432else
35433  # Passes both tests.
35434ac_preproc_ok=:
35435break
35436fi
35437rm -f conftest.err conftest.i conftest.$ac_ext
35438
35439done
35440# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35441rm -f conftest.i conftest.err conftest.$ac_ext
35442if $ac_preproc_ok; then :
35443  break
35444fi
35445
35446    done
35447    ac_cv_prog_CPP=$CPP
35448
35449fi
35450  CPP=$ac_cv_prog_CPP
35451else
35452  ac_cv_prog_CPP=$CPP
35453fi
35454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35455$as_echo "$CPP" >&6; }
35456ac_preproc_ok=false
35457for ac_c_preproc_warn_flag in '' yes
35458do
35459  # Use a header file that comes with gcc, so configuring glibc
35460  # with a fresh cross-compiler works.
35461  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35462  # <limits.h> exists even on freestanding compilers.
35463  # On the NeXT, cc -E runs the code through the compiler's parser,
35464  # not just through cpp. "Syntax error" is here to catch this case.
35465  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35466/* end confdefs.h.  */
35467#ifdef __STDC__
35468# include <limits.h>
35469#else
35470# include <assert.h>
35471#endif
35472		     Syntax error
35473_ACEOF
35474if ac_fn_c_try_cpp "$LINENO"; then :
35475
35476else
35477  # Broken: fails on valid input.
35478continue
35479fi
35480rm -f conftest.err conftest.i conftest.$ac_ext
35481
35482  # OK, works on sane cases.  Now check whether nonexistent headers
35483  # can be detected and how.
35484  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35485/* end confdefs.h.  */
35486#include <ac_nonexistent.h>
35487_ACEOF
35488if ac_fn_c_try_cpp "$LINENO"; then :
35489  # Broken: success on invalid input.
35490continue
35491else
35492  # Passes both tests.
35493ac_preproc_ok=:
35494break
35495fi
35496rm -f conftest.err conftest.i conftest.$ac_ext
35497
35498done
35499# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35500rm -f conftest.i conftest.err conftest.$ac_ext
35501if $ac_preproc_ok; then :
35502
35503else
35504  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35505$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35506as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35507See \`config.log' for more details" "$LINENO" 5; }
35508fi
35509
35510ac_ext=cpp
35511ac_cpp='$CXXCPP $CPPFLAGS'
35512ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35513ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35514ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35515
35516
35517  # Only process if variable expands to non-empty
35518
35519  if test "x$CPP" != x; then
35520    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35521
35522  # First separate the path from the arguments. This will split at the first
35523  # space.
35524  complete="$CPP"
35525  path="${complete%% *}"
35526  tmp="$complete EOL"
35527  arguments="${tmp#* }"
35528
35529  # Input might be given as Windows format, start by converting to
35530  # unix format.
35531  new_path=`$CYGPATH -u "$path"`
35532
35533  # Now try to locate executable using which
35534  new_path=`$WHICH "$new_path" 2> /dev/null`
35535  # bat and cmd files are not always considered executable in cygwin causing which
35536  # to not find them
35537  if test "x$new_path" = x \
35538      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35539      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35540    new_path=`$CYGPATH -u "$path"`
35541  fi
35542  if test "x$new_path" = x; then
35543    # Oops. Which didn't find the executable.
35544    # The splitting of arguments from the executable at a space might have been incorrect,
35545    # since paths with space are more likely in Windows. Give it another try with the whole
35546    # argument.
35547    path="$complete"
35548    arguments="EOL"
35549    new_path=`$CYGPATH -u "$path"`
35550    new_path=`$WHICH "$new_path" 2> /dev/null`
35551    # bat and cmd files are not always considered executable in cygwin causing which
35552    # to not find them
35553    if test "x$new_path" = x \
35554        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35555        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35556      new_path=`$CYGPATH -u "$path"`
35557    fi
35558    if test "x$new_path" = x; then
35559      # It's still not found. Now this is an unrecoverable error.
35560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35561$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35562      has_space=`$ECHO "$complete" | $GREP " "`
35563      if test "x$has_space" != x; then
35564        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35565$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35566      fi
35567      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35568    fi
35569  fi
35570
35571  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35572  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35573  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35574  # "foo.exe" is OK but "foo" is an error.
35575  #
35576  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35577  # It is also a way to make sure we got the proper file name for the real test later on.
35578  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35579  if test "x$test_shortpath" = x; then
35580    # Short path failed, file does not exist as specified.
35581    # Try adding .exe or .cmd
35582    if test -f "${new_path}.exe"; then
35583      input_to_shortpath="${new_path}.exe"
35584    elif test -f "${new_path}.cmd"; then
35585      input_to_shortpath="${new_path}.cmd"
35586    else
35587      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35588$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35589      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35590$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35591      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35592    fi
35593  else
35594    input_to_shortpath="$new_path"
35595  fi
35596
35597  # Call helper function which possibly converts this using DOS-style short mode.
35598  # If so, the updated path is stored in $new_path.
35599  new_path="$input_to_shortpath"
35600
35601  input_path="$input_to_shortpath"
35602  # Check if we need to convert this using DOS-style short mode. If the path
35603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35604  # take no chances and rewrite it.
35605  # Note: m4 eats our [], so we need to use [ and ] instead.
35606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35607  if test "x$has_forbidden_chars" != x; then
35608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35609    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35610    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35611    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35612      # Going to short mode and back again did indeed matter. Since short mode is
35613      # case insensitive, let's make it lowercase to improve readability.
35614      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35615      # Now convert it back to Unix-style (cygpath)
35616      input_path=`$CYGPATH -u "$shortmode_path"`
35617      new_path="$input_path"
35618    fi
35619  fi
35620
35621  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35622  if test "x$test_cygdrive_prefix" = x; then
35623    # As a simple fix, exclude /usr/bin since it's not a real path.
35624    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35625      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35626      # a path prefixed by /cygdrive for fixpath to work.
35627      new_path="$CYGWIN_ROOT_PATH$input_path"
35628    fi
35629  fi
35630
35631  # remove trailing .exe if any
35632  new_path="${new_path/%.exe/}"
35633
35634    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35635
35636  # First separate the path from the arguments. This will split at the first
35637  # space.
35638  complete="$CPP"
35639  path="${complete%% *}"
35640  tmp="$complete EOL"
35641  arguments="${tmp#* }"
35642
35643  # Input might be given as Windows format, start by converting to
35644  # unix format.
35645  new_path="$path"
35646
35647  windows_path="$new_path"
35648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35649    unix_path=`$CYGPATH -u "$windows_path"`
35650    new_path="$unix_path"
35651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35653    new_path="$unix_path"
35654  fi
35655
35656
35657  # Now try to locate executable using which
35658  new_path=`$WHICH "$new_path" 2> /dev/null`
35659
35660  if test "x$new_path" = x; then
35661    # Oops. Which didn't find the executable.
35662    # The splitting of arguments from the executable at a space might have been incorrect,
35663    # since paths with space are more likely in Windows. Give it another try with the whole
35664    # argument.
35665    path="$complete"
35666    arguments="EOL"
35667    new_path="$path"
35668
35669  windows_path="$new_path"
35670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35671    unix_path=`$CYGPATH -u "$windows_path"`
35672    new_path="$unix_path"
35673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35675    new_path="$unix_path"
35676  fi
35677
35678
35679    new_path=`$WHICH "$new_path" 2> /dev/null`
35680    # bat and cmd files are not always considered executable in MSYS causing which
35681    # to not find them
35682    if test "x$new_path" = x \
35683        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35684        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35685      new_path="$path"
35686
35687  windows_path="$new_path"
35688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35689    unix_path=`$CYGPATH -u "$windows_path"`
35690    new_path="$unix_path"
35691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35693    new_path="$unix_path"
35694  fi
35695
35696    fi
35697
35698    if test "x$new_path" = x; then
35699      # It's still not found. Now this is an unrecoverable error.
35700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35701$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35702      has_space=`$ECHO "$complete" | $GREP " "`
35703      if test "x$has_space" != x; then
35704        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35705$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35706      fi
35707      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35708    fi
35709  fi
35710
35711  # Now new_path has a complete unix path to the binary
35712  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35713    # Keep paths in /bin as-is, but remove trailing .exe if any
35714    new_path="${new_path/%.exe/}"
35715    # Do not save /bin paths to all_fixpath_prefixes!
35716  else
35717    # Not in mixed or Windows style, start by that.
35718    new_path=`cmd //c echo $new_path`
35719
35720  input_path="$new_path"
35721  # Check if we need to convert this using DOS-style short mode. If the path
35722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35723  # take no chances and rewrite it.
35724  # Note: m4 eats our [], so we need to use [ and ] instead.
35725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35726  if test "x$has_forbidden_chars" != x; then
35727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35728    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35729  fi
35730
35731    # Output is in $new_path
35732
35733  windows_path="$new_path"
35734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35735    unix_path=`$CYGPATH -u "$windows_path"`
35736    new_path="$unix_path"
35737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35739    new_path="$unix_path"
35740  fi
35741
35742    # remove trailing .exe if any
35743    new_path="${new_path/%.exe/}"
35744
35745    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35746    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35747  fi
35748
35749    else
35750      # We're on a unix platform. Hooray! :)
35751      # First separate the path from the arguments. This will split at the first
35752      # space.
35753      complete="$CPP"
35754      path="${complete%% *}"
35755      tmp="$complete EOL"
35756      arguments="${tmp#* }"
35757
35758      # Cannot rely on the command "which" here since it doesn't always work.
35759      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35760      if test -z "$is_absolute_path"; then
35761        # Path to executable is not absolute. Find it.
35762        IFS_save="$IFS"
35763        IFS=:
35764        for p in $PATH; do
35765          if test -f "$p/$path" && test -x "$p/$path"; then
35766            new_path="$p/$path"
35767            break
35768          fi
35769        done
35770        IFS="$IFS_save"
35771      else
35772        # This is an absolute path, we can use it without further modifications.
35773        new_path="$path"
35774      fi
35775
35776      if test "x$new_path" = x; then
35777        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35778$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35779        has_space=`$ECHO "$complete" | $GREP " "`
35780        if test "x$has_space" != x; then
35781          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35782$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35783        fi
35784        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35785      fi
35786    fi
35787
35788    # Now join together the path and the arguments once again
35789    if test "x$arguments" != xEOL; then
35790      new_complete="$new_path ${arguments% *}"
35791    else
35792      new_complete="$new_path"
35793    fi
35794
35795    if test "x$complete" != "x$new_complete"; then
35796      CPP="$new_complete"
35797      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35798$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35799    fi
35800  fi
35801
35802  ac_ext=cpp
35803ac_cpp='$CXXCPP $CPPFLAGS'
35804ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35805ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35806ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35808$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35809if test -z "$CXXCPP"; then
35810  if ${ac_cv_prog_CXXCPP+:} false; then :
35811  $as_echo_n "(cached) " >&6
35812else
35813      # Double quotes because CXXCPP needs to be expanded
35814    for CXXCPP in "$CXX -E" "/lib/cpp"
35815    do
35816      ac_preproc_ok=false
35817for ac_cxx_preproc_warn_flag in '' yes
35818do
35819  # Use a header file that comes with gcc, so configuring glibc
35820  # with a fresh cross-compiler works.
35821  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35822  # <limits.h> exists even on freestanding compilers.
35823  # On the NeXT, cc -E runs the code through the compiler's parser,
35824  # not just through cpp. "Syntax error" is here to catch this case.
35825  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35826/* end confdefs.h.  */
35827#ifdef __STDC__
35828# include <limits.h>
35829#else
35830# include <assert.h>
35831#endif
35832		     Syntax error
35833_ACEOF
35834if ac_fn_cxx_try_cpp "$LINENO"; then :
35835
35836else
35837  # Broken: fails on valid input.
35838continue
35839fi
35840rm -f conftest.err conftest.i conftest.$ac_ext
35841
35842  # OK, works on sane cases.  Now check whether nonexistent headers
35843  # can be detected and how.
35844  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35845/* end confdefs.h.  */
35846#include <ac_nonexistent.h>
35847_ACEOF
35848if ac_fn_cxx_try_cpp "$LINENO"; then :
35849  # Broken: success on invalid input.
35850continue
35851else
35852  # Passes both tests.
35853ac_preproc_ok=:
35854break
35855fi
35856rm -f conftest.err conftest.i conftest.$ac_ext
35857
35858done
35859# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35860rm -f conftest.i conftest.err conftest.$ac_ext
35861if $ac_preproc_ok; then :
35862  break
35863fi
35864
35865    done
35866    ac_cv_prog_CXXCPP=$CXXCPP
35867
35868fi
35869  CXXCPP=$ac_cv_prog_CXXCPP
35870else
35871  ac_cv_prog_CXXCPP=$CXXCPP
35872fi
35873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35874$as_echo "$CXXCPP" >&6; }
35875ac_preproc_ok=false
35876for ac_cxx_preproc_warn_flag in '' yes
35877do
35878  # Use a header file that comes with gcc, so configuring glibc
35879  # with a fresh cross-compiler works.
35880  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35881  # <limits.h> exists even on freestanding compilers.
35882  # On the NeXT, cc -E runs the code through the compiler's parser,
35883  # not just through cpp. "Syntax error" is here to catch this case.
35884  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35885/* end confdefs.h.  */
35886#ifdef __STDC__
35887# include <limits.h>
35888#else
35889# include <assert.h>
35890#endif
35891		     Syntax error
35892_ACEOF
35893if ac_fn_cxx_try_cpp "$LINENO"; then :
35894
35895else
35896  # Broken: fails on valid input.
35897continue
35898fi
35899rm -f conftest.err conftest.i conftest.$ac_ext
35900
35901  # OK, works on sane cases.  Now check whether nonexistent headers
35902  # can be detected and how.
35903  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35904/* end confdefs.h.  */
35905#include <ac_nonexistent.h>
35906_ACEOF
35907if ac_fn_cxx_try_cpp "$LINENO"; then :
35908  # Broken: success on invalid input.
35909continue
35910else
35911  # Passes both tests.
35912ac_preproc_ok=:
35913break
35914fi
35915rm -f conftest.err conftest.i conftest.$ac_ext
35916
35917done
35918# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35919rm -f conftest.i conftest.err conftest.$ac_ext
35920if $ac_preproc_ok; then :
35921
35922else
35923  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35924$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35925as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35926See \`config.log' for more details" "$LINENO" 5; }
35927fi
35928
35929ac_ext=cpp
35930ac_cpp='$CXXCPP $CPPFLAGS'
35931ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35932ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35933ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35934
35935
35936  # Only process if variable expands to non-empty
35937
35938  if test "x$CXXCPP" != x; then
35939    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35940
35941  # First separate the path from the arguments. This will split at the first
35942  # space.
35943  complete="$CXXCPP"
35944  path="${complete%% *}"
35945  tmp="$complete EOL"
35946  arguments="${tmp#* }"
35947
35948  # Input might be given as Windows format, start by converting to
35949  # unix format.
35950  new_path=`$CYGPATH -u "$path"`
35951
35952  # Now try to locate executable using which
35953  new_path=`$WHICH "$new_path" 2> /dev/null`
35954  # bat and cmd files are not always considered executable in cygwin causing which
35955  # to not find them
35956  if test "x$new_path" = x \
35957      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35958      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35959    new_path=`$CYGPATH -u "$path"`
35960  fi
35961  if test "x$new_path" = x; then
35962    # Oops. Which didn't find the executable.
35963    # The splitting of arguments from the executable at a space might have been incorrect,
35964    # since paths with space are more likely in Windows. Give it another try with the whole
35965    # argument.
35966    path="$complete"
35967    arguments="EOL"
35968    new_path=`$CYGPATH -u "$path"`
35969    new_path=`$WHICH "$new_path" 2> /dev/null`
35970    # bat and cmd files are not always considered executable in cygwin causing which
35971    # to not find them
35972    if test "x$new_path" = x \
35973        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35974        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35975      new_path=`$CYGPATH -u "$path"`
35976    fi
35977    if test "x$new_path" = x; then
35978      # It's still not found. Now this is an unrecoverable error.
35979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35980$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35981      has_space=`$ECHO "$complete" | $GREP " "`
35982      if test "x$has_space" != x; then
35983        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35984$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35985      fi
35986      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35987    fi
35988  fi
35989
35990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35993  # "foo.exe" is OK but "foo" is an error.
35994  #
35995  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35996  # It is also a way to make sure we got the proper file name for the real test later on.
35997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35998  if test "x$test_shortpath" = x; then
35999    # Short path failed, file does not exist as specified.
36000    # Try adding .exe or .cmd
36001    if test -f "${new_path}.exe"; then
36002      input_to_shortpath="${new_path}.exe"
36003    elif test -f "${new_path}.cmd"; then
36004      input_to_shortpath="${new_path}.cmd"
36005    else
36006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36007$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36008      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36009$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36010      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36011    fi
36012  else
36013    input_to_shortpath="$new_path"
36014  fi
36015
36016  # Call helper function which possibly converts this using DOS-style short mode.
36017  # If so, the updated path is stored in $new_path.
36018  new_path="$input_to_shortpath"
36019
36020  input_path="$input_to_shortpath"
36021  # Check if we need to convert this using DOS-style short mode. If the path
36022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36023  # take no chances and rewrite it.
36024  # Note: m4 eats our [], so we need to use [ and ] instead.
36025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36026  if test "x$has_forbidden_chars" != x; then
36027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36028    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36029    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36030    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36031      # Going to short mode and back again did indeed matter. Since short mode is
36032      # case insensitive, let's make it lowercase to improve readability.
36033      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36034      # Now convert it back to Unix-style (cygpath)
36035      input_path=`$CYGPATH -u "$shortmode_path"`
36036      new_path="$input_path"
36037    fi
36038  fi
36039
36040  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36041  if test "x$test_cygdrive_prefix" = x; then
36042    # As a simple fix, exclude /usr/bin since it's not a real path.
36043    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36044      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36045      # a path prefixed by /cygdrive for fixpath to work.
36046      new_path="$CYGWIN_ROOT_PATH$input_path"
36047    fi
36048  fi
36049
36050  # remove trailing .exe if any
36051  new_path="${new_path/%.exe/}"
36052
36053    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36054
36055  # First separate the path from the arguments. This will split at the first
36056  # space.
36057  complete="$CXXCPP"
36058  path="${complete%% *}"
36059  tmp="$complete EOL"
36060  arguments="${tmp#* }"
36061
36062  # Input might be given as Windows format, start by converting to
36063  # unix format.
36064  new_path="$path"
36065
36066  windows_path="$new_path"
36067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36068    unix_path=`$CYGPATH -u "$windows_path"`
36069    new_path="$unix_path"
36070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36072    new_path="$unix_path"
36073  fi
36074
36075
36076  # Now try to locate executable using which
36077  new_path=`$WHICH "$new_path" 2> /dev/null`
36078
36079  if test "x$new_path" = x; then
36080    # Oops. Which didn't find the executable.
36081    # The splitting of arguments from the executable at a space might have been incorrect,
36082    # since paths with space are more likely in Windows. Give it another try with the whole
36083    # argument.
36084    path="$complete"
36085    arguments="EOL"
36086    new_path="$path"
36087
36088  windows_path="$new_path"
36089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36090    unix_path=`$CYGPATH -u "$windows_path"`
36091    new_path="$unix_path"
36092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36094    new_path="$unix_path"
36095  fi
36096
36097
36098    new_path=`$WHICH "$new_path" 2> /dev/null`
36099    # bat and cmd files are not always considered executable in MSYS causing which
36100    # to not find them
36101    if test "x$new_path" = x \
36102        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36103        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36104      new_path="$path"
36105
36106  windows_path="$new_path"
36107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36108    unix_path=`$CYGPATH -u "$windows_path"`
36109    new_path="$unix_path"
36110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36112    new_path="$unix_path"
36113  fi
36114
36115    fi
36116
36117    if test "x$new_path" = x; then
36118      # It's still not found. Now this is an unrecoverable error.
36119      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36120$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36121      has_space=`$ECHO "$complete" | $GREP " "`
36122      if test "x$has_space" != x; then
36123        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36124$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36125      fi
36126      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36127    fi
36128  fi
36129
36130  # Now new_path has a complete unix path to the binary
36131  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36132    # Keep paths in /bin as-is, but remove trailing .exe if any
36133    new_path="${new_path/%.exe/}"
36134    # Do not save /bin paths to all_fixpath_prefixes!
36135  else
36136    # Not in mixed or Windows style, start by that.
36137    new_path=`cmd //c echo $new_path`
36138
36139  input_path="$new_path"
36140  # Check if we need to convert this using DOS-style short mode. If the path
36141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36142  # take no chances and rewrite it.
36143  # Note: m4 eats our [], so we need to use [ and ] instead.
36144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36145  if test "x$has_forbidden_chars" != x; then
36146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36147    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36148  fi
36149
36150    # Output is in $new_path
36151
36152  windows_path="$new_path"
36153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36154    unix_path=`$CYGPATH -u "$windows_path"`
36155    new_path="$unix_path"
36156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36158    new_path="$unix_path"
36159  fi
36160
36161    # remove trailing .exe if any
36162    new_path="${new_path/%.exe/}"
36163
36164    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36165    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36166  fi
36167
36168    else
36169      # We're on a unix platform. Hooray! :)
36170      # First separate the path from the arguments. This will split at the first
36171      # space.
36172      complete="$CXXCPP"
36173      path="${complete%% *}"
36174      tmp="$complete EOL"
36175      arguments="${tmp#* }"
36176
36177      # Cannot rely on the command "which" here since it doesn't always work.
36178      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36179      if test -z "$is_absolute_path"; then
36180        # Path to executable is not absolute. Find it.
36181        IFS_save="$IFS"
36182        IFS=:
36183        for p in $PATH; do
36184          if test -f "$p/$path" && test -x "$p/$path"; then
36185            new_path="$p/$path"
36186            break
36187          fi
36188        done
36189        IFS="$IFS_save"
36190      else
36191        # This is an absolute path, we can use it without further modifications.
36192        new_path="$path"
36193      fi
36194
36195      if test "x$new_path" = x; then
36196        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36197$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36198        has_space=`$ECHO "$complete" | $GREP " "`
36199        if test "x$has_space" != x; then
36200          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36201$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36202        fi
36203        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36204      fi
36205    fi
36206
36207    # Now join together the path and the arguments once again
36208    if test "x$arguments" != xEOL; then
36209      new_complete="$new_path ${arguments% *}"
36210    else
36211      new_complete="$new_path"
36212    fi
36213
36214    if test "x$complete" != "x$new_complete"; then
36215      CXXCPP="$new_complete"
36216      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36217$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36218    fi
36219  fi
36220
36221
36222  #
36223  # Setup the linker (LD)
36224  #
36225  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36226    # In the Microsoft toolchain we have a separate LD command "link".
36227    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36228    # a cygwin program for something completely different.
36229    # Extract the first word of "link", so it can be a program name with args.
36230set dummy link; ac_word=$2
36231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36232$as_echo_n "checking for $ac_word... " >&6; }
36233if ${ac_cv_prog_LD+:} false; then :
36234  $as_echo_n "(cached) " >&6
36235else
36236  if test -n "$LD"; then
36237  ac_cv_prog_LD="$LD" # Let the user override the test.
36238else
36239  ac_prog_rejected=no
36240as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36241for as_dir in $PATH
36242do
36243  IFS=$as_save_IFS
36244  test -z "$as_dir" && as_dir=.
36245    for ac_exec_ext in '' $ac_executable_extensions; do
36246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36247    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36248       ac_prog_rejected=yes
36249       continue
36250     fi
36251    ac_cv_prog_LD="link"
36252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36253    break 2
36254  fi
36255done
36256  done
36257IFS=$as_save_IFS
36258
36259if test $ac_prog_rejected = yes; then
36260  # We found a bogon in the path, so make sure we never use it.
36261  set dummy $ac_cv_prog_LD
36262  shift
36263  if test $# != 0; then
36264    # We chose a different compiler from the bogus one.
36265    # However, it has the same basename, so the bogon will be chosen
36266    # first if we set LD to just the basename; use the full file name.
36267    shift
36268    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36269  fi
36270fi
36271fi
36272fi
36273LD=$ac_cv_prog_LD
36274if test -n "$LD"; then
36275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36276$as_echo "$LD" >&6; }
36277else
36278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36279$as_echo "no" >&6; }
36280fi
36281
36282
36283
36284  # Only process if variable expands to non-empty
36285
36286  if test "x$LD" != x; then
36287    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36288
36289  # First separate the path from the arguments. This will split at the first
36290  # space.
36291  complete="$LD"
36292  path="${complete%% *}"
36293  tmp="$complete EOL"
36294  arguments="${tmp#* }"
36295
36296  # Input might be given as Windows format, start by converting to
36297  # unix format.
36298  new_path=`$CYGPATH -u "$path"`
36299
36300  # Now try to locate executable using which
36301  new_path=`$WHICH "$new_path" 2> /dev/null`
36302  # bat and cmd files are not always considered executable in cygwin causing which
36303  # to not find them
36304  if test "x$new_path" = x \
36305      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36306      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36307    new_path=`$CYGPATH -u "$path"`
36308  fi
36309  if test "x$new_path" = x; then
36310    # Oops. Which didn't find the executable.
36311    # The splitting of arguments from the executable at a space might have been incorrect,
36312    # since paths with space are more likely in Windows. Give it another try with the whole
36313    # argument.
36314    path="$complete"
36315    arguments="EOL"
36316    new_path=`$CYGPATH -u "$path"`
36317    new_path=`$WHICH "$new_path" 2> /dev/null`
36318    # bat and cmd files are not always considered executable in cygwin causing which
36319    # to not find them
36320    if test "x$new_path" = x \
36321        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36322        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36323      new_path=`$CYGPATH -u "$path"`
36324    fi
36325    if test "x$new_path" = x; then
36326      # It's still not found. Now this is an unrecoverable error.
36327      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36328$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36329      has_space=`$ECHO "$complete" | $GREP " "`
36330      if test "x$has_space" != x; then
36331        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36332$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36333      fi
36334      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36335    fi
36336  fi
36337
36338  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36339  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36340  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36341  # "foo.exe" is OK but "foo" is an error.
36342  #
36343  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36344  # It is also a way to make sure we got the proper file name for the real test later on.
36345  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36346  if test "x$test_shortpath" = x; then
36347    # Short path failed, file does not exist as specified.
36348    # Try adding .exe or .cmd
36349    if test -f "${new_path}.exe"; then
36350      input_to_shortpath="${new_path}.exe"
36351    elif test -f "${new_path}.cmd"; then
36352      input_to_shortpath="${new_path}.cmd"
36353    else
36354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36355$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36356      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36357$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36358      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36359    fi
36360  else
36361    input_to_shortpath="$new_path"
36362  fi
36363
36364  # Call helper function which possibly converts this using DOS-style short mode.
36365  # If so, the updated path is stored in $new_path.
36366  new_path="$input_to_shortpath"
36367
36368  input_path="$input_to_shortpath"
36369  # Check if we need to convert this using DOS-style short mode. If the path
36370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36371  # take no chances and rewrite it.
36372  # Note: m4 eats our [], so we need to use [ and ] instead.
36373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36374  if test "x$has_forbidden_chars" != x; then
36375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36376    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36377    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36378    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36379      # Going to short mode and back again did indeed matter. Since short mode is
36380      # case insensitive, let's make it lowercase to improve readability.
36381      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36382      # Now convert it back to Unix-style (cygpath)
36383      input_path=`$CYGPATH -u "$shortmode_path"`
36384      new_path="$input_path"
36385    fi
36386  fi
36387
36388  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36389  if test "x$test_cygdrive_prefix" = x; then
36390    # As a simple fix, exclude /usr/bin since it's not a real path.
36391    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36392      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36393      # a path prefixed by /cygdrive for fixpath to work.
36394      new_path="$CYGWIN_ROOT_PATH$input_path"
36395    fi
36396  fi
36397
36398  # remove trailing .exe if any
36399  new_path="${new_path/%.exe/}"
36400
36401    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36402
36403  # First separate the path from the arguments. This will split at the first
36404  # space.
36405  complete="$LD"
36406  path="${complete%% *}"
36407  tmp="$complete EOL"
36408  arguments="${tmp#* }"
36409
36410  # Input might be given as Windows format, start by converting to
36411  # unix format.
36412  new_path="$path"
36413
36414  windows_path="$new_path"
36415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36416    unix_path=`$CYGPATH -u "$windows_path"`
36417    new_path="$unix_path"
36418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36420    new_path="$unix_path"
36421  fi
36422
36423
36424  # Now try to locate executable using which
36425  new_path=`$WHICH "$new_path" 2> /dev/null`
36426
36427  if test "x$new_path" = x; then
36428    # Oops. Which didn't find the executable.
36429    # The splitting of arguments from the executable at a space might have been incorrect,
36430    # since paths with space are more likely in Windows. Give it another try with the whole
36431    # argument.
36432    path="$complete"
36433    arguments="EOL"
36434    new_path="$path"
36435
36436  windows_path="$new_path"
36437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36438    unix_path=`$CYGPATH -u "$windows_path"`
36439    new_path="$unix_path"
36440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36442    new_path="$unix_path"
36443  fi
36444
36445
36446    new_path=`$WHICH "$new_path" 2> /dev/null`
36447    # bat and cmd files are not always considered executable in MSYS causing which
36448    # to not find them
36449    if test "x$new_path" = x \
36450        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36451        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36452      new_path="$path"
36453
36454  windows_path="$new_path"
36455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36456    unix_path=`$CYGPATH -u "$windows_path"`
36457    new_path="$unix_path"
36458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36460    new_path="$unix_path"
36461  fi
36462
36463    fi
36464
36465    if test "x$new_path" = x; then
36466      # It's still not found. Now this is an unrecoverable error.
36467      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36468$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36469      has_space=`$ECHO "$complete" | $GREP " "`
36470      if test "x$has_space" != x; then
36471        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36472$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36473      fi
36474      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36475    fi
36476  fi
36477
36478  # Now new_path has a complete unix path to the binary
36479  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36480    # Keep paths in /bin as-is, but remove trailing .exe if any
36481    new_path="${new_path/%.exe/}"
36482    # Do not save /bin paths to all_fixpath_prefixes!
36483  else
36484    # Not in mixed or Windows style, start by that.
36485    new_path=`cmd //c echo $new_path`
36486
36487  input_path="$new_path"
36488  # Check if we need to convert this using DOS-style short mode. If the path
36489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36490  # take no chances and rewrite it.
36491  # Note: m4 eats our [], so we need to use [ and ] instead.
36492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36493  if test "x$has_forbidden_chars" != x; then
36494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36495    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36496  fi
36497
36498    # Output is in $new_path
36499
36500  windows_path="$new_path"
36501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36502    unix_path=`$CYGPATH -u "$windows_path"`
36503    new_path="$unix_path"
36504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36506    new_path="$unix_path"
36507  fi
36508
36509    # remove trailing .exe if any
36510    new_path="${new_path/%.exe/}"
36511
36512    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36513    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36514  fi
36515
36516    else
36517      # We're on a unix platform. Hooray! :)
36518      # First separate the path from the arguments. This will split at the first
36519      # space.
36520      complete="$LD"
36521      path="${complete%% *}"
36522      tmp="$complete EOL"
36523      arguments="${tmp#* }"
36524
36525      # Cannot rely on the command "which" here since it doesn't always work.
36526      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36527      if test -z "$is_absolute_path"; then
36528        # Path to executable is not absolute. Find it.
36529        IFS_save="$IFS"
36530        IFS=:
36531        for p in $PATH; do
36532          if test -f "$p/$path" && test -x "$p/$path"; then
36533            new_path="$p/$path"
36534            break
36535          fi
36536        done
36537        IFS="$IFS_save"
36538      else
36539        # This is an absolute path, we can use it without further modifications.
36540        new_path="$path"
36541      fi
36542
36543      if test "x$new_path" = x; then
36544        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36545$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36546        has_space=`$ECHO "$complete" | $GREP " "`
36547        if test "x$has_space" != x; then
36548          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36549$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36550        fi
36551        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36552      fi
36553    fi
36554
36555    # Now join together the path and the arguments once again
36556    if test "x$arguments" != xEOL; then
36557      new_complete="$new_path ${arguments% *}"
36558    else
36559      new_complete="$new_path"
36560    fi
36561
36562    if test "x$complete" != "x$new_complete"; then
36563      LD="$new_complete"
36564      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36565$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36566    fi
36567  fi
36568
36569    # Verify that we indeed succeeded with this trick.
36570    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36571$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36572    "$LD" --version > /dev/null
36573    if test $? -eq 0 ; then
36574      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36575$as_echo "no" >&6; }
36576      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36577    else
36578      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36579$as_echo "yes" >&6; }
36580    fi
36581    LDCXX="$LD"
36582  else
36583    # All other toolchains use the compiler to link.
36584    LD="$CC"
36585    LDCXX="$CXX"
36586  fi
36587
36588  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36589
36590
36591  #
36592  # Setup the assembler (AS)
36593  #
36594  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36595
36596
36597  # Publish this variable in the help.
36598
36599
36600  if [ -z "${AS+x}" ]; then
36601    # The variable is not set by user, try to locate tool using the code snippet
36602    for ac_prog in as
36603do
36604  # Extract the first word of "$ac_prog", so it can be a program name with args.
36605set dummy $ac_prog; ac_word=$2
36606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36607$as_echo_n "checking for $ac_word... " >&6; }
36608if ${ac_cv_path_AS+:} false; then :
36609  $as_echo_n "(cached) " >&6
36610else
36611  case $AS in
36612  [\\/]* | ?:[\\/]*)
36613  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36614  ;;
36615  *)
36616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36617for as_dir in $PATH
36618do
36619  IFS=$as_save_IFS
36620  test -z "$as_dir" && as_dir=.
36621    for ac_exec_ext in '' $ac_executable_extensions; do
36622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36623    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36625    break 2
36626  fi
36627done
36628  done
36629IFS=$as_save_IFS
36630
36631  ;;
36632esac
36633fi
36634AS=$ac_cv_path_AS
36635if test -n "$AS"; then
36636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36637$as_echo "$AS" >&6; }
36638else
36639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36640$as_echo "no" >&6; }
36641fi
36642
36643
36644  test -n "$AS" && break
36645done
36646
36647  else
36648    # The variable is set, but is it from the command line or the environment?
36649
36650    # Try to remove the string !AS! from our list.
36651    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36652    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36653      # If it failed, the variable was not from the command line. Ignore it,
36654      # but warn the user (except for BASH, which is always set by the calling BASH).
36655      if test "xAS" != xBASH; then
36656        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36657$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36658      fi
36659      # Try to locate tool using the code snippet
36660      for ac_prog in as
36661do
36662  # Extract the first word of "$ac_prog", so it can be a program name with args.
36663set dummy $ac_prog; ac_word=$2
36664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36665$as_echo_n "checking for $ac_word... " >&6; }
36666if ${ac_cv_path_AS+:} false; then :
36667  $as_echo_n "(cached) " >&6
36668else
36669  case $AS in
36670  [\\/]* | ?:[\\/]*)
36671  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36672  ;;
36673  *)
36674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36675for as_dir in $PATH
36676do
36677  IFS=$as_save_IFS
36678  test -z "$as_dir" && as_dir=.
36679    for ac_exec_ext in '' $ac_executable_extensions; do
36680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36681    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36683    break 2
36684  fi
36685done
36686  done
36687IFS=$as_save_IFS
36688
36689  ;;
36690esac
36691fi
36692AS=$ac_cv_path_AS
36693if test -n "$AS"; then
36694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36695$as_echo "$AS" >&6; }
36696else
36697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36698$as_echo "no" >&6; }
36699fi
36700
36701
36702  test -n "$AS" && break
36703done
36704
36705    else
36706      # If it succeeded, then it was overridden by the user. We will use it
36707      # for the tool.
36708
36709      # First remove it from the list of overridden variables, so we can test
36710      # for unknown variables in the end.
36711      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36712
36713      # Check if we try to supply an empty value
36714      if test "x$AS" = x; then
36715        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36716$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36717        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36718$as_echo_n "checking for AS... " >&6; }
36719        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36720$as_echo "disabled" >&6; }
36721      else
36722        # Check if the provided tool contains a complete path.
36723        tool_specified="$AS"
36724        tool_basename="${tool_specified##*/}"
36725        if test "x$tool_basename" = "x$tool_specified"; then
36726          # A command without a complete path is provided, search $PATH.
36727          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36728$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36729          # Extract the first word of "$tool_basename", so it can be a program name with args.
36730set dummy $tool_basename; ac_word=$2
36731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36732$as_echo_n "checking for $ac_word... " >&6; }
36733if ${ac_cv_path_AS+:} false; then :
36734  $as_echo_n "(cached) " >&6
36735else
36736  case $AS in
36737  [\\/]* | ?:[\\/]*)
36738  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36739  ;;
36740  *)
36741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36742for as_dir in $PATH
36743do
36744  IFS=$as_save_IFS
36745  test -z "$as_dir" && as_dir=.
36746    for ac_exec_ext in '' $ac_executable_extensions; do
36747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36748    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36750    break 2
36751  fi
36752done
36753  done
36754IFS=$as_save_IFS
36755
36756  ;;
36757esac
36758fi
36759AS=$ac_cv_path_AS
36760if test -n "$AS"; then
36761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36762$as_echo "$AS" >&6; }
36763else
36764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36765$as_echo "no" >&6; }
36766fi
36767
36768
36769          if test "x$AS" = x; then
36770            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36771          fi
36772        else
36773          # Otherwise we believe it is a complete path. Use it as it is.
36774          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36775$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36776          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36777$as_echo_n "checking for AS... " >&6; }
36778          if test ! -x "$tool_specified"; then
36779            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36780$as_echo "not found" >&6; }
36781            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36782          fi
36783          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36784$as_echo "$tool_specified" >&6; }
36785        fi
36786      fi
36787    fi
36788
36789  fi
36790
36791
36792
36793  # Only process if variable expands to non-empty
36794
36795  if test "x$AS" != x; then
36796    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36797
36798  # First separate the path from the arguments. This will split at the first
36799  # space.
36800  complete="$AS"
36801  path="${complete%% *}"
36802  tmp="$complete EOL"
36803  arguments="${tmp#* }"
36804
36805  # Input might be given as Windows format, start by converting to
36806  # unix format.
36807  new_path=`$CYGPATH -u "$path"`
36808
36809  # Now try to locate executable using which
36810  new_path=`$WHICH "$new_path" 2> /dev/null`
36811  # bat and cmd files are not always considered executable in cygwin causing which
36812  # to not find them
36813  if test "x$new_path" = x \
36814      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36815      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36816    new_path=`$CYGPATH -u "$path"`
36817  fi
36818  if test "x$new_path" = x; then
36819    # Oops. Which didn't find the executable.
36820    # The splitting of arguments from the executable at a space might have been incorrect,
36821    # since paths with space are more likely in Windows. Give it another try with the whole
36822    # argument.
36823    path="$complete"
36824    arguments="EOL"
36825    new_path=`$CYGPATH -u "$path"`
36826    new_path=`$WHICH "$new_path" 2> /dev/null`
36827    # bat and cmd files are not always considered executable in cygwin causing which
36828    # to not find them
36829    if test "x$new_path" = x \
36830        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36831        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36832      new_path=`$CYGPATH -u "$path"`
36833    fi
36834    if test "x$new_path" = x; then
36835      # It's still not found. Now this is an unrecoverable error.
36836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36837$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36838      has_space=`$ECHO "$complete" | $GREP " "`
36839      if test "x$has_space" != x; then
36840        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36841$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36842      fi
36843      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36844    fi
36845  fi
36846
36847  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36848  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36849  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36850  # "foo.exe" is OK but "foo" is an error.
36851  #
36852  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36853  # It is also a way to make sure we got the proper file name for the real test later on.
36854  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36855  if test "x$test_shortpath" = x; then
36856    # Short path failed, file does not exist as specified.
36857    # Try adding .exe or .cmd
36858    if test -f "${new_path}.exe"; then
36859      input_to_shortpath="${new_path}.exe"
36860    elif test -f "${new_path}.cmd"; then
36861      input_to_shortpath="${new_path}.cmd"
36862    else
36863      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36864$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36865      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36866$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36867      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36868    fi
36869  else
36870    input_to_shortpath="$new_path"
36871  fi
36872
36873  # Call helper function which possibly converts this using DOS-style short mode.
36874  # If so, the updated path is stored in $new_path.
36875  new_path="$input_to_shortpath"
36876
36877  input_path="$input_to_shortpath"
36878  # Check if we need to convert this using DOS-style short mode. If the path
36879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36880  # take no chances and rewrite it.
36881  # Note: m4 eats our [], so we need to use [ and ] instead.
36882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36883  if test "x$has_forbidden_chars" != x; then
36884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36885    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36886    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36887    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36888      # Going to short mode and back again did indeed matter. Since short mode is
36889      # case insensitive, let's make it lowercase to improve readability.
36890      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36891      # Now convert it back to Unix-style (cygpath)
36892      input_path=`$CYGPATH -u "$shortmode_path"`
36893      new_path="$input_path"
36894    fi
36895  fi
36896
36897  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36898  if test "x$test_cygdrive_prefix" = x; then
36899    # As a simple fix, exclude /usr/bin since it's not a real path.
36900    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36901      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36902      # a path prefixed by /cygdrive for fixpath to work.
36903      new_path="$CYGWIN_ROOT_PATH$input_path"
36904    fi
36905  fi
36906
36907  # remove trailing .exe if any
36908  new_path="${new_path/%.exe/}"
36909
36910    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36911
36912  # First separate the path from the arguments. This will split at the first
36913  # space.
36914  complete="$AS"
36915  path="${complete%% *}"
36916  tmp="$complete EOL"
36917  arguments="${tmp#* }"
36918
36919  # Input might be given as Windows format, start by converting to
36920  # unix format.
36921  new_path="$path"
36922
36923  windows_path="$new_path"
36924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36925    unix_path=`$CYGPATH -u "$windows_path"`
36926    new_path="$unix_path"
36927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36929    new_path="$unix_path"
36930  fi
36931
36932
36933  # Now try to locate executable using which
36934  new_path=`$WHICH "$new_path" 2> /dev/null`
36935
36936  if test "x$new_path" = x; then
36937    # Oops. Which didn't find the executable.
36938    # The splitting of arguments from the executable at a space might have been incorrect,
36939    # since paths with space are more likely in Windows. Give it another try with the whole
36940    # argument.
36941    path="$complete"
36942    arguments="EOL"
36943    new_path="$path"
36944
36945  windows_path="$new_path"
36946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36947    unix_path=`$CYGPATH -u "$windows_path"`
36948    new_path="$unix_path"
36949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36951    new_path="$unix_path"
36952  fi
36953
36954
36955    new_path=`$WHICH "$new_path" 2> /dev/null`
36956    # bat and cmd files are not always considered executable in MSYS causing which
36957    # to not find them
36958    if test "x$new_path" = x \
36959        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36960        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36961      new_path="$path"
36962
36963  windows_path="$new_path"
36964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36965    unix_path=`$CYGPATH -u "$windows_path"`
36966    new_path="$unix_path"
36967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36969    new_path="$unix_path"
36970  fi
36971
36972    fi
36973
36974    if test "x$new_path" = x; then
36975      # It's still not found. Now this is an unrecoverable error.
36976      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36977$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36978      has_space=`$ECHO "$complete" | $GREP " "`
36979      if test "x$has_space" != x; then
36980        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36981$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36982      fi
36983      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36984    fi
36985  fi
36986
36987  # Now new_path has a complete unix path to the binary
36988  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36989    # Keep paths in /bin as-is, but remove trailing .exe if any
36990    new_path="${new_path/%.exe/}"
36991    # Do not save /bin paths to all_fixpath_prefixes!
36992  else
36993    # Not in mixed or Windows style, start by that.
36994    new_path=`cmd //c echo $new_path`
36995
36996  input_path="$new_path"
36997  # Check if we need to convert this using DOS-style short mode. If the path
36998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36999  # take no chances and rewrite it.
37000  # Note: m4 eats our [], so we need to use [ and ] instead.
37001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37002  if test "x$has_forbidden_chars" != x; then
37003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37004    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37005  fi
37006
37007    # Output is in $new_path
37008
37009  windows_path="$new_path"
37010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37011    unix_path=`$CYGPATH -u "$windows_path"`
37012    new_path="$unix_path"
37013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37015    new_path="$unix_path"
37016  fi
37017
37018    # remove trailing .exe if any
37019    new_path="${new_path/%.exe/}"
37020
37021    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37022    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37023  fi
37024
37025    else
37026      # We're on a unix platform. Hooray! :)
37027      # First separate the path from the arguments. This will split at the first
37028      # space.
37029      complete="$AS"
37030      path="${complete%% *}"
37031      tmp="$complete EOL"
37032      arguments="${tmp#* }"
37033
37034      # Cannot rely on the command "which" here since it doesn't always work.
37035      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37036      if test -z "$is_absolute_path"; then
37037        # Path to executable is not absolute. Find it.
37038        IFS_save="$IFS"
37039        IFS=:
37040        for p in $PATH; do
37041          if test -f "$p/$path" && test -x "$p/$path"; then
37042            new_path="$p/$path"
37043            break
37044          fi
37045        done
37046        IFS="$IFS_save"
37047      else
37048        # This is an absolute path, we can use it without further modifications.
37049        new_path="$path"
37050      fi
37051
37052      if test "x$new_path" = x; then
37053        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37054$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37055        has_space=`$ECHO "$complete" | $GREP " "`
37056        if test "x$has_space" != x; then
37057          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37058$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37059        fi
37060        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37061      fi
37062    fi
37063
37064    # Now join together the path and the arguments once again
37065    if test "x$arguments" != xEOL; then
37066      new_complete="$new_path ${arguments% *}"
37067    else
37068      new_complete="$new_path"
37069    fi
37070
37071    if test "x$complete" != "x$new_complete"; then
37072      AS="$new_complete"
37073      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37074$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37075    fi
37076  fi
37077
37078    if test "x$AS" = x; then
37079      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37080    fi
37081  else
37082    # FIXME: is this correct for microsoft?
37083    AS="$CC -c"
37084  fi
37085
37086
37087  #
37088  # Setup the archiver (AR)
37089  #
37090  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37091    # The corresponding ar tool is lib.exe (used to create static libraries)
37092    # Extract the first word of "lib", so it can be a program name with args.
37093set dummy lib; ac_word=$2
37094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37095$as_echo_n "checking for $ac_word... " >&6; }
37096if ${ac_cv_prog_AR+:} false; then :
37097  $as_echo_n "(cached) " >&6
37098else
37099  if test -n "$AR"; then
37100  ac_cv_prog_AR="$AR" # Let the user override the test.
37101else
37102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37103for as_dir in $PATH
37104do
37105  IFS=$as_save_IFS
37106  test -z "$as_dir" && as_dir=.
37107    for ac_exec_ext in '' $ac_executable_extensions; do
37108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37109    ac_cv_prog_AR="lib"
37110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37111    break 2
37112  fi
37113done
37114  done
37115IFS=$as_save_IFS
37116
37117fi
37118fi
37119AR=$ac_cv_prog_AR
37120if test -n "$AR"; then
37121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37122$as_echo "$AR" >&6; }
37123else
37124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37125$as_echo "no" >&6; }
37126fi
37127
37128
37129  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37130
37131
37132  # Publish this variable in the help.
37133
37134
37135  if [ -z "${AR+x}" ]; then
37136    # The variable is not set by user, try to locate tool using the code snippet
37137    if test -n "$ac_tool_prefix"; then
37138  for ac_prog in ar gcc-ar
37139  do
37140    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37141set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37143$as_echo_n "checking for $ac_word... " >&6; }
37144if ${ac_cv_prog_AR+:} false; then :
37145  $as_echo_n "(cached) " >&6
37146else
37147  if test -n "$AR"; then
37148  ac_cv_prog_AR="$AR" # Let the user override the test.
37149else
37150as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37151for as_dir in $PATH
37152do
37153  IFS=$as_save_IFS
37154  test -z "$as_dir" && as_dir=.
37155    for ac_exec_ext in '' $ac_executable_extensions; do
37156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37157    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37159    break 2
37160  fi
37161done
37162  done
37163IFS=$as_save_IFS
37164
37165fi
37166fi
37167AR=$ac_cv_prog_AR
37168if test -n "$AR"; then
37169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37170$as_echo "$AR" >&6; }
37171else
37172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37173$as_echo "no" >&6; }
37174fi
37175
37176
37177    test -n "$AR" && break
37178  done
37179fi
37180if test -z "$AR"; then
37181  ac_ct_AR=$AR
37182  for ac_prog in ar gcc-ar
37183do
37184  # Extract the first word of "$ac_prog", so it can be a program name with args.
37185set dummy $ac_prog; ac_word=$2
37186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37187$as_echo_n "checking for $ac_word... " >&6; }
37188if ${ac_cv_prog_ac_ct_AR+:} false; then :
37189  $as_echo_n "(cached) " >&6
37190else
37191  if test -n "$ac_ct_AR"; then
37192  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37193else
37194as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37195for as_dir in $PATH
37196do
37197  IFS=$as_save_IFS
37198  test -z "$as_dir" && as_dir=.
37199    for ac_exec_ext in '' $ac_executable_extensions; do
37200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37201    ac_cv_prog_ac_ct_AR="$ac_prog"
37202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37203    break 2
37204  fi
37205done
37206  done
37207IFS=$as_save_IFS
37208
37209fi
37210fi
37211ac_ct_AR=$ac_cv_prog_ac_ct_AR
37212if test -n "$ac_ct_AR"; then
37213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37214$as_echo "$ac_ct_AR" >&6; }
37215else
37216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37217$as_echo "no" >&6; }
37218fi
37219
37220
37221  test -n "$ac_ct_AR" && break
37222done
37223
37224  if test "x$ac_ct_AR" = x; then
37225    AR=""
37226  else
37227    case $cross_compiling:$ac_tool_warned in
37228yes:)
37229{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37230$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37231ac_tool_warned=yes ;;
37232esac
37233    AR=$ac_ct_AR
37234  fi
37235fi
37236
37237  else
37238    # The variable is set, but is it from the command line or the environment?
37239
37240    # Try to remove the string !AR! from our list.
37241    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37242    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37243      # If it failed, the variable was not from the command line. Ignore it,
37244      # but warn the user (except for BASH, which is always set by the calling BASH).
37245      if test "xAR" != xBASH; then
37246        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37247$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37248      fi
37249      # Try to locate tool using the code snippet
37250      if test -n "$ac_tool_prefix"; then
37251  for ac_prog in ar gcc-ar
37252  do
37253    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37254set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37256$as_echo_n "checking for $ac_word... " >&6; }
37257if ${ac_cv_prog_AR+:} false; then :
37258  $as_echo_n "(cached) " >&6
37259else
37260  if test -n "$AR"; then
37261  ac_cv_prog_AR="$AR" # Let the user override the test.
37262else
37263as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37264for as_dir in $PATH
37265do
37266  IFS=$as_save_IFS
37267  test -z "$as_dir" && as_dir=.
37268    for ac_exec_ext in '' $ac_executable_extensions; do
37269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37270    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37272    break 2
37273  fi
37274done
37275  done
37276IFS=$as_save_IFS
37277
37278fi
37279fi
37280AR=$ac_cv_prog_AR
37281if test -n "$AR"; then
37282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37283$as_echo "$AR" >&6; }
37284else
37285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37286$as_echo "no" >&6; }
37287fi
37288
37289
37290    test -n "$AR" && break
37291  done
37292fi
37293if test -z "$AR"; then
37294  ac_ct_AR=$AR
37295  for ac_prog in ar gcc-ar
37296do
37297  # Extract the first word of "$ac_prog", so it can be a program name with args.
37298set dummy $ac_prog; ac_word=$2
37299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37300$as_echo_n "checking for $ac_word... " >&6; }
37301if ${ac_cv_prog_ac_ct_AR+:} false; then :
37302  $as_echo_n "(cached) " >&6
37303else
37304  if test -n "$ac_ct_AR"; then
37305  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37306else
37307as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37308for as_dir in $PATH
37309do
37310  IFS=$as_save_IFS
37311  test -z "$as_dir" && as_dir=.
37312    for ac_exec_ext in '' $ac_executable_extensions; do
37313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37314    ac_cv_prog_ac_ct_AR="$ac_prog"
37315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37316    break 2
37317  fi
37318done
37319  done
37320IFS=$as_save_IFS
37321
37322fi
37323fi
37324ac_ct_AR=$ac_cv_prog_ac_ct_AR
37325if test -n "$ac_ct_AR"; then
37326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37327$as_echo "$ac_ct_AR" >&6; }
37328else
37329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37330$as_echo "no" >&6; }
37331fi
37332
37333
37334  test -n "$ac_ct_AR" && break
37335done
37336
37337  if test "x$ac_ct_AR" = x; then
37338    AR=""
37339  else
37340    case $cross_compiling:$ac_tool_warned in
37341yes:)
37342{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37343$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37344ac_tool_warned=yes ;;
37345esac
37346    AR=$ac_ct_AR
37347  fi
37348fi
37349
37350    else
37351      # If it succeeded, then it was overridden by the user. We will use it
37352      # for the tool.
37353
37354      # First remove it from the list of overridden variables, so we can test
37355      # for unknown variables in the end.
37356      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37357
37358      # Check if we try to supply an empty value
37359      if test "x$AR" = x; then
37360        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37361$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37362        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37363$as_echo_n "checking for AR... " >&6; }
37364        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37365$as_echo "disabled" >&6; }
37366      else
37367        # Check if the provided tool contains a complete path.
37368        tool_specified="$AR"
37369        tool_basename="${tool_specified##*/}"
37370        if test "x$tool_basename" = "x$tool_specified"; then
37371          # A command without a complete path is provided, search $PATH.
37372          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37373$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37374          # Extract the first word of "$tool_basename", so it can be a program name with args.
37375set dummy $tool_basename; ac_word=$2
37376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37377$as_echo_n "checking for $ac_word... " >&6; }
37378if ${ac_cv_path_AR+:} false; then :
37379  $as_echo_n "(cached) " >&6
37380else
37381  case $AR in
37382  [\\/]* | ?:[\\/]*)
37383  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37384  ;;
37385  *)
37386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37387for as_dir in $PATH
37388do
37389  IFS=$as_save_IFS
37390  test -z "$as_dir" && as_dir=.
37391    for ac_exec_ext in '' $ac_executable_extensions; do
37392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37393    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37395    break 2
37396  fi
37397done
37398  done
37399IFS=$as_save_IFS
37400
37401  ;;
37402esac
37403fi
37404AR=$ac_cv_path_AR
37405if test -n "$AR"; then
37406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37407$as_echo "$AR" >&6; }
37408else
37409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37410$as_echo "no" >&6; }
37411fi
37412
37413
37414          if test "x$AR" = x; then
37415            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37416          fi
37417        else
37418          # Otherwise we believe it is a complete path. Use it as it is.
37419          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37420$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37421          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37422$as_echo_n "checking for AR... " >&6; }
37423          if test ! -x "$tool_specified"; then
37424            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37425$as_echo "not found" >&6; }
37426            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37427          fi
37428          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37429$as_echo "$tool_specified" >&6; }
37430        fi
37431      fi
37432    fi
37433
37434  fi
37435
37436
37437  else
37438
37439
37440  # Publish this variable in the help.
37441
37442
37443  if [ -z "${AR+x}" ]; then
37444    # The variable is not set by user, try to locate tool using the code snippet
37445    if test -n "$ac_tool_prefix"; then
37446  for ac_prog in ar
37447  do
37448    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37449set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37451$as_echo_n "checking for $ac_word... " >&6; }
37452if ${ac_cv_prog_AR+:} false; then :
37453  $as_echo_n "(cached) " >&6
37454else
37455  if test -n "$AR"; then
37456  ac_cv_prog_AR="$AR" # Let the user override the test.
37457else
37458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37459for as_dir in $PATH
37460do
37461  IFS=$as_save_IFS
37462  test -z "$as_dir" && as_dir=.
37463    for ac_exec_ext in '' $ac_executable_extensions; do
37464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37465    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37467    break 2
37468  fi
37469done
37470  done
37471IFS=$as_save_IFS
37472
37473fi
37474fi
37475AR=$ac_cv_prog_AR
37476if test -n "$AR"; then
37477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37478$as_echo "$AR" >&6; }
37479else
37480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37481$as_echo "no" >&6; }
37482fi
37483
37484
37485    test -n "$AR" && break
37486  done
37487fi
37488if test -z "$AR"; then
37489  ac_ct_AR=$AR
37490  for ac_prog in ar
37491do
37492  # Extract the first word of "$ac_prog", so it can be a program name with args.
37493set dummy $ac_prog; ac_word=$2
37494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37495$as_echo_n "checking for $ac_word... " >&6; }
37496if ${ac_cv_prog_ac_ct_AR+:} false; then :
37497  $as_echo_n "(cached) " >&6
37498else
37499  if test -n "$ac_ct_AR"; then
37500  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37501else
37502as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37503for as_dir in $PATH
37504do
37505  IFS=$as_save_IFS
37506  test -z "$as_dir" && as_dir=.
37507    for ac_exec_ext in '' $ac_executable_extensions; do
37508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37509    ac_cv_prog_ac_ct_AR="$ac_prog"
37510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37511    break 2
37512  fi
37513done
37514  done
37515IFS=$as_save_IFS
37516
37517fi
37518fi
37519ac_ct_AR=$ac_cv_prog_ac_ct_AR
37520if test -n "$ac_ct_AR"; then
37521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37522$as_echo "$ac_ct_AR" >&6; }
37523else
37524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37525$as_echo "no" >&6; }
37526fi
37527
37528
37529  test -n "$ac_ct_AR" && break
37530done
37531
37532  if test "x$ac_ct_AR" = x; then
37533    AR=""
37534  else
37535    case $cross_compiling:$ac_tool_warned in
37536yes:)
37537{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37538$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37539ac_tool_warned=yes ;;
37540esac
37541    AR=$ac_ct_AR
37542  fi
37543fi
37544
37545  else
37546    # The variable is set, but is it from the command line or the environment?
37547
37548    # Try to remove the string !AR! from our list.
37549    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37550    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37551      # If it failed, the variable was not from the command line. Ignore it,
37552      # but warn the user (except for BASH, which is always set by the calling BASH).
37553      if test "xAR" != xBASH; then
37554        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37555$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37556      fi
37557      # Try to locate tool using the code snippet
37558      if test -n "$ac_tool_prefix"; then
37559  for ac_prog in ar
37560  do
37561    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37562set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37564$as_echo_n "checking for $ac_word... " >&6; }
37565if ${ac_cv_prog_AR+:} false; then :
37566  $as_echo_n "(cached) " >&6
37567else
37568  if test -n "$AR"; then
37569  ac_cv_prog_AR="$AR" # Let the user override the test.
37570else
37571as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37572for as_dir in $PATH
37573do
37574  IFS=$as_save_IFS
37575  test -z "$as_dir" && as_dir=.
37576    for ac_exec_ext in '' $ac_executable_extensions; do
37577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37578    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37580    break 2
37581  fi
37582done
37583  done
37584IFS=$as_save_IFS
37585
37586fi
37587fi
37588AR=$ac_cv_prog_AR
37589if test -n "$AR"; then
37590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37591$as_echo "$AR" >&6; }
37592else
37593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37594$as_echo "no" >&6; }
37595fi
37596
37597
37598    test -n "$AR" && break
37599  done
37600fi
37601if test -z "$AR"; then
37602  ac_ct_AR=$AR
37603  for ac_prog in ar
37604do
37605  # Extract the first word of "$ac_prog", so it can be a program name with args.
37606set dummy $ac_prog; ac_word=$2
37607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37608$as_echo_n "checking for $ac_word... " >&6; }
37609if ${ac_cv_prog_ac_ct_AR+:} false; then :
37610  $as_echo_n "(cached) " >&6
37611else
37612  if test -n "$ac_ct_AR"; then
37613  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37614else
37615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37616for as_dir in $PATH
37617do
37618  IFS=$as_save_IFS
37619  test -z "$as_dir" && as_dir=.
37620    for ac_exec_ext in '' $ac_executable_extensions; do
37621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37622    ac_cv_prog_ac_ct_AR="$ac_prog"
37623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37624    break 2
37625  fi
37626done
37627  done
37628IFS=$as_save_IFS
37629
37630fi
37631fi
37632ac_ct_AR=$ac_cv_prog_ac_ct_AR
37633if test -n "$ac_ct_AR"; then
37634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37635$as_echo "$ac_ct_AR" >&6; }
37636else
37637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37638$as_echo "no" >&6; }
37639fi
37640
37641
37642  test -n "$ac_ct_AR" && break
37643done
37644
37645  if test "x$ac_ct_AR" = x; then
37646    AR=""
37647  else
37648    case $cross_compiling:$ac_tool_warned in
37649yes:)
37650{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37651$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37652ac_tool_warned=yes ;;
37653esac
37654    AR=$ac_ct_AR
37655  fi
37656fi
37657
37658    else
37659      # If it succeeded, then it was overridden by the user. We will use it
37660      # for the tool.
37661
37662      # First remove it from the list of overridden variables, so we can test
37663      # for unknown variables in the end.
37664      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37665
37666      # Check if we try to supply an empty value
37667      if test "x$AR" = x; then
37668        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37669$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37670        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37671$as_echo_n "checking for AR... " >&6; }
37672        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37673$as_echo "disabled" >&6; }
37674      else
37675        # Check if the provided tool contains a complete path.
37676        tool_specified="$AR"
37677        tool_basename="${tool_specified##*/}"
37678        if test "x$tool_basename" = "x$tool_specified"; then
37679          # A command without a complete path is provided, search $PATH.
37680          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37681$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37682          # Extract the first word of "$tool_basename", so it can be a program name with args.
37683set dummy $tool_basename; ac_word=$2
37684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37685$as_echo_n "checking for $ac_word... " >&6; }
37686if ${ac_cv_path_AR+:} false; then :
37687  $as_echo_n "(cached) " >&6
37688else
37689  case $AR in
37690  [\\/]* | ?:[\\/]*)
37691  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37692  ;;
37693  *)
37694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37695for as_dir in $PATH
37696do
37697  IFS=$as_save_IFS
37698  test -z "$as_dir" && as_dir=.
37699    for ac_exec_ext in '' $ac_executable_extensions; do
37700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37701    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37703    break 2
37704  fi
37705done
37706  done
37707IFS=$as_save_IFS
37708
37709  ;;
37710esac
37711fi
37712AR=$ac_cv_path_AR
37713if test -n "$AR"; then
37714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37715$as_echo "$AR" >&6; }
37716else
37717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37718$as_echo "no" >&6; }
37719fi
37720
37721
37722          if test "x$AR" = x; then
37723            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37724          fi
37725        else
37726          # Otherwise we believe it is a complete path. Use it as it is.
37727          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37728$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37729          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37730$as_echo_n "checking for AR... " >&6; }
37731          if test ! -x "$tool_specified"; then
37732            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37733$as_echo "not found" >&6; }
37734            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37735          fi
37736          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37737$as_echo "$tool_specified" >&6; }
37738        fi
37739      fi
37740    fi
37741
37742  fi
37743
37744
37745  fi
37746
37747  # Only process if variable expands to non-empty
37748
37749  if test "x$AR" != x; then
37750    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37751
37752  # First separate the path from the arguments. This will split at the first
37753  # space.
37754  complete="$AR"
37755  path="${complete%% *}"
37756  tmp="$complete EOL"
37757  arguments="${tmp#* }"
37758
37759  # Input might be given as Windows format, start by converting to
37760  # unix format.
37761  new_path=`$CYGPATH -u "$path"`
37762
37763  # Now try to locate executable using which
37764  new_path=`$WHICH "$new_path" 2> /dev/null`
37765  # bat and cmd files are not always considered executable in cygwin causing which
37766  # to not find them
37767  if test "x$new_path" = x \
37768      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37769      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37770    new_path=`$CYGPATH -u "$path"`
37771  fi
37772  if test "x$new_path" = x; then
37773    # Oops. Which didn't find the executable.
37774    # The splitting of arguments from the executable at a space might have been incorrect,
37775    # since paths with space are more likely in Windows. Give it another try with the whole
37776    # argument.
37777    path="$complete"
37778    arguments="EOL"
37779    new_path=`$CYGPATH -u "$path"`
37780    new_path=`$WHICH "$new_path" 2> /dev/null`
37781    # bat and cmd files are not always considered executable in cygwin causing which
37782    # to not find them
37783    if test "x$new_path" = x \
37784        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37785        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37786      new_path=`$CYGPATH -u "$path"`
37787    fi
37788    if test "x$new_path" = x; then
37789      # It's still not found. Now this is an unrecoverable error.
37790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37791$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37792      has_space=`$ECHO "$complete" | $GREP " "`
37793      if test "x$has_space" != x; then
37794        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37795$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37796      fi
37797      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37798    fi
37799  fi
37800
37801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37804  # "foo.exe" is OK but "foo" is an error.
37805  #
37806  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37807  # It is also a way to make sure we got the proper file name for the real test later on.
37808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37809  if test "x$test_shortpath" = x; then
37810    # Short path failed, file does not exist as specified.
37811    # Try adding .exe or .cmd
37812    if test -f "${new_path}.exe"; then
37813      input_to_shortpath="${new_path}.exe"
37814    elif test -f "${new_path}.cmd"; then
37815      input_to_shortpath="${new_path}.cmd"
37816    else
37817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37818$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37819      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37820$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37821      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37822    fi
37823  else
37824    input_to_shortpath="$new_path"
37825  fi
37826
37827  # Call helper function which possibly converts this using DOS-style short mode.
37828  # If so, the updated path is stored in $new_path.
37829  new_path="$input_to_shortpath"
37830
37831  input_path="$input_to_shortpath"
37832  # Check if we need to convert this using DOS-style short mode. If the path
37833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37834  # take no chances and rewrite it.
37835  # Note: m4 eats our [], so we need to use [ and ] instead.
37836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37837  if test "x$has_forbidden_chars" != x; then
37838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37842      # Going to short mode and back again did indeed matter. Since short mode is
37843      # case insensitive, let's make it lowercase to improve readability.
37844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37845      # Now convert it back to Unix-style (cygpath)
37846      input_path=`$CYGPATH -u "$shortmode_path"`
37847      new_path="$input_path"
37848    fi
37849  fi
37850
37851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37852  if test "x$test_cygdrive_prefix" = x; then
37853    # As a simple fix, exclude /usr/bin since it's not a real path.
37854    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37856      # a path prefixed by /cygdrive for fixpath to work.
37857      new_path="$CYGWIN_ROOT_PATH$input_path"
37858    fi
37859  fi
37860
37861  # remove trailing .exe if any
37862  new_path="${new_path/%.exe/}"
37863
37864    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37865
37866  # First separate the path from the arguments. This will split at the first
37867  # space.
37868  complete="$AR"
37869  path="${complete%% *}"
37870  tmp="$complete EOL"
37871  arguments="${tmp#* }"
37872
37873  # Input might be given as Windows format, start by converting to
37874  # unix format.
37875  new_path="$path"
37876
37877  windows_path="$new_path"
37878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37879    unix_path=`$CYGPATH -u "$windows_path"`
37880    new_path="$unix_path"
37881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37883    new_path="$unix_path"
37884  fi
37885
37886
37887  # Now try to locate executable using which
37888  new_path=`$WHICH "$new_path" 2> /dev/null`
37889
37890  if test "x$new_path" = x; then
37891    # Oops. Which didn't find the executable.
37892    # The splitting of arguments from the executable at a space might have been incorrect,
37893    # since paths with space are more likely in Windows. Give it another try with the whole
37894    # argument.
37895    path="$complete"
37896    arguments="EOL"
37897    new_path="$path"
37898
37899  windows_path="$new_path"
37900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37901    unix_path=`$CYGPATH -u "$windows_path"`
37902    new_path="$unix_path"
37903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37905    new_path="$unix_path"
37906  fi
37907
37908
37909    new_path=`$WHICH "$new_path" 2> /dev/null`
37910    # bat and cmd files are not always considered executable in MSYS causing which
37911    # to not find them
37912    if test "x$new_path" = x \
37913        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37914        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37915      new_path="$path"
37916
37917  windows_path="$new_path"
37918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37919    unix_path=`$CYGPATH -u "$windows_path"`
37920    new_path="$unix_path"
37921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37923    new_path="$unix_path"
37924  fi
37925
37926    fi
37927
37928    if test "x$new_path" = x; then
37929      # It's still not found. Now this is an unrecoverable error.
37930      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37931$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37932      has_space=`$ECHO "$complete" | $GREP " "`
37933      if test "x$has_space" != x; then
37934        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37935$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37936      fi
37937      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37938    fi
37939  fi
37940
37941  # Now new_path has a complete unix path to the binary
37942  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37943    # Keep paths in /bin as-is, but remove trailing .exe if any
37944    new_path="${new_path/%.exe/}"
37945    # Do not save /bin paths to all_fixpath_prefixes!
37946  else
37947    # Not in mixed or Windows style, start by that.
37948    new_path=`cmd //c echo $new_path`
37949
37950  input_path="$new_path"
37951  # Check if we need to convert this using DOS-style short mode. If the path
37952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37953  # take no chances and rewrite it.
37954  # Note: m4 eats our [], so we need to use [ and ] instead.
37955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37956  if test "x$has_forbidden_chars" != x; then
37957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37958    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37959  fi
37960
37961    # Output is in $new_path
37962
37963  windows_path="$new_path"
37964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37965    unix_path=`$CYGPATH -u "$windows_path"`
37966    new_path="$unix_path"
37967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37969    new_path="$unix_path"
37970  fi
37971
37972    # remove trailing .exe if any
37973    new_path="${new_path/%.exe/}"
37974
37975    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37976    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37977  fi
37978
37979    else
37980      # We're on a unix platform. Hooray! :)
37981      # First separate the path from the arguments. This will split at the first
37982      # space.
37983      complete="$AR"
37984      path="${complete%% *}"
37985      tmp="$complete EOL"
37986      arguments="${tmp#* }"
37987
37988      # Cannot rely on the command "which" here since it doesn't always work.
37989      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37990      if test -z "$is_absolute_path"; then
37991        # Path to executable is not absolute. Find it.
37992        IFS_save="$IFS"
37993        IFS=:
37994        for p in $PATH; do
37995          if test -f "$p/$path" && test -x "$p/$path"; then
37996            new_path="$p/$path"
37997            break
37998          fi
37999        done
38000        IFS="$IFS_save"
38001      else
38002        # This is an absolute path, we can use it without further modifications.
38003        new_path="$path"
38004      fi
38005
38006      if test "x$new_path" = x; then
38007        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38008$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38009        has_space=`$ECHO "$complete" | $GREP " "`
38010        if test "x$has_space" != x; then
38011          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38012$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38013        fi
38014        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38015      fi
38016    fi
38017
38018    # Now join together the path and the arguments once again
38019    if test "x$arguments" != xEOL; then
38020      new_complete="$new_path ${arguments% *}"
38021    else
38022      new_complete="$new_path"
38023    fi
38024
38025    if test "x$complete" != "x$new_complete"; then
38026      AR="$new_complete"
38027      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38028$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38029    fi
38030  fi
38031
38032
38033
38034  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38035
38036
38037  # Publish this variable in the help.
38038
38039
38040  if [ -z "${LIPO+x}" ]; then
38041    # The variable is not set by user, try to locate tool using the code snippet
38042    for ac_prog in lipo
38043do
38044  # Extract the first word of "$ac_prog", so it can be a program name with args.
38045set dummy $ac_prog; ac_word=$2
38046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38047$as_echo_n "checking for $ac_word... " >&6; }
38048if ${ac_cv_path_LIPO+:} false; then :
38049  $as_echo_n "(cached) " >&6
38050else
38051  case $LIPO in
38052  [\\/]* | ?:[\\/]*)
38053  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38054  ;;
38055  *)
38056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38057for as_dir in $PATH
38058do
38059  IFS=$as_save_IFS
38060  test -z "$as_dir" && as_dir=.
38061    for ac_exec_ext in '' $ac_executable_extensions; do
38062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38063    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38065    break 2
38066  fi
38067done
38068  done
38069IFS=$as_save_IFS
38070
38071  ;;
38072esac
38073fi
38074LIPO=$ac_cv_path_LIPO
38075if test -n "$LIPO"; then
38076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38077$as_echo "$LIPO" >&6; }
38078else
38079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38080$as_echo "no" >&6; }
38081fi
38082
38083
38084  test -n "$LIPO" && break
38085done
38086
38087  else
38088    # The variable is set, but is it from the command line or the environment?
38089
38090    # Try to remove the string !LIPO! from our list.
38091    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38092    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38093      # If it failed, the variable was not from the command line. Ignore it,
38094      # but warn the user (except for BASH, which is always set by the calling BASH).
38095      if test "xLIPO" != xBASH; then
38096        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38097$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38098      fi
38099      # Try to locate tool using the code snippet
38100      for ac_prog in lipo
38101do
38102  # Extract the first word of "$ac_prog", so it can be a program name with args.
38103set dummy $ac_prog; ac_word=$2
38104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38105$as_echo_n "checking for $ac_word... " >&6; }
38106if ${ac_cv_path_LIPO+:} false; then :
38107  $as_echo_n "(cached) " >&6
38108else
38109  case $LIPO in
38110  [\\/]* | ?:[\\/]*)
38111  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38112  ;;
38113  *)
38114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38115for as_dir in $PATH
38116do
38117  IFS=$as_save_IFS
38118  test -z "$as_dir" && as_dir=.
38119    for ac_exec_ext in '' $ac_executable_extensions; do
38120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38121    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38123    break 2
38124  fi
38125done
38126  done
38127IFS=$as_save_IFS
38128
38129  ;;
38130esac
38131fi
38132LIPO=$ac_cv_path_LIPO
38133if test -n "$LIPO"; then
38134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38135$as_echo "$LIPO" >&6; }
38136else
38137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38138$as_echo "no" >&6; }
38139fi
38140
38141
38142  test -n "$LIPO" && break
38143done
38144
38145    else
38146      # If it succeeded, then it was overridden by the user. We will use it
38147      # for the tool.
38148
38149      # First remove it from the list of overridden variables, so we can test
38150      # for unknown variables in the end.
38151      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38152
38153      # Check if we try to supply an empty value
38154      if test "x$LIPO" = x; then
38155        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38156$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38157        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38158$as_echo_n "checking for LIPO... " >&6; }
38159        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38160$as_echo "disabled" >&6; }
38161      else
38162        # Check if the provided tool contains a complete path.
38163        tool_specified="$LIPO"
38164        tool_basename="${tool_specified##*/}"
38165        if test "x$tool_basename" = "x$tool_specified"; then
38166          # A command without a complete path is provided, search $PATH.
38167          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38168$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38169          # Extract the first word of "$tool_basename", so it can be a program name with args.
38170set dummy $tool_basename; ac_word=$2
38171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38172$as_echo_n "checking for $ac_word... " >&6; }
38173if ${ac_cv_path_LIPO+:} false; then :
38174  $as_echo_n "(cached) " >&6
38175else
38176  case $LIPO in
38177  [\\/]* | ?:[\\/]*)
38178  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38179  ;;
38180  *)
38181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38182for as_dir in $PATH
38183do
38184  IFS=$as_save_IFS
38185  test -z "$as_dir" && as_dir=.
38186    for ac_exec_ext in '' $ac_executable_extensions; do
38187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38188    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38190    break 2
38191  fi
38192done
38193  done
38194IFS=$as_save_IFS
38195
38196  ;;
38197esac
38198fi
38199LIPO=$ac_cv_path_LIPO
38200if test -n "$LIPO"; then
38201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38202$as_echo "$LIPO" >&6; }
38203else
38204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38205$as_echo "no" >&6; }
38206fi
38207
38208
38209          if test "x$LIPO" = x; then
38210            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38211          fi
38212        else
38213          # Otherwise we believe it is a complete path. Use it as it is.
38214          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38215$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38216          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38217$as_echo_n "checking for LIPO... " >&6; }
38218          if test ! -x "$tool_specified"; then
38219            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38220$as_echo "not found" >&6; }
38221            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38222          fi
38223          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38224$as_echo "$tool_specified" >&6; }
38225        fi
38226      fi
38227    fi
38228
38229  fi
38230
38231
38232
38233  # Only process if variable expands to non-empty
38234
38235  if test "x$LIPO" != x; then
38236    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38237
38238  # First separate the path from the arguments. This will split at the first
38239  # space.
38240  complete="$LIPO"
38241  path="${complete%% *}"
38242  tmp="$complete EOL"
38243  arguments="${tmp#* }"
38244
38245  # Input might be given as Windows format, start by converting to
38246  # unix format.
38247  new_path=`$CYGPATH -u "$path"`
38248
38249  # Now try to locate executable using which
38250  new_path=`$WHICH "$new_path" 2> /dev/null`
38251  # bat and cmd files are not always considered executable in cygwin causing which
38252  # to not find them
38253  if test "x$new_path" = x \
38254      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38255      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38256    new_path=`$CYGPATH -u "$path"`
38257  fi
38258  if test "x$new_path" = x; then
38259    # Oops. Which didn't find the executable.
38260    # The splitting of arguments from the executable at a space might have been incorrect,
38261    # since paths with space are more likely in Windows. Give it another try with the whole
38262    # argument.
38263    path="$complete"
38264    arguments="EOL"
38265    new_path=`$CYGPATH -u "$path"`
38266    new_path=`$WHICH "$new_path" 2> /dev/null`
38267    # bat and cmd files are not always considered executable in cygwin causing which
38268    # to not find them
38269    if test "x$new_path" = x \
38270        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38271        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38272      new_path=`$CYGPATH -u "$path"`
38273    fi
38274    if test "x$new_path" = x; then
38275      # It's still not found. Now this is an unrecoverable error.
38276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38277$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38278      has_space=`$ECHO "$complete" | $GREP " "`
38279      if test "x$has_space" != x; then
38280        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38281$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38282      fi
38283      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38284    fi
38285  fi
38286
38287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38290  # "foo.exe" is OK but "foo" is an error.
38291  #
38292  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38293  # It is also a way to make sure we got the proper file name for the real test later on.
38294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38295  if test "x$test_shortpath" = x; then
38296    # Short path failed, file does not exist as specified.
38297    # Try adding .exe or .cmd
38298    if test -f "${new_path}.exe"; then
38299      input_to_shortpath="${new_path}.exe"
38300    elif test -f "${new_path}.cmd"; then
38301      input_to_shortpath="${new_path}.cmd"
38302    else
38303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38304$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38305      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38306$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38307      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38308    fi
38309  else
38310    input_to_shortpath="$new_path"
38311  fi
38312
38313  # Call helper function which possibly converts this using DOS-style short mode.
38314  # If so, the updated path is stored in $new_path.
38315  new_path="$input_to_shortpath"
38316
38317  input_path="$input_to_shortpath"
38318  # Check if we need to convert this using DOS-style short mode. If the path
38319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38320  # take no chances and rewrite it.
38321  # Note: m4 eats our [], so we need to use [ and ] instead.
38322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38323  if test "x$has_forbidden_chars" != x; then
38324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38328      # Going to short mode and back again did indeed matter. Since short mode is
38329      # case insensitive, let's make it lowercase to improve readability.
38330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38331      # Now convert it back to Unix-style (cygpath)
38332      input_path=`$CYGPATH -u "$shortmode_path"`
38333      new_path="$input_path"
38334    fi
38335  fi
38336
38337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38338  if test "x$test_cygdrive_prefix" = x; then
38339    # As a simple fix, exclude /usr/bin since it's not a real path.
38340    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38342      # a path prefixed by /cygdrive for fixpath to work.
38343      new_path="$CYGWIN_ROOT_PATH$input_path"
38344    fi
38345  fi
38346
38347  # remove trailing .exe if any
38348  new_path="${new_path/%.exe/}"
38349
38350    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38351
38352  # First separate the path from the arguments. This will split at the first
38353  # space.
38354  complete="$LIPO"
38355  path="${complete%% *}"
38356  tmp="$complete EOL"
38357  arguments="${tmp#* }"
38358
38359  # Input might be given as Windows format, start by converting to
38360  # unix format.
38361  new_path="$path"
38362
38363  windows_path="$new_path"
38364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38365    unix_path=`$CYGPATH -u "$windows_path"`
38366    new_path="$unix_path"
38367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38369    new_path="$unix_path"
38370  fi
38371
38372
38373  # Now try to locate executable using which
38374  new_path=`$WHICH "$new_path" 2> /dev/null`
38375
38376  if test "x$new_path" = x; then
38377    # Oops. Which didn't find the executable.
38378    # The splitting of arguments from the executable at a space might have been incorrect,
38379    # since paths with space are more likely in Windows. Give it another try with the whole
38380    # argument.
38381    path="$complete"
38382    arguments="EOL"
38383    new_path="$path"
38384
38385  windows_path="$new_path"
38386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38387    unix_path=`$CYGPATH -u "$windows_path"`
38388    new_path="$unix_path"
38389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38391    new_path="$unix_path"
38392  fi
38393
38394
38395    new_path=`$WHICH "$new_path" 2> /dev/null`
38396    # bat and cmd files are not always considered executable in MSYS causing which
38397    # to not find them
38398    if test "x$new_path" = x \
38399        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38400        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38401      new_path="$path"
38402
38403  windows_path="$new_path"
38404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38405    unix_path=`$CYGPATH -u "$windows_path"`
38406    new_path="$unix_path"
38407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38409    new_path="$unix_path"
38410  fi
38411
38412    fi
38413
38414    if test "x$new_path" = x; then
38415      # It's still not found. Now this is an unrecoverable error.
38416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38417$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38418      has_space=`$ECHO "$complete" | $GREP " "`
38419      if test "x$has_space" != x; then
38420        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38421$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38422      fi
38423      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38424    fi
38425  fi
38426
38427  # Now new_path has a complete unix path to the binary
38428  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38429    # Keep paths in /bin as-is, but remove trailing .exe if any
38430    new_path="${new_path/%.exe/}"
38431    # Do not save /bin paths to all_fixpath_prefixes!
38432  else
38433    # Not in mixed or Windows style, start by that.
38434    new_path=`cmd //c echo $new_path`
38435
38436  input_path="$new_path"
38437  # Check if we need to convert this using DOS-style short mode. If the path
38438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38439  # take no chances and rewrite it.
38440  # Note: m4 eats our [], so we need to use [ and ] instead.
38441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38442  if test "x$has_forbidden_chars" != x; then
38443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38445  fi
38446
38447    # Output is in $new_path
38448
38449  windows_path="$new_path"
38450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38451    unix_path=`$CYGPATH -u "$windows_path"`
38452    new_path="$unix_path"
38453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38455    new_path="$unix_path"
38456  fi
38457
38458    # remove trailing .exe if any
38459    new_path="${new_path/%.exe/}"
38460
38461    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38462    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38463  fi
38464
38465    else
38466      # We're on a unix platform. Hooray! :)
38467      # First separate the path from the arguments. This will split at the first
38468      # space.
38469      complete="$LIPO"
38470      path="${complete%% *}"
38471      tmp="$complete EOL"
38472      arguments="${tmp#* }"
38473
38474      # Cannot rely on the command "which" here since it doesn't always work.
38475      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38476      if test -z "$is_absolute_path"; then
38477        # Path to executable is not absolute. Find it.
38478        IFS_save="$IFS"
38479        IFS=:
38480        for p in $PATH; do
38481          if test -f "$p/$path" && test -x "$p/$path"; then
38482            new_path="$p/$path"
38483            break
38484          fi
38485        done
38486        IFS="$IFS_save"
38487      else
38488        # This is an absolute path, we can use it without further modifications.
38489        new_path="$path"
38490      fi
38491
38492      if test "x$new_path" = x; then
38493        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38494$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38495        has_space=`$ECHO "$complete" | $GREP " "`
38496        if test "x$has_space" != x; then
38497          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38498$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38499        fi
38500        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38501      fi
38502    fi
38503
38504    # Now join together the path and the arguments once again
38505    if test "x$arguments" != xEOL; then
38506      new_complete="$new_path ${arguments% *}"
38507    else
38508      new_complete="$new_path"
38509    fi
38510
38511    if test "x$complete" != "x$new_complete"; then
38512      LIPO="$new_complete"
38513      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38514$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38515    fi
38516  fi
38517
38518  fi
38519
38520  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38521    # Extract the first word of "mt", so it can be a program name with args.
38522set dummy mt; ac_word=$2
38523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38524$as_echo_n "checking for $ac_word... " >&6; }
38525if ${ac_cv_prog_MT+:} false; then :
38526  $as_echo_n "(cached) " >&6
38527else
38528  if test -n "$MT"; then
38529  ac_cv_prog_MT="$MT" # Let the user override the test.
38530else
38531  ac_prog_rejected=no
38532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38533for as_dir in $PATH
38534do
38535  IFS=$as_save_IFS
38536  test -z "$as_dir" && as_dir=.
38537    for ac_exec_ext in '' $ac_executable_extensions; do
38538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38539    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38540       ac_prog_rejected=yes
38541       continue
38542     fi
38543    ac_cv_prog_MT="mt"
38544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38545    break 2
38546  fi
38547done
38548  done
38549IFS=$as_save_IFS
38550
38551if test $ac_prog_rejected = yes; then
38552  # We found a bogon in the path, so make sure we never use it.
38553  set dummy $ac_cv_prog_MT
38554  shift
38555  if test $# != 0; then
38556    # We chose a different compiler from the bogus one.
38557    # However, it has the same basename, so the bogon will be chosen
38558    # first if we set MT to just the basename; use the full file name.
38559    shift
38560    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38561  fi
38562fi
38563fi
38564fi
38565MT=$ac_cv_prog_MT
38566if test -n "$MT"; then
38567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38568$as_echo "$MT" >&6; }
38569else
38570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38571$as_echo "no" >&6; }
38572fi
38573
38574
38575
38576  # Only process if variable expands to non-empty
38577
38578  if test "x$MT" != x; then
38579    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38580
38581  # First separate the path from the arguments. This will split at the first
38582  # space.
38583  complete="$MT"
38584  path="${complete%% *}"
38585  tmp="$complete EOL"
38586  arguments="${tmp#* }"
38587
38588  # Input might be given as Windows format, start by converting to
38589  # unix format.
38590  new_path=`$CYGPATH -u "$path"`
38591
38592  # Now try to locate executable using which
38593  new_path=`$WHICH "$new_path" 2> /dev/null`
38594  # bat and cmd files are not always considered executable in cygwin causing which
38595  # to not find them
38596  if test "x$new_path" = x \
38597      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38598      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38599    new_path=`$CYGPATH -u "$path"`
38600  fi
38601  if test "x$new_path" = x; then
38602    # Oops. Which didn't find the executable.
38603    # The splitting of arguments from the executable at a space might have been incorrect,
38604    # since paths with space are more likely in Windows. Give it another try with the whole
38605    # argument.
38606    path="$complete"
38607    arguments="EOL"
38608    new_path=`$CYGPATH -u "$path"`
38609    new_path=`$WHICH "$new_path" 2> /dev/null`
38610    # bat and cmd files are not always considered executable in cygwin causing which
38611    # to not find them
38612    if test "x$new_path" = x \
38613        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38614        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38615      new_path=`$CYGPATH -u "$path"`
38616    fi
38617    if test "x$new_path" = x; then
38618      # It's still not found. Now this is an unrecoverable error.
38619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38620$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38621      has_space=`$ECHO "$complete" | $GREP " "`
38622      if test "x$has_space" != x; then
38623        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38624$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38625      fi
38626      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38627    fi
38628  fi
38629
38630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38633  # "foo.exe" is OK but "foo" is an error.
38634  #
38635  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38636  # It is also a way to make sure we got the proper file name for the real test later on.
38637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38638  if test "x$test_shortpath" = x; then
38639    # Short path failed, file does not exist as specified.
38640    # Try adding .exe or .cmd
38641    if test -f "${new_path}.exe"; then
38642      input_to_shortpath="${new_path}.exe"
38643    elif test -f "${new_path}.cmd"; then
38644      input_to_shortpath="${new_path}.cmd"
38645    else
38646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38647$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38648      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38649$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38650      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38651    fi
38652  else
38653    input_to_shortpath="$new_path"
38654  fi
38655
38656  # Call helper function which possibly converts this using DOS-style short mode.
38657  # If so, the updated path is stored in $new_path.
38658  new_path="$input_to_shortpath"
38659
38660  input_path="$input_to_shortpath"
38661  # Check if we need to convert this using DOS-style short mode. If the path
38662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38663  # take no chances and rewrite it.
38664  # Note: m4 eats our [], so we need to use [ and ] instead.
38665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38666  if test "x$has_forbidden_chars" != x; then
38667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38668    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38669    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38670    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38671      # Going to short mode and back again did indeed matter. Since short mode is
38672      # case insensitive, let's make it lowercase to improve readability.
38673      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38674      # Now convert it back to Unix-style (cygpath)
38675      input_path=`$CYGPATH -u "$shortmode_path"`
38676      new_path="$input_path"
38677    fi
38678  fi
38679
38680  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38681  if test "x$test_cygdrive_prefix" = x; then
38682    # As a simple fix, exclude /usr/bin since it's not a real path.
38683    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38684      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38685      # a path prefixed by /cygdrive for fixpath to work.
38686      new_path="$CYGWIN_ROOT_PATH$input_path"
38687    fi
38688  fi
38689
38690  # remove trailing .exe if any
38691  new_path="${new_path/%.exe/}"
38692
38693    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38694
38695  # First separate the path from the arguments. This will split at the first
38696  # space.
38697  complete="$MT"
38698  path="${complete%% *}"
38699  tmp="$complete EOL"
38700  arguments="${tmp#* }"
38701
38702  # Input might be given as Windows format, start by converting to
38703  # unix format.
38704  new_path="$path"
38705
38706  windows_path="$new_path"
38707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38708    unix_path=`$CYGPATH -u "$windows_path"`
38709    new_path="$unix_path"
38710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38712    new_path="$unix_path"
38713  fi
38714
38715
38716  # Now try to locate executable using which
38717  new_path=`$WHICH "$new_path" 2> /dev/null`
38718
38719  if test "x$new_path" = x; then
38720    # Oops. Which didn't find the executable.
38721    # The splitting of arguments from the executable at a space might have been incorrect,
38722    # since paths with space are more likely in Windows. Give it another try with the whole
38723    # argument.
38724    path="$complete"
38725    arguments="EOL"
38726    new_path="$path"
38727
38728  windows_path="$new_path"
38729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38730    unix_path=`$CYGPATH -u "$windows_path"`
38731    new_path="$unix_path"
38732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38734    new_path="$unix_path"
38735  fi
38736
38737
38738    new_path=`$WHICH "$new_path" 2> /dev/null`
38739    # bat and cmd files are not always considered executable in MSYS causing which
38740    # to not find them
38741    if test "x$new_path" = x \
38742        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38743        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38744      new_path="$path"
38745
38746  windows_path="$new_path"
38747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38748    unix_path=`$CYGPATH -u "$windows_path"`
38749    new_path="$unix_path"
38750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38752    new_path="$unix_path"
38753  fi
38754
38755    fi
38756
38757    if test "x$new_path" = x; then
38758      # It's still not found. Now this is an unrecoverable error.
38759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38760$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38761      has_space=`$ECHO "$complete" | $GREP " "`
38762      if test "x$has_space" != x; then
38763        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38764$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38765      fi
38766      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38767    fi
38768  fi
38769
38770  # Now new_path has a complete unix path to the binary
38771  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38772    # Keep paths in /bin as-is, but remove trailing .exe if any
38773    new_path="${new_path/%.exe/}"
38774    # Do not save /bin paths to all_fixpath_prefixes!
38775  else
38776    # Not in mixed or Windows style, start by that.
38777    new_path=`cmd //c echo $new_path`
38778
38779  input_path="$new_path"
38780  # Check if we need to convert this using DOS-style short mode. If the path
38781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38782  # take no chances and rewrite it.
38783  # Note: m4 eats our [], so we need to use [ and ] instead.
38784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38785  if test "x$has_forbidden_chars" != x; then
38786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38787    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38788  fi
38789
38790    # Output is in $new_path
38791
38792  windows_path="$new_path"
38793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38794    unix_path=`$CYGPATH -u "$windows_path"`
38795    new_path="$unix_path"
38796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38798    new_path="$unix_path"
38799  fi
38800
38801    # remove trailing .exe if any
38802    new_path="${new_path/%.exe/}"
38803
38804    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38805    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38806  fi
38807
38808    else
38809      # We're on a unix platform. Hooray! :)
38810      # First separate the path from the arguments. This will split at the first
38811      # space.
38812      complete="$MT"
38813      path="${complete%% *}"
38814      tmp="$complete EOL"
38815      arguments="${tmp#* }"
38816
38817      # Cannot rely on the command "which" here since it doesn't always work.
38818      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38819      if test -z "$is_absolute_path"; then
38820        # Path to executable is not absolute. Find it.
38821        IFS_save="$IFS"
38822        IFS=:
38823        for p in $PATH; do
38824          if test -f "$p/$path" && test -x "$p/$path"; then
38825            new_path="$p/$path"
38826            break
38827          fi
38828        done
38829        IFS="$IFS_save"
38830      else
38831        # This is an absolute path, we can use it without further modifications.
38832        new_path="$path"
38833      fi
38834
38835      if test "x$new_path" = x; then
38836        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38837$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38838        has_space=`$ECHO "$complete" | $GREP " "`
38839        if test "x$has_space" != x; then
38840          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38841$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38842        fi
38843        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38844      fi
38845    fi
38846
38847    # Now join together the path and the arguments once again
38848    if test "x$arguments" != xEOL; then
38849      new_complete="$new_path ${arguments% *}"
38850    else
38851      new_complete="$new_path"
38852    fi
38853
38854    if test "x$complete" != "x$new_complete"; then
38855      MT="$new_complete"
38856      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38857$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38858    fi
38859  fi
38860
38861    # Setup the resource compiler (RC)
38862    # Extract the first word of "rc", so it can be a program name with args.
38863set dummy rc; ac_word=$2
38864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38865$as_echo_n "checking for $ac_word... " >&6; }
38866if ${ac_cv_prog_RC+:} false; then :
38867  $as_echo_n "(cached) " >&6
38868else
38869  if test -n "$RC"; then
38870  ac_cv_prog_RC="$RC" # Let the user override the test.
38871else
38872  ac_prog_rejected=no
38873as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38874for as_dir in $PATH
38875do
38876  IFS=$as_save_IFS
38877  test -z "$as_dir" && as_dir=.
38878    for ac_exec_ext in '' $ac_executable_extensions; do
38879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38880    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38881       ac_prog_rejected=yes
38882       continue
38883     fi
38884    ac_cv_prog_RC="rc"
38885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38886    break 2
38887  fi
38888done
38889  done
38890IFS=$as_save_IFS
38891
38892if test $ac_prog_rejected = yes; then
38893  # We found a bogon in the path, so make sure we never use it.
38894  set dummy $ac_cv_prog_RC
38895  shift
38896  if test $# != 0; then
38897    # We chose a different compiler from the bogus one.
38898    # However, it has the same basename, so the bogon will be chosen
38899    # first if we set RC to just the basename; use the full file name.
38900    shift
38901    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38902  fi
38903fi
38904fi
38905fi
38906RC=$ac_cv_prog_RC
38907if test -n "$RC"; then
38908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38909$as_echo "$RC" >&6; }
38910else
38911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38912$as_echo "no" >&6; }
38913fi
38914
38915
38916
38917  # Only process if variable expands to non-empty
38918
38919  if test "x$RC" != x; then
38920    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38921
38922  # First separate the path from the arguments. This will split at the first
38923  # space.
38924  complete="$RC"
38925  path="${complete%% *}"
38926  tmp="$complete EOL"
38927  arguments="${tmp#* }"
38928
38929  # Input might be given as Windows format, start by converting to
38930  # unix format.
38931  new_path=`$CYGPATH -u "$path"`
38932
38933  # Now try to locate executable using which
38934  new_path=`$WHICH "$new_path" 2> /dev/null`
38935  # bat and cmd files are not always considered executable in cygwin causing which
38936  # to not find them
38937  if test "x$new_path" = x \
38938      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38939      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38940    new_path=`$CYGPATH -u "$path"`
38941  fi
38942  if test "x$new_path" = x; then
38943    # Oops. Which didn't find the executable.
38944    # The splitting of arguments from the executable at a space might have been incorrect,
38945    # since paths with space are more likely in Windows. Give it another try with the whole
38946    # argument.
38947    path="$complete"
38948    arguments="EOL"
38949    new_path=`$CYGPATH -u "$path"`
38950    new_path=`$WHICH "$new_path" 2> /dev/null`
38951    # bat and cmd files are not always considered executable in cygwin causing which
38952    # to not find them
38953    if test "x$new_path" = x \
38954        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38955        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38956      new_path=`$CYGPATH -u "$path"`
38957    fi
38958    if test "x$new_path" = x; then
38959      # It's still not found. Now this is an unrecoverable error.
38960      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38961$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38962      has_space=`$ECHO "$complete" | $GREP " "`
38963      if test "x$has_space" != x; then
38964        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38965$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38966      fi
38967      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38968    fi
38969  fi
38970
38971  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38972  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38973  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38974  # "foo.exe" is OK but "foo" is an error.
38975  #
38976  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38977  # It is also a way to make sure we got the proper file name for the real test later on.
38978  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38979  if test "x$test_shortpath" = x; then
38980    # Short path failed, file does not exist as specified.
38981    # Try adding .exe or .cmd
38982    if test -f "${new_path}.exe"; then
38983      input_to_shortpath="${new_path}.exe"
38984    elif test -f "${new_path}.cmd"; then
38985      input_to_shortpath="${new_path}.cmd"
38986    else
38987      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38988$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38989      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38990$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38991      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38992    fi
38993  else
38994    input_to_shortpath="$new_path"
38995  fi
38996
38997  # Call helper function which possibly converts this using DOS-style short mode.
38998  # If so, the updated path is stored in $new_path.
38999  new_path="$input_to_shortpath"
39000
39001  input_path="$input_to_shortpath"
39002  # Check if we need to convert this using DOS-style short mode. If the path
39003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39004  # take no chances and rewrite it.
39005  # Note: m4 eats our [], so we need to use [ and ] instead.
39006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39007  if test "x$has_forbidden_chars" != x; then
39008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39009    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39010    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39011    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39012      # Going to short mode and back again did indeed matter. Since short mode is
39013      # case insensitive, let's make it lowercase to improve readability.
39014      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39015      # Now convert it back to Unix-style (cygpath)
39016      input_path=`$CYGPATH -u "$shortmode_path"`
39017      new_path="$input_path"
39018    fi
39019  fi
39020
39021  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39022  if test "x$test_cygdrive_prefix" = x; then
39023    # As a simple fix, exclude /usr/bin since it's not a real path.
39024    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39025      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39026      # a path prefixed by /cygdrive for fixpath to work.
39027      new_path="$CYGWIN_ROOT_PATH$input_path"
39028    fi
39029  fi
39030
39031  # remove trailing .exe if any
39032  new_path="${new_path/%.exe/}"
39033
39034    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39035
39036  # First separate the path from the arguments. This will split at the first
39037  # space.
39038  complete="$RC"
39039  path="${complete%% *}"
39040  tmp="$complete EOL"
39041  arguments="${tmp#* }"
39042
39043  # Input might be given as Windows format, start by converting to
39044  # unix format.
39045  new_path="$path"
39046
39047  windows_path="$new_path"
39048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39049    unix_path=`$CYGPATH -u "$windows_path"`
39050    new_path="$unix_path"
39051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39053    new_path="$unix_path"
39054  fi
39055
39056
39057  # Now try to locate executable using which
39058  new_path=`$WHICH "$new_path" 2> /dev/null`
39059
39060  if test "x$new_path" = x; then
39061    # Oops. Which didn't find the executable.
39062    # The splitting of arguments from the executable at a space might have been incorrect,
39063    # since paths with space are more likely in Windows. Give it another try with the whole
39064    # argument.
39065    path="$complete"
39066    arguments="EOL"
39067    new_path="$path"
39068
39069  windows_path="$new_path"
39070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39071    unix_path=`$CYGPATH -u "$windows_path"`
39072    new_path="$unix_path"
39073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39075    new_path="$unix_path"
39076  fi
39077
39078
39079    new_path=`$WHICH "$new_path" 2> /dev/null`
39080    # bat and cmd files are not always considered executable in MSYS causing which
39081    # to not find them
39082    if test "x$new_path" = x \
39083        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39084        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39085      new_path="$path"
39086
39087  windows_path="$new_path"
39088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39089    unix_path=`$CYGPATH -u "$windows_path"`
39090    new_path="$unix_path"
39091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39093    new_path="$unix_path"
39094  fi
39095
39096    fi
39097
39098    if test "x$new_path" = x; then
39099      # It's still not found. Now this is an unrecoverable error.
39100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39101$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39102      has_space=`$ECHO "$complete" | $GREP " "`
39103      if test "x$has_space" != x; then
39104        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39105$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39106      fi
39107      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39108    fi
39109  fi
39110
39111  # Now new_path has a complete unix path to the binary
39112  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39113    # Keep paths in /bin as-is, but remove trailing .exe if any
39114    new_path="${new_path/%.exe/}"
39115    # Do not save /bin paths to all_fixpath_prefixes!
39116  else
39117    # Not in mixed or Windows style, start by that.
39118    new_path=`cmd //c echo $new_path`
39119
39120  input_path="$new_path"
39121  # Check if we need to convert this using DOS-style short mode. If the path
39122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39123  # take no chances and rewrite it.
39124  # Note: m4 eats our [], so we need to use [ and ] instead.
39125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39126  if test "x$has_forbidden_chars" != x; then
39127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39128    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39129  fi
39130
39131    # Output is in $new_path
39132
39133  windows_path="$new_path"
39134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39135    unix_path=`$CYGPATH -u "$windows_path"`
39136    new_path="$unix_path"
39137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39139    new_path="$unix_path"
39140  fi
39141
39142    # remove trailing .exe if any
39143    new_path="${new_path/%.exe/}"
39144
39145    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39146    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39147  fi
39148
39149    else
39150      # We're on a unix platform. Hooray! :)
39151      # First separate the path from the arguments. This will split at the first
39152      # space.
39153      complete="$RC"
39154      path="${complete%% *}"
39155      tmp="$complete EOL"
39156      arguments="${tmp#* }"
39157
39158      # Cannot rely on the command "which" here since it doesn't always work.
39159      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39160      if test -z "$is_absolute_path"; then
39161        # Path to executable is not absolute. Find it.
39162        IFS_save="$IFS"
39163        IFS=:
39164        for p in $PATH; do
39165          if test -f "$p/$path" && test -x "$p/$path"; then
39166            new_path="$p/$path"
39167            break
39168          fi
39169        done
39170        IFS="$IFS_save"
39171      else
39172        # This is an absolute path, we can use it without further modifications.
39173        new_path="$path"
39174      fi
39175
39176      if test "x$new_path" = x; then
39177        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39178$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39179        has_space=`$ECHO "$complete" | $GREP " "`
39180        if test "x$has_space" != x; then
39181          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39182$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39183        fi
39184        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39185      fi
39186    fi
39187
39188    # Now join together the path and the arguments once again
39189    if test "x$arguments" != xEOL; then
39190      new_complete="$new_path ${arguments% *}"
39191    else
39192      new_complete="$new_path"
39193    fi
39194
39195    if test "x$complete" != "x$new_complete"; then
39196      RC="$new_complete"
39197      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39198$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39199    fi
39200  fi
39201
39202    # Extract the first word of "dumpbin", so it can be a program name with args.
39203set dummy dumpbin; ac_word=$2
39204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39205$as_echo_n "checking for $ac_word... " >&6; }
39206if ${ac_cv_prog_DUMPBIN+:} false; then :
39207  $as_echo_n "(cached) " >&6
39208else
39209  if test -n "$DUMPBIN"; then
39210  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39211else
39212as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39213for as_dir in $PATH
39214do
39215  IFS=$as_save_IFS
39216  test -z "$as_dir" && as_dir=.
39217    for ac_exec_ext in '' $ac_executable_extensions; do
39218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39219    ac_cv_prog_DUMPBIN="dumpbin"
39220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39221    break 2
39222  fi
39223done
39224  done
39225IFS=$as_save_IFS
39226
39227fi
39228fi
39229DUMPBIN=$ac_cv_prog_DUMPBIN
39230if test -n "$DUMPBIN"; then
39231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39232$as_echo "$DUMPBIN" >&6; }
39233else
39234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39235$as_echo "no" >&6; }
39236fi
39237
39238
39239
39240  # Only process if variable expands to non-empty
39241
39242  if test "x$DUMPBIN" != x; then
39243    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39244
39245  # First separate the path from the arguments. This will split at the first
39246  # space.
39247  complete="$DUMPBIN"
39248  path="${complete%% *}"
39249  tmp="$complete EOL"
39250  arguments="${tmp#* }"
39251
39252  # Input might be given as Windows format, start by converting to
39253  # unix format.
39254  new_path=`$CYGPATH -u "$path"`
39255
39256  # Now try to locate executable using which
39257  new_path=`$WHICH "$new_path" 2> /dev/null`
39258  # bat and cmd files are not always considered executable in cygwin causing which
39259  # to not find them
39260  if test "x$new_path" = x \
39261      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39262      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39263    new_path=`$CYGPATH -u "$path"`
39264  fi
39265  if test "x$new_path" = x; then
39266    # Oops. Which didn't find the executable.
39267    # The splitting of arguments from the executable at a space might have been incorrect,
39268    # since paths with space are more likely in Windows. Give it another try with the whole
39269    # argument.
39270    path="$complete"
39271    arguments="EOL"
39272    new_path=`$CYGPATH -u "$path"`
39273    new_path=`$WHICH "$new_path" 2> /dev/null`
39274    # bat and cmd files are not always considered executable in cygwin causing which
39275    # to not find them
39276    if test "x$new_path" = x \
39277        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39278        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39279      new_path=`$CYGPATH -u "$path"`
39280    fi
39281    if test "x$new_path" = x; then
39282      # It's still not found. Now this is an unrecoverable error.
39283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39284$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39285      has_space=`$ECHO "$complete" | $GREP " "`
39286      if test "x$has_space" != x; then
39287        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39288$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39289      fi
39290      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39291    fi
39292  fi
39293
39294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39297  # "foo.exe" is OK but "foo" is an error.
39298  #
39299  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39300  # It is also a way to make sure we got the proper file name for the real test later on.
39301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39302  if test "x$test_shortpath" = x; then
39303    # Short path failed, file does not exist as specified.
39304    # Try adding .exe or .cmd
39305    if test -f "${new_path}.exe"; then
39306      input_to_shortpath="${new_path}.exe"
39307    elif test -f "${new_path}.cmd"; then
39308      input_to_shortpath="${new_path}.cmd"
39309    else
39310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39311$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39312      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39313$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39314      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39315    fi
39316  else
39317    input_to_shortpath="$new_path"
39318  fi
39319
39320  # Call helper function which possibly converts this using DOS-style short mode.
39321  # If so, the updated path is stored in $new_path.
39322  new_path="$input_to_shortpath"
39323
39324  input_path="$input_to_shortpath"
39325  # Check if we need to convert this using DOS-style short mode. If the path
39326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39327  # take no chances and rewrite it.
39328  # Note: m4 eats our [], so we need to use [ and ] instead.
39329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39330  if test "x$has_forbidden_chars" != x; then
39331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39335      # Going to short mode and back again did indeed matter. Since short mode is
39336      # case insensitive, let's make it lowercase to improve readability.
39337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39338      # Now convert it back to Unix-style (cygpath)
39339      input_path=`$CYGPATH -u "$shortmode_path"`
39340      new_path="$input_path"
39341    fi
39342  fi
39343
39344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39345  if test "x$test_cygdrive_prefix" = x; then
39346    # As a simple fix, exclude /usr/bin since it's not a real path.
39347    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39349      # a path prefixed by /cygdrive for fixpath to work.
39350      new_path="$CYGWIN_ROOT_PATH$input_path"
39351    fi
39352  fi
39353
39354  # remove trailing .exe if any
39355  new_path="${new_path/%.exe/}"
39356
39357    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39358
39359  # First separate the path from the arguments. This will split at the first
39360  # space.
39361  complete="$DUMPBIN"
39362  path="${complete%% *}"
39363  tmp="$complete EOL"
39364  arguments="${tmp#* }"
39365
39366  # Input might be given as Windows format, start by converting to
39367  # unix format.
39368  new_path="$path"
39369
39370  windows_path="$new_path"
39371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39372    unix_path=`$CYGPATH -u "$windows_path"`
39373    new_path="$unix_path"
39374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39376    new_path="$unix_path"
39377  fi
39378
39379
39380  # Now try to locate executable using which
39381  new_path=`$WHICH "$new_path" 2> /dev/null`
39382
39383  if test "x$new_path" = x; then
39384    # Oops. Which didn't find the executable.
39385    # The splitting of arguments from the executable at a space might have been incorrect,
39386    # since paths with space are more likely in Windows. Give it another try with the whole
39387    # argument.
39388    path="$complete"
39389    arguments="EOL"
39390    new_path="$path"
39391
39392  windows_path="$new_path"
39393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39394    unix_path=`$CYGPATH -u "$windows_path"`
39395    new_path="$unix_path"
39396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39398    new_path="$unix_path"
39399  fi
39400
39401
39402    new_path=`$WHICH "$new_path" 2> /dev/null`
39403    # bat and cmd files are not always considered executable in MSYS causing which
39404    # to not find them
39405    if test "x$new_path" = x \
39406        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39407        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39408      new_path="$path"
39409
39410  windows_path="$new_path"
39411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39412    unix_path=`$CYGPATH -u "$windows_path"`
39413    new_path="$unix_path"
39414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39416    new_path="$unix_path"
39417  fi
39418
39419    fi
39420
39421    if test "x$new_path" = x; then
39422      # It's still not found. Now this is an unrecoverable error.
39423      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39424$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39425      has_space=`$ECHO "$complete" | $GREP " "`
39426      if test "x$has_space" != x; then
39427        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39428$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39429      fi
39430      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39431    fi
39432  fi
39433
39434  # Now new_path has a complete unix path to the binary
39435  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39436    # Keep paths in /bin as-is, but remove trailing .exe if any
39437    new_path="${new_path/%.exe/}"
39438    # Do not save /bin paths to all_fixpath_prefixes!
39439  else
39440    # Not in mixed or Windows style, start by that.
39441    new_path=`cmd //c echo $new_path`
39442
39443  input_path="$new_path"
39444  # Check if we need to convert this using DOS-style short mode. If the path
39445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39446  # take no chances and rewrite it.
39447  # Note: m4 eats our [], so we need to use [ and ] instead.
39448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39449  if test "x$has_forbidden_chars" != x; then
39450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39451    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39452  fi
39453
39454    # Output is in $new_path
39455
39456  windows_path="$new_path"
39457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39458    unix_path=`$CYGPATH -u "$windows_path"`
39459    new_path="$unix_path"
39460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39462    new_path="$unix_path"
39463  fi
39464
39465    # remove trailing .exe if any
39466    new_path="${new_path/%.exe/}"
39467
39468    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39469    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39470  fi
39471
39472    else
39473      # We're on a unix platform. Hooray! :)
39474      # First separate the path from the arguments. This will split at the first
39475      # space.
39476      complete="$DUMPBIN"
39477      path="${complete%% *}"
39478      tmp="$complete EOL"
39479      arguments="${tmp#* }"
39480
39481      # Cannot rely on the command "which" here since it doesn't always work.
39482      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39483      if test -z "$is_absolute_path"; then
39484        # Path to executable is not absolute. Find it.
39485        IFS_save="$IFS"
39486        IFS=:
39487        for p in $PATH; do
39488          if test -f "$p/$path" && test -x "$p/$path"; then
39489            new_path="$p/$path"
39490            break
39491          fi
39492        done
39493        IFS="$IFS_save"
39494      else
39495        # This is an absolute path, we can use it without further modifications.
39496        new_path="$path"
39497      fi
39498
39499      if test "x$new_path" = x; then
39500        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39501$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39502        has_space=`$ECHO "$complete" | $GREP " "`
39503        if test "x$has_space" != x; then
39504          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39505$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39506        fi
39507        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39508      fi
39509    fi
39510
39511    # Now join together the path and the arguments once again
39512    if test "x$arguments" != xEOL; then
39513      new_complete="$new_path ${arguments% *}"
39514    else
39515      new_complete="$new_path"
39516    fi
39517
39518    if test "x$complete" != "x$new_complete"; then
39519      DUMPBIN="$new_complete"
39520      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39521$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39522    fi
39523  fi
39524
39525    # We need to check for 'msbuild.exe' because at the place where we expect to
39526    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39527    # won't find the 'msbuild.exe' executable in that case (and the
39528    # 'ac_executable_extensions' is unusable due to performance reasons).
39529    # Notice that we intentionally don't fix up the path to MSBUILD because we
39530    # will call it in a DOS shell during freetype detection on Windows (see
39531    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39532    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39533set dummy msbuild.exe; ac_word=$2
39534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39535$as_echo_n "checking for $ac_word... " >&6; }
39536if ${ac_cv_prog_MSBUILD+:} false; then :
39537  $as_echo_n "(cached) " >&6
39538else
39539  if test -n "$MSBUILD"; then
39540  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39541else
39542as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39543for as_dir in $PATH
39544do
39545  IFS=$as_save_IFS
39546  test -z "$as_dir" && as_dir=.
39547    for ac_exec_ext in '' $ac_executable_extensions; do
39548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39549    ac_cv_prog_MSBUILD="msbuild.exe"
39550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39551    break 2
39552  fi
39553done
39554  done
39555IFS=$as_save_IFS
39556
39557fi
39558fi
39559MSBUILD=$ac_cv_prog_MSBUILD
39560if test -n "$MSBUILD"; then
39561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39562$as_echo "$MSBUILD" >&6; }
39563else
39564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39565$as_echo "no" >&6; }
39566fi
39567
39568
39569  fi
39570
39571  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39572
39573
39574  # Publish this variable in the help.
39575
39576
39577  if [ -z "${STRIP+x}" ]; then
39578    # The variable is not set by user, try to locate tool using the code snippet
39579    for ac_prog in strip
39580do
39581  # Extract the first word of "$ac_prog", so it can be a program name with args.
39582set dummy $ac_prog; ac_word=$2
39583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39584$as_echo_n "checking for $ac_word... " >&6; }
39585if ${ac_cv_path_STRIP+:} false; then :
39586  $as_echo_n "(cached) " >&6
39587else
39588  case $STRIP in
39589  [\\/]* | ?:[\\/]*)
39590  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39591  ;;
39592  *)
39593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39594for as_dir in $PATH
39595do
39596  IFS=$as_save_IFS
39597  test -z "$as_dir" && as_dir=.
39598    for ac_exec_ext in '' $ac_executable_extensions; do
39599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39600    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39602    break 2
39603  fi
39604done
39605  done
39606IFS=$as_save_IFS
39607
39608  ;;
39609esac
39610fi
39611STRIP=$ac_cv_path_STRIP
39612if test -n "$STRIP"; then
39613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39614$as_echo "$STRIP" >&6; }
39615else
39616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39617$as_echo "no" >&6; }
39618fi
39619
39620
39621  test -n "$STRIP" && break
39622done
39623
39624  else
39625    # The variable is set, but is it from the command line or the environment?
39626
39627    # Try to remove the string !STRIP! from our list.
39628    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39629    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39630      # If it failed, the variable was not from the command line. Ignore it,
39631      # but warn the user (except for BASH, which is always set by the calling BASH).
39632      if test "xSTRIP" != xBASH; then
39633        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39634$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39635      fi
39636      # Try to locate tool using the code snippet
39637      for ac_prog in strip
39638do
39639  # Extract the first word of "$ac_prog", so it can be a program name with args.
39640set dummy $ac_prog; ac_word=$2
39641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39642$as_echo_n "checking for $ac_word... " >&6; }
39643if ${ac_cv_path_STRIP+:} false; then :
39644  $as_echo_n "(cached) " >&6
39645else
39646  case $STRIP in
39647  [\\/]* | ?:[\\/]*)
39648  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39649  ;;
39650  *)
39651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39652for as_dir in $PATH
39653do
39654  IFS=$as_save_IFS
39655  test -z "$as_dir" && as_dir=.
39656    for ac_exec_ext in '' $ac_executable_extensions; do
39657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39658    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39660    break 2
39661  fi
39662done
39663  done
39664IFS=$as_save_IFS
39665
39666  ;;
39667esac
39668fi
39669STRIP=$ac_cv_path_STRIP
39670if test -n "$STRIP"; then
39671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39672$as_echo "$STRIP" >&6; }
39673else
39674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39675$as_echo "no" >&6; }
39676fi
39677
39678
39679  test -n "$STRIP" && break
39680done
39681
39682    else
39683      # If it succeeded, then it was overridden by the user. We will use it
39684      # for the tool.
39685
39686      # First remove it from the list of overridden variables, so we can test
39687      # for unknown variables in the end.
39688      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39689
39690      # Check if we try to supply an empty value
39691      if test "x$STRIP" = x; then
39692        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39693$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39694        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39695$as_echo_n "checking for STRIP... " >&6; }
39696        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39697$as_echo "disabled" >&6; }
39698      else
39699        # Check if the provided tool contains a complete path.
39700        tool_specified="$STRIP"
39701        tool_basename="${tool_specified##*/}"
39702        if test "x$tool_basename" = "x$tool_specified"; then
39703          # A command without a complete path is provided, search $PATH.
39704          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39705$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39706          # Extract the first word of "$tool_basename", so it can be a program name with args.
39707set dummy $tool_basename; ac_word=$2
39708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39709$as_echo_n "checking for $ac_word... " >&6; }
39710if ${ac_cv_path_STRIP+:} false; then :
39711  $as_echo_n "(cached) " >&6
39712else
39713  case $STRIP in
39714  [\\/]* | ?:[\\/]*)
39715  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39716  ;;
39717  *)
39718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39719for as_dir in $PATH
39720do
39721  IFS=$as_save_IFS
39722  test -z "$as_dir" && as_dir=.
39723    for ac_exec_ext in '' $ac_executable_extensions; do
39724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39725    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39727    break 2
39728  fi
39729done
39730  done
39731IFS=$as_save_IFS
39732
39733  ;;
39734esac
39735fi
39736STRIP=$ac_cv_path_STRIP
39737if test -n "$STRIP"; then
39738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39739$as_echo "$STRIP" >&6; }
39740else
39741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39742$as_echo "no" >&6; }
39743fi
39744
39745
39746          if test "x$STRIP" = x; then
39747            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39748          fi
39749        else
39750          # Otherwise we believe it is a complete path. Use it as it is.
39751          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39752$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39753          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39754$as_echo_n "checking for STRIP... " >&6; }
39755          if test ! -x "$tool_specified"; then
39756            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39757$as_echo "not found" >&6; }
39758            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39759          fi
39760          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39761$as_echo "$tool_specified" >&6; }
39762        fi
39763      fi
39764    fi
39765
39766  fi
39767
39768
39769
39770  # Only process if variable expands to non-empty
39771
39772  if test "x$STRIP" != x; then
39773    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39774
39775  # First separate the path from the arguments. This will split at the first
39776  # space.
39777  complete="$STRIP"
39778  path="${complete%% *}"
39779  tmp="$complete EOL"
39780  arguments="${tmp#* }"
39781
39782  # Input might be given as Windows format, start by converting to
39783  # unix format.
39784  new_path=`$CYGPATH -u "$path"`
39785
39786  # Now try to locate executable using which
39787  new_path=`$WHICH "$new_path" 2> /dev/null`
39788  # bat and cmd files are not always considered executable in cygwin causing which
39789  # to not find them
39790  if test "x$new_path" = x \
39791      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39792      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39793    new_path=`$CYGPATH -u "$path"`
39794  fi
39795  if test "x$new_path" = x; then
39796    # Oops. Which didn't find the executable.
39797    # The splitting of arguments from the executable at a space might have been incorrect,
39798    # since paths with space are more likely in Windows. Give it another try with the whole
39799    # argument.
39800    path="$complete"
39801    arguments="EOL"
39802    new_path=`$CYGPATH -u "$path"`
39803    new_path=`$WHICH "$new_path" 2> /dev/null`
39804    # bat and cmd files are not always considered executable in cygwin causing which
39805    # to not find them
39806    if test "x$new_path" = x \
39807        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39808        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39809      new_path=`$CYGPATH -u "$path"`
39810    fi
39811    if test "x$new_path" = x; then
39812      # It's still not found. Now this is an unrecoverable error.
39813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39814$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39815      has_space=`$ECHO "$complete" | $GREP " "`
39816      if test "x$has_space" != x; then
39817        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39818$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39819      fi
39820      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39821    fi
39822  fi
39823
39824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39827  # "foo.exe" is OK but "foo" is an error.
39828  #
39829  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39830  # It is also a way to make sure we got the proper file name for the real test later on.
39831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39832  if test "x$test_shortpath" = x; then
39833    # Short path failed, file does not exist as specified.
39834    # Try adding .exe or .cmd
39835    if test -f "${new_path}.exe"; then
39836      input_to_shortpath="${new_path}.exe"
39837    elif test -f "${new_path}.cmd"; then
39838      input_to_shortpath="${new_path}.cmd"
39839    else
39840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39841$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39842      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39843$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39844      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39845    fi
39846  else
39847    input_to_shortpath="$new_path"
39848  fi
39849
39850  # Call helper function which possibly converts this using DOS-style short mode.
39851  # If so, the updated path is stored in $new_path.
39852  new_path="$input_to_shortpath"
39853
39854  input_path="$input_to_shortpath"
39855  # Check if we need to convert this using DOS-style short mode. If the path
39856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39857  # take no chances and rewrite it.
39858  # Note: m4 eats our [], so we need to use [ and ] instead.
39859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39860  if test "x$has_forbidden_chars" != x; then
39861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39862    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39863    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39864    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39865      # Going to short mode and back again did indeed matter. Since short mode is
39866      # case insensitive, let's make it lowercase to improve readability.
39867      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39868      # Now convert it back to Unix-style (cygpath)
39869      input_path=`$CYGPATH -u "$shortmode_path"`
39870      new_path="$input_path"
39871    fi
39872  fi
39873
39874  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39875  if test "x$test_cygdrive_prefix" = x; then
39876    # As a simple fix, exclude /usr/bin since it's not a real path.
39877    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39878      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39879      # a path prefixed by /cygdrive for fixpath to work.
39880      new_path="$CYGWIN_ROOT_PATH$input_path"
39881    fi
39882  fi
39883
39884  # remove trailing .exe if any
39885  new_path="${new_path/%.exe/}"
39886
39887    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39888
39889  # First separate the path from the arguments. This will split at the first
39890  # space.
39891  complete="$STRIP"
39892  path="${complete%% *}"
39893  tmp="$complete EOL"
39894  arguments="${tmp#* }"
39895
39896  # Input might be given as Windows format, start by converting to
39897  # unix format.
39898  new_path="$path"
39899
39900  windows_path="$new_path"
39901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39902    unix_path=`$CYGPATH -u "$windows_path"`
39903    new_path="$unix_path"
39904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39906    new_path="$unix_path"
39907  fi
39908
39909
39910  # Now try to locate executable using which
39911  new_path=`$WHICH "$new_path" 2> /dev/null`
39912
39913  if test "x$new_path" = x; then
39914    # Oops. Which didn't find the executable.
39915    # The splitting of arguments from the executable at a space might have been incorrect,
39916    # since paths with space are more likely in Windows. Give it another try with the whole
39917    # argument.
39918    path="$complete"
39919    arguments="EOL"
39920    new_path="$path"
39921
39922  windows_path="$new_path"
39923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39924    unix_path=`$CYGPATH -u "$windows_path"`
39925    new_path="$unix_path"
39926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39928    new_path="$unix_path"
39929  fi
39930
39931
39932    new_path=`$WHICH "$new_path" 2> /dev/null`
39933    # bat and cmd files are not always considered executable in MSYS causing which
39934    # to not find them
39935    if test "x$new_path" = x \
39936        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39937        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39938      new_path="$path"
39939
39940  windows_path="$new_path"
39941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39942    unix_path=`$CYGPATH -u "$windows_path"`
39943    new_path="$unix_path"
39944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39946    new_path="$unix_path"
39947  fi
39948
39949    fi
39950
39951    if test "x$new_path" = x; then
39952      # It's still not found. Now this is an unrecoverable error.
39953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39954$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39955      has_space=`$ECHO "$complete" | $GREP " "`
39956      if test "x$has_space" != x; then
39957        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39958$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39959      fi
39960      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39961    fi
39962  fi
39963
39964  # Now new_path has a complete unix path to the binary
39965  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39966    # Keep paths in /bin as-is, but remove trailing .exe if any
39967    new_path="${new_path/%.exe/}"
39968    # Do not save /bin paths to all_fixpath_prefixes!
39969  else
39970    # Not in mixed or Windows style, start by that.
39971    new_path=`cmd //c echo $new_path`
39972
39973  input_path="$new_path"
39974  # Check if we need to convert this using DOS-style short mode. If the path
39975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39976  # take no chances and rewrite it.
39977  # Note: m4 eats our [], so we need to use [ and ] instead.
39978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39979  if test "x$has_forbidden_chars" != x; then
39980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39982  fi
39983
39984    # Output is in $new_path
39985
39986  windows_path="$new_path"
39987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39988    unix_path=`$CYGPATH -u "$windows_path"`
39989    new_path="$unix_path"
39990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39992    new_path="$unix_path"
39993  fi
39994
39995    # remove trailing .exe if any
39996    new_path="${new_path/%.exe/}"
39997
39998    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39999    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40000  fi
40001
40002    else
40003      # We're on a unix platform. Hooray! :)
40004      # First separate the path from the arguments. This will split at the first
40005      # space.
40006      complete="$STRIP"
40007      path="${complete%% *}"
40008      tmp="$complete EOL"
40009      arguments="${tmp#* }"
40010
40011      # Cannot rely on the command "which" here since it doesn't always work.
40012      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40013      if test -z "$is_absolute_path"; then
40014        # Path to executable is not absolute. Find it.
40015        IFS_save="$IFS"
40016        IFS=:
40017        for p in $PATH; do
40018          if test -f "$p/$path" && test -x "$p/$path"; then
40019            new_path="$p/$path"
40020            break
40021          fi
40022        done
40023        IFS="$IFS_save"
40024      else
40025        # This is an absolute path, we can use it without further modifications.
40026        new_path="$path"
40027      fi
40028
40029      if test "x$new_path" = x; then
40030        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40031$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40032        has_space=`$ECHO "$complete" | $GREP " "`
40033        if test "x$has_space" != x; then
40034          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40035$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40036        fi
40037        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40038      fi
40039    fi
40040
40041    # Now join together the path and the arguments once again
40042    if test "x$arguments" != xEOL; then
40043      new_complete="$new_path ${arguments% *}"
40044    else
40045      new_complete="$new_path"
40046    fi
40047
40048    if test "x$complete" != "x$new_complete"; then
40049      STRIP="$new_complete"
40050      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40051$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40052    fi
40053  fi
40054
40055
40056
40057  # Publish this variable in the help.
40058
40059
40060  if [ -z "${NM+x}" ]; then
40061    # The variable is not set by user, try to locate tool using the code snippet
40062    for ac_prog in nm
40063do
40064  # Extract the first word of "$ac_prog", so it can be a program name with args.
40065set dummy $ac_prog; ac_word=$2
40066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40067$as_echo_n "checking for $ac_word... " >&6; }
40068if ${ac_cv_path_NM+:} false; then :
40069  $as_echo_n "(cached) " >&6
40070else
40071  case $NM in
40072  [\\/]* | ?:[\\/]*)
40073  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40074  ;;
40075  *)
40076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40077for as_dir in $PATH
40078do
40079  IFS=$as_save_IFS
40080  test -z "$as_dir" && as_dir=.
40081    for ac_exec_ext in '' $ac_executable_extensions; do
40082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40083    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40085    break 2
40086  fi
40087done
40088  done
40089IFS=$as_save_IFS
40090
40091  ;;
40092esac
40093fi
40094NM=$ac_cv_path_NM
40095if test -n "$NM"; then
40096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40097$as_echo "$NM" >&6; }
40098else
40099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40100$as_echo "no" >&6; }
40101fi
40102
40103
40104  test -n "$NM" && break
40105done
40106
40107  else
40108    # The variable is set, but is it from the command line or the environment?
40109
40110    # Try to remove the string !NM! from our list.
40111    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40112    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40113      # If it failed, the variable was not from the command line. Ignore it,
40114      # but warn the user (except for BASH, which is always set by the calling BASH).
40115      if test "xNM" != xBASH; then
40116        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40117$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40118      fi
40119      # Try to locate tool using the code snippet
40120      for ac_prog in nm
40121do
40122  # Extract the first word of "$ac_prog", so it can be a program name with args.
40123set dummy $ac_prog; ac_word=$2
40124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40125$as_echo_n "checking for $ac_word... " >&6; }
40126if ${ac_cv_path_NM+:} false; then :
40127  $as_echo_n "(cached) " >&6
40128else
40129  case $NM in
40130  [\\/]* | ?:[\\/]*)
40131  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40132  ;;
40133  *)
40134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40135for as_dir in $PATH
40136do
40137  IFS=$as_save_IFS
40138  test -z "$as_dir" && as_dir=.
40139    for ac_exec_ext in '' $ac_executable_extensions; do
40140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40141    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40143    break 2
40144  fi
40145done
40146  done
40147IFS=$as_save_IFS
40148
40149  ;;
40150esac
40151fi
40152NM=$ac_cv_path_NM
40153if test -n "$NM"; then
40154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40155$as_echo "$NM" >&6; }
40156else
40157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40158$as_echo "no" >&6; }
40159fi
40160
40161
40162  test -n "$NM" && break
40163done
40164
40165    else
40166      # If it succeeded, then it was overridden by the user. We will use it
40167      # for the tool.
40168
40169      # First remove it from the list of overridden variables, so we can test
40170      # for unknown variables in the end.
40171      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40172
40173      # Check if we try to supply an empty value
40174      if test "x$NM" = x; then
40175        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40176$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40177        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40178$as_echo_n "checking for NM... " >&6; }
40179        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40180$as_echo "disabled" >&6; }
40181      else
40182        # Check if the provided tool contains a complete path.
40183        tool_specified="$NM"
40184        tool_basename="${tool_specified##*/}"
40185        if test "x$tool_basename" = "x$tool_specified"; then
40186          # A command without a complete path is provided, search $PATH.
40187          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40188$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40189          # Extract the first word of "$tool_basename", so it can be a program name with args.
40190set dummy $tool_basename; ac_word=$2
40191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40192$as_echo_n "checking for $ac_word... " >&6; }
40193if ${ac_cv_path_NM+:} false; then :
40194  $as_echo_n "(cached) " >&6
40195else
40196  case $NM in
40197  [\\/]* | ?:[\\/]*)
40198  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40199  ;;
40200  *)
40201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40202for as_dir in $PATH
40203do
40204  IFS=$as_save_IFS
40205  test -z "$as_dir" && as_dir=.
40206    for ac_exec_ext in '' $ac_executable_extensions; do
40207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40208    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40210    break 2
40211  fi
40212done
40213  done
40214IFS=$as_save_IFS
40215
40216  ;;
40217esac
40218fi
40219NM=$ac_cv_path_NM
40220if test -n "$NM"; then
40221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40222$as_echo "$NM" >&6; }
40223else
40224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40225$as_echo "no" >&6; }
40226fi
40227
40228
40229          if test "x$NM" = x; then
40230            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40231          fi
40232        else
40233          # Otherwise we believe it is a complete path. Use it as it is.
40234          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40235$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40236          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40237$as_echo_n "checking for NM... " >&6; }
40238          if test ! -x "$tool_specified"; then
40239            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40240$as_echo "not found" >&6; }
40241            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40242          fi
40243          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40244$as_echo "$tool_specified" >&6; }
40245        fi
40246      fi
40247    fi
40248
40249  fi
40250
40251
40252
40253  # Only process if variable expands to non-empty
40254
40255  if test "x$NM" != x; then
40256    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40257
40258  # First separate the path from the arguments. This will split at the first
40259  # space.
40260  complete="$NM"
40261  path="${complete%% *}"
40262  tmp="$complete EOL"
40263  arguments="${tmp#* }"
40264
40265  # Input might be given as Windows format, start by converting to
40266  # unix format.
40267  new_path=`$CYGPATH -u "$path"`
40268
40269  # Now try to locate executable using which
40270  new_path=`$WHICH "$new_path" 2> /dev/null`
40271  # bat and cmd files are not always considered executable in cygwin causing which
40272  # to not find them
40273  if test "x$new_path" = x \
40274      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40275      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40276    new_path=`$CYGPATH -u "$path"`
40277  fi
40278  if test "x$new_path" = x; then
40279    # Oops. Which didn't find the executable.
40280    # The splitting of arguments from the executable at a space might have been incorrect,
40281    # since paths with space are more likely in Windows. Give it another try with the whole
40282    # argument.
40283    path="$complete"
40284    arguments="EOL"
40285    new_path=`$CYGPATH -u "$path"`
40286    new_path=`$WHICH "$new_path" 2> /dev/null`
40287    # bat and cmd files are not always considered executable in cygwin causing which
40288    # to not find them
40289    if test "x$new_path" = x \
40290        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40291        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40292      new_path=`$CYGPATH -u "$path"`
40293    fi
40294    if test "x$new_path" = x; then
40295      # It's still not found. Now this is an unrecoverable error.
40296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40297$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40298      has_space=`$ECHO "$complete" | $GREP " "`
40299      if test "x$has_space" != x; then
40300        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40301$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40302      fi
40303      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40304    fi
40305  fi
40306
40307  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40308  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40309  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40310  # "foo.exe" is OK but "foo" is an error.
40311  #
40312  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40313  # It is also a way to make sure we got the proper file name for the real test later on.
40314  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40315  if test "x$test_shortpath" = x; then
40316    # Short path failed, file does not exist as specified.
40317    # Try adding .exe or .cmd
40318    if test -f "${new_path}.exe"; then
40319      input_to_shortpath="${new_path}.exe"
40320    elif test -f "${new_path}.cmd"; then
40321      input_to_shortpath="${new_path}.cmd"
40322    else
40323      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40324$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40325      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40326$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40327      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40328    fi
40329  else
40330    input_to_shortpath="$new_path"
40331  fi
40332
40333  # Call helper function which possibly converts this using DOS-style short mode.
40334  # If so, the updated path is stored in $new_path.
40335  new_path="$input_to_shortpath"
40336
40337  input_path="$input_to_shortpath"
40338  # Check if we need to convert this using DOS-style short mode. If the path
40339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40340  # take no chances and rewrite it.
40341  # Note: m4 eats our [], so we need to use [ and ] instead.
40342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40343  if test "x$has_forbidden_chars" != x; then
40344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40345    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40346    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40347    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40348      # Going to short mode and back again did indeed matter. Since short mode is
40349      # case insensitive, let's make it lowercase to improve readability.
40350      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40351      # Now convert it back to Unix-style (cygpath)
40352      input_path=`$CYGPATH -u "$shortmode_path"`
40353      new_path="$input_path"
40354    fi
40355  fi
40356
40357  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40358  if test "x$test_cygdrive_prefix" = x; then
40359    # As a simple fix, exclude /usr/bin since it's not a real path.
40360    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40361      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40362      # a path prefixed by /cygdrive for fixpath to work.
40363      new_path="$CYGWIN_ROOT_PATH$input_path"
40364    fi
40365  fi
40366
40367  # remove trailing .exe if any
40368  new_path="${new_path/%.exe/}"
40369
40370    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40371
40372  # First separate the path from the arguments. This will split at the first
40373  # space.
40374  complete="$NM"
40375  path="${complete%% *}"
40376  tmp="$complete EOL"
40377  arguments="${tmp#* }"
40378
40379  # Input might be given as Windows format, start by converting to
40380  # unix format.
40381  new_path="$path"
40382
40383  windows_path="$new_path"
40384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40385    unix_path=`$CYGPATH -u "$windows_path"`
40386    new_path="$unix_path"
40387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40389    new_path="$unix_path"
40390  fi
40391
40392
40393  # Now try to locate executable using which
40394  new_path=`$WHICH "$new_path" 2> /dev/null`
40395
40396  if test "x$new_path" = x; then
40397    # Oops. Which didn't find the executable.
40398    # The splitting of arguments from the executable at a space might have been incorrect,
40399    # since paths with space are more likely in Windows. Give it another try with the whole
40400    # argument.
40401    path="$complete"
40402    arguments="EOL"
40403    new_path="$path"
40404
40405  windows_path="$new_path"
40406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40407    unix_path=`$CYGPATH -u "$windows_path"`
40408    new_path="$unix_path"
40409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40411    new_path="$unix_path"
40412  fi
40413
40414
40415    new_path=`$WHICH "$new_path" 2> /dev/null`
40416    # bat and cmd files are not always considered executable in MSYS causing which
40417    # to not find them
40418    if test "x$new_path" = x \
40419        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40420        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40421      new_path="$path"
40422
40423  windows_path="$new_path"
40424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40425    unix_path=`$CYGPATH -u "$windows_path"`
40426    new_path="$unix_path"
40427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40429    new_path="$unix_path"
40430  fi
40431
40432    fi
40433
40434    if test "x$new_path" = x; then
40435      # It's still not found. Now this is an unrecoverable error.
40436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40437$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40438      has_space=`$ECHO "$complete" | $GREP " "`
40439      if test "x$has_space" != x; then
40440        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40441$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40442      fi
40443      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40444    fi
40445  fi
40446
40447  # Now new_path has a complete unix path to the binary
40448  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40449    # Keep paths in /bin as-is, but remove trailing .exe if any
40450    new_path="${new_path/%.exe/}"
40451    # Do not save /bin paths to all_fixpath_prefixes!
40452  else
40453    # Not in mixed or Windows style, start by that.
40454    new_path=`cmd //c echo $new_path`
40455
40456  input_path="$new_path"
40457  # Check if we need to convert this using DOS-style short mode. If the path
40458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40459  # take no chances and rewrite it.
40460  # Note: m4 eats our [], so we need to use [ and ] instead.
40461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40462  if test "x$has_forbidden_chars" != x; then
40463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40464    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40465  fi
40466
40467    # Output is in $new_path
40468
40469  windows_path="$new_path"
40470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40471    unix_path=`$CYGPATH -u "$windows_path"`
40472    new_path="$unix_path"
40473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40475    new_path="$unix_path"
40476  fi
40477
40478    # remove trailing .exe if any
40479    new_path="${new_path/%.exe/}"
40480
40481    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40482    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40483  fi
40484
40485    else
40486      # We're on a unix platform. Hooray! :)
40487      # First separate the path from the arguments. This will split at the first
40488      # space.
40489      complete="$NM"
40490      path="${complete%% *}"
40491      tmp="$complete EOL"
40492      arguments="${tmp#* }"
40493
40494      # Cannot rely on the command "which" here since it doesn't always work.
40495      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40496      if test -z "$is_absolute_path"; then
40497        # Path to executable is not absolute. Find it.
40498        IFS_save="$IFS"
40499        IFS=:
40500        for p in $PATH; do
40501          if test -f "$p/$path" && test -x "$p/$path"; then
40502            new_path="$p/$path"
40503            break
40504          fi
40505        done
40506        IFS="$IFS_save"
40507      else
40508        # This is an absolute path, we can use it without further modifications.
40509        new_path="$path"
40510      fi
40511
40512      if test "x$new_path" = x; then
40513        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40514$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40515        has_space=`$ECHO "$complete" | $GREP " "`
40516        if test "x$has_space" != x; then
40517          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40518$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40519        fi
40520        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40521      fi
40522    fi
40523
40524    # Now join together the path and the arguments once again
40525    if test "x$arguments" != xEOL; then
40526      new_complete="$new_path ${arguments% *}"
40527    else
40528      new_complete="$new_path"
40529    fi
40530
40531    if test "x$complete" != "x$new_complete"; then
40532      NM="$new_complete"
40533      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40534$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40535    fi
40536  fi
40537
40538
40539
40540  # Publish this variable in the help.
40541
40542
40543  if [ -z "${GNM+x}" ]; then
40544    # The variable is not set by user, try to locate tool using the code snippet
40545    for ac_prog in gnm
40546do
40547  # Extract the first word of "$ac_prog", so it can be a program name with args.
40548set dummy $ac_prog; ac_word=$2
40549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40550$as_echo_n "checking for $ac_word... " >&6; }
40551if ${ac_cv_path_GNM+:} false; then :
40552  $as_echo_n "(cached) " >&6
40553else
40554  case $GNM in
40555  [\\/]* | ?:[\\/]*)
40556  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40557  ;;
40558  *)
40559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40560for as_dir in $PATH
40561do
40562  IFS=$as_save_IFS
40563  test -z "$as_dir" && as_dir=.
40564    for ac_exec_ext in '' $ac_executable_extensions; do
40565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40566    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40568    break 2
40569  fi
40570done
40571  done
40572IFS=$as_save_IFS
40573
40574  ;;
40575esac
40576fi
40577GNM=$ac_cv_path_GNM
40578if test -n "$GNM"; then
40579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40580$as_echo "$GNM" >&6; }
40581else
40582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40583$as_echo "no" >&6; }
40584fi
40585
40586
40587  test -n "$GNM" && break
40588done
40589
40590  else
40591    # The variable is set, but is it from the command line or the environment?
40592
40593    # Try to remove the string !GNM! from our list.
40594    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40595    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40596      # If it failed, the variable was not from the command line. Ignore it,
40597      # but warn the user (except for BASH, which is always set by the calling BASH).
40598      if test "xGNM" != xBASH; then
40599        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40600$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40601      fi
40602      # Try to locate tool using the code snippet
40603      for ac_prog in gnm
40604do
40605  # Extract the first word of "$ac_prog", so it can be a program name with args.
40606set dummy $ac_prog; ac_word=$2
40607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40608$as_echo_n "checking for $ac_word... " >&6; }
40609if ${ac_cv_path_GNM+:} false; then :
40610  $as_echo_n "(cached) " >&6
40611else
40612  case $GNM in
40613  [\\/]* | ?:[\\/]*)
40614  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40615  ;;
40616  *)
40617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40618for as_dir in $PATH
40619do
40620  IFS=$as_save_IFS
40621  test -z "$as_dir" && as_dir=.
40622    for ac_exec_ext in '' $ac_executable_extensions; do
40623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40624    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40626    break 2
40627  fi
40628done
40629  done
40630IFS=$as_save_IFS
40631
40632  ;;
40633esac
40634fi
40635GNM=$ac_cv_path_GNM
40636if test -n "$GNM"; then
40637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40638$as_echo "$GNM" >&6; }
40639else
40640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40641$as_echo "no" >&6; }
40642fi
40643
40644
40645  test -n "$GNM" && break
40646done
40647
40648    else
40649      # If it succeeded, then it was overridden by the user. We will use it
40650      # for the tool.
40651
40652      # First remove it from the list of overridden variables, so we can test
40653      # for unknown variables in the end.
40654      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40655
40656      # Check if we try to supply an empty value
40657      if test "x$GNM" = x; then
40658        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40659$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40660        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40661$as_echo_n "checking for GNM... " >&6; }
40662        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40663$as_echo "disabled" >&6; }
40664      else
40665        # Check if the provided tool contains a complete path.
40666        tool_specified="$GNM"
40667        tool_basename="${tool_specified##*/}"
40668        if test "x$tool_basename" = "x$tool_specified"; then
40669          # A command without a complete path is provided, search $PATH.
40670          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40671$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40672          # Extract the first word of "$tool_basename", so it can be a program name with args.
40673set dummy $tool_basename; ac_word=$2
40674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40675$as_echo_n "checking for $ac_word... " >&6; }
40676if ${ac_cv_path_GNM+:} false; then :
40677  $as_echo_n "(cached) " >&6
40678else
40679  case $GNM in
40680  [\\/]* | ?:[\\/]*)
40681  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40682  ;;
40683  *)
40684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40685for as_dir in $PATH
40686do
40687  IFS=$as_save_IFS
40688  test -z "$as_dir" && as_dir=.
40689    for ac_exec_ext in '' $ac_executable_extensions; do
40690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40691    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40693    break 2
40694  fi
40695done
40696  done
40697IFS=$as_save_IFS
40698
40699  ;;
40700esac
40701fi
40702GNM=$ac_cv_path_GNM
40703if test -n "$GNM"; then
40704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40705$as_echo "$GNM" >&6; }
40706else
40707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40708$as_echo "no" >&6; }
40709fi
40710
40711
40712          if test "x$GNM" = x; then
40713            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40714          fi
40715        else
40716          # Otherwise we believe it is a complete path. Use it as it is.
40717          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40718$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40719          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40720$as_echo_n "checking for GNM... " >&6; }
40721          if test ! -x "$tool_specified"; then
40722            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40723$as_echo "not found" >&6; }
40724            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40725          fi
40726          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40727$as_echo "$tool_specified" >&6; }
40728        fi
40729      fi
40730    fi
40731
40732  fi
40733
40734
40735
40736  # Only process if variable expands to non-empty
40737
40738  if test "x$GNM" != x; then
40739    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40740
40741  # First separate the path from the arguments. This will split at the first
40742  # space.
40743  complete="$GNM"
40744  path="${complete%% *}"
40745  tmp="$complete EOL"
40746  arguments="${tmp#* }"
40747
40748  # Input might be given as Windows format, start by converting to
40749  # unix format.
40750  new_path=`$CYGPATH -u "$path"`
40751
40752  # Now try to locate executable using which
40753  new_path=`$WHICH "$new_path" 2> /dev/null`
40754  # bat and cmd files are not always considered executable in cygwin causing which
40755  # to not find them
40756  if test "x$new_path" = x \
40757      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40758      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40759    new_path=`$CYGPATH -u "$path"`
40760  fi
40761  if test "x$new_path" = x; then
40762    # Oops. Which didn't find the executable.
40763    # The splitting of arguments from the executable at a space might have been incorrect,
40764    # since paths with space are more likely in Windows. Give it another try with the whole
40765    # argument.
40766    path="$complete"
40767    arguments="EOL"
40768    new_path=`$CYGPATH -u "$path"`
40769    new_path=`$WHICH "$new_path" 2> /dev/null`
40770    # bat and cmd files are not always considered executable in cygwin causing which
40771    # to not find them
40772    if test "x$new_path" = x \
40773        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40774        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40775      new_path=`$CYGPATH -u "$path"`
40776    fi
40777    if test "x$new_path" = x; then
40778      # It's still not found. Now this is an unrecoverable error.
40779      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40780$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40781      has_space=`$ECHO "$complete" | $GREP " "`
40782      if test "x$has_space" != x; then
40783        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40784$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40785      fi
40786      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40787    fi
40788  fi
40789
40790  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40791  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40792  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40793  # "foo.exe" is OK but "foo" is an error.
40794  #
40795  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40796  # It is also a way to make sure we got the proper file name for the real test later on.
40797  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40798  if test "x$test_shortpath" = x; then
40799    # Short path failed, file does not exist as specified.
40800    # Try adding .exe or .cmd
40801    if test -f "${new_path}.exe"; then
40802      input_to_shortpath="${new_path}.exe"
40803    elif test -f "${new_path}.cmd"; then
40804      input_to_shortpath="${new_path}.cmd"
40805    else
40806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40807$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40808      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40809$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40810      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40811    fi
40812  else
40813    input_to_shortpath="$new_path"
40814  fi
40815
40816  # Call helper function which possibly converts this using DOS-style short mode.
40817  # If so, the updated path is stored in $new_path.
40818  new_path="$input_to_shortpath"
40819
40820  input_path="$input_to_shortpath"
40821  # Check if we need to convert this using DOS-style short mode. If the path
40822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40823  # take no chances and rewrite it.
40824  # Note: m4 eats our [], so we need to use [ and ] instead.
40825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40826  if test "x$has_forbidden_chars" != x; then
40827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40828    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40829    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40830    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40831      # Going to short mode and back again did indeed matter. Since short mode is
40832      # case insensitive, let's make it lowercase to improve readability.
40833      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40834      # Now convert it back to Unix-style (cygpath)
40835      input_path=`$CYGPATH -u "$shortmode_path"`
40836      new_path="$input_path"
40837    fi
40838  fi
40839
40840  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40841  if test "x$test_cygdrive_prefix" = x; then
40842    # As a simple fix, exclude /usr/bin since it's not a real path.
40843    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40844      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40845      # a path prefixed by /cygdrive for fixpath to work.
40846      new_path="$CYGWIN_ROOT_PATH$input_path"
40847    fi
40848  fi
40849
40850  # remove trailing .exe if any
40851  new_path="${new_path/%.exe/}"
40852
40853    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40854
40855  # First separate the path from the arguments. This will split at the first
40856  # space.
40857  complete="$GNM"
40858  path="${complete%% *}"
40859  tmp="$complete EOL"
40860  arguments="${tmp#* }"
40861
40862  # Input might be given as Windows format, start by converting to
40863  # unix format.
40864  new_path="$path"
40865
40866  windows_path="$new_path"
40867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40868    unix_path=`$CYGPATH -u "$windows_path"`
40869    new_path="$unix_path"
40870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40872    new_path="$unix_path"
40873  fi
40874
40875
40876  # Now try to locate executable using which
40877  new_path=`$WHICH "$new_path" 2> /dev/null`
40878
40879  if test "x$new_path" = x; then
40880    # Oops. Which didn't find the executable.
40881    # The splitting of arguments from the executable at a space might have been incorrect,
40882    # since paths with space are more likely in Windows. Give it another try with the whole
40883    # argument.
40884    path="$complete"
40885    arguments="EOL"
40886    new_path="$path"
40887
40888  windows_path="$new_path"
40889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40890    unix_path=`$CYGPATH -u "$windows_path"`
40891    new_path="$unix_path"
40892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40894    new_path="$unix_path"
40895  fi
40896
40897
40898    new_path=`$WHICH "$new_path" 2> /dev/null`
40899    # bat and cmd files are not always considered executable in MSYS causing which
40900    # to not find them
40901    if test "x$new_path" = x \
40902        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40903        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40904      new_path="$path"
40905
40906  windows_path="$new_path"
40907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40908    unix_path=`$CYGPATH -u "$windows_path"`
40909    new_path="$unix_path"
40910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40912    new_path="$unix_path"
40913  fi
40914
40915    fi
40916
40917    if test "x$new_path" = x; then
40918      # It's still not found. Now this is an unrecoverable error.
40919      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40920$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40921      has_space=`$ECHO "$complete" | $GREP " "`
40922      if test "x$has_space" != x; then
40923        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40924$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40925      fi
40926      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40927    fi
40928  fi
40929
40930  # Now new_path has a complete unix path to the binary
40931  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40932    # Keep paths in /bin as-is, but remove trailing .exe if any
40933    new_path="${new_path/%.exe/}"
40934    # Do not save /bin paths to all_fixpath_prefixes!
40935  else
40936    # Not in mixed or Windows style, start by that.
40937    new_path=`cmd //c echo $new_path`
40938
40939  input_path="$new_path"
40940  # Check if we need to convert this using DOS-style short mode. If the path
40941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40942  # take no chances and rewrite it.
40943  # Note: m4 eats our [], so we need to use [ and ] instead.
40944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40945  if test "x$has_forbidden_chars" != x; then
40946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40947    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40948  fi
40949
40950    # Output is in $new_path
40951
40952  windows_path="$new_path"
40953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40954    unix_path=`$CYGPATH -u "$windows_path"`
40955    new_path="$unix_path"
40956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40958    new_path="$unix_path"
40959  fi
40960
40961    # remove trailing .exe if any
40962    new_path="${new_path/%.exe/}"
40963
40964    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40965    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40966  fi
40967
40968    else
40969      # We're on a unix platform. Hooray! :)
40970      # First separate the path from the arguments. This will split at the first
40971      # space.
40972      complete="$GNM"
40973      path="${complete%% *}"
40974      tmp="$complete EOL"
40975      arguments="${tmp#* }"
40976
40977      # Cannot rely on the command "which" here since it doesn't always work.
40978      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40979      if test -z "$is_absolute_path"; then
40980        # Path to executable is not absolute. Find it.
40981        IFS_save="$IFS"
40982        IFS=:
40983        for p in $PATH; do
40984          if test -f "$p/$path" && test -x "$p/$path"; then
40985            new_path="$p/$path"
40986            break
40987          fi
40988        done
40989        IFS="$IFS_save"
40990      else
40991        # This is an absolute path, we can use it without further modifications.
40992        new_path="$path"
40993      fi
40994
40995      if test "x$new_path" = x; then
40996        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40997$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40998        has_space=`$ECHO "$complete" | $GREP " "`
40999        if test "x$has_space" != x; then
41000          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41001$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41002        fi
41003        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41004      fi
41005    fi
41006
41007    # Now join together the path and the arguments once again
41008    if test "x$arguments" != xEOL; then
41009      new_complete="$new_path ${arguments% *}"
41010    else
41011      new_complete="$new_path"
41012    fi
41013
41014    if test "x$complete" != "x$new_complete"; then
41015      GNM="$new_complete"
41016      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41017$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41018    fi
41019  fi
41020
41021  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41022    # FIXME: we should unify this with the solaris case above.
41023
41024
41025  # Publish this variable in the help.
41026
41027
41028  if [ -z "${STRIP+x}" ]; then
41029    # The variable is not set by user, try to locate tool using the code snippet
41030    if test -n "$ac_tool_prefix"; then
41031  for ac_prog in strip
41032  do
41033    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41034set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41036$as_echo_n "checking for $ac_word... " >&6; }
41037if ${ac_cv_prog_STRIP+:} false; then :
41038  $as_echo_n "(cached) " >&6
41039else
41040  if test -n "$STRIP"; then
41041  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41042else
41043as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41044for as_dir in $PATH
41045do
41046  IFS=$as_save_IFS
41047  test -z "$as_dir" && as_dir=.
41048    for ac_exec_ext in '' $ac_executable_extensions; do
41049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41050    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41052    break 2
41053  fi
41054done
41055  done
41056IFS=$as_save_IFS
41057
41058fi
41059fi
41060STRIP=$ac_cv_prog_STRIP
41061if test -n "$STRIP"; then
41062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41063$as_echo "$STRIP" >&6; }
41064else
41065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41066$as_echo "no" >&6; }
41067fi
41068
41069
41070    test -n "$STRIP" && break
41071  done
41072fi
41073if test -z "$STRIP"; then
41074  ac_ct_STRIP=$STRIP
41075  for ac_prog in strip
41076do
41077  # Extract the first word of "$ac_prog", so it can be a program name with args.
41078set dummy $ac_prog; ac_word=$2
41079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41080$as_echo_n "checking for $ac_word... " >&6; }
41081if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41082  $as_echo_n "(cached) " >&6
41083else
41084  if test -n "$ac_ct_STRIP"; then
41085  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41086else
41087as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41088for as_dir in $PATH
41089do
41090  IFS=$as_save_IFS
41091  test -z "$as_dir" && as_dir=.
41092    for ac_exec_ext in '' $ac_executable_extensions; do
41093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41094    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41096    break 2
41097  fi
41098done
41099  done
41100IFS=$as_save_IFS
41101
41102fi
41103fi
41104ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41105if test -n "$ac_ct_STRIP"; then
41106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41107$as_echo "$ac_ct_STRIP" >&6; }
41108else
41109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41110$as_echo "no" >&6; }
41111fi
41112
41113
41114  test -n "$ac_ct_STRIP" && break
41115done
41116
41117  if test "x$ac_ct_STRIP" = x; then
41118    STRIP=""
41119  else
41120    case $cross_compiling:$ac_tool_warned in
41121yes:)
41122{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41123$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41124ac_tool_warned=yes ;;
41125esac
41126    STRIP=$ac_ct_STRIP
41127  fi
41128fi
41129
41130  else
41131    # The variable is set, but is it from the command line or the environment?
41132
41133    # Try to remove the string !STRIP! from our list.
41134    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41135    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41136      # If it failed, the variable was not from the command line. Ignore it,
41137      # but warn the user (except for BASH, which is always set by the calling BASH).
41138      if test "xSTRIP" != xBASH; then
41139        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41140$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41141      fi
41142      # Try to locate tool using the code snippet
41143      if test -n "$ac_tool_prefix"; then
41144  for ac_prog in strip
41145  do
41146    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41147set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41149$as_echo_n "checking for $ac_word... " >&6; }
41150if ${ac_cv_prog_STRIP+:} false; then :
41151  $as_echo_n "(cached) " >&6
41152else
41153  if test -n "$STRIP"; then
41154  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41155else
41156as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41157for as_dir in $PATH
41158do
41159  IFS=$as_save_IFS
41160  test -z "$as_dir" && as_dir=.
41161    for ac_exec_ext in '' $ac_executable_extensions; do
41162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41163    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41165    break 2
41166  fi
41167done
41168  done
41169IFS=$as_save_IFS
41170
41171fi
41172fi
41173STRIP=$ac_cv_prog_STRIP
41174if test -n "$STRIP"; then
41175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41176$as_echo "$STRIP" >&6; }
41177else
41178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41179$as_echo "no" >&6; }
41180fi
41181
41182
41183    test -n "$STRIP" && break
41184  done
41185fi
41186if test -z "$STRIP"; then
41187  ac_ct_STRIP=$STRIP
41188  for ac_prog in strip
41189do
41190  # Extract the first word of "$ac_prog", so it can be a program name with args.
41191set dummy $ac_prog; ac_word=$2
41192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41193$as_echo_n "checking for $ac_word... " >&6; }
41194if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41195  $as_echo_n "(cached) " >&6
41196else
41197  if test -n "$ac_ct_STRIP"; then
41198  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41199else
41200as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41201for as_dir in $PATH
41202do
41203  IFS=$as_save_IFS
41204  test -z "$as_dir" && as_dir=.
41205    for ac_exec_ext in '' $ac_executable_extensions; do
41206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41207    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41209    break 2
41210  fi
41211done
41212  done
41213IFS=$as_save_IFS
41214
41215fi
41216fi
41217ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41218if test -n "$ac_ct_STRIP"; then
41219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41220$as_echo "$ac_ct_STRIP" >&6; }
41221else
41222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41223$as_echo "no" >&6; }
41224fi
41225
41226
41227  test -n "$ac_ct_STRIP" && break
41228done
41229
41230  if test "x$ac_ct_STRIP" = x; then
41231    STRIP=""
41232  else
41233    case $cross_compiling:$ac_tool_warned in
41234yes:)
41235{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41236$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41237ac_tool_warned=yes ;;
41238esac
41239    STRIP=$ac_ct_STRIP
41240  fi
41241fi
41242
41243    else
41244      # If it succeeded, then it was overridden by the user. We will use it
41245      # for the tool.
41246
41247      # First remove it from the list of overridden variables, so we can test
41248      # for unknown variables in the end.
41249      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41250
41251      # Check if we try to supply an empty value
41252      if test "x$STRIP" = x; then
41253        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41254$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41255        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41256$as_echo_n "checking for STRIP... " >&6; }
41257        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41258$as_echo "disabled" >&6; }
41259      else
41260        # Check if the provided tool contains a complete path.
41261        tool_specified="$STRIP"
41262        tool_basename="${tool_specified##*/}"
41263        if test "x$tool_basename" = "x$tool_specified"; then
41264          # A command without a complete path is provided, search $PATH.
41265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41266$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41267          # Extract the first word of "$tool_basename", so it can be a program name with args.
41268set dummy $tool_basename; ac_word=$2
41269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41270$as_echo_n "checking for $ac_word... " >&6; }
41271if ${ac_cv_path_STRIP+:} false; then :
41272  $as_echo_n "(cached) " >&6
41273else
41274  case $STRIP in
41275  [\\/]* | ?:[\\/]*)
41276  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41277  ;;
41278  *)
41279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41280for as_dir in $PATH
41281do
41282  IFS=$as_save_IFS
41283  test -z "$as_dir" && as_dir=.
41284    for ac_exec_ext in '' $ac_executable_extensions; do
41285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41286    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41288    break 2
41289  fi
41290done
41291  done
41292IFS=$as_save_IFS
41293
41294  ;;
41295esac
41296fi
41297STRIP=$ac_cv_path_STRIP
41298if test -n "$STRIP"; then
41299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41300$as_echo "$STRIP" >&6; }
41301else
41302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41303$as_echo "no" >&6; }
41304fi
41305
41306
41307          if test "x$STRIP" = x; then
41308            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41309          fi
41310        else
41311          # Otherwise we believe it is a complete path. Use it as it is.
41312          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41313$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41314          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41315$as_echo_n "checking for STRIP... " >&6; }
41316          if test ! -x "$tool_specified"; then
41317            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41318$as_echo "not found" >&6; }
41319            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41320          fi
41321          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41322$as_echo "$tool_specified" >&6; }
41323        fi
41324      fi
41325    fi
41326
41327  fi
41328
41329
41330
41331  # Only process if variable expands to non-empty
41332
41333  if test "x$STRIP" != x; then
41334    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41335
41336  # First separate the path from the arguments. This will split at the first
41337  # space.
41338  complete="$STRIP"
41339  path="${complete%% *}"
41340  tmp="$complete EOL"
41341  arguments="${tmp#* }"
41342
41343  # Input might be given as Windows format, start by converting to
41344  # unix format.
41345  new_path=`$CYGPATH -u "$path"`
41346
41347  # Now try to locate executable using which
41348  new_path=`$WHICH "$new_path" 2> /dev/null`
41349  # bat and cmd files are not always considered executable in cygwin causing which
41350  # to not find them
41351  if test "x$new_path" = x \
41352      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41353      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41354    new_path=`$CYGPATH -u "$path"`
41355  fi
41356  if test "x$new_path" = x; then
41357    # Oops. Which didn't find the executable.
41358    # The splitting of arguments from the executable at a space might have been incorrect,
41359    # since paths with space are more likely in Windows. Give it another try with the whole
41360    # argument.
41361    path="$complete"
41362    arguments="EOL"
41363    new_path=`$CYGPATH -u "$path"`
41364    new_path=`$WHICH "$new_path" 2> /dev/null`
41365    # bat and cmd files are not always considered executable in cygwin causing which
41366    # to not find them
41367    if test "x$new_path" = x \
41368        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41369        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41370      new_path=`$CYGPATH -u "$path"`
41371    fi
41372    if test "x$new_path" = x; then
41373      # It's still not found. Now this is an unrecoverable error.
41374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41375$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41376      has_space=`$ECHO "$complete" | $GREP " "`
41377      if test "x$has_space" != x; then
41378        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41379$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41380      fi
41381      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41382    fi
41383  fi
41384
41385  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41386  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41387  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41388  # "foo.exe" is OK but "foo" is an error.
41389  #
41390  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41391  # It is also a way to make sure we got the proper file name for the real test later on.
41392  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41393  if test "x$test_shortpath" = x; then
41394    # Short path failed, file does not exist as specified.
41395    # Try adding .exe or .cmd
41396    if test -f "${new_path}.exe"; then
41397      input_to_shortpath="${new_path}.exe"
41398    elif test -f "${new_path}.cmd"; then
41399      input_to_shortpath="${new_path}.cmd"
41400    else
41401      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41402$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41403      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41404$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41405      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41406    fi
41407  else
41408    input_to_shortpath="$new_path"
41409  fi
41410
41411  # Call helper function which possibly converts this using DOS-style short mode.
41412  # If so, the updated path is stored in $new_path.
41413  new_path="$input_to_shortpath"
41414
41415  input_path="$input_to_shortpath"
41416  # Check if we need to convert this using DOS-style short mode. If the path
41417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41418  # take no chances and rewrite it.
41419  # Note: m4 eats our [], so we need to use [ and ] instead.
41420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41421  if test "x$has_forbidden_chars" != x; then
41422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41423    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41424    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41425    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41426      # Going to short mode and back again did indeed matter. Since short mode is
41427      # case insensitive, let's make it lowercase to improve readability.
41428      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41429      # Now convert it back to Unix-style (cygpath)
41430      input_path=`$CYGPATH -u "$shortmode_path"`
41431      new_path="$input_path"
41432    fi
41433  fi
41434
41435  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41436  if test "x$test_cygdrive_prefix" = x; then
41437    # As a simple fix, exclude /usr/bin since it's not a real path.
41438    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41439      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41440      # a path prefixed by /cygdrive for fixpath to work.
41441      new_path="$CYGWIN_ROOT_PATH$input_path"
41442    fi
41443  fi
41444
41445  # remove trailing .exe if any
41446  new_path="${new_path/%.exe/}"
41447
41448    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41449
41450  # First separate the path from the arguments. This will split at the first
41451  # space.
41452  complete="$STRIP"
41453  path="${complete%% *}"
41454  tmp="$complete EOL"
41455  arguments="${tmp#* }"
41456
41457  # Input might be given as Windows format, start by converting to
41458  # unix format.
41459  new_path="$path"
41460
41461  windows_path="$new_path"
41462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41463    unix_path=`$CYGPATH -u "$windows_path"`
41464    new_path="$unix_path"
41465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41467    new_path="$unix_path"
41468  fi
41469
41470
41471  # Now try to locate executable using which
41472  new_path=`$WHICH "$new_path" 2> /dev/null`
41473
41474  if test "x$new_path" = x; then
41475    # Oops. Which didn't find the executable.
41476    # The splitting of arguments from the executable at a space might have been incorrect,
41477    # since paths with space are more likely in Windows. Give it another try with the whole
41478    # argument.
41479    path="$complete"
41480    arguments="EOL"
41481    new_path="$path"
41482
41483  windows_path="$new_path"
41484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41485    unix_path=`$CYGPATH -u "$windows_path"`
41486    new_path="$unix_path"
41487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41489    new_path="$unix_path"
41490  fi
41491
41492
41493    new_path=`$WHICH "$new_path" 2> /dev/null`
41494    # bat and cmd files are not always considered executable in MSYS causing which
41495    # to not find them
41496    if test "x$new_path" = x \
41497        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41498        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41499      new_path="$path"
41500
41501  windows_path="$new_path"
41502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41503    unix_path=`$CYGPATH -u "$windows_path"`
41504    new_path="$unix_path"
41505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41507    new_path="$unix_path"
41508  fi
41509
41510    fi
41511
41512    if test "x$new_path" = x; then
41513      # It's still not found. Now this is an unrecoverable error.
41514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41515$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41516      has_space=`$ECHO "$complete" | $GREP " "`
41517      if test "x$has_space" != x; then
41518        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41519$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41520      fi
41521      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41522    fi
41523  fi
41524
41525  # Now new_path has a complete unix path to the binary
41526  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41527    # Keep paths in /bin as-is, but remove trailing .exe if any
41528    new_path="${new_path/%.exe/}"
41529    # Do not save /bin paths to all_fixpath_prefixes!
41530  else
41531    # Not in mixed or Windows style, start by that.
41532    new_path=`cmd //c echo $new_path`
41533
41534  input_path="$new_path"
41535  # Check if we need to convert this using DOS-style short mode. If the path
41536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41537  # take no chances and rewrite it.
41538  # Note: m4 eats our [], so we need to use [ and ] instead.
41539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41540  if test "x$has_forbidden_chars" != x; then
41541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41542    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41543  fi
41544
41545    # Output is in $new_path
41546
41547  windows_path="$new_path"
41548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41549    unix_path=`$CYGPATH -u "$windows_path"`
41550    new_path="$unix_path"
41551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41553    new_path="$unix_path"
41554  fi
41555
41556    # remove trailing .exe if any
41557    new_path="${new_path/%.exe/}"
41558
41559    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41560    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41561  fi
41562
41563    else
41564      # We're on a unix platform. Hooray! :)
41565      # First separate the path from the arguments. This will split at the first
41566      # space.
41567      complete="$STRIP"
41568      path="${complete%% *}"
41569      tmp="$complete EOL"
41570      arguments="${tmp#* }"
41571
41572      # Cannot rely on the command "which" here since it doesn't always work.
41573      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41574      if test -z "$is_absolute_path"; then
41575        # Path to executable is not absolute. Find it.
41576        IFS_save="$IFS"
41577        IFS=:
41578        for p in $PATH; do
41579          if test -f "$p/$path" && test -x "$p/$path"; then
41580            new_path="$p/$path"
41581            break
41582          fi
41583        done
41584        IFS="$IFS_save"
41585      else
41586        # This is an absolute path, we can use it without further modifications.
41587        new_path="$path"
41588      fi
41589
41590      if test "x$new_path" = x; then
41591        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41592$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41593        has_space=`$ECHO "$complete" | $GREP " "`
41594        if test "x$has_space" != x; then
41595          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41596$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41597        fi
41598        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41599      fi
41600    fi
41601
41602    # Now join together the path and the arguments once again
41603    if test "x$arguments" != xEOL; then
41604      new_complete="$new_path ${arguments% *}"
41605    else
41606      new_complete="$new_path"
41607    fi
41608
41609    if test "x$complete" != "x$new_complete"; then
41610      STRIP="$new_complete"
41611      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41612$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41613    fi
41614  fi
41615
41616    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41617
41618
41619  # Publish this variable in the help.
41620
41621
41622  if [ -z "${NM+x}" ]; then
41623    # The variable is not set by user, try to locate tool using the code snippet
41624    if test -n "$ac_tool_prefix"; then
41625  for ac_prog in nm gcc-nm
41626  do
41627    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41628set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41630$as_echo_n "checking for $ac_word... " >&6; }
41631if ${ac_cv_prog_NM+:} false; then :
41632  $as_echo_n "(cached) " >&6
41633else
41634  if test -n "$NM"; then
41635  ac_cv_prog_NM="$NM" # Let the user override the test.
41636else
41637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41638for as_dir in $PATH
41639do
41640  IFS=$as_save_IFS
41641  test -z "$as_dir" && as_dir=.
41642    for ac_exec_ext in '' $ac_executable_extensions; do
41643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41644    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41646    break 2
41647  fi
41648done
41649  done
41650IFS=$as_save_IFS
41651
41652fi
41653fi
41654NM=$ac_cv_prog_NM
41655if test -n "$NM"; then
41656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41657$as_echo "$NM" >&6; }
41658else
41659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41660$as_echo "no" >&6; }
41661fi
41662
41663
41664    test -n "$NM" && break
41665  done
41666fi
41667if test -z "$NM"; then
41668  ac_ct_NM=$NM
41669  for ac_prog in nm gcc-nm
41670do
41671  # Extract the first word of "$ac_prog", so it can be a program name with args.
41672set dummy $ac_prog; ac_word=$2
41673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41674$as_echo_n "checking for $ac_word... " >&6; }
41675if ${ac_cv_prog_ac_ct_NM+:} false; then :
41676  $as_echo_n "(cached) " >&6
41677else
41678  if test -n "$ac_ct_NM"; then
41679  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41680else
41681as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41682for as_dir in $PATH
41683do
41684  IFS=$as_save_IFS
41685  test -z "$as_dir" && as_dir=.
41686    for ac_exec_ext in '' $ac_executable_extensions; do
41687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41688    ac_cv_prog_ac_ct_NM="$ac_prog"
41689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41690    break 2
41691  fi
41692done
41693  done
41694IFS=$as_save_IFS
41695
41696fi
41697fi
41698ac_ct_NM=$ac_cv_prog_ac_ct_NM
41699if test -n "$ac_ct_NM"; then
41700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41701$as_echo "$ac_ct_NM" >&6; }
41702else
41703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41704$as_echo "no" >&6; }
41705fi
41706
41707
41708  test -n "$ac_ct_NM" && break
41709done
41710
41711  if test "x$ac_ct_NM" = x; then
41712    NM=""
41713  else
41714    case $cross_compiling:$ac_tool_warned in
41715yes:)
41716{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41717$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41718ac_tool_warned=yes ;;
41719esac
41720    NM=$ac_ct_NM
41721  fi
41722fi
41723
41724  else
41725    # The variable is set, but is it from the command line or the environment?
41726
41727    # Try to remove the string !NM! from our list.
41728    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41729    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41730      # If it failed, the variable was not from the command line. Ignore it,
41731      # but warn the user (except for BASH, which is always set by the calling BASH).
41732      if test "xNM" != xBASH; then
41733        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41734$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41735      fi
41736      # Try to locate tool using the code snippet
41737      if test -n "$ac_tool_prefix"; then
41738  for ac_prog in nm gcc-nm
41739  do
41740    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41741set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41743$as_echo_n "checking for $ac_word... " >&6; }
41744if ${ac_cv_prog_NM+:} false; then :
41745  $as_echo_n "(cached) " >&6
41746else
41747  if test -n "$NM"; then
41748  ac_cv_prog_NM="$NM" # Let the user override the test.
41749else
41750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41751for as_dir in $PATH
41752do
41753  IFS=$as_save_IFS
41754  test -z "$as_dir" && as_dir=.
41755    for ac_exec_ext in '' $ac_executable_extensions; do
41756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41757    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41759    break 2
41760  fi
41761done
41762  done
41763IFS=$as_save_IFS
41764
41765fi
41766fi
41767NM=$ac_cv_prog_NM
41768if test -n "$NM"; then
41769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41770$as_echo "$NM" >&6; }
41771else
41772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41773$as_echo "no" >&6; }
41774fi
41775
41776
41777    test -n "$NM" && break
41778  done
41779fi
41780if test -z "$NM"; then
41781  ac_ct_NM=$NM
41782  for ac_prog in nm gcc-nm
41783do
41784  # Extract the first word of "$ac_prog", so it can be a program name with args.
41785set dummy $ac_prog; ac_word=$2
41786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41787$as_echo_n "checking for $ac_word... " >&6; }
41788if ${ac_cv_prog_ac_ct_NM+:} false; then :
41789  $as_echo_n "(cached) " >&6
41790else
41791  if test -n "$ac_ct_NM"; then
41792  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41793else
41794as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41795for as_dir in $PATH
41796do
41797  IFS=$as_save_IFS
41798  test -z "$as_dir" && as_dir=.
41799    for ac_exec_ext in '' $ac_executable_extensions; do
41800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41801    ac_cv_prog_ac_ct_NM="$ac_prog"
41802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41803    break 2
41804  fi
41805done
41806  done
41807IFS=$as_save_IFS
41808
41809fi
41810fi
41811ac_ct_NM=$ac_cv_prog_ac_ct_NM
41812if test -n "$ac_ct_NM"; then
41813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41814$as_echo "$ac_ct_NM" >&6; }
41815else
41816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41817$as_echo "no" >&6; }
41818fi
41819
41820
41821  test -n "$ac_ct_NM" && break
41822done
41823
41824  if test "x$ac_ct_NM" = x; then
41825    NM=""
41826  else
41827    case $cross_compiling:$ac_tool_warned in
41828yes:)
41829{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41830$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41831ac_tool_warned=yes ;;
41832esac
41833    NM=$ac_ct_NM
41834  fi
41835fi
41836
41837    else
41838      # If it succeeded, then it was overridden by the user. We will use it
41839      # for the tool.
41840
41841      # First remove it from the list of overridden variables, so we can test
41842      # for unknown variables in the end.
41843      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41844
41845      # Check if we try to supply an empty value
41846      if test "x$NM" = x; then
41847        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41848$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41849        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41850$as_echo_n "checking for NM... " >&6; }
41851        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41852$as_echo "disabled" >&6; }
41853      else
41854        # Check if the provided tool contains a complete path.
41855        tool_specified="$NM"
41856        tool_basename="${tool_specified##*/}"
41857        if test "x$tool_basename" = "x$tool_specified"; then
41858          # A command without a complete path is provided, search $PATH.
41859          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41860$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41861          # Extract the first word of "$tool_basename", so it can be a program name with args.
41862set dummy $tool_basename; ac_word=$2
41863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41864$as_echo_n "checking for $ac_word... " >&6; }
41865if ${ac_cv_path_NM+:} false; then :
41866  $as_echo_n "(cached) " >&6
41867else
41868  case $NM in
41869  [\\/]* | ?:[\\/]*)
41870  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41871  ;;
41872  *)
41873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41874for as_dir in $PATH
41875do
41876  IFS=$as_save_IFS
41877  test -z "$as_dir" && as_dir=.
41878    for ac_exec_ext in '' $ac_executable_extensions; do
41879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41880    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41882    break 2
41883  fi
41884done
41885  done
41886IFS=$as_save_IFS
41887
41888  ;;
41889esac
41890fi
41891NM=$ac_cv_path_NM
41892if test -n "$NM"; then
41893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41894$as_echo "$NM" >&6; }
41895else
41896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41897$as_echo "no" >&6; }
41898fi
41899
41900
41901          if test "x$NM" = x; then
41902            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41903          fi
41904        else
41905          # Otherwise we believe it is a complete path. Use it as it is.
41906          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41907$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41908          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41909$as_echo_n "checking for NM... " >&6; }
41910          if test ! -x "$tool_specified"; then
41911            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41912$as_echo "not found" >&6; }
41913            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41914          fi
41915          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41916$as_echo "$tool_specified" >&6; }
41917        fi
41918      fi
41919    fi
41920
41921  fi
41922
41923
41924    else
41925
41926
41927  # Publish this variable in the help.
41928
41929
41930  if [ -z "${NM+x}" ]; then
41931    # The variable is not set by user, try to locate tool using the code snippet
41932    if test -n "$ac_tool_prefix"; then
41933  for ac_prog in nm
41934  do
41935    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41936set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41938$as_echo_n "checking for $ac_word... " >&6; }
41939if ${ac_cv_prog_NM+:} false; then :
41940  $as_echo_n "(cached) " >&6
41941else
41942  if test -n "$NM"; then
41943  ac_cv_prog_NM="$NM" # Let the user override the test.
41944else
41945as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41946for as_dir in $PATH
41947do
41948  IFS=$as_save_IFS
41949  test -z "$as_dir" && as_dir=.
41950    for ac_exec_ext in '' $ac_executable_extensions; do
41951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41952    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41954    break 2
41955  fi
41956done
41957  done
41958IFS=$as_save_IFS
41959
41960fi
41961fi
41962NM=$ac_cv_prog_NM
41963if test -n "$NM"; then
41964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41965$as_echo "$NM" >&6; }
41966else
41967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41968$as_echo "no" >&6; }
41969fi
41970
41971
41972    test -n "$NM" && break
41973  done
41974fi
41975if test -z "$NM"; then
41976  ac_ct_NM=$NM
41977  for ac_prog in nm
41978do
41979  # Extract the first word of "$ac_prog", so it can be a program name with args.
41980set dummy $ac_prog; ac_word=$2
41981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41982$as_echo_n "checking for $ac_word... " >&6; }
41983if ${ac_cv_prog_ac_ct_NM+:} false; then :
41984  $as_echo_n "(cached) " >&6
41985else
41986  if test -n "$ac_ct_NM"; then
41987  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41988else
41989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41990for as_dir in $PATH
41991do
41992  IFS=$as_save_IFS
41993  test -z "$as_dir" && as_dir=.
41994    for ac_exec_ext in '' $ac_executable_extensions; do
41995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41996    ac_cv_prog_ac_ct_NM="$ac_prog"
41997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41998    break 2
41999  fi
42000done
42001  done
42002IFS=$as_save_IFS
42003
42004fi
42005fi
42006ac_ct_NM=$ac_cv_prog_ac_ct_NM
42007if test -n "$ac_ct_NM"; then
42008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42009$as_echo "$ac_ct_NM" >&6; }
42010else
42011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42012$as_echo "no" >&6; }
42013fi
42014
42015
42016  test -n "$ac_ct_NM" && break
42017done
42018
42019  if test "x$ac_ct_NM" = x; then
42020    NM=""
42021  else
42022    case $cross_compiling:$ac_tool_warned in
42023yes:)
42024{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42025$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42026ac_tool_warned=yes ;;
42027esac
42028    NM=$ac_ct_NM
42029  fi
42030fi
42031
42032  else
42033    # The variable is set, but is it from the command line or the environment?
42034
42035    # Try to remove the string !NM! from our list.
42036    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42037    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42038      # If it failed, the variable was not from the command line. Ignore it,
42039      # but warn the user (except for BASH, which is always set by the calling BASH).
42040      if test "xNM" != xBASH; then
42041        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42042$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42043      fi
42044      # Try to locate tool using the code snippet
42045      if test -n "$ac_tool_prefix"; then
42046  for ac_prog in nm
42047  do
42048    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42049set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42051$as_echo_n "checking for $ac_word... " >&6; }
42052if ${ac_cv_prog_NM+:} false; then :
42053  $as_echo_n "(cached) " >&6
42054else
42055  if test -n "$NM"; then
42056  ac_cv_prog_NM="$NM" # Let the user override the test.
42057else
42058as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42059for as_dir in $PATH
42060do
42061  IFS=$as_save_IFS
42062  test -z "$as_dir" && as_dir=.
42063    for ac_exec_ext in '' $ac_executable_extensions; do
42064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42065    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42067    break 2
42068  fi
42069done
42070  done
42071IFS=$as_save_IFS
42072
42073fi
42074fi
42075NM=$ac_cv_prog_NM
42076if test -n "$NM"; then
42077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42078$as_echo "$NM" >&6; }
42079else
42080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42081$as_echo "no" >&6; }
42082fi
42083
42084
42085    test -n "$NM" && break
42086  done
42087fi
42088if test -z "$NM"; then
42089  ac_ct_NM=$NM
42090  for ac_prog in nm
42091do
42092  # Extract the first word of "$ac_prog", so it can be a program name with args.
42093set dummy $ac_prog; ac_word=$2
42094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42095$as_echo_n "checking for $ac_word... " >&6; }
42096if ${ac_cv_prog_ac_ct_NM+:} false; then :
42097  $as_echo_n "(cached) " >&6
42098else
42099  if test -n "$ac_ct_NM"; then
42100  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42101else
42102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42103for as_dir in $PATH
42104do
42105  IFS=$as_save_IFS
42106  test -z "$as_dir" && as_dir=.
42107    for ac_exec_ext in '' $ac_executable_extensions; do
42108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42109    ac_cv_prog_ac_ct_NM="$ac_prog"
42110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42111    break 2
42112  fi
42113done
42114  done
42115IFS=$as_save_IFS
42116
42117fi
42118fi
42119ac_ct_NM=$ac_cv_prog_ac_ct_NM
42120if test -n "$ac_ct_NM"; then
42121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42122$as_echo "$ac_ct_NM" >&6; }
42123else
42124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42125$as_echo "no" >&6; }
42126fi
42127
42128
42129  test -n "$ac_ct_NM" && break
42130done
42131
42132  if test "x$ac_ct_NM" = x; then
42133    NM=""
42134  else
42135    case $cross_compiling:$ac_tool_warned in
42136yes:)
42137{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42138$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42139ac_tool_warned=yes ;;
42140esac
42141    NM=$ac_ct_NM
42142  fi
42143fi
42144
42145    else
42146      # If it succeeded, then it was overridden by the user. We will use it
42147      # for the tool.
42148
42149      # First remove it from the list of overridden variables, so we can test
42150      # for unknown variables in the end.
42151      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42152
42153      # Check if we try to supply an empty value
42154      if test "x$NM" = x; then
42155        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42156$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42157        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42158$as_echo_n "checking for NM... " >&6; }
42159        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42160$as_echo "disabled" >&6; }
42161      else
42162        # Check if the provided tool contains a complete path.
42163        tool_specified="$NM"
42164        tool_basename="${tool_specified##*/}"
42165        if test "x$tool_basename" = "x$tool_specified"; then
42166          # A command without a complete path is provided, search $PATH.
42167          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42168$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42169          # Extract the first word of "$tool_basename", so it can be a program name with args.
42170set dummy $tool_basename; ac_word=$2
42171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42172$as_echo_n "checking for $ac_word... " >&6; }
42173if ${ac_cv_path_NM+:} false; then :
42174  $as_echo_n "(cached) " >&6
42175else
42176  case $NM in
42177  [\\/]* | ?:[\\/]*)
42178  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42179  ;;
42180  *)
42181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42182for as_dir in $PATH
42183do
42184  IFS=$as_save_IFS
42185  test -z "$as_dir" && as_dir=.
42186    for ac_exec_ext in '' $ac_executable_extensions; do
42187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42188    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42190    break 2
42191  fi
42192done
42193  done
42194IFS=$as_save_IFS
42195
42196  ;;
42197esac
42198fi
42199NM=$ac_cv_path_NM
42200if test -n "$NM"; then
42201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42202$as_echo "$NM" >&6; }
42203else
42204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42205$as_echo "no" >&6; }
42206fi
42207
42208
42209          if test "x$NM" = x; then
42210            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42211          fi
42212        else
42213          # Otherwise we believe it is a complete path. Use it as it is.
42214          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42215$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42216          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42217$as_echo_n "checking for NM... " >&6; }
42218          if test ! -x "$tool_specified"; then
42219            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42220$as_echo "not found" >&6; }
42221            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42222          fi
42223          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42224$as_echo "$tool_specified" >&6; }
42225        fi
42226      fi
42227    fi
42228
42229  fi
42230
42231
42232    fi
42233
42234  # Only process if variable expands to non-empty
42235
42236  if test "x$NM" != x; then
42237    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42238
42239  # First separate the path from the arguments. This will split at the first
42240  # space.
42241  complete="$NM"
42242  path="${complete%% *}"
42243  tmp="$complete EOL"
42244  arguments="${tmp#* }"
42245
42246  # Input might be given as Windows format, start by converting to
42247  # unix format.
42248  new_path=`$CYGPATH -u "$path"`
42249
42250  # Now try to locate executable using which
42251  new_path=`$WHICH "$new_path" 2> /dev/null`
42252  # bat and cmd files are not always considered executable in cygwin causing which
42253  # to not find them
42254  if test "x$new_path" = x \
42255      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42256      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42257    new_path=`$CYGPATH -u "$path"`
42258  fi
42259  if test "x$new_path" = x; then
42260    # Oops. Which didn't find the executable.
42261    # The splitting of arguments from the executable at a space might have been incorrect,
42262    # since paths with space are more likely in Windows. Give it another try with the whole
42263    # argument.
42264    path="$complete"
42265    arguments="EOL"
42266    new_path=`$CYGPATH -u "$path"`
42267    new_path=`$WHICH "$new_path" 2> /dev/null`
42268    # bat and cmd files are not always considered executable in cygwin causing which
42269    # to not find them
42270    if test "x$new_path" = x \
42271        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42272        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42273      new_path=`$CYGPATH -u "$path"`
42274    fi
42275    if test "x$new_path" = x; then
42276      # It's still not found. Now this is an unrecoverable error.
42277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42278$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42279      has_space=`$ECHO "$complete" | $GREP " "`
42280      if test "x$has_space" != x; then
42281        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42282$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42283      fi
42284      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42285    fi
42286  fi
42287
42288  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42289  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42290  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42291  # "foo.exe" is OK but "foo" is an error.
42292  #
42293  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42294  # It is also a way to make sure we got the proper file name for the real test later on.
42295  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42296  if test "x$test_shortpath" = x; then
42297    # Short path failed, file does not exist as specified.
42298    # Try adding .exe or .cmd
42299    if test -f "${new_path}.exe"; then
42300      input_to_shortpath="${new_path}.exe"
42301    elif test -f "${new_path}.cmd"; then
42302      input_to_shortpath="${new_path}.cmd"
42303    else
42304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42305$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42306      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42307$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42308      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42309    fi
42310  else
42311    input_to_shortpath="$new_path"
42312  fi
42313
42314  # Call helper function which possibly converts this using DOS-style short mode.
42315  # If so, the updated path is stored in $new_path.
42316  new_path="$input_to_shortpath"
42317
42318  input_path="$input_to_shortpath"
42319  # Check if we need to convert this using DOS-style short mode. If the path
42320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42321  # take no chances and rewrite it.
42322  # Note: m4 eats our [], so we need to use [ and ] instead.
42323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42324  if test "x$has_forbidden_chars" != x; then
42325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42326    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42327    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42328    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42329      # Going to short mode and back again did indeed matter. Since short mode is
42330      # case insensitive, let's make it lowercase to improve readability.
42331      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42332      # Now convert it back to Unix-style (cygpath)
42333      input_path=`$CYGPATH -u "$shortmode_path"`
42334      new_path="$input_path"
42335    fi
42336  fi
42337
42338  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42339  if test "x$test_cygdrive_prefix" = x; then
42340    # As a simple fix, exclude /usr/bin since it's not a real path.
42341    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42342      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42343      # a path prefixed by /cygdrive for fixpath to work.
42344      new_path="$CYGWIN_ROOT_PATH$input_path"
42345    fi
42346  fi
42347
42348  # remove trailing .exe if any
42349  new_path="${new_path/%.exe/}"
42350
42351    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42352
42353  # First separate the path from the arguments. This will split at the first
42354  # space.
42355  complete="$NM"
42356  path="${complete%% *}"
42357  tmp="$complete EOL"
42358  arguments="${tmp#* }"
42359
42360  # Input might be given as Windows format, start by converting to
42361  # unix format.
42362  new_path="$path"
42363
42364  windows_path="$new_path"
42365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42366    unix_path=`$CYGPATH -u "$windows_path"`
42367    new_path="$unix_path"
42368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42370    new_path="$unix_path"
42371  fi
42372
42373
42374  # Now try to locate executable using which
42375  new_path=`$WHICH "$new_path" 2> /dev/null`
42376
42377  if test "x$new_path" = x; then
42378    # Oops. Which didn't find the executable.
42379    # The splitting of arguments from the executable at a space might have been incorrect,
42380    # since paths with space are more likely in Windows. Give it another try with the whole
42381    # argument.
42382    path="$complete"
42383    arguments="EOL"
42384    new_path="$path"
42385
42386  windows_path="$new_path"
42387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42388    unix_path=`$CYGPATH -u "$windows_path"`
42389    new_path="$unix_path"
42390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42392    new_path="$unix_path"
42393  fi
42394
42395
42396    new_path=`$WHICH "$new_path" 2> /dev/null`
42397    # bat and cmd files are not always considered executable in MSYS causing which
42398    # to not find them
42399    if test "x$new_path" = x \
42400        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42401        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42402      new_path="$path"
42403
42404  windows_path="$new_path"
42405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42406    unix_path=`$CYGPATH -u "$windows_path"`
42407    new_path="$unix_path"
42408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42410    new_path="$unix_path"
42411  fi
42412
42413    fi
42414
42415    if test "x$new_path" = x; then
42416      # It's still not found. Now this is an unrecoverable error.
42417      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42418$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42419      has_space=`$ECHO "$complete" | $GREP " "`
42420      if test "x$has_space" != x; then
42421        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42422$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42423      fi
42424      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42425    fi
42426  fi
42427
42428  # Now new_path has a complete unix path to the binary
42429  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42430    # Keep paths in /bin as-is, but remove trailing .exe if any
42431    new_path="${new_path/%.exe/}"
42432    # Do not save /bin paths to all_fixpath_prefixes!
42433  else
42434    # Not in mixed or Windows style, start by that.
42435    new_path=`cmd //c echo $new_path`
42436
42437  input_path="$new_path"
42438  # Check if we need to convert this using DOS-style short mode. If the path
42439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42440  # take no chances and rewrite it.
42441  # Note: m4 eats our [], so we need to use [ and ] instead.
42442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42443  if test "x$has_forbidden_chars" != x; then
42444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42445    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42446  fi
42447
42448    # Output is in $new_path
42449
42450  windows_path="$new_path"
42451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42452    unix_path=`$CYGPATH -u "$windows_path"`
42453    new_path="$unix_path"
42454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42456    new_path="$unix_path"
42457  fi
42458
42459    # remove trailing .exe if any
42460    new_path="${new_path/%.exe/}"
42461
42462    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42463    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42464  fi
42465
42466    else
42467      # We're on a unix platform. Hooray! :)
42468      # First separate the path from the arguments. This will split at the first
42469      # space.
42470      complete="$NM"
42471      path="${complete%% *}"
42472      tmp="$complete EOL"
42473      arguments="${tmp#* }"
42474
42475      # Cannot rely on the command "which" here since it doesn't always work.
42476      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42477      if test -z "$is_absolute_path"; then
42478        # Path to executable is not absolute. Find it.
42479        IFS_save="$IFS"
42480        IFS=:
42481        for p in $PATH; do
42482          if test -f "$p/$path" && test -x "$p/$path"; then
42483            new_path="$p/$path"
42484            break
42485          fi
42486        done
42487        IFS="$IFS_save"
42488      else
42489        # This is an absolute path, we can use it without further modifications.
42490        new_path="$path"
42491      fi
42492
42493      if test "x$new_path" = x; then
42494        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42495$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42496        has_space=`$ECHO "$complete" | $GREP " "`
42497        if test "x$has_space" != x; then
42498          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42499$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42500        fi
42501        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42502      fi
42503    fi
42504
42505    # Now join together the path and the arguments once again
42506    if test "x$arguments" != xEOL; then
42507      new_complete="$new_path ${arguments% *}"
42508    else
42509      new_complete="$new_path"
42510    fi
42511
42512    if test "x$complete" != "x$new_complete"; then
42513      NM="$new_complete"
42514      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42515$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42516    fi
42517  fi
42518
42519    GNM="$NM"
42520
42521  fi
42522
42523  # objcopy is used for moving debug symbols to separate files when
42524  # full debug symbols are enabled.
42525  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42526
42527
42528  # Publish this variable in the help.
42529
42530
42531  if [ -z "${OBJCOPY+x}" ]; then
42532    # The variable is not set by user, try to locate tool using the code snippet
42533    if test -n "$ac_tool_prefix"; then
42534  for ac_prog in gobjcopy objcopy
42535  do
42536    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42537set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42539$as_echo_n "checking for $ac_word... " >&6; }
42540if ${ac_cv_prog_OBJCOPY+:} false; then :
42541  $as_echo_n "(cached) " >&6
42542else
42543  if test -n "$OBJCOPY"; then
42544  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42545else
42546as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42547for as_dir in $PATH
42548do
42549  IFS=$as_save_IFS
42550  test -z "$as_dir" && as_dir=.
42551    for ac_exec_ext in '' $ac_executable_extensions; do
42552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42553    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42555    break 2
42556  fi
42557done
42558  done
42559IFS=$as_save_IFS
42560
42561fi
42562fi
42563OBJCOPY=$ac_cv_prog_OBJCOPY
42564if test -n "$OBJCOPY"; then
42565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42566$as_echo "$OBJCOPY" >&6; }
42567else
42568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42569$as_echo "no" >&6; }
42570fi
42571
42572
42573    test -n "$OBJCOPY" && break
42574  done
42575fi
42576if test -z "$OBJCOPY"; then
42577  ac_ct_OBJCOPY=$OBJCOPY
42578  for ac_prog in gobjcopy objcopy
42579do
42580  # Extract the first word of "$ac_prog", so it can be a program name with args.
42581set dummy $ac_prog; ac_word=$2
42582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42583$as_echo_n "checking for $ac_word... " >&6; }
42584if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42585  $as_echo_n "(cached) " >&6
42586else
42587  if test -n "$ac_ct_OBJCOPY"; then
42588  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42589else
42590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42591for as_dir in $PATH
42592do
42593  IFS=$as_save_IFS
42594  test -z "$as_dir" && as_dir=.
42595    for ac_exec_ext in '' $ac_executable_extensions; do
42596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42597    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42599    break 2
42600  fi
42601done
42602  done
42603IFS=$as_save_IFS
42604
42605fi
42606fi
42607ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42608if test -n "$ac_ct_OBJCOPY"; then
42609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42610$as_echo "$ac_ct_OBJCOPY" >&6; }
42611else
42612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42613$as_echo "no" >&6; }
42614fi
42615
42616
42617  test -n "$ac_ct_OBJCOPY" && break
42618done
42619
42620  if test "x$ac_ct_OBJCOPY" = x; then
42621    OBJCOPY=""
42622  else
42623    case $cross_compiling:$ac_tool_warned in
42624yes:)
42625{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42626$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42627ac_tool_warned=yes ;;
42628esac
42629    OBJCOPY=$ac_ct_OBJCOPY
42630  fi
42631fi
42632
42633  else
42634    # The variable is set, but is it from the command line or the environment?
42635
42636    # Try to remove the string !OBJCOPY! from our list.
42637    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42638    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42639      # If it failed, the variable was not from the command line. Ignore it,
42640      # but warn the user (except for BASH, which is always set by the calling BASH).
42641      if test "xOBJCOPY" != xBASH; then
42642        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42643$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42644      fi
42645      # Try to locate tool using the code snippet
42646      if test -n "$ac_tool_prefix"; then
42647  for ac_prog in gobjcopy objcopy
42648  do
42649    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42650set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42652$as_echo_n "checking for $ac_word... " >&6; }
42653if ${ac_cv_prog_OBJCOPY+:} false; then :
42654  $as_echo_n "(cached) " >&6
42655else
42656  if test -n "$OBJCOPY"; then
42657  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42658else
42659as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42660for as_dir in $PATH
42661do
42662  IFS=$as_save_IFS
42663  test -z "$as_dir" && as_dir=.
42664    for ac_exec_ext in '' $ac_executable_extensions; do
42665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42666    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42668    break 2
42669  fi
42670done
42671  done
42672IFS=$as_save_IFS
42673
42674fi
42675fi
42676OBJCOPY=$ac_cv_prog_OBJCOPY
42677if test -n "$OBJCOPY"; then
42678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42679$as_echo "$OBJCOPY" >&6; }
42680else
42681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42682$as_echo "no" >&6; }
42683fi
42684
42685
42686    test -n "$OBJCOPY" && break
42687  done
42688fi
42689if test -z "$OBJCOPY"; then
42690  ac_ct_OBJCOPY=$OBJCOPY
42691  for ac_prog in gobjcopy objcopy
42692do
42693  # Extract the first word of "$ac_prog", so it can be a program name with args.
42694set dummy $ac_prog; ac_word=$2
42695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42696$as_echo_n "checking for $ac_word... " >&6; }
42697if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42698  $as_echo_n "(cached) " >&6
42699else
42700  if test -n "$ac_ct_OBJCOPY"; then
42701  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42702else
42703as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42704for as_dir in $PATH
42705do
42706  IFS=$as_save_IFS
42707  test -z "$as_dir" && as_dir=.
42708    for ac_exec_ext in '' $ac_executable_extensions; do
42709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42710    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42712    break 2
42713  fi
42714done
42715  done
42716IFS=$as_save_IFS
42717
42718fi
42719fi
42720ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42721if test -n "$ac_ct_OBJCOPY"; then
42722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42723$as_echo "$ac_ct_OBJCOPY" >&6; }
42724else
42725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42726$as_echo "no" >&6; }
42727fi
42728
42729
42730  test -n "$ac_ct_OBJCOPY" && break
42731done
42732
42733  if test "x$ac_ct_OBJCOPY" = x; then
42734    OBJCOPY=""
42735  else
42736    case $cross_compiling:$ac_tool_warned in
42737yes:)
42738{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42739$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42740ac_tool_warned=yes ;;
42741esac
42742    OBJCOPY=$ac_ct_OBJCOPY
42743  fi
42744fi
42745
42746    else
42747      # If it succeeded, then it was overridden by the user. We will use it
42748      # for the tool.
42749
42750      # First remove it from the list of overridden variables, so we can test
42751      # for unknown variables in the end.
42752      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42753
42754      # Check if we try to supply an empty value
42755      if test "x$OBJCOPY" = x; then
42756        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42757$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42758        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42759$as_echo_n "checking for OBJCOPY... " >&6; }
42760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42761$as_echo "disabled" >&6; }
42762      else
42763        # Check if the provided tool contains a complete path.
42764        tool_specified="$OBJCOPY"
42765        tool_basename="${tool_specified##*/}"
42766        if test "x$tool_basename" = "x$tool_specified"; then
42767          # A command without a complete path is provided, search $PATH.
42768          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42769$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42770          # Extract the first word of "$tool_basename", so it can be a program name with args.
42771set dummy $tool_basename; ac_word=$2
42772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42773$as_echo_n "checking for $ac_word... " >&6; }
42774if ${ac_cv_path_OBJCOPY+:} false; then :
42775  $as_echo_n "(cached) " >&6
42776else
42777  case $OBJCOPY in
42778  [\\/]* | ?:[\\/]*)
42779  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42780  ;;
42781  *)
42782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42783for as_dir in $PATH
42784do
42785  IFS=$as_save_IFS
42786  test -z "$as_dir" && as_dir=.
42787    for ac_exec_ext in '' $ac_executable_extensions; do
42788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42789    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42791    break 2
42792  fi
42793done
42794  done
42795IFS=$as_save_IFS
42796
42797  ;;
42798esac
42799fi
42800OBJCOPY=$ac_cv_path_OBJCOPY
42801if test -n "$OBJCOPY"; then
42802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42803$as_echo "$OBJCOPY" >&6; }
42804else
42805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42806$as_echo "no" >&6; }
42807fi
42808
42809
42810          if test "x$OBJCOPY" = x; then
42811            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42812          fi
42813        else
42814          # Otherwise we believe it is a complete path. Use it as it is.
42815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42816$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42817          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42818$as_echo_n "checking for OBJCOPY... " >&6; }
42819          if test ! -x "$tool_specified"; then
42820            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42821$as_echo "not found" >&6; }
42822            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42823          fi
42824          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42825$as_echo "$tool_specified" >&6; }
42826        fi
42827      fi
42828    fi
42829
42830  fi
42831
42832
42833    # Only call fixup if objcopy was found.
42834    if test -n "$OBJCOPY"; then
42835
42836  # Only process if variable expands to non-empty
42837
42838  if test "x$OBJCOPY" != x; then
42839    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42840
42841  # First separate the path from the arguments. This will split at the first
42842  # space.
42843  complete="$OBJCOPY"
42844  path="${complete%% *}"
42845  tmp="$complete EOL"
42846  arguments="${tmp#* }"
42847
42848  # Input might be given as Windows format, start by converting to
42849  # unix format.
42850  new_path=`$CYGPATH -u "$path"`
42851
42852  # Now try to locate executable using which
42853  new_path=`$WHICH "$new_path" 2> /dev/null`
42854  # bat and cmd files are not always considered executable in cygwin causing which
42855  # to not find them
42856  if test "x$new_path" = x \
42857      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42858      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42859    new_path=`$CYGPATH -u "$path"`
42860  fi
42861  if test "x$new_path" = x; then
42862    # Oops. Which didn't find the executable.
42863    # The splitting of arguments from the executable at a space might have been incorrect,
42864    # since paths with space are more likely in Windows. Give it another try with the whole
42865    # argument.
42866    path="$complete"
42867    arguments="EOL"
42868    new_path=`$CYGPATH -u "$path"`
42869    new_path=`$WHICH "$new_path" 2> /dev/null`
42870    # bat and cmd files are not always considered executable in cygwin causing which
42871    # to not find them
42872    if test "x$new_path" = x \
42873        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42874        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42875      new_path=`$CYGPATH -u "$path"`
42876    fi
42877    if test "x$new_path" = x; then
42878      # It's still not found. Now this is an unrecoverable error.
42879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42880$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42881      has_space=`$ECHO "$complete" | $GREP " "`
42882      if test "x$has_space" != x; then
42883        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42884$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42885      fi
42886      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42887    fi
42888  fi
42889
42890  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42891  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42892  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42893  # "foo.exe" is OK but "foo" is an error.
42894  #
42895  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42896  # It is also a way to make sure we got the proper file name for the real test later on.
42897  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42898  if test "x$test_shortpath" = x; then
42899    # Short path failed, file does not exist as specified.
42900    # Try adding .exe or .cmd
42901    if test -f "${new_path}.exe"; then
42902      input_to_shortpath="${new_path}.exe"
42903    elif test -f "${new_path}.cmd"; then
42904      input_to_shortpath="${new_path}.cmd"
42905    else
42906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42907$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42908      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42909$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42910      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42911    fi
42912  else
42913    input_to_shortpath="$new_path"
42914  fi
42915
42916  # Call helper function which possibly converts this using DOS-style short mode.
42917  # If so, the updated path is stored in $new_path.
42918  new_path="$input_to_shortpath"
42919
42920  input_path="$input_to_shortpath"
42921  # Check if we need to convert this using DOS-style short mode. If the path
42922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42923  # take no chances and rewrite it.
42924  # Note: m4 eats our [], so we need to use [ and ] instead.
42925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42926  if test "x$has_forbidden_chars" != x; then
42927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42928    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42929    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42930    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42931      # Going to short mode and back again did indeed matter. Since short mode is
42932      # case insensitive, let's make it lowercase to improve readability.
42933      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42934      # Now convert it back to Unix-style (cygpath)
42935      input_path=`$CYGPATH -u "$shortmode_path"`
42936      new_path="$input_path"
42937    fi
42938  fi
42939
42940  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42941  if test "x$test_cygdrive_prefix" = x; then
42942    # As a simple fix, exclude /usr/bin since it's not a real path.
42943    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42944      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42945      # a path prefixed by /cygdrive for fixpath to work.
42946      new_path="$CYGWIN_ROOT_PATH$input_path"
42947    fi
42948  fi
42949
42950  # remove trailing .exe if any
42951  new_path="${new_path/%.exe/}"
42952
42953    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42954
42955  # First separate the path from the arguments. This will split at the first
42956  # space.
42957  complete="$OBJCOPY"
42958  path="${complete%% *}"
42959  tmp="$complete EOL"
42960  arguments="${tmp#* }"
42961
42962  # Input might be given as Windows format, start by converting to
42963  # unix format.
42964  new_path="$path"
42965
42966  windows_path="$new_path"
42967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42968    unix_path=`$CYGPATH -u "$windows_path"`
42969    new_path="$unix_path"
42970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42972    new_path="$unix_path"
42973  fi
42974
42975
42976  # Now try to locate executable using which
42977  new_path=`$WHICH "$new_path" 2> /dev/null`
42978
42979  if test "x$new_path" = x; then
42980    # Oops. Which didn't find the executable.
42981    # The splitting of arguments from the executable at a space might have been incorrect,
42982    # since paths with space are more likely in Windows. Give it another try with the whole
42983    # argument.
42984    path="$complete"
42985    arguments="EOL"
42986    new_path="$path"
42987
42988  windows_path="$new_path"
42989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42990    unix_path=`$CYGPATH -u "$windows_path"`
42991    new_path="$unix_path"
42992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42994    new_path="$unix_path"
42995  fi
42996
42997
42998    new_path=`$WHICH "$new_path" 2> /dev/null`
42999    # bat and cmd files are not always considered executable in MSYS causing which
43000    # to not find them
43001    if test "x$new_path" = x \
43002        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43003        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43004      new_path="$path"
43005
43006  windows_path="$new_path"
43007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43008    unix_path=`$CYGPATH -u "$windows_path"`
43009    new_path="$unix_path"
43010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43012    new_path="$unix_path"
43013  fi
43014
43015    fi
43016
43017    if test "x$new_path" = x; then
43018      # It's still not found. Now this is an unrecoverable error.
43019      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43020$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43021      has_space=`$ECHO "$complete" | $GREP " "`
43022      if test "x$has_space" != x; then
43023        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43024$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43025      fi
43026      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43027    fi
43028  fi
43029
43030  # Now new_path has a complete unix path to the binary
43031  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43032    # Keep paths in /bin as-is, but remove trailing .exe if any
43033    new_path="${new_path/%.exe/}"
43034    # Do not save /bin paths to all_fixpath_prefixes!
43035  else
43036    # Not in mixed or Windows style, start by that.
43037    new_path=`cmd //c echo $new_path`
43038
43039  input_path="$new_path"
43040  # Check if we need to convert this using DOS-style short mode. If the path
43041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43042  # take no chances and rewrite it.
43043  # Note: m4 eats our [], so we need to use [ and ] instead.
43044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43045  if test "x$has_forbidden_chars" != x; then
43046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43047    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43048  fi
43049
43050    # Output is in $new_path
43051
43052  windows_path="$new_path"
43053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43054    unix_path=`$CYGPATH -u "$windows_path"`
43055    new_path="$unix_path"
43056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43058    new_path="$unix_path"
43059  fi
43060
43061    # remove trailing .exe if any
43062    new_path="${new_path/%.exe/}"
43063
43064    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43065    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43066  fi
43067
43068    else
43069      # We're on a unix platform. Hooray! :)
43070      # First separate the path from the arguments. This will split at the first
43071      # space.
43072      complete="$OBJCOPY"
43073      path="${complete%% *}"
43074      tmp="$complete EOL"
43075      arguments="${tmp#* }"
43076
43077      # Cannot rely on the command "which" here since it doesn't always work.
43078      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43079      if test -z "$is_absolute_path"; then
43080        # Path to executable is not absolute. Find it.
43081        IFS_save="$IFS"
43082        IFS=:
43083        for p in $PATH; do
43084          if test -f "$p/$path" && test -x "$p/$path"; then
43085            new_path="$p/$path"
43086            break
43087          fi
43088        done
43089        IFS="$IFS_save"
43090      else
43091        # This is an absolute path, we can use it without further modifications.
43092        new_path="$path"
43093      fi
43094
43095      if test "x$new_path" = x; then
43096        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43097$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43098        has_space=`$ECHO "$complete" | $GREP " "`
43099        if test "x$has_space" != x; then
43100          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43101$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43102        fi
43103        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43104      fi
43105    fi
43106
43107    # Now join together the path and the arguments once again
43108    if test "x$arguments" != xEOL; then
43109      new_complete="$new_path ${arguments% *}"
43110    else
43111      new_complete="$new_path"
43112    fi
43113
43114    if test "x$complete" != "x$new_complete"; then
43115      OBJCOPY="$new_complete"
43116      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43117$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43118    fi
43119  fi
43120
43121      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43122        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43123        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43124        # - version number is last blank separate word on first line
43125        # - version number formats that have been seen:
43126        #   - <major>.<minor>
43127        #   - <major>.<minor>.<micro>
43128        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43129        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43130         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43131              -e 's/.* //' \
43132              -e '/^[01]\./b bad' \
43133              -e '/^2\./{' \
43134              -e '  s/^2\.//' \
43135              -e '  /^[0-9]$/b bad' \
43136              -e '  /^[0-9]\./b bad' \
43137              -e '  /^1[0-9]$/b bad' \
43138              -e '  /^1[0-9]\./b bad' \
43139              -e '  /^20\./b bad' \
43140              -e '  /^21\.0$/b bad' \
43141              -e '  /^21\.0\./b bad' \
43142              -e '}' \
43143              -e ':good' \
43144              -e 's/.*/VALID_VERSION/p' \
43145              -e 'q' \
43146              -e ':bad' \
43147              -e 's/.*/BAD_VERSION/p' \
43148              -e 'q'`
43149        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43150          OBJCOPY=
43151          { $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
43152$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43153          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43154$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43155          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43156$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43157          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43158$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43159          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43160$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43161        fi
43162      fi
43163    fi
43164  fi
43165
43166
43167
43168  # Publish this variable in the help.
43169
43170
43171  if [ -z "${OBJDUMP+x}" ]; then
43172    # The variable is not set by user, try to locate tool using the code snippet
43173    if test -n "$ac_tool_prefix"; then
43174  for ac_prog in gobjdump objdump
43175  do
43176    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43177set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43179$as_echo_n "checking for $ac_word... " >&6; }
43180if ${ac_cv_prog_OBJDUMP+:} false; then :
43181  $as_echo_n "(cached) " >&6
43182else
43183  if test -n "$OBJDUMP"; then
43184  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43185else
43186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43187for as_dir in $PATH
43188do
43189  IFS=$as_save_IFS
43190  test -z "$as_dir" && as_dir=.
43191    for ac_exec_ext in '' $ac_executable_extensions; do
43192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43193    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43195    break 2
43196  fi
43197done
43198  done
43199IFS=$as_save_IFS
43200
43201fi
43202fi
43203OBJDUMP=$ac_cv_prog_OBJDUMP
43204if test -n "$OBJDUMP"; then
43205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43206$as_echo "$OBJDUMP" >&6; }
43207else
43208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43209$as_echo "no" >&6; }
43210fi
43211
43212
43213    test -n "$OBJDUMP" && break
43214  done
43215fi
43216if test -z "$OBJDUMP"; then
43217  ac_ct_OBJDUMP=$OBJDUMP
43218  for ac_prog in gobjdump objdump
43219do
43220  # Extract the first word of "$ac_prog", so it can be a program name with args.
43221set dummy $ac_prog; ac_word=$2
43222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43223$as_echo_n "checking for $ac_word... " >&6; }
43224if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43225  $as_echo_n "(cached) " >&6
43226else
43227  if test -n "$ac_ct_OBJDUMP"; then
43228  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43229else
43230as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43231for as_dir in $PATH
43232do
43233  IFS=$as_save_IFS
43234  test -z "$as_dir" && as_dir=.
43235    for ac_exec_ext in '' $ac_executable_extensions; do
43236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43237    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43239    break 2
43240  fi
43241done
43242  done
43243IFS=$as_save_IFS
43244
43245fi
43246fi
43247ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43248if test -n "$ac_ct_OBJDUMP"; then
43249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43250$as_echo "$ac_ct_OBJDUMP" >&6; }
43251else
43252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43253$as_echo "no" >&6; }
43254fi
43255
43256
43257  test -n "$ac_ct_OBJDUMP" && break
43258done
43259
43260  if test "x$ac_ct_OBJDUMP" = x; then
43261    OBJDUMP=""
43262  else
43263    case $cross_compiling:$ac_tool_warned in
43264yes:)
43265{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43266$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43267ac_tool_warned=yes ;;
43268esac
43269    OBJDUMP=$ac_ct_OBJDUMP
43270  fi
43271fi
43272
43273  else
43274    # The variable is set, but is it from the command line or the environment?
43275
43276    # Try to remove the string !OBJDUMP! from our list.
43277    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43278    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43279      # If it failed, the variable was not from the command line. Ignore it,
43280      # but warn the user (except for BASH, which is always set by the calling BASH).
43281      if test "xOBJDUMP" != xBASH; then
43282        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43283$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43284      fi
43285      # Try to locate tool using the code snippet
43286      if test -n "$ac_tool_prefix"; then
43287  for ac_prog in gobjdump objdump
43288  do
43289    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43290set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43292$as_echo_n "checking for $ac_word... " >&6; }
43293if ${ac_cv_prog_OBJDUMP+:} false; then :
43294  $as_echo_n "(cached) " >&6
43295else
43296  if test -n "$OBJDUMP"; then
43297  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43298else
43299as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43300for as_dir in $PATH
43301do
43302  IFS=$as_save_IFS
43303  test -z "$as_dir" && as_dir=.
43304    for ac_exec_ext in '' $ac_executable_extensions; do
43305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43306    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43308    break 2
43309  fi
43310done
43311  done
43312IFS=$as_save_IFS
43313
43314fi
43315fi
43316OBJDUMP=$ac_cv_prog_OBJDUMP
43317if test -n "$OBJDUMP"; then
43318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43319$as_echo "$OBJDUMP" >&6; }
43320else
43321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43322$as_echo "no" >&6; }
43323fi
43324
43325
43326    test -n "$OBJDUMP" && break
43327  done
43328fi
43329if test -z "$OBJDUMP"; then
43330  ac_ct_OBJDUMP=$OBJDUMP
43331  for ac_prog in gobjdump objdump
43332do
43333  # Extract the first word of "$ac_prog", so it can be a program name with args.
43334set dummy $ac_prog; ac_word=$2
43335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43336$as_echo_n "checking for $ac_word... " >&6; }
43337if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43338  $as_echo_n "(cached) " >&6
43339else
43340  if test -n "$ac_ct_OBJDUMP"; then
43341  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43342else
43343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43344for as_dir in $PATH
43345do
43346  IFS=$as_save_IFS
43347  test -z "$as_dir" && as_dir=.
43348    for ac_exec_ext in '' $ac_executable_extensions; do
43349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43350    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43352    break 2
43353  fi
43354done
43355  done
43356IFS=$as_save_IFS
43357
43358fi
43359fi
43360ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43361if test -n "$ac_ct_OBJDUMP"; then
43362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43363$as_echo "$ac_ct_OBJDUMP" >&6; }
43364else
43365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43366$as_echo "no" >&6; }
43367fi
43368
43369
43370  test -n "$ac_ct_OBJDUMP" && break
43371done
43372
43373  if test "x$ac_ct_OBJDUMP" = x; then
43374    OBJDUMP=""
43375  else
43376    case $cross_compiling:$ac_tool_warned in
43377yes:)
43378{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43379$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43380ac_tool_warned=yes ;;
43381esac
43382    OBJDUMP=$ac_ct_OBJDUMP
43383  fi
43384fi
43385
43386    else
43387      # If it succeeded, then it was overridden by the user. We will use it
43388      # for the tool.
43389
43390      # First remove it from the list of overridden variables, so we can test
43391      # for unknown variables in the end.
43392      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43393
43394      # Check if we try to supply an empty value
43395      if test "x$OBJDUMP" = x; then
43396        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43397$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43398        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43399$as_echo_n "checking for OBJDUMP... " >&6; }
43400        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43401$as_echo "disabled" >&6; }
43402      else
43403        # Check if the provided tool contains a complete path.
43404        tool_specified="$OBJDUMP"
43405        tool_basename="${tool_specified##*/}"
43406        if test "x$tool_basename" = "x$tool_specified"; then
43407          # A command without a complete path is provided, search $PATH.
43408          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43409$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43410          # Extract the first word of "$tool_basename", so it can be a program name with args.
43411set dummy $tool_basename; ac_word=$2
43412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43413$as_echo_n "checking for $ac_word... " >&6; }
43414if ${ac_cv_path_OBJDUMP+:} false; then :
43415  $as_echo_n "(cached) " >&6
43416else
43417  case $OBJDUMP in
43418  [\\/]* | ?:[\\/]*)
43419  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43420  ;;
43421  *)
43422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43423for as_dir in $PATH
43424do
43425  IFS=$as_save_IFS
43426  test -z "$as_dir" && as_dir=.
43427    for ac_exec_ext in '' $ac_executable_extensions; do
43428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43429    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43431    break 2
43432  fi
43433done
43434  done
43435IFS=$as_save_IFS
43436
43437  ;;
43438esac
43439fi
43440OBJDUMP=$ac_cv_path_OBJDUMP
43441if test -n "$OBJDUMP"; then
43442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43443$as_echo "$OBJDUMP" >&6; }
43444else
43445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43446$as_echo "no" >&6; }
43447fi
43448
43449
43450          if test "x$OBJDUMP" = x; then
43451            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43452          fi
43453        else
43454          # Otherwise we believe it is a complete path. Use it as it is.
43455          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43456$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43457          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43458$as_echo_n "checking for OBJDUMP... " >&6; }
43459          if test ! -x "$tool_specified"; then
43460            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43461$as_echo "not found" >&6; }
43462            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43463          fi
43464          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43465$as_echo "$tool_specified" >&6; }
43466        fi
43467      fi
43468    fi
43469
43470  fi
43471
43472
43473  if test "x$OBJDUMP" != x; then
43474    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43475    # bails if argument is missing.
43476
43477  # Only process if variable expands to non-empty
43478
43479  if test "x$OBJDUMP" != x; then
43480    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43481
43482  # First separate the path from the arguments. This will split at the first
43483  # space.
43484  complete="$OBJDUMP"
43485  path="${complete%% *}"
43486  tmp="$complete EOL"
43487  arguments="${tmp#* }"
43488
43489  # Input might be given as Windows format, start by converting to
43490  # unix format.
43491  new_path=`$CYGPATH -u "$path"`
43492
43493  # Now try to locate executable using which
43494  new_path=`$WHICH "$new_path" 2> /dev/null`
43495  # bat and cmd files are not always considered executable in cygwin causing which
43496  # to not find them
43497  if test "x$new_path" = x \
43498      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43499      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43500    new_path=`$CYGPATH -u "$path"`
43501  fi
43502  if test "x$new_path" = x; then
43503    # Oops. Which didn't find the executable.
43504    # The splitting of arguments from the executable at a space might have been incorrect,
43505    # since paths with space are more likely in Windows. Give it another try with the whole
43506    # argument.
43507    path="$complete"
43508    arguments="EOL"
43509    new_path=`$CYGPATH -u "$path"`
43510    new_path=`$WHICH "$new_path" 2> /dev/null`
43511    # bat and cmd files are not always considered executable in cygwin causing which
43512    # to not find them
43513    if test "x$new_path" = x \
43514        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43515        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43516      new_path=`$CYGPATH -u "$path"`
43517    fi
43518    if test "x$new_path" = x; then
43519      # It's still not found. Now this is an unrecoverable error.
43520      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43521$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43522      has_space=`$ECHO "$complete" | $GREP " "`
43523      if test "x$has_space" != x; then
43524        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43525$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43526      fi
43527      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43528    fi
43529  fi
43530
43531  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43532  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43533  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43534  # "foo.exe" is OK but "foo" is an error.
43535  #
43536  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43537  # It is also a way to make sure we got the proper file name for the real test later on.
43538  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43539  if test "x$test_shortpath" = x; then
43540    # Short path failed, file does not exist as specified.
43541    # Try adding .exe or .cmd
43542    if test -f "${new_path}.exe"; then
43543      input_to_shortpath="${new_path}.exe"
43544    elif test -f "${new_path}.cmd"; then
43545      input_to_shortpath="${new_path}.cmd"
43546    else
43547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43548$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43549      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43550$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43551      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43552    fi
43553  else
43554    input_to_shortpath="$new_path"
43555  fi
43556
43557  # Call helper function which possibly converts this using DOS-style short mode.
43558  # If so, the updated path is stored in $new_path.
43559  new_path="$input_to_shortpath"
43560
43561  input_path="$input_to_shortpath"
43562  # Check if we need to convert this using DOS-style short mode. If the path
43563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43564  # take no chances and rewrite it.
43565  # Note: m4 eats our [], so we need to use [ and ] instead.
43566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43567  if test "x$has_forbidden_chars" != x; then
43568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43572      # Going to short mode and back again did indeed matter. Since short mode is
43573      # case insensitive, let's make it lowercase to improve readability.
43574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43575      # Now convert it back to Unix-style (cygpath)
43576      input_path=`$CYGPATH -u "$shortmode_path"`
43577      new_path="$input_path"
43578    fi
43579  fi
43580
43581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43582  if test "x$test_cygdrive_prefix" = x; then
43583    # As a simple fix, exclude /usr/bin since it's not a real path.
43584    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43586      # a path prefixed by /cygdrive for fixpath to work.
43587      new_path="$CYGWIN_ROOT_PATH$input_path"
43588    fi
43589  fi
43590
43591  # remove trailing .exe if any
43592  new_path="${new_path/%.exe/}"
43593
43594    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43595
43596  # First separate the path from the arguments. This will split at the first
43597  # space.
43598  complete="$OBJDUMP"
43599  path="${complete%% *}"
43600  tmp="$complete EOL"
43601  arguments="${tmp#* }"
43602
43603  # Input might be given as Windows format, start by converting to
43604  # unix format.
43605  new_path="$path"
43606
43607  windows_path="$new_path"
43608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43609    unix_path=`$CYGPATH -u "$windows_path"`
43610    new_path="$unix_path"
43611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43613    new_path="$unix_path"
43614  fi
43615
43616
43617  # Now try to locate executable using which
43618  new_path=`$WHICH "$new_path" 2> /dev/null`
43619
43620  if test "x$new_path" = x; then
43621    # Oops. Which didn't find the executable.
43622    # The splitting of arguments from the executable at a space might have been incorrect,
43623    # since paths with space are more likely in Windows. Give it another try with the whole
43624    # argument.
43625    path="$complete"
43626    arguments="EOL"
43627    new_path="$path"
43628
43629  windows_path="$new_path"
43630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43631    unix_path=`$CYGPATH -u "$windows_path"`
43632    new_path="$unix_path"
43633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43635    new_path="$unix_path"
43636  fi
43637
43638
43639    new_path=`$WHICH "$new_path" 2> /dev/null`
43640    # bat and cmd files are not always considered executable in MSYS causing which
43641    # to not find them
43642    if test "x$new_path" = x \
43643        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43644        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43645      new_path="$path"
43646
43647  windows_path="$new_path"
43648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43649    unix_path=`$CYGPATH -u "$windows_path"`
43650    new_path="$unix_path"
43651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43653    new_path="$unix_path"
43654  fi
43655
43656    fi
43657
43658    if test "x$new_path" = x; then
43659      # It's still not found. Now this is an unrecoverable error.
43660      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43661$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43662      has_space=`$ECHO "$complete" | $GREP " "`
43663      if test "x$has_space" != x; then
43664        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43665$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43666      fi
43667      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43668    fi
43669  fi
43670
43671  # Now new_path has a complete unix path to the binary
43672  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43673    # Keep paths in /bin as-is, but remove trailing .exe if any
43674    new_path="${new_path/%.exe/}"
43675    # Do not save /bin paths to all_fixpath_prefixes!
43676  else
43677    # Not in mixed or Windows style, start by that.
43678    new_path=`cmd //c echo $new_path`
43679
43680  input_path="$new_path"
43681  # Check if we need to convert this using DOS-style short mode. If the path
43682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43683  # take no chances and rewrite it.
43684  # Note: m4 eats our [], so we need to use [ and ] instead.
43685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43686  if test "x$has_forbidden_chars" != x; then
43687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43688    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43689  fi
43690
43691    # Output is in $new_path
43692
43693  windows_path="$new_path"
43694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43695    unix_path=`$CYGPATH -u "$windows_path"`
43696    new_path="$unix_path"
43697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43699    new_path="$unix_path"
43700  fi
43701
43702    # remove trailing .exe if any
43703    new_path="${new_path/%.exe/}"
43704
43705    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43706    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43707  fi
43708
43709    else
43710      # We're on a unix platform. Hooray! :)
43711      # First separate the path from the arguments. This will split at the first
43712      # space.
43713      complete="$OBJDUMP"
43714      path="${complete%% *}"
43715      tmp="$complete EOL"
43716      arguments="${tmp#* }"
43717
43718      # Cannot rely on the command "which" here since it doesn't always work.
43719      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43720      if test -z "$is_absolute_path"; then
43721        # Path to executable is not absolute. Find it.
43722        IFS_save="$IFS"
43723        IFS=:
43724        for p in $PATH; do
43725          if test -f "$p/$path" && test -x "$p/$path"; then
43726            new_path="$p/$path"
43727            break
43728          fi
43729        done
43730        IFS="$IFS_save"
43731      else
43732        # This is an absolute path, we can use it without further modifications.
43733        new_path="$path"
43734      fi
43735
43736      if test "x$new_path" = x; then
43737        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43738$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43739        has_space=`$ECHO "$complete" | $GREP " "`
43740        if test "x$has_space" != x; then
43741          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43742$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43743        fi
43744        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43745      fi
43746    fi
43747
43748    # Now join together the path and the arguments once again
43749    if test "x$arguments" != xEOL; then
43750      new_complete="$new_path ${arguments% *}"
43751    else
43752      new_complete="$new_path"
43753    fi
43754
43755    if test "x$complete" != "x$new_complete"; then
43756      OBJDUMP="$new_complete"
43757      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43758$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43759    fi
43760  fi
43761
43762  fi
43763
43764
43765  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43766  # to remain in place. Otherwise the compiler will not work in some siutations
43767  # in later configure checks.
43768  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43769    PATH="$OLD_PATH"
43770  fi
43771
43772  # Restore the flags to the user specified values.
43773  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43774  CFLAGS="$ORG_CFLAGS"
43775  CXXFLAGS="$ORG_CXXFLAGS"
43776
43777
43778# Finally do some processing after the detection phase
43779
43780  if test "x$COMPILE_TYPE" = "xcross"; then
43781    # Now we need to find a C/C++ compiler that can build executables for the
43782    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43783    # used once. Also, we need to do this without adding a tools dir to the
43784    # path, otherwise we might pick up cross-compilers which don't use standard
43785    # naming.
43786
43787    OLDPATH="$PATH"
43788
43789
43790# Check whether --with-build-devkit was given.
43791if test "${with_build_devkit+set}" = set; then :
43792  withval=$with_build_devkit;
43793fi
43794
43795    if test "x$with_build_devkit" = "xyes"; then
43796      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43797    elif test -n "$with_build_devkit"; then
43798      if test ! -d "$with_build_devkit"; then
43799        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43800      else
43801
43802  # Only process if variable expands to non-empty
43803
43804  if test "x$with_build_devkit" != x; then
43805    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43806
43807  # Input might be given as Windows format, start by converting to
43808  # unix format.
43809  path="$with_build_devkit"
43810  new_path=`$CYGPATH -u "$path"`
43811
43812  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43813  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43814  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43815  # "foo.exe" is OK but "foo" is an error.
43816  #
43817  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43818  # It is also a way to make sure we got the proper file name for the real test later on.
43819  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43820  if test "x$test_shortpath" = x; then
43821    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43822$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43823    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43824  fi
43825
43826  # Call helper function which possibly converts this using DOS-style short mode.
43827  # If so, the updated path is stored in $new_path.
43828
43829  input_path="$new_path"
43830  # Check if we need to convert this using DOS-style short mode. If the path
43831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43832  # take no chances and rewrite it.
43833  # Note: m4 eats our [], so we need to use [ and ] instead.
43834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43835  if test "x$has_forbidden_chars" != x; then
43836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43837    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43838    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43839    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43840      # Going to short mode and back again did indeed matter. Since short mode is
43841      # case insensitive, let's make it lowercase to improve readability.
43842      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43843      # Now convert it back to Unix-style (cygpath)
43844      input_path=`$CYGPATH -u "$shortmode_path"`
43845      new_path="$input_path"
43846    fi
43847  fi
43848
43849  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43850  if test "x$test_cygdrive_prefix" = x; then
43851    # As a simple fix, exclude /usr/bin since it's not a real path.
43852    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43853      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43854      # a path prefixed by /cygdrive for fixpath to work.
43855      new_path="$CYGWIN_ROOT_PATH$input_path"
43856    fi
43857  fi
43858
43859
43860  if test "x$path" != "x$new_path"; then
43861    with_build_devkit="$new_path"
43862    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43863$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43864  fi
43865
43866    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43867
43868  path="$with_build_devkit"
43869  has_colon=`$ECHO $path | $GREP ^.:`
43870  new_path="$path"
43871  if test "x$has_colon" = x; then
43872    # Not in mixed or Windows style, start by that.
43873    new_path=`cmd //c echo $path`
43874  fi
43875
43876
43877  input_path="$new_path"
43878  # Check if we need to convert this using DOS-style short mode. If the path
43879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43880  # take no chances and rewrite it.
43881  # Note: m4 eats our [], so we need to use [ and ] instead.
43882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43883  if test "x$has_forbidden_chars" != x; then
43884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43885    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43886  fi
43887
43888
43889  windows_path="$new_path"
43890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43891    unix_path=`$CYGPATH -u "$windows_path"`
43892    new_path="$unix_path"
43893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43895    new_path="$unix_path"
43896  fi
43897
43898  if test "x$path" != "x$new_path"; then
43899    with_build_devkit="$new_path"
43900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43901$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43902  fi
43903
43904  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43905  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43906
43907    else
43908      # We're on a unix platform. Hooray! :)
43909      path="$with_build_devkit"
43910      has_space=`$ECHO "$path" | $GREP " "`
43911      if test "x$has_space" != x; then
43912        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43913$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43914        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43915      fi
43916
43917      # Use eval to expand a potential ~
43918      eval path="$path"
43919      if test ! -f "$path" && test ! -d "$path"; then
43920        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43921      fi
43922
43923      if test -d "$path"; then
43924        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43925      else
43926        dir="`$DIRNAME "$path"`"
43927        base="`$BASENAME "$path"`"
43928        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43929      fi
43930    fi
43931  fi
43932
43933        BUILD_DEVKIT_ROOT="$with_build_devkit"
43934        # Check for a meta data info file in the root of the devkit
43935        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43936          # Process devkit.info so that existing devkit variables are not
43937          # modified by this
43938          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43939              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43940              -e "s/\$host/\$build/g" \
43941              $BUILD_DEVKIT_ROOT/devkit.info \
43942              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43943          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43944          # This potentially sets the following:
43945          # A descriptive name of the devkit
43946
43947  if test "x$BUILD_DEVKIT_NAME" = x; then
43948    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43949  fi
43950
43951          # Corresponds to --with-extra-path
43952
43953  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43954    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43955  fi
43956
43957          # Corresponds to --with-toolchain-path
43958
43959  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43960    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43961  fi
43962
43963          # Corresponds to --with-sysroot
43964
43965  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43966    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43967  fi
43968
43969          # Skip the Window specific parts
43970        fi
43971
43972        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43973$as_echo_n "checking for build platform devkit... " >&6; }
43974        if test "x$BUILD_DEVKIT_NAME" != x; then
43975          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43976$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43977        else
43978          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43979$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43980        fi
43981
43982        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43983
43984  if test "x$BUILD_SYSROOT" != "x"; then
43985    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43986      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43987        # Solaris Studio does not have a concept of sysroot. Instead we must
43988        # make sure the default include and lib dirs are appended to each
43989        # compile and link command line. Must also add -I-xbuiltin to enable
43990        # inlining of system functions and intrinsics.
43991        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43992        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43993            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
43994      fi
43995    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43996      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43997      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43998    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43999      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44000      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44001    fi
44002    # Propagate the sysroot args to hotspot
44003    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
44004    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44005    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44006    # The global CFLAGS and LDFLAGS variables need these for configure to function
44007    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44008    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44009    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44010    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44011  fi
44012
44013  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44014    # We also need -iframework<path>/System/Library/Frameworks
44015    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44016    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44017    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44018    # set this here so it doesn't have to be peppered throughout the forest
44019    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44020    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44021  fi
44022
44023
44024
44025
44026
44027         # Fallback default of just /bin if DEVKIT_PATH is not defined
44028        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44029          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44030        fi
44031        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44032      fi
44033    fi
44034
44035    # FIXME: we should list the discovered compilers as an exclude pattern!
44036    # If we do that, we can do this detection before POST_DETECTION, and still
44037    # find the build compilers in the tools dir, if needed.
44038
44039
44040
44041  # Publish this variable in the help.
44042
44043
44044  if [ -z "${BUILD_CC+x}" ]; then
44045    # The variable is not set by user, try to locate tool using the code snippet
44046    for ac_prog in cl cc gcc
44047do
44048  # Extract the first word of "$ac_prog", so it can be a program name with args.
44049set dummy $ac_prog; ac_word=$2
44050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44051$as_echo_n "checking for $ac_word... " >&6; }
44052if ${ac_cv_path_BUILD_CC+:} false; then :
44053  $as_echo_n "(cached) " >&6
44054else
44055  case $BUILD_CC in
44056  [\\/]* | ?:[\\/]*)
44057  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44058  ;;
44059  *)
44060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44061for as_dir in $PATH
44062do
44063  IFS=$as_save_IFS
44064  test -z "$as_dir" && as_dir=.
44065    for ac_exec_ext in '' $ac_executable_extensions; do
44066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44067    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44069    break 2
44070  fi
44071done
44072  done
44073IFS=$as_save_IFS
44074
44075  ;;
44076esac
44077fi
44078BUILD_CC=$ac_cv_path_BUILD_CC
44079if test -n "$BUILD_CC"; then
44080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44081$as_echo "$BUILD_CC" >&6; }
44082else
44083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44084$as_echo "no" >&6; }
44085fi
44086
44087
44088  test -n "$BUILD_CC" && break
44089done
44090
44091  else
44092    # The variable is set, but is it from the command line or the environment?
44093
44094    # Try to remove the string !BUILD_CC! from our list.
44095    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44096    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44097      # If it failed, the variable was not from the command line. Ignore it,
44098      # but warn the user (except for BASH, which is always set by the calling BASH).
44099      if test "xBUILD_CC" != xBASH; then
44100        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44101$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44102      fi
44103      # Try to locate tool using the code snippet
44104      for ac_prog in cl cc gcc
44105do
44106  # Extract the first word of "$ac_prog", so it can be a program name with args.
44107set dummy $ac_prog; ac_word=$2
44108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44109$as_echo_n "checking for $ac_word... " >&6; }
44110if ${ac_cv_path_BUILD_CC+:} false; then :
44111  $as_echo_n "(cached) " >&6
44112else
44113  case $BUILD_CC in
44114  [\\/]* | ?:[\\/]*)
44115  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44116  ;;
44117  *)
44118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44119for as_dir in $PATH
44120do
44121  IFS=$as_save_IFS
44122  test -z "$as_dir" && as_dir=.
44123    for ac_exec_ext in '' $ac_executable_extensions; do
44124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44125    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44127    break 2
44128  fi
44129done
44130  done
44131IFS=$as_save_IFS
44132
44133  ;;
44134esac
44135fi
44136BUILD_CC=$ac_cv_path_BUILD_CC
44137if test -n "$BUILD_CC"; then
44138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44139$as_echo "$BUILD_CC" >&6; }
44140else
44141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44142$as_echo "no" >&6; }
44143fi
44144
44145
44146  test -n "$BUILD_CC" && break
44147done
44148
44149    else
44150      # If it succeeded, then it was overridden by the user. We will use it
44151      # for the tool.
44152
44153      # First remove it from the list of overridden variables, so we can test
44154      # for unknown variables in the end.
44155      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44156
44157      # Check if we try to supply an empty value
44158      if test "x$BUILD_CC" = x; then
44159        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44160$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44161        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44162$as_echo_n "checking for BUILD_CC... " >&6; }
44163        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44164$as_echo "disabled" >&6; }
44165      else
44166        # Check if the provided tool contains a complete path.
44167        tool_specified="$BUILD_CC"
44168        tool_basename="${tool_specified##*/}"
44169        if test "x$tool_basename" = "x$tool_specified"; then
44170          # A command without a complete path is provided, search $PATH.
44171          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44172$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44173          # Extract the first word of "$tool_basename", so it can be a program name with args.
44174set dummy $tool_basename; ac_word=$2
44175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44176$as_echo_n "checking for $ac_word... " >&6; }
44177if ${ac_cv_path_BUILD_CC+:} false; then :
44178  $as_echo_n "(cached) " >&6
44179else
44180  case $BUILD_CC in
44181  [\\/]* | ?:[\\/]*)
44182  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44183  ;;
44184  *)
44185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44186for as_dir in $PATH
44187do
44188  IFS=$as_save_IFS
44189  test -z "$as_dir" && as_dir=.
44190    for ac_exec_ext in '' $ac_executable_extensions; do
44191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44192    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44194    break 2
44195  fi
44196done
44197  done
44198IFS=$as_save_IFS
44199
44200  ;;
44201esac
44202fi
44203BUILD_CC=$ac_cv_path_BUILD_CC
44204if test -n "$BUILD_CC"; then
44205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44206$as_echo "$BUILD_CC" >&6; }
44207else
44208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44209$as_echo "no" >&6; }
44210fi
44211
44212
44213          if test "x$BUILD_CC" = x; then
44214            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44215          fi
44216        else
44217          # Otherwise we believe it is a complete path. Use it as it is.
44218          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44219$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44220          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44221$as_echo_n "checking for BUILD_CC... " >&6; }
44222          if test ! -x "$tool_specified"; then
44223            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44224$as_echo "not found" >&6; }
44225            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44226          fi
44227          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44228$as_echo "$tool_specified" >&6; }
44229        fi
44230      fi
44231    fi
44232
44233  fi
44234
44235
44236
44237  if test "x$BUILD_CC" = x; then
44238    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44239  fi
44240
44241
44242
44243  # Only process if variable expands to non-empty
44244
44245  if test "x$BUILD_CC" != x; then
44246    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44247
44248  # First separate the path from the arguments. This will split at the first
44249  # space.
44250  complete="$BUILD_CC"
44251  path="${complete%% *}"
44252  tmp="$complete EOL"
44253  arguments="${tmp#* }"
44254
44255  # Input might be given as Windows format, start by converting to
44256  # unix format.
44257  new_path=`$CYGPATH -u "$path"`
44258
44259  # Now try to locate executable using which
44260  new_path=`$WHICH "$new_path" 2> /dev/null`
44261  # bat and cmd files are not always considered executable in cygwin causing which
44262  # to not find them
44263  if test "x$new_path" = x \
44264      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44265      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44266    new_path=`$CYGPATH -u "$path"`
44267  fi
44268  if test "x$new_path" = x; then
44269    # Oops. Which didn't find the executable.
44270    # The splitting of arguments from the executable at a space might have been incorrect,
44271    # since paths with space are more likely in Windows. Give it another try with the whole
44272    # argument.
44273    path="$complete"
44274    arguments="EOL"
44275    new_path=`$CYGPATH -u "$path"`
44276    new_path=`$WHICH "$new_path" 2> /dev/null`
44277    # bat and cmd files are not always considered executable in cygwin causing which
44278    # to not find them
44279    if test "x$new_path" = x \
44280        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44281        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44282      new_path=`$CYGPATH -u "$path"`
44283    fi
44284    if test "x$new_path" = x; then
44285      # It's still not found. Now this is an unrecoverable error.
44286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44287$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44288      has_space=`$ECHO "$complete" | $GREP " "`
44289      if test "x$has_space" != x; then
44290        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44291$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44292      fi
44293      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44294    fi
44295  fi
44296
44297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44300  # "foo.exe" is OK but "foo" is an error.
44301  #
44302  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44303  # It is also a way to make sure we got the proper file name for the real test later on.
44304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44305  if test "x$test_shortpath" = x; then
44306    # Short path failed, file does not exist as specified.
44307    # Try adding .exe or .cmd
44308    if test -f "${new_path}.exe"; then
44309      input_to_shortpath="${new_path}.exe"
44310    elif test -f "${new_path}.cmd"; then
44311      input_to_shortpath="${new_path}.cmd"
44312    else
44313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44314$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44315      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44316$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44317      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44318    fi
44319  else
44320    input_to_shortpath="$new_path"
44321  fi
44322
44323  # Call helper function which possibly converts this using DOS-style short mode.
44324  # If so, the updated path is stored in $new_path.
44325  new_path="$input_to_shortpath"
44326
44327  input_path="$input_to_shortpath"
44328  # Check if we need to convert this using DOS-style short mode. If the path
44329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44330  # take no chances and rewrite it.
44331  # Note: m4 eats our [], so we need to use [ and ] instead.
44332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44333  if test "x$has_forbidden_chars" != x; then
44334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44338      # Going to short mode and back again did indeed matter. Since short mode is
44339      # case insensitive, let's make it lowercase to improve readability.
44340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44341      # Now convert it back to Unix-style (cygpath)
44342      input_path=`$CYGPATH -u "$shortmode_path"`
44343      new_path="$input_path"
44344    fi
44345  fi
44346
44347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44348  if test "x$test_cygdrive_prefix" = x; then
44349    # As a simple fix, exclude /usr/bin since it's not a real path.
44350    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44352      # a path prefixed by /cygdrive for fixpath to work.
44353      new_path="$CYGWIN_ROOT_PATH$input_path"
44354    fi
44355  fi
44356
44357  # remove trailing .exe if any
44358  new_path="${new_path/%.exe/}"
44359
44360    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44361
44362  # First separate the path from the arguments. This will split at the first
44363  # space.
44364  complete="$BUILD_CC"
44365  path="${complete%% *}"
44366  tmp="$complete EOL"
44367  arguments="${tmp#* }"
44368
44369  # Input might be given as Windows format, start by converting to
44370  # unix format.
44371  new_path="$path"
44372
44373  windows_path="$new_path"
44374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44375    unix_path=`$CYGPATH -u "$windows_path"`
44376    new_path="$unix_path"
44377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44379    new_path="$unix_path"
44380  fi
44381
44382
44383  # Now try to locate executable using which
44384  new_path=`$WHICH "$new_path" 2> /dev/null`
44385
44386  if test "x$new_path" = x; then
44387    # Oops. Which didn't find the executable.
44388    # The splitting of arguments from the executable at a space might have been incorrect,
44389    # since paths with space are more likely in Windows. Give it another try with the whole
44390    # argument.
44391    path="$complete"
44392    arguments="EOL"
44393    new_path="$path"
44394
44395  windows_path="$new_path"
44396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44397    unix_path=`$CYGPATH -u "$windows_path"`
44398    new_path="$unix_path"
44399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44401    new_path="$unix_path"
44402  fi
44403
44404
44405    new_path=`$WHICH "$new_path" 2> /dev/null`
44406    # bat and cmd files are not always considered executable in MSYS causing which
44407    # to not find them
44408    if test "x$new_path" = x \
44409        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44410        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44411      new_path="$path"
44412
44413  windows_path="$new_path"
44414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44415    unix_path=`$CYGPATH -u "$windows_path"`
44416    new_path="$unix_path"
44417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44419    new_path="$unix_path"
44420  fi
44421
44422    fi
44423
44424    if test "x$new_path" = x; then
44425      # It's still not found. Now this is an unrecoverable error.
44426      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44427$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44428      has_space=`$ECHO "$complete" | $GREP " "`
44429      if test "x$has_space" != x; then
44430        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44431$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44432      fi
44433      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44434    fi
44435  fi
44436
44437  # Now new_path has a complete unix path to the binary
44438  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44439    # Keep paths in /bin as-is, but remove trailing .exe if any
44440    new_path="${new_path/%.exe/}"
44441    # Do not save /bin paths to all_fixpath_prefixes!
44442  else
44443    # Not in mixed or Windows style, start by that.
44444    new_path=`cmd //c echo $new_path`
44445
44446  input_path="$new_path"
44447  # Check if we need to convert this using DOS-style short mode. If the path
44448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44449  # take no chances and rewrite it.
44450  # Note: m4 eats our [], so we need to use [ and ] instead.
44451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44452  if test "x$has_forbidden_chars" != x; then
44453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44454    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44455  fi
44456
44457    # Output is in $new_path
44458
44459  windows_path="$new_path"
44460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44461    unix_path=`$CYGPATH -u "$windows_path"`
44462    new_path="$unix_path"
44463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44465    new_path="$unix_path"
44466  fi
44467
44468    # remove trailing .exe if any
44469    new_path="${new_path/%.exe/}"
44470
44471    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44472    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44473  fi
44474
44475    else
44476      # We're on a unix platform. Hooray! :)
44477      # First separate the path from the arguments. This will split at the first
44478      # space.
44479      complete="$BUILD_CC"
44480      path="${complete%% *}"
44481      tmp="$complete EOL"
44482      arguments="${tmp#* }"
44483
44484      # Cannot rely on the command "which" here since it doesn't always work.
44485      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44486      if test -z "$is_absolute_path"; then
44487        # Path to executable is not absolute. Find it.
44488        IFS_save="$IFS"
44489        IFS=:
44490        for p in $PATH; do
44491          if test -f "$p/$path" && test -x "$p/$path"; then
44492            new_path="$p/$path"
44493            break
44494          fi
44495        done
44496        IFS="$IFS_save"
44497      else
44498        # This is an absolute path, we can use it without further modifications.
44499        new_path="$path"
44500      fi
44501
44502      if test "x$new_path" = x; then
44503        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44504$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44505        has_space=`$ECHO "$complete" | $GREP " "`
44506        if test "x$has_space" != x; then
44507          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44508$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44509        fi
44510        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44511      fi
44512    fi
44513
44514    # Now join together the path and the arguments once again
44515    if test "x$arguments" != xEOL; then
44516      new_complete="$new_path ${arguments% *}"
44517    else
44518      new_complete="$new_path"
44519    fi
44520
44521    if test "x$complete" != "x$new_complete"; then
44522      BUILD_CC="$new_complete"
44523      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44524$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44525    fi
44526  fi
44527
44528
44529
44530
44531  # Publish this variable in the help.
44532
44533
44534  if [ -z "${BUILD_CXX+x}" ]; then
44535    # The variable is not set by user, try to locate tool using the code snippet
44536    for ac_prog in cl CC g++
44537do
44538  # Extract the first word of "$ac_prog", so it can be a program name with args.
44539set dummy $ac_prog; ac_word=$2
44540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44541$as_echo_n "checking for $ac_word... " >&6; }
44542if ${ac_cv_path_BUILD_CXX+:} false; then :
44543  $as_echo_n "(cached) " >&6
44544else
44545  case $BUILD_CXX in
44546  [\\/]* | ?:[\\/]*)
44547  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44548  ;;
44549  *)
44550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44551for as_dir in $PATH
44552do
44553  IFS=$as_save_IFS
44554  test -z "$as_dir" && as_dir=.
44555    for ac_exec_ext in '' $ac_executable_extensions; do
44556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44557    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44559    break 2
44560  fi
44561done
44562  done
44563IFS=$as_save_IFS
44564
44565  ;;
44566esac
44567fi
44568BUILD_CXX=$ac_cv_path_BUILD_CXX
44569if test -n "$BUILD_CXX"; then
44570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44571$as_echo "$BUILD_CXX" >&6; }
44572else
44573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44574$as_echo "no" >&6; }
44575fi
44576
44577
44578  test -n "$BUILD_CXX" && break
44579done
44580
44581  else
44582    # The variable is set, but is it from the command line or the environment?
44583
44584    # Try to remove the string !BUILD_CXX! from our list.
44585    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44586    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44587      # If it failed, the variable was not from the command line. Ignore it,
44588      # but warn the user (except for BASH, which is always set by the calling BASH).
44589      if test "xBUILD_CXX" != xBASH; then
44590        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44591$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44592      fi
44593      # Try to locate tool using the code snippet
44594      for ac_prog in cl CC g++
44595do
44596  # Extract the first word of "$ac_prog", so it can be a program name with args.
44597set dummy $ac_prog; ac_word=$2
44598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44599$as_echo_n "checking for $ac_word... " >&6; }
44600if ${ac_cv_path_BUILD_CXX+:} false; then :
44601  $as_echo_n "(cached) " >&6
44602else
44603  case $BUILD_CXX in
44604  [\\/]* | ?:[\\/]*)
44605  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44606  ;;
44607  *)
44608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44609for as_dir in $PATH
44610do
44611  IFS=$as_save_IFS
44612  test -z "$as_dir" && as_dir=.
44613    for ac_exec_ext in '' $ac_executable_extensions; do
44614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44615    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44617    break 2
44618  fi
44619done
44620  done
44621IFS=$as_save_IFS
44622
44623  ;;
44624esac
44625fi
44626BUILD_CXX=$ac_cv_path_BUILD_CXX
44627if test -n "$BUILD_CXX"; then
44628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44629$as_echo "$BUILD_CXX" >&6; }
44630else
44631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44632$as_echo "no" >&6; }
44633fi
44634
44635
44636  test -n "$BUILD_CXX" && break
44637done
44638
44639    else
44640      # If it succeeded, then it was overridden by the user. We will use it
44641      # for the tool.
44642
44643      # First remove it from the list of overridden variables, so we can test
44644      # for unknown variables in the end.
44645      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44646
44647      # Check if we try to supply an empty value
44648      if test "x$BUILD_CXX" = x; then
44649        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44650$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44651        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44652$as_echo_n "checking for BUILD_CXX... " >&6; }
44653        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44654$as_echo "disabled" >&6; }
44655      else
44656        # Check if the provided tool contains a complete path.
44657        tool_specified="$BUILD_CXX"
44658        tool_basename="${tool_specified##*/}"
44659        if test "x$tool_basename" = "x$tool_specified"; then
44660          # A command without a complete path is provided, search $PATH.
44661          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44662$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44663          # Extract the first word of "$tool_basename", so it can be a program name with args.
44664set dummy $tool_basename; ac_word=$2
44665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44666$as_echo_n "checking for $ac_word... " >&6; }
44667if ${ac_cv_path_BUILD_CXX+:} false; then :
44668  $as_echo_n "(cached) " >&6
44669else
44670  case $BUILD_CXX in
44671  [\\/]* | ?:[\\/]*)
44672  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44673  ;;
44674  *)
44675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44676for as_dir in $PATH
44677do
44678  IFS=$as_save_IFS
44679  test -z "$as_dir" && as_dir=.
44680    for ac_exec_ext in '' $ac_executable_extensions; do
44681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44682    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44684    break 2
44685  fi
44686done
44687  done
44688IFS=$as_save_IFS
44689
44690  ;;
44691esac
44692fi
44693BUILD_CXX=$ac_cv_path_BUILD_CXX
44694if test -n "$BUILD_CXX"; then
44695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44696$as_echo "$BUILD_CXX" >&6; }
44697else
44698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44699$as_echo "no" >&6; }
44700fi
44701
44702
44703          if test "x$BUILD_CXX" = x; then
44704            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44705          fi
44706        else
44707          # Otherwise we believe it is a complete path. Use it as it is.
44708          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44709$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44710          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44711$as_echo_n "checking for BUILD_CXX... " >&6; }
44712          if test ! -x "$tool_specified"; then
44713            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44714$as_echo "not found" >&6; }
44715            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44716          fi
44717          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44718$as_echo "$tool_specified" >&6; }
44719        fi
44720      fi
44721    fi
44722
44723  fi
44724
44725
44726
44727  if test "x$BUILD_CXX" = x; then
44728    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44729  fi
44730
44731
44732
44733  # Only process if variable expands to non-empty
44734
44735  if test "x$BUILD_CXX" != x; then
44736    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44737
44738  # First separate the path from the arguments. This will split at the first
44739  # space.
44740  complete="$BUILD_CXX"
44741  path="${complete%% *}"
44742  tmp="$complete EOL"
44743  arguments="${tmp#* }"
44744
44745  # Input might be given as Windows format, start by converting to
44746  # unix format.
44747  new_path=`$CYGPATH -u "$path"`
44748
44749  # Now try to locate executable using which
44750  new_path=`$WHICH "$new_path" 2> /dev/null`
44751  # bat and cmd files are not always considered executable in cygwin causing which
44752  # to not find them
44753  if test "x$new_path" = x \
44754      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44755      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44756    new_path=`$CYGPATH -u "$path"`
44757  fi
44758  if test "x$new_path" = x; then
44759    # Oops. Which didn't find the executable.
44760    # The splitting of arguments from the executable at a space might have been incorrect,
44761    # since paths with space are more likely in Windows. Give it another try with the whole
44762    # argument.
44763    path="$complete"
44764    arguments="EOL"
44765    new_path=`$CYGPATH -u "$path"`
44766    new_path=`$WHICH "$new_path" 2> /dev/null`
44767    # bat and cmd files are not always considered executable in cygwin causing which
44768    # to not find them
44769    if test "x$new_path" = x \
44770        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44771        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44772      new_path=`$CYGPATH -u "$path"`
44773    fi
44774    if test "x$new_path" = x; then
44775      # It's still not found. Now this is an unrecoverable error.
44776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44777$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44778      has_space=`$ECHO "$complete" | $GREP " "`
44779      if test "x$has_space" != x; then
44780        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44781$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44782      fi
44783      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44784    fi
44785  fi
44786
44787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44790  # "foo.exe" is OK but "foo" is an error.
44791  #
44792  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44793  # It is also a way to make sure we got the proper file name for the real test later on.
44794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44795  if test "x$test_shortpath" = x; then
44796    # Short path failed, file does not exist as specified.
44797    # Try adding .exe or .cmd
44798    if test -f "${new_path}.exe"; then
44799      input_to_shortpath="${new_path}.exe"
44800    elif test -f "${new_path}.cmd"; then
44801      input_to_shortpath="${new_path}.cmd"
44802    else
44803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44804$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44805      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44806$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44807      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44808    fi
44809  else
44810    input_to_shortpath="$new_path"
44811  fi
44812
44813  # Call helper function which possibly converts this using DOS-style short mode.
44814  # If so, the updated path is stored in $new_path.
44815  new_path="$input_to_shortpath"
44816
44817  input_path="$input_to_shortpath"
44818  # Check if we need to convert this using DOS-style short mode. If the path
44819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44820  # take no chances and rewrite it.
44821  # Note: m4 eats our [], so we need to use [ and ] instead.
44822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44823  if test "x$has_forbidden_chars" != x; then
44824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44825    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44826    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44827    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44828      # Going to short mode and back again did indeed matter. Since short mode is
44829      # case insensitive, let's make it lowercase to improve readability.
44830      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44831      # Now convert it back to Unix-style (cygpath)
44832      input_path=`$CYGPATH -u "$shortmode_path"`
44833      new_path="$input_path"
44834    fi
44835  fi
44836
44837  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44838  if test "x$test_cygdrive_prefix" = x; then
44839    # As a simple fix, exclude /usr/bin since it's not a real path.
44840    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44841      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44842      # a path prefixed by /cygdrive for fixpath to work.
44843      new_path="$CYGWIN_ROOT_PATH$input_path"
44844    fi
44845  fi
44846
44847  # remove trailing .exe if any
44848  new_path="${new_path/%.exe/}"
44849
44850    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44851
44852  # First separate the path from the arguments. This will split at the first
44853  # space.
44854  complete="$BUILD_CXX"
44855  path="${complete%% *}"
44856  tmp="$complete EOL"
44857  arguments="${tmp#* }"
44858
44859  # Input might be given as Windows format, start by converting to
44860  # unix format.
44861  new_path="$path"
44862
44863  windows_path="$new_path"
44864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44865    unix_path=`$CYGPATH -u "$windows_path"`
44866    new_path="$unix_path"
44867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44869    new_path="$unix_path"
44870  fi
44871
44872
44873  # Now try to locate executable using which
44874  new_path=`$WHICH "$new_path" 2> /dev/null`
44875
44876  if test "x$new_path" = x; then
44877    # Oops. Which didn't find the executable.
44878    # The splitting of arguments from the executable at a space might have been incorrect,
44879    # since paths with space are more likely in Windows. Give it another try with the whole
44880    # argument.
44881    path="$complete"
44882    arguments="EOL"
44883    new_path="$path"
44884
44885  windows_path="$new_path"
44886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44887    unix_path=`$CYGPATH -u "$windows_path"`
44888    new_path="$unix_path"
44889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44891    new_path="$unix_path"
44892  fi
44893
44894
44895    new_path=`$WHICH "$new_path" 2> /dev/null`
44896    # bat and cmd files are not always considered executable in MSYS causing which
44897    # to not find them
44898    if test "x$new_path" = x \
44899        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44900        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44901      new_path="$path"
44902
44903  windows_path="$new_path"
44904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44905    unix_path=`$CYGPATH -u "$windows_path"`
44906    new_path="$unix_path"
44907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44909    new_path="$unix_path"
44910  fi
44911
44912    fi
44913
44914    if test "x$new_path" = x; then
44915      # It's still not found. Now this is an unrecoverable error.
44916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44917$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44918      has_space=`$ECHO "$complete" | $GREP " "`
44919      if test "x$has_space" != x; then
44920        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44921$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44922      fi
44923      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44924    fi
44925  fi
44926
44927  # Now new_path has a complete unix path to the binary
44928  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44929    # Keep paths in /bin as-is, but remove trailing .exe if any
44930    new_path="${new_path/%.exe/}"
44931    # Do not save /bin paths to all_fixpath_prefixes!
44932  else
44933    # Not in mixed or Windows style, start by that.
44934    new_path=`cmd //c echo $new_path`
44935
44936  input_path="$new_path"
44937  # Check if we need to convert this using DOS-style short mode. If the path
44938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44939  # take no chances and rewrite it.
44940  # Note: m4 eats our [], so we need to use [ and ] instead.
44941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44942  if test "x$has_forbidden_chars" != x; then
44943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44944    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44945  fi
44946
44947    # Output is in $new_path
44948
44949  windows_path="$new_path"
44950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44951    unix_path=`$CYGPATH -u "$windows_path"`
44952    new_path="$unix_path"
44953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44955    new_path="$unix_path"
44956  fi
44957
44958    # remove trailing .exe if any
44959    new_path="${new_path/%.exe/}"
44960
44961    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44962    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44963  fi
44964
44965    else
44966      # We're on a unix platform. Hooray! :)
44967      # First separate the path from the arguments. This will split at the first
44968      # space.
44969      complete="$BUILD_CXX"
44970      path="${complete%% *}"
44971      tmp="$complete EOL"
44972      arguments="${tmp#* }"
44973
44974      # Cannot rely on the command "which" here since it doesn't always work.
44975      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44976      if test -z "$is_absolute_path"; then
44977        # Path to executable is not absolute. Find it.
44978        IFS_save="$IFS"
44979        IFS=:
44980        for p in $PATH; do
44981          if test -f "$p/$path" && test -x "$p/$path"; then
44982            new_path="$p/$path"
44983            break
44984          fi
44985        done
44986        IFS="$IFS_save"
44987      else
44988        # This is an absolute path, we can use it without further modifications.
44989        new_path="$path"
44990      fi
44991
44992      if test "x$new_path" = x; then
44993        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44994$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44995        has_space=`$ECHO "$complete" | $GREP " "`
44996        if test "x$has_space" != x; then
44997          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44998$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44999        fi
45000        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45001      fi
45002    fi
45003
45004    # Now join together the path and the arguments once again
45005    if test "x$arguments" != xEOL; then
45006      new_complete="$new_path ${arguments% *}"
45007    else
45008      new_complete="$new_path"
45009    fi
45010
45011    if test "x$complete" != "x$new_complete"; then
45012      BUILD_CXX="$new_complete"
45013      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45014$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45015    fi
45016  fi
45017
45018
45019
45020  # Publish this variable in the help.
45021
45022
45023  if [ -z "${BUILD_NM+x}" ]; then
45024    # The variable is not set by user, try to locate tool using the code snippet
45025    for ac_prog in nm gcc-nm
45026do
45027  # Extract the first word of "$ac_prog", so it can be a program name with args.
45028set dummy $ac_prog; ac_word=$2
45029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45030$as_echo_n "checking for $ac_word... " >&6; }
45031if ${ac_cv_path_BUILD_NM+:} false; then :
45032  $as_echo_n "(cached) " >&6
45033else
45034  case $BUILD_NM in
45035  [\\/]* | ?:[\\/]*)
45036  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45037  ;;
45038  *)
45039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45040for as_dir in $PATH
45041do
45042  IFS=$as_save_IFS
45043  test -z "$as_dir" && as_dir=.
45044    for ac_exec_ext in '' $ac_executable_extensions; do
45045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45046    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45048    break 2
45049  fi
45050done
45051  done
45052IFS=$as_save_IFS
45053
45054  ;;
45055esac
45056fi
45057BUILD_NM=$ac_cv_path_BUILD_NM
45058if test -n "$BUILD_NM"; then
45059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45060$as_echo "$BUILD_NM" >&6; }
45061else
45062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45063$as_echo "no" >&6; }
45064fi
45065
45066
45067  test -n "$BUILD_NM" && break
45068done
45069
45070  else
45071    # The variable is set, but is it from the command line or the environment?
45072
45073    # Try to remove the string !BUILD_NM! from our list.
45074    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45075    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45076      # If it failed, the variable was not from the command line. Ignore it,
45077      # but warn the user (except for BASH, which is always set by the calling BASH).
45078      if test "xBUILD_NM" != xBASH; then
45079        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45080$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45081      fi
45082      # Try to locate tool using the code snippet
45083      for ac_prog in nm gcc-nm
45084do
45085  # Extract the first word of "$ac_prog", so it can be a program name with args.
45086set dummy $ac_prog; ac_word=$2
45087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45088$as_echo_n "checking for $ac_word... " >&6; }
45089if ${ac_cv_path_BUILD_NM+:} false; then :
45090  $as_echo_n "(cached) " >&6
45091else
45092  case $BUILD_NM in
45093  [\\/]* | ?:[\\/]*)
45094  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45095  ;;
45096  *)
45097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45098for as_dir in $PATH
45099do
45100  IFS=$as_save_IFS
45101  test -z "$as_dir" && as_dir=.
45102    for ac_exec_ext in '' $ac_executable_extensions; do
45103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45104    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45106    break 2
45107  fi
45108done
45109  done
45110IFS=$as_save_IFS
45111
45112  ;;
45113esac
45114fi
45115BUILD_NM=$ac_cv_path_BUILD_NM
45116if test -n "$BUILD_NM"; then
45117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45118$as_echo "$BUILD_NM" >&6; }
45119else
45120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45121$as_echo "no" >&6; }
45122fi
45123
45124
45125  test -n "$BUILD_NM" && break
45126done
45127
45128    else
45129      # If it succeeded, then it was overridden by the user. We will use it
45130      # for the tool.
45131
45132      # First remove it from the list of overridden variables, so we can test
45133      # for unknown variables in the end.
45134      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45135
45136      # Check if we try to supply an empty value
45137      if test "x$BUILD_NM" = x; then
45138        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45139$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45140        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45141$as_echo_n "checking for BUILD_NM... " >&6; }
45142        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45143$as_echo "disabled" >&6; }
45144      else
45145        # Check if the provided tool contains a complete path.
45146        tool_specified="$BUILD_NM"
45147        tool_basename="${tool_specified##*/}"
45148        if test "x$tool_basename" = "x$tool_specified"; then
45149          # A command without a complete path is provided, search $PATH.
45150          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45151$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45152          # Extract the first word of "$tool_basename", so it can be a program name with args.
45153set dummy $tool_basename; ac_word=$2
45154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45155$as_echo_n "checking for $ac_word... " >&6; }
45156if ${ac_cv_path_BUILD_NM+:} false; then :
45157  $as_echo_n "(cached) " >&6
45158else
45159  case $BUILD_NM in
45160  [\\/]* | ?:[\\/]*)
45161  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45162  ;;
45163  *)
45164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45165for as_dir in $PATH
45166do
45167  IFS=$as_save_IFS
45168  test -z "$as_dir" && as_dir=.
45169    for ac_exec_ext in '' $ac_executable_extensions; do
45170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45171    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45173    break 2
45174  fi
45175done
45176  done
45177IFS=$as_save_IFS
45178
45179  ;;
45180esac
45181fi
45182BUILD_NM=$ac_cv_path_BUILD_NM
45183if test -n "$BUILD_NM"; then
45184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45185$as_echo "$BUILD_NM" >&6; }
45186else
45187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45188$as_echo "no" >&6; }
45189fi
45190
45191
45192          if test "x$BUILD_NM" = x; then
45193            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45194          fi
45195        else
45196          # Otherwise we believe it is a complete path. Use it as it is.
45197          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45198$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45199          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45200$as_echo_n "checking for BUILD_NM... " >&6; }
45201          if test ! -x "$tool_specified"; then
45202            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45203$as_echo "not found" >&6; }
45204            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45205          fi
45206          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45207$as_echo "$tool_specified" >&6; }
45208        fi
45209      fi
45210    fi
45211
45212  fi
45213
45214
45215
45216  # Only process if variable expands to non-empty
45217
45218  if test "x$BUILD_NM" != x; then
45219    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45220
45221  # First separate the path from the arguments. This will split at the first
45222  # space.
45223  complete="$BUILD_NM"
45224  path="${complete%% *}"
45225  tmp="$complete EOL"
45226  arguments="${tmp#* }"
45227
45228  # Input might be given as Windows format, start by converting to
45229  # unix format.
45230  new_path=`$CYGPATH -u "$path"`
45231
45232  # Now try to locate executable using which
45233  new_path=`$WHICH "$new_path" 2> /dev/null`
45234  # bat and cmd files are not always considered executable in cygwin causing which
45235  # to not find them
45236  if test "x$new_path" = x \
45237      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45238      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45239    new_path=`$CYGPATH -u "$path"`
45240  fi
45241  if test "x$new_path" = x; then
45242    # Oops. Which didn't find the executable.
45243    # The splitting of arguments from the executable at a space might have been incorrect,
45244    # since paths with space are more likely in Windows. Give it another try with the whole
45245    # argument.
45246    path="$complete"
45247    arguments="EOL"
45248    new_path=`$CYGPATH -u "$path"`
45249    new_path=`$WHICH "$new_path" 2> /dev/null`
45250    # bat and cmd files are not always considered executable in cygwin causing which
45251    # to not find them
45252    if test "x$new_path" = x \
45253        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45254        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45255      new_path=`$CYGPATH -u "$path"`
45256    fi
45257    if test "x$new_path" = x; then
45258      # It's still not found. Now this is an unrecoverable error.
45259      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45260$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45261      has_space=`$ECHO "$complete" | $GREP " "`
45262      if test "x$has_space" != x; then
45263        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45264$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45265      fi
45266      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45267    fi
45268  fi
45269
45270  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45271  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45272  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45273  # "foo.exe" is OK but "foo" is an error.
45274  #
45275  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45276  # It is also a way to make sure we got the proper file name for the real test later on.
45277  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45278  if test "x$test_shortpath" = x; then
45279    # Short path failed, file does not exist as specified.
45280    # Try adding .exe or .cmd
45281    if test -f "${new_path}.exe"; then
45282      input_to_shortpath="${new_path}.exe"
45283    elif test -f "${new_path}.cmd"; then
45284      input_to_shortpath="${new_path}.cmd"
45285    else
45286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45287$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45288      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45289$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45290      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45291    fi
45292  else
45293    input_to_shortpath="$new_path"
45294  fi
45295
45296  # Call helper function which possibly converts this using DOS-style short mode.
45297  # If so, the updated path is stored in $new_path.
45298  new_path="$input_to_shortpath"
45299
45300  input_path="$input_to_shortpath"
45301  # Check if we need to convert this using DOS-style short mode. If the path
45302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45303  # take no chances and rewrite it.
45304  # Note: m4 eats our [], so we need to use [ and ] instead.
45305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45306  if test "x$has_forbidden_chars" != x; then
45307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45311      # Going to short mode and back again did indeed matter. Since short mode is
45312      # case insensitive, let's make it lowercase to improve readability.
45313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45314      # Now convert it back to Unix-style (cygpath)
45315      input_path=`$CYGPATH -u "$shortmode_path"`
45316      new_path="$input_path"
45317    fi
45318  fi
45319
45320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45321  if test "x$test_cygdrive_prefix" = x; then
45322    # As a simple fix, exclude /usr/bin since it's not a real path.
45323    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45325      # a path prefixed by /cygdrive for fixpath to work.
45326      new_path="$CYGWIN_ROOT_PATH$input_path"
45327    fi
45328  fi
45329
45330  # remove trailing .exe if any
45331  new_path="${new_path/%.exe/}"
45332
45333    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45334
45335  # First separate the path from the arguments. This will split at the first
45336  # space.
45337  complete="$BUILD_NM"
45338  path="${complete%% *}"
45339  tmp="$complete EOL"
45340  arguments="${tmp#* }"
45341
45342  # Input might be given as Windows format, start by converting to
45343  # unix format.
45344  new_path="$path"
45345
45346  windows_path="$new_path"
45347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45348    unix_path=`$CYGPATH -u "$windows_path"`
45349    new_path="$unix_path"
45350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45352    new_path="$unix_path"
45353  fi
45354
45355
45356  # Now try to locate executable using which
45357  new_path=`$WHICH "$new_path" 2> /dev/null`
45358
45359  if test "x$new_path" = x; then
45360    # Oops. Which didn't find the executable.
45361    # The splitting of arguments from the executable at a space might have been incorrect,
45362    # since paths with space are more likely in Windows. Give it another try with the whole
45363    # argument.
45364    path="$complete"
45365    arguments="EOL"
45366    new_path="$path"
45367
45368  windows_path="$new_path"
45369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45370    unix_path=`$CYGPATH -u "$windows_path"`
45371    new_path="$unix_path"
45372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45374    new_path="$unix_path"
45375  fi
45376
45377
45378    new_path=`$WHICH "$new_path" 2> /dev/null`
45379    # bat and cmd files are not always considered executable in MSYS causing which
45380    # to not find them
45381    if test "x$new_path" = x \
45382        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45383        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45384      new_path="$path"
45385
45386  windows_path="$new_path"
45387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45388    unix_path=`$CYGPATH -u "$windows_path"`
45389    new_path="$unix_path"
45390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45392    new_path="$unix_path"
45393  fi
45394
45395    fi
45396
45397    if test "x$new_path" = x; then
45398      # It's still not found. Now this is an unrecoverable error.
45399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45400$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45401      has_space=`$ECHO "$complete" | $GREP " "`
45402      if test "x$has_space" != x; then
45403        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45404$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45405      fi
45406      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45407    fi
45408  fi
45409
45410  # Now new_path has a complete unix path to the binary
45411  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45412    # Keep paths in /bin as-is, but remove trailing .exe if any
45413    new_path="${new_path/%.exe/}"
45414    # Do not save /bin paths to all_fixpath_prefixes!
45415  else
45416    # Not in mixed or Windows style, start by that.
45417    new_path=`cmd //c echo $new_path`
45418
45419  input_path="$new_path"
45420  # Check if we need to convert this using DOS-style short mode. If the path
45421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45422  # take no chances and rewrite it.
45423  # Note: m4 eats our [], so we need to use [ and ] instead.
45424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45425  if test "x$has_forbidden_chars" != x; then
45426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45427    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45428  fi
45429
45430    # Output is in $new_path
45431
45432  windows_path="$new_path"
45433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45434    unix_path=`$CYGPATH -u "$windows_path"`
45435    new_path="$unix_path"
45436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45438    new_path="$unix_path"
45439  fi
45440
45441    # remove trailing .exe if any
45442    new_path="${new_path/%.exe/}"
45443
45444    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45445    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45446  fi
45447
45448    else
45449      # We're on a unix platform. Hooray! :)
45450      # First separate the path from the arguments. This will split at the first
45451      # space.
45452      complete="$BUILD_NM"
45453      path="${complete%% *}"
45454      tmp="$complete EOL"
45455      arguments="${tmp#* }"
45456
45457      # Cannot rely on the command "which" here since it doesn't always work.
45458      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45459      if test -z "$is_absolute_path"; then
45460        # Path to executable is not absolute. Find it.
45461        IFS_save="$IFS"
45462        IFS=:
45463        for p in $PATH; do
45464          if test -f "$p/$path" && test -x "$p/$path"; then
45465            new_path="$p/$path"
45466            break
45467          fi
45468        done
45469        IFS="$IFS_save"
45470      else
45471        # This is an absolute path, we can use it without further modifications.
45472        new_path="$path"
45473      fi
45474
45475      if test "x$new_path" = x; then
45476        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45477$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45478        has_space=`$ECHO "$complete" | $GREP " "`
45479        if test "x$has_space" != x; then
45480          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45481$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45482        fi
45483        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45484      fi
45485    fi
45486
45487    # Now join together the path and the arguments once again
45488    if test "x$arguments" != xEOL; then
45489      new_complete="$new_path ${arguments% *}"
45490    else
45491      new_complete="$new_path"
45492    fi
45493
45494    if test "x$complete" != "x$new_complete"; then
45495      BUILD_NM="$new_complete"
45496      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45497$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45498    fi
45499  fi
45500
45501
45502
45503  # Publish this variable in the help.
45504
45505
45506  if [ -z "${BUILD_AR+x}" ]; then
45507    # The variable is not set by user, try to locate tool using the code snippet
45508    for ac_prog in ar gcc-ar
45509do
45510  # Extract the first word of "$ac_prog", so it can be a program name with args.
45511set dummy $ac_prog; ac_word=$2
45512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45513$as_echo_n "checking for $ac_word... " >&6; }
45514if ${ac_cv_path_BUILD_AR+:} false; then :
45515  $as_echo_n "(cached) " >&6
45516else
45517  case $BUILD_AR in
45518  [\\/]* | ?:[\\/]*)
45519  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45520  ;;
45521  *)
45522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45523for as_dir in $PATH
45524do
45525  IFS=$as_save_IFS
45526  test -z "$as_dir" && as_dir=.
45527    for ac_exec_ext in '' $ac_executable_extensions; do
45528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45529    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45531    break 2
45532  fi
45533done
45534  done
45535IFS=$as_save_IFS
45536
45537  ;;
45538esac
45539fi
45540BUILD_AR=$ac_cv_path_BUILD_AR
45541if test -n "$BUILD_AR"; then
45542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45543$as_echo "$BUILD_AR" >&6; }
45544else
45545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45546$as_echo "no" >&6; }
45547fi
45548
45549
45550  test -n "$BUILD_AR" && break
45551done
45552
45553  else
45554    # The variable is set, but is it from the command line or the environment?
45555
45556    # Try to remove the string !BUILD_AR! from our list.
45557    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45558    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45559      # If it failed, the variable was not from the command line. Ignore it,
45560      # but warn the user (except for BASH, which is always set by the calling BASH).
45561      if test "xBUILD_AR" != xBASH; then
45562        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45563$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45564      fi
45565      # Try to locate tool using the code snippet
45566      for ac_prog in ar gcc-ar
45567do
45568  # Extract the first word of "$ac_prog", so it can be a program name with args.
45569set dummy $ac_prog; ac_word=$2
45570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45571$as_echo_n "checking for $ac_word... " >&6; }
45572if ${ac_cv_path_BUILD_AR+:} false; then :
45573  $as_echo_n "(cached) " >&6
45574else
45575  case $BUILD_AR in
45576  [\\/]* | ?:[\\/]*)
45577  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45578  ;;
45579  *)
45580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45581for as_dir in $PATH
45582do
45583  IFS=$as_save_IFS
45584  test -z "$as_dir" && as_dir=.
45585    for ac_exec_ext in '' $ac_executable_extensions; do
45586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45587    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45589    break 2
45590  fi
45591done
45592  done
45593IFS=$as_save_IFS
45594
45595  ;;
45596esac
45597fi
45598BUILD_AR=$ac_cv_path_BUILD_AR
45599if test -n "$BUILD_AR"; then
45600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45601$as_echo "$BUILD_AR" >&6; }
45602else
45603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45604$as_echo "no" >&6; }
45605fi
45606
45607
45608  test -n "$BUILD_AR" && break
45609done
45610
45611    else
45612      # If it succeeded, then it was overridden by the user. We will use it
45613      # for the tool.
45614
45615      # First remove it from the list of overridden variables, so we can test
45616      # for unknown variables in the end.
45617      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45618
45619      # Check if we try to supply an empty value
45620      if test "x$BUILD_AR" = x; then
45621        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45622$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45623        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45624$as_echo_n "checking for BUILD_AR... " >&6; }
45625        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45626$as_echo "disabled" >&6; }
45627      else
45628        # Check if the provided tool contains a complete path.
45629        tool_specified="$BUILD_AR"
45630        tool_basename="${tool_specified##*/}"
45631        if test "x$tool_basename" = "x$tool_specified"; then
45632          # A command without a complete path is provided, search $PATH.
45633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45634$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45635          # Extract the first word of "$tool_basename", so it can be a program name with args.
45636set dummy $tool_basename; ac_word=$2
45637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45638$as_echo_n "checking for $ac_word... " >&6; }
45639if ${ac_cv_path_BUILD_AR+:} false; then :
45640  $as_echo_n "(cached) " >&6
45641else
45642  case $BUILD_AR in
45643  [\\/]* | ?:[\\/]*)
45644  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45645  ;;
45646  *)
45647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45648for as_dir in $PATH
45649do
45650  IFS=$as_save_IFS
45651  test -z "$as_dir" && as_dir=.
45652    for ac_exec_ext in '' $ac_executable_extensions; do
45653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45654    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45656    break 2
45657  fi
45658done
45659  done
45660IFS=$as_save_IFS
45661
45662  ;;
45663esac
45664fi
45665BUILD_AR=$ac_cv_path_BUILD_AR
45666if test -n "$BUILD_AR"; then
45667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45668$as_echo "$BUILD_AR" >&6; }
45669else
45670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45671$as_echo "no" >&6; }
45672fi
45673
45674
45675          if test "x$BUILD_AR" = x; then
45676            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45677          fi
45678        else
45679          # Otherwise we believe it is a complete path. Use it as it is.
45680          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45681$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45682          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45683$as_echo_n "checking for BUILD_AR... " >&6; }
45684          if test ! -x "$tool_specified"; then
45685            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45686$as_echo "not found" >&6; }
45687            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45688          fi
45689          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45690$as_echo "$tool_specified" >&6; }
45691        fi
45692      fi
45693    fi
45694
45695  fi
45696
45697
45698
45699  # Only process if variable expands to non-empty
45700
45701  if test "x$BUILD_AR" != x; then
45702    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45703
45704  # First separate the path from the arguments. This will split at the first
45705  # space.
45706  complete="$BUILD_AR"
45707  path="${complete%% *}"
45708  tmp="$complete EOL"
45709  arguments="${tmp#* }"
45710
45711  # Input might be given as Windows format, start by converting to
45712  # unix format.
45713  new_path=`$CYGPATH -u "$path"`
45714
45715  # Now try to locate executable using which
45716  new_path=`$WHICH "$new_path" 2> /dev/null`
45717  # bat and cmd files are not always considered executable in cygwin causing which
45718  # to not find them
45719  if test "x$new_path" = x \
45720      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45721      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45722    new_path=`$CYGPATH -u "$path"`
45723  fi
45724  if test "x$new_path" = x; then
45725    # Oops. Which didn't find the executable.
45726    # The splitting of arguments from the executable at a space might have been incorrect,
45727    # since paths with space are more likely in Windows. Give it another try with the whole
45728    # argument.
45729    path="$complete"
45730    arguments="EOL"
45731    new_path=`$CYGPATH -u "$path"`
45732    new_path=`$WHICH "$new_path" 2> /dev/null`
45733    # bat and cmd files are not always considered executable in cygwin causing which
45734    # to not find them
45735    if test "x$new_path" = x \
45736        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45737        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45738      new_path=`$CYGPATH -u "$path"`
45739    fi
45740    if test "x$new_path" = x; then
45741      # It's still not found. Now this is an unrecoverable error.
45742      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45743$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45744      has_space=`$ECHO "$complete" | $GREP " "`
45745      if test "x$has_space" != x; then
45746        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45747$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45748      fi
45749      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45750    fi
45751  fi
45752
45753  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45754  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45755  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45756  # "foo.exe" is OK but "foo" is an error.
45757  #
45758  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45759  # It is also a way to make sure we got the proper file name for the real test later on.
45760  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45761  if test "x$test_shortpath" = x; then
45762    # Short path failed, file does not exist as specified.
45763    # Try adding .exe or .cmd
45764    if test -f "${new_path}.exe"; then
45765      input_to_shortpath="${new_path}.exe"
45766    elif test -f "${new_path}.cmd"; then
45767      input_to_shortpath="${new_path}.cmd"
45768    else
45769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45770$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45771      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45772$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45773      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45774    fi
45775  else
45776    input_to_shortpath="$new_path"
45777  fi
45778
45779  # Call helper function which possibly converts this using DOS-style short mode.
45780  # If so, the updated path is stored in $new_path.
45781  new_path="$input_to_shortpath"
45782
45783  input_path="$input_to_shortpath"
45784  # Check if we need to convert this using DOS-style short mode. If the path
45785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45786  # take no chances and rewrite it.
45787  # Note: m4 eats our [], so we need to use [ and ] instead.
45788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45789  if test "x$has_forbidden_chars" != x; then
45790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45791    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45792    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45793    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45794      # Going to short mode and back again did indeed matter. Since short mode is
45795      # case insensitive, let's make it lowercase to improve readability.
45796      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45797      # Now convert it back to Unix-style (cygpath)
45798      input_path=`$CYGPATH -u "$shortmode_path"`
45799      new_path="$input_path"
45800    fi
45801  fi
45802
45803  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45804  if test "x$test_cygdrive_prefix" = x; then
45805    # As a simple fix, exclude /usr/bin since it's not a real path.
45806    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45807      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45808      # a path prefixed by /cygdrive for fixpath to work.
45809      new_path="$CYGWIN_ROOT_PATH$input_path"
45810    fi
45811  fi
45812
45813  # remove trailing .exe if any
45814  new_path="${new_path/%.exe/}"
45815
45816    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45817
45818  # First separate the path from the arguments. This will split at the first
45819  # space.
45820  complete="$BUILD_AR"
45821  path="${complete%% *}"
45822  tmp="$complete EOL"
45823  arguments="${tmp#* }"
45824
45825  # Input might be given as Windows format, start by converting to
45826  # unix format.
45827  new_path="$path"
45828
45829  windows_path="$new_path"
45830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45831    unix_path=`$CYGPATH -u "$windows_path"`
45832    new_path="$unix_path"
45833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45835    new_path="$unix_path"
45836  fi
45837
45838
45839  # Now try to locate executable using which
45840  new_path=`$WHICH "$new_path" 2> /dev/null`
45841
45842  if test "x$new_path" = x; then
45843    # Oops. Which didn't find the executable.
45844    # The splitting of arguments from the executable at a space might have been incorrect,
45845    # since paths with space are more likely in Windows. Give it another try with the whole
45846    # argument.
45847    path="$complete"
45848    arguments="EOL"
45849    new_path="$path"
45850
45851  windows_path="$new_path"
45852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45853    unix_path=`$CYGPATH -u "$windows_path"`
45854    new_path="$unix_path"
45855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45857    new_path="$unix_path"
45858  fi
45859
45860
45861    new_path=`$WHICH "$new_path" 2> /dev/null`
45862    # bat and cmd files are not always considered executable in MSYS causing which
45863    # to not find them
45864    if test "x$new_path" = x \
45865        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45866        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45867      new_path="$path"
45868
45869  windows_path="$new_path"
45870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45871    unix_path=`$CYGPATH -u "$windows_path"`
45872    new_path="$unix_path"
45873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45875    new_path="$unix_path"
45876  fi
45877
45878    fi
45879
45880    if test "x$new_path" = x; then
45881      # It's still not found. Now this is an unrecoverable error.
45882      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45883$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45884      has_space=`$ECHO "$complete" | $GREP " "`
45885      if test "x$has_space" != x; then
45886        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45887$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45888      fi
45889      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45890    fi
45891  fi
45892
45893  # Now new_path has a complete unix path to the binary
45894  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45895    # Keep paths in /bin as-is, but remove trailing .exe if any
45896    new_path="${new_path/%.exe/}"
45897    # Do not save /bin paths to all_fixpath_prefixes!
45898  else
45899    # Not in mixed or Windows style, start by that.
45900    new_path=`cmd //c echo $new_path`
45901
45902  input_path="$new_path"
45903  # Check if we need to convert this using DOS-style short mode. If the path
45904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45905  # take no chances and rewrite it.
45906  # Note: m4 eats our [], so we need to use [ and ] instead.
45907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45908  if test "x$has_forbidden_chars" != x; then
45909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45910    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45911  fi
45912
45913    # Output is in $new_path
45914
45915  windows_path="$new_path"
45916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45917    unix_path=`$CYGPATH -u "$windows_path"`
45918    new_path="$unix_path"
45919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45921    new_path="$unix_path"
45922  fi
45923
45924    # remove trailing .exe if any
45925    new_path="${new_path/%.exe/}"
45926
45927    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45928    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45929  fi
45930
45931    else
45932      # We're on a unix platform. Hooray! :)
45933      # First separate the path from the arguments. This will split at the first
45934      # space.
45935      complete="$BUILD_AR"
45936      path="${complete%% *}"
45937      tmp="$complete EOL"
45938      arguments="${tmp#* }"
45939
45940      # Cannot rely on the command "which" here since it doesn't always work.
45941      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45942      if test -z "$is_absolute_path"; then
45943        # Path to executable is not absolute. Find it.
45944        IFS_save="$IFS"
45945        IFS=:
45946        for p in $PATH; do
45947          if test -f "$p/$path" && test -x "$p/$path"; then
45948            new_path="$p/$path"
45949            break
45950          fi
45951        done
45952        IFS="$IFS_save"
45953      else
45954        # This is an absolute path, we can use it without further modifications.
45955        new_path="$path"
45956      fi
45957
45958      if test "x$new_path" = x; then
45959        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45960$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45961        has_space=`$ECHO "$complete" | $GREP " "`
45962        if test "x$has_space" != x; then
45963          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45964$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45965        fi
45966        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45967      fi
45968    fi
45969
45970    # Now join together the path and the arguments once again
45971    if test "x$arguments" != xEOL; then
45972      new_complete="$new_path ${arguments% *}"
45973    else
45974      new_complete="$new_path"
45975    fi
45976
45977    if test "x$complete" != "x$new_complete"; then
45978      BUILD_AR="$new_complete"
45979      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45980$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45981    fi
45982  fi
45983
45984
45985
45986  # Publish this variable in the help.
45987
45988
45989  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45990    # The variable is not set by user, try to locate tool using the code snippet
45991    for ac_prog in objcopy
45992do
45993  # Extract the first word of "$ac_prog", so it can be a program name with args.
45994set dummy $ac_prog; ac_word=$2
45995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45996$as_echo_n "checking for $ac_word... " >&6; }
45997if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45998  $as_echo_n "(cached) " >&6
45999else
46000  case $BUILD_OBJCOPY in
46001  [\\/]* | ?:[\\/]*)
46002  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46003  ;;
46004  *)
46005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46006for as_dir in $PATH
46007do
46008  IFS=$as_save_IFS
46009  test -z "$as_dir" && as_dir=.
46010    for ac_exec_ext in '' $ac_executable_extensions; do
46011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46012    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46014    break 2
46015  fi
46016done
46017  done
46018IFS=$as_save_IFS
46019
46020  ;;
46021esac
46022fi
46023BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46024if test -n "$BUILD_OBJCOPY"; then
46025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46026$as_echo "$BUILD_OBJCOPY" >&6; }
46027else
46028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46029$as_echo "no" >&6; }
46030fi
46031
46032
46033  test -n "$BUILD_OBJCOPY" && break
46034done
46035
46036  else
46037    # The variable is set, but is it from the command line or the environment?
46038
46039    # Try to remove the string !BUILD_OBJCOPY! from our list.
46040    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46041    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46042      # If it failed, the variable was not from the command line. Ignore it,
46043      # but warn the user (except for BASH, which is always set by the calling BASH).
46044      if test "xBUILD_OBJCOPY" != xBASH; then
46045        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46046$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46047      fi
46048      # Try to locate tool using the code snippet
46049      for ac_prog in objcopy
46050do
46051  # Extract the first word of "$ac_prog", so it can be a program name with args.
46052set dummy $ac_prog; ac_word=$2
46053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46054$as_echo_n "checking for $ac_word... " >&6; }
46055if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46056  $as_echo_n "(cached) " >&6
46057else
46058  case $BUILD_OBJCOPY in
46059  [\\/]* | ?:[\\/]*)
46060  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46061  ;;
46062  *)
46063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46064for as_dir in $PATH
46065do
46066  IFS=$as_save_IFS
46067  test -z "$as_dir" && as_dir=.
46068    for ac_exec_ext in '' $ac_executable_extensions; do
46069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46070    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46072    break 2
46073  fi
46074done
46075  done
46076IFS=$as_save_IFS
46077
46078  ;;
46079esac
46080fi
46081BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46082if test -n "$BUILD_OBJCOPY"; then
46083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46084$as_echo "$BUILD_OBJCOPY" >&6; }
46085else
46086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46087$as_echo "no" >&6; }
46088fi
46089
46090
46091  test -n "$BUILD_OBJCOPY" && break
46092done
46093
46094    else
46095      # If it succeeded, then it was overridden by the user. We will use it
46096      # for the tool.
46097
46098      # First remove it from the list of overridden variables, so we can test
46099      # for unknown variables in the end.
46100      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46101
46102      # Check if we try to supply an empty value
46103      if test "x$BUILD_OBJCOPY" = x; then
46104        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46105$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46106        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46107$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46108        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46109$as_echo "disabled" >&6; }
46110      else
46111        # Check if the provided tool contains a complete path.
46112        tool_specified="$BUILD_OBJCOPY"
46113        tool_basename="${tool_specified##*/}"
46114        if test "x$tool_basename" = "x$tool_specified"; then
46115          # A command without a complete path is provided, search $PATH.
46116          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46117$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46118          # Extract the first word of "$tool_basename", so it can be a program name with args.
46119set dummy $tool_basename; ac_word=$2
46120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46121$as_echo_n "checking for $ac_word... " >&6; }
46122if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46123  $as_echo_n "(cached) " >&6
46124else
46125  case $BUILD_OBJCOPY in
46126  [\\/]* | ?:[\\/]*)
46127  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46128  ;;
46129  *)
46130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46131for as_dir in $PATH
46132do
46133  IFS=$as_save_IFS
46134  test -z "$as_dir" && as_dir=.
46135    for ac_exec_ext in '' $ac_executable_extensions; do
46136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46137    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46139    break 2
46140  fi
46141done
46142  done
46143IFS=$as_save_IFS
46144
46145  ;;
46146esac
46147fi
46148BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46149if test -n "$BUILD_OBJCOPY"; then
46150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46151$as_echo "$BUILD_OBJCOPY" >&6; }
46152else
46153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46154$as_echo "no" >&6; }
46155fi
46156
46157
46158          if test "x$BUILD_OBJCOPY" = x; then
46159            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46160          fi
46161        else
46162          # Otherwise we believe it is a complete path. Use it as it is.
46163          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46164$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46165          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46166$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46167          if test ! -x "$tool_specified"; then
46168            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46169$as_echo "not found" >&6; }
46170            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46171          fi
46172          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46173$as_echo "$tool_specified" >&6; }
46174        fi
46175      fi
46176    fi
46177
46178  fi
46179
46180
46181
46182  # Only process if variable expands to non-empty
46183
46184  if test "x$BUILD_OBJCOPY" != x; then
46185    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46186
46187  # First separate the path from the arguments. This will split at the first
46188  # space.
46189  complete="$BUILD_OBJCOPY"
46190  path="${complete%% *}"
46191  tmp="$complete EOL"
46192  arguments="${tmp#* }"
46193
46194  # Input might be given as Windows format, start by converting to
46195  # unix format.
46196  new_path=`$CYGPATH -u "$path"`
46197
46198  # Now try to locate executable using which
46199  new_path=`$WHICH "$new_path" 2> /dev/null`
46200  # bat and cmd files are not always considered executable in cygwin causing which
46201  # to not find them
46202  if test "x$new_path" = x \
46203      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46204      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46205    new_path=`$CYGPATH -u "$path"`
46206  fi
46207  if test "x$new_path" = x; then
46208    # Oops. Which didn't find the executable.
46209    # The splitting of arguments from the executable at a space might have been incorrect,
46210    # since paths with space are more likely in Windows. Give it another try with the whole
46211    # argument.
46212    path="$complete"
46213    arguments="EOL"
46214    new_path=`$CYGPATH -u "$path"`
46215    new_path=`$WHICH "$new_path" 2> /dev/null`
46216    # bat and cmd files are not always considered executable in cygwin causing which
46217    # to not find them
46218    if test "x$new_path" = x \
46219        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46220        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46221      new_path=`$CYGPATH -u "$path"`
46222    fi
46223    if test "x$new_path" = x; then
46224      # It's still not found. Now this is an unrecoverable error.
46225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46226$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46227      has_space=`$ECHO "$complete" | $GREP " "`
46228      if test "x$has_space" != x; then
46229        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46230$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46231      fi
46232      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46233    fi
46234  fi
46235
46236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46239  # "foo.exe" is OK but "foo" is an error.
46240  #
46241  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46242  # It is also a way to make sure we got the proper file name for the real test later on.
46243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46244  if test "x$test_shortpath" = x; then
46245    # Short path failed, file does not exist as specified.
46246    # Try adding .exe or .cmd
46247    if test -f "${new_path}.exe"; then
46248      input_to_shortpath="${new_path}.exe"
46249    elif test -f "${new_path}.cmd"; then
46250      input_to_shortpath="${new_path}.cmd"
46251    else
46252      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46253$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46254      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46255$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46256      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46257    fi
46258  else
46259    input_to_shortpath="$new_path"
46260  fi
46261
46262  # Call helper function which possibly converts this using DOS-style short mode.
46263  # If so, the updated path is stored in $new_path.
46264  new_path="$input_to_shortpath"
46265
46266  input_path="$input_to_shortpath"
46267  # Check if we need to convert this using DOS-style short mode. If the path
46268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46269  # take no chances and rewrite it.
46270  # Note: m4 eats our [], so we need to use [ and ] instead.
46271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46272  if test "x$has_forbidden_chars" != x; then
46273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46274    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46275    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46276    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46277      # Going to short mode and back again did indeed matter. Since short mode is
46278      # case insensitive, let's make it lowercase to improve readability.
46279      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46280      # Now convert it back to Unix-style (cygpath)
46281      input_path=`$CYGPATH -u "$shortmode_path"`
46282      new_path="$input_path"
46283    fi
46284  fi
46285
46286  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46287  if test "x$test_cygdrive_prefix" = x; then
46288    # As a simple fix, exclude /usr/bin since it's not a real path.
46289    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46290      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46291      # a path prefixed by /cygdrive for fixpath to work.
46292      new_path="$CYGWIN_ROOT_PATH$input_path"
46293    fi
46294  fi
46295
46296  # remove trailing .exe if any
46297  new_path="${new_path/%.exe/}"
46298
46299    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46300
46301  # First separate the path from the arguments. This will split at the first
46302  # space.
46303  complete="$BUILD_OBJCOPY"
46304  path="${complete%% *}"
46305  tmp="$complete EOL"
46306  arguments="${tmp#* }"
46307
46308  # Input might be given as Windows format, start by converting to
46309  # unix format.
46310  new_path="$path"
46311
46312  windows_path="$new_path"
46313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46314    unix_path=`$CYGPATH -u "$windows_path"`
46315    new_path="$unix_path"
46316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46318    new_path="$unix_path"
46319  fi
46320
46321
46322  # Now try to locate executable using which
46323  new_path=`$WHICH "$new_path" 2> /dev/null`
46324
46325  if test "x$new_path" = x; then
46326    # Oops. Which didn't find the executable.
46327    # The splitting of arguments from the executable at a space might have been incorrect,
46328    # since paths with space are more likely in Windows. Give it another try with the whole
46329    # argument.
46330    path="$complete"
46331    arguments="EOL"
46332    new_path="$path"
46333
46334  windows_path="$new_path"
46335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46336    unix_path=`$CYGPATH -u "$windows_path"`
46337    new_path="$unix_path"
46338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46340    new_path="$unix_path"
46341  fi
46342
46343
46344    new_path=`$WHICH "$new_path" 2> /dev/null`
46345    # bat and cmd files are not always considered executable in MSYS causing which
46346    # to not find them
46347    if test "x$new_path" = x \
46348        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46349        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46350      new_path="$path"
46351
46352  windows_path="$new_path"
46353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46354    unix_path=`$CYGPATH -u "$windows_path"`
46355    new_path="$unix_path"
46356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46358    new_path="$unix_path"
46359  fi
46360
46361    fi
46362
46363    if test "x$new_path" = x; then
46364      # It's still not found. Now this is an unrecoverable error.
46365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46366$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46367      has_space=`$ECHO "$complete" | $GREP " "`
46368      if test "x$has_space" != x; then
46369        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46370$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46371      fi
46372      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46373    fi
46374  fi
46375
46376  # Now new_path has a complete unix path to the binary
46377  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46378    # Keep paths in /bin as-is, but remove trailing .exe if any
46379    new_path="${new_path/%.exe/}"
46380    # Do not save /bin paths to all_fixpath_prefixes!
46381  else
46382    # Not in mixed or Windows style, start by that.
46383    new_path=`cmd //c echo $new_path`
46384
46385  input_path="$new_path"
46386  # Check if we need to convert this using DOS-style short mode. If the path
46387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46388  # take no chances and rewrite it.
46389  # Note: m4 eats our [], so we need to use [ and ] instead.
46390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46391  if test "x$has_forbidden_chars" != x; then
46392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46394  fi
46395
46396    # Output is in $new_path
46397
46398  windows_path="$new_path"
46399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46400    unix_path=`$CYGPATH -u "$windows_path"`
46401    new_path="$unix_path"
46402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46404    new_path="$unix_path"
46405  fi
46406
46407    # remove trailing .exe if any
46408    new_path="${new_path/%.exe/}"
46409
46410    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46411    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46412  fi
46413
46414    else
46415      # We're on a unix platform. Hooray! :)
46416      # First separate the path from the arguments. This will split at the first
46417      # space.
46418      complete="$BUILD_OBJCOPY"
46419      path="${complete%% *}"
46420      tmp="$complete EOL"
46421      arguments="${tmp#* }"
46422
46423      # Cannot rely on the command "which" here since it doesn't always work.
46424      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46425      if test -z "$is_absolute_path"; then
46426        # Path to executable is not absolute. Find it.
46427        IFS_save="$IFS"
46428        IFS=:
46429        for p in $PATH; do
46430          if test -f "$p/$path" && test -x "$p/$path"; then
46431            new_path="$p/$path"
46432            break
46433          fi
46434        done
46435        IFS="$IFS_save"
46436      else
46437        # This is an absolute path, we can use it without further modifications.
46438        new_path="$path"
46439      fi
46440
46441      if test "x$new_path" = x; then
46442        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46443$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46444        has_space=`$ECHO "$complete" | $GREP " "`
46445        if test "x$has_space" != x; then
46446          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46447$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46448        fi
46449        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46450      fi
46451    fi
46452
46453    # Now join together the path and the arguments once again
46454    if test "x$arguments" != xEOL; then
46455      new_complete="$new_path ${arguments% *}"
46456    else
46457      new_complete="$new_path"
46458    fi
46459
46460    if test "x$complete" != "x$new_complete"; then
46461      BUILD_OBJCOPY="$new_complete"
46462      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46463$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46464    fi
46465  fi
46466
46467
46468
46469  # Publish this variable in the help.
46470
46471
46472  if [ -z "${BUILD_STRIP+x}" ]; then
46473    # The variable is not set by user, try to locate tool using the code snippet
46474    for ac_prog in strip
46475do
46476  # Extract the first word of "$ac_prog", so it can be a program name with args.
46477set dummy $ac_prog; ac_word=$2
46478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46479$as_echo_n "checking for $ac_word... " >&6; }
46480if ${ac_cv_path_BUILD_STRIP+:} false; then :
46481  $as_echo_n "(cached) " >&6
46482else
46483  case $BUILD_STRIP in
46484  [\\/]* | ?:[\\/]*)
46485  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46486  ;;
46487  *)
46488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46489for as_dir in $PATH
46490do
46491  IFS=$as_save_IFS
46492  test -z "$as_dir" && as_dir=.
46493    for ac_exec_ext in '' $ac_executable_extensions; do
46494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46495    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46497    break 2
46498  fi
46499done
46500  done
46501IFS=$as_save_IFS
46502
46503  ;;
46504esac
46505fi
46506BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46507if test -n "$BUILD_STRIP"; then
46508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46509$as_echo "$BUILD_STRIP" >&6; }
46510else
46511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46512$as_echo "no" >&6; }
46513fi
46514
46515
46516  test -n "$BUILD_STRIP" && break
46517done
46518
46519  else
46520    # The variable is set, but is it from the command line or the environment?
46521
46522    # Try to remove the string !BUILD_STRIP! from our list.
46523    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46524    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46525      # If it failed, the variable was not from the command line. Ignore it,
46526      # but warn the user (except for BASH, which is always set by the calling BASH).
46527      if test "xBUILD_STRIP" != xBASH; then
46528        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46529$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46530      fi
46531      # Try to locate tool using the code snippet
46532      for ac_prog in strip
46533do
46534  # Extract the first word of "$ac_prog", so it can be a program name with args.
46535set dummy $ac_prog; ac_word=$2
46536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46537$as_echo_n "checking for $ac_word... " >&6; }
46538if ${ac_cv_path_BUILD_STRIP+:} false; then :
46539  $as_echo_n "(cached) " >&6
46540else
46541  case $BUILD_STRIP in
46542  [\\/]* | ?:[\\/]*)
46543  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46544  ;;
46545  *)
46546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46547for as_dir in $PATH
46548do
46549  IFS=$as_save_IFS
46550  test -z "$as_dir" && as_dir=.
46551    for ac_exec_ext in '' $ac_executable_extensions; do
46552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46553    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46555    break 2
46556  fi
46557done
46558  done
46559IFS=$as_save_IFS
46560
46561  ;;
46562esac
46563fi
46564BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46565if test -n "$BUILD_STRIP"; then
46566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46567$as_echo "$BUILD_STRIP" >&6; }
46568else
46569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46570$as_echo "no" >&6; }
46571fi
46572
46573
46574  test -n "$BUILD_STRIP" && break
46575done
46576
46577    else
46578      # If it succeeded, then it was overridden by the user. We will use it
46579      # for the tool.
46580
46581      # First remove it from the list of overridden variables, so we can test
46582      # for unknown variables in the end.
46583      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46584
46585      # Check if we try to supply an empty value
46586      if test "x$BUILD_STRIP" = x; then
46587        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46588$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46589        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46590$as_echo_n "checking for BUILD_STRIP... " >&6; }
46591        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46592$as_echo "disabled" >&6; }
46593      else
46594        # Check if the provided tool contains a complete path.
46595        tool_specified="$BUILD_STRIP"
46596        tool_basename="${tool_specified##*/}"
46597        if test "x$tool_basename" = "x$tool_specified"; then
46598          # A command without a complete path is provided, search $PATH.
46599          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46600$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46601          # Extract the first word of "$tool_basename", so it can be a program name with args.
46602set dummy $tool_basename; ac_word=$2
46603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46604$as_echo_n "checking for $ac_word... " >&6; }
46605if ${ac_cv_path_BUILD_STRIP+:} false; then :
46606  $as_echo_n "(cached) " >&6
46607else
46608  case $BUILD_STRIP in
46609  [\\/]* | ?:[\\/]*)
46610  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46611  ;;
46612  *)
46613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46614for as_dir in $PATH
46615do
46616  IFS=$as_save_IFS
46617  test -z "$as_dir" && as_dir=.
46618    for ac_exec_ext in '' $ac_executable_extensions; do
46619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46620    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46622    break 2
46623  fi
46624done
46625  done
46626IFS=$as_save_IFS
46627
46628  ;;
46629esac
46630fi
46631BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46632if test -n "$BUILD_STRIP"; then
46633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46634$as_echo "$BUILD_STRIP" >&6; }
46635else
46636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46637$as_echo "no" >&6; }
46638fi
46639
46640
46641          if test "x$BUILD_STRIP" = x; then
46642            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46643          fi
46644        else
46645          # Otherwise we believe it is a complete path. Use it as it is.
46646          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46647$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46648          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46649$as_echo_n "checking for BUILD_STRIP... " >&6; }
46650          if test ! -x "$tool_specified"; then
46651            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46652$as_echo "not found" >&6; }
46653            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46654          fi
46655          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46656$as_echo "$tool_specified" >&6; }
46657        fi
46658      fi
46659    fi
46660
46661  fi
46662
46663
46664
46665  # Only process if variable expands to non-empty
46666
46667  if test "x$BUILD_STRIP" != x; then
46668    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46669
46670  # First separate the path from the arguments. This will split at the first
46671  # space.
46672  complete="$BUILD_STRIP"
46673  path="${complete%% *}"
46674  tmp="$complete EOL"
46675  arguments="${tmp#* }"
46676
46677  # Input might be given as Windows format, start by converting to
46678  # unix format.
46679  new_path=`$CYGPATH -u "$path"`
46680
46681  # Now try to locate executable using which
46682  new_path=`$WHICH "$new_path" 2> /dev/null`
46683  # bat and cmd files are not always considered executable in cygwin causing which
46684  # to not find them
46685  if test "x$new_path" = x \
46686      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46687      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46688    new_path=`$CYGPATH -u "$path"`
46689  fi
46690  if test "x$new_path" = x; then
46691    # Oops. Which didn't find the executable.
46692    # The splitting of arguments from the executable at a space might have been incorrect,
46693    # since paths with space are more likely in Windows. Give it another try with the whole
46694    # argument.
46695    path="$complete"
46696    arguments="EOL"
46697    new_path=`$CYGPATH -u "$path"`
46698    new_path=`$WHICH "$new_path" 2> /dev/null`
46699    # bat and cmd files are not always considered executable in cygwin causing which
46700    # to not find them
46701    if test "x$new_path" = x \
46702        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46703        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46704      new_path=`$CYGPATH -u "$path"`
46705    fi
46706    if test "x$new_path" = x; then
46707      # It's still not found. Now this is an unrecoverable error.
46708      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46709$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46710      has_space=`$ECHO "$complete" | $GREP " "`
46711      if test "x$has_space" != x; then
46712        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46713$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46714      fi
46715      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46716    fi
46717  fi
46718
46719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46722  # "foo.exe" is OK but "foo" is an error.
46723  #
46724  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46725  # It is also a way to make sure we got the proper file name for the real test later on.
46726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46727  if test "x$test_shortpath" = x; then
46728    # Short path failed, file does not exist as specified.
46729    # Try adding .exe or .cmd
46730    if test -f "${new_path}.exe"; then
46731      input_to_shortpath="${new_path}.exe"
46732    elif test -f "${new_path}.cmd"; then
46733      input_to_shortpath="${new_path}.cmd"
46734    else
46735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46736$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46737      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46738$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46739      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46740    fi
46741  else
46742    input_to_shortpath="$new_path"
46743  fi
46744
46745  # Call helper function which possibly converts this using DOS-style short mode.
46746  # If so, the updated path is stored in $new_path.
46747  new_path="$input_to_shortpath"
46748
46749  input_path="$input_to_shortpath"
46750  # Check if we need to convert this using DOS-style short mode. If the path
46751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46752  # take no chances and rewrite it.
46753  # Note: m4 eats our [], so we need to use [ and ] instead.
46754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46755  if test "x$has_forbidden_chars" != x; then
46756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46757    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46758    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46759    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46760      # Going to short mode and back again did indeed matter. Since short mode is
46761      # case insensitive, let's make it lowercase to improve readability.
46762      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46763      # Now convert it back to Unix-style (cygpath)
46764      input_path=`$CYGPATH -u "$shortmode_path"`
46765      new_path="$input_path"
46766    fi
46767  fi
46768
46769  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46770  if test "x$test_cygdrive_prefix" = x; then
46771    # As a simple fix, exclude /usr/bin since it's not a real path.
46772    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46773      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46774      # a path prefixed by /cygdrive for fixpath to work.
46775      new_path="$CYGWIN_ROOT_PATH$input_path"
46776    fi
46777  fi
46778
46779  # remove trailing .exe if any
46780  new_path="${new_path/%.exe/}"
46781
46782    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46783
46784  # First separate the path from the arguments. This will split at the first
46785  # space.
46786  complete="$BUILD_STRIP"
46787  path="${complete%% *}"
46788  tmp="$complete EOL"
46789  arguments="${tmp#* }"
46790
46791  # Input might be given as Windows format, start by converting to
46792  # unix format.
46793  new_path="$path"
46794
46795  windows_path="$new_path"
46796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46797    unix_path=`$CYGPATH -u "$windows_path"`
46798    new_path="$unix_path"
46799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46801    new_path="$unix_path"
46802  fi
46803
46804
46805  # Now try to locate executable using which
46806  new_path=`$WHICH "$new_path" 2> /dev/null`
46807
46808  if test "x$new_path" = x; then
46809    # Oops. Which didn't find the executable.
46810    # The splitting of arguments from the executable at a space might have been incorrect,
46811    # since paths with space are more likely in Windows. Give it another try with the whole
46812    # argument.
46813    path="$complete"
46814    arguments="EOL"
46815    new_path="$path"
46816
46817  windows_path="$new_path"
46818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46819    unix_path=`$CYGPATH -u "$windows_path"`
46820    new_path="$unix_path"
46821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46823    new_path="$unix_path"
46824  fi
46825
46826
46827    new_path=`$WHICH "$new_path" 2> /dev/null`
46828    # bat and cmd files are not always considered executable in MSYS causing which
46829    # to not find them
46830    if test "x$new_path" = x \
46831        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46832        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46833      new_path="$path"
46834
46835  windows_path="$new_path"
46836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46837    unix_path=`$CYGPATH -u "$windows_path"`
46838    new_path="$unix_path"
46839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46841    new_path="$unix_path"
46842  fi
46843
46844    fi
46845
46846    if test "x$new_path" = x; then
46847      # It's still not found. Now this is an unrecoverable error.
46848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46849$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46850      has_space=`$ECHO "$complete" | $GREP " "`
46851      if test "x$has_space" != x; then
46852        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46853$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46854      fi
46855      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46856    fi
46857  fi
46858
46859  # Now new_path has a complete unix path to the binary
46860  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46861    # Keep paths in /bin as-is, but remove trailing .exe if any
46862    new_path="${new_path/%.exe/}"
46863    # Do not save /bin paths to all_fixpath_prefixes!
46864  else
46865    # Not in mixed or Windows style, start by that.
46866    new_path=`cmd //c echo $new_path`
46867
46868  input_path="$new_path"
46869  # Check if we need to convert this using DOS-style short mode. If the path
46870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46871  # take no chances and rewrite it.
46872  # Note: m4 eats our [], so we need to use [ and ] instead.
46873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46874  if test "x$has_forbidden_chars" != x; then
46875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46876    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46877  fi
46878
46879    # Output is in $new_path
46880
46881  windows_path="$new_path"
46882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46883    unix_path=`$CYGPATH -u "$windows_path"`
46884    new_path="$unix_path"
46885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46887    new_path="$unix_path"
46888  fi
46889
46890    # remove trailing .exe if any
46891    new_path="${new_path/%.exe/}"
46892
46893    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46894    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46895  fi
46896
46897    else
46898      # We're on a unix platform. Hooray! :)
46899      # First separate the path from the arguments. This will split at the first
46900      # space.
46901      complete="$BUILD_STRIP"
46902      path="${complete%% *}"
46903      tmp="$complete EOL"
46904      arguments="${tmp#* }"
46905
46906      # Cannot rely on the command "which" here since it doesn't always work.
46907      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46908      if test -z "$is_absolute_path"; then
46909        # Path to executable is not absolute. Find it.
46910        IFS_save="$IFS"
46911        IFS=:
46912        for p in $PATH; do
46913          if test -f "$p/$path" && test -x "$p/$path"; then
46914            new_path="$p/$path"
46915            break
46916          fi
46917        done
46918        IFS="$IFS_save"
46919      else
46920        # This is an absolute path, we can use it without further modifications.
46921        new_path="$path"
46922      fi
46923
46924      if test "x$new_path" = x; then
46925        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46926$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46927        has_space=`$ECHO "$complete" | $GREP " "`
46928        if test "x$has_space" != x; then
46929          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46930$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46931        fi
46932        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46933      fi
46934    fi
46935
46936    # Now join together the path and the arguments once again
46937    if test "x$arguments" != xEOL; then
46938      new_complete="$new_path ${arguments% *}"
46939    else
46940      new_complete="$new_path"
46941    fi
46942
46943    if test "x$complete" != "x$new_complete"; then
46944      BUILD_STRIP="$new_complete"
46945      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46946$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46947    fi
46948  fi
46949
46950    # Assume the C compiler is the assembler
46951    BUILD_AS="$BUILD_CC -c"
46952    # Just like for the target compiler, use the compiler as linker
46953    BUILD_LD="$BUILD_CC"
46954    BUILD_LDCXX="$BUILD_CXX"
46955
46956    PATH="$OLDPATH"
46957
46958
46959  COMPILER=$BUILD_CC
46960  COMPILER_NAME=BuildC
46961
46962  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46963    # cc -V output typically looks like
46964    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46965    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46966    # Check that this is likely to be the Solaris Studio cc.
46967    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46968    if test $? -ne 0; then
46969      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46970      { $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
46971$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46972      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46973$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46974      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46975$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46976      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46977    fi
46978    # Remove usage instructions (if present), and
46979    # collapse compiler output into a single line
46980    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46981        $SED -e 's/ *[Uu]sage:.*//'`
46982    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46983        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46984  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46985    # xlc -qversion output typically looks like
46986    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46987    #     Version: 11.01.0000.0015
46988    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46989    # Check that this is likely to be the IBM XL C compiler.
46990    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46991    if test $? -ne 0; then
46992      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46993      { $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
46994$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46995      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46996$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46997      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46998$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46999      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47000    fi
47001    # Collapse compiler output into a single line
47002    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47003    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47004        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47005  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47006    # There is no specific version flag, but all output starts with a version string.
47007    # First line typically looks something like:
47008    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47009    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47010    # Check that this is likely to be Microsoft CL.EXE.
47011    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47012    if test $? -ne 0; then
47013      { $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
47014$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47015      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47016$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47017      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47018    fi
47019    # Collapse compiler output into a single line
47020    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47021    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47022        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47023  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47024    # gcc --version output typically looks like
47025    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47026    #     Copyright (C) 2013 Free Software Foundation, Inc.
47027    #     This is free software; see the source for copying conditions.  There is NO
47028    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47029    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47030    # Check that this is likely to be GCC.
47031    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47032    if test $? -ne 0; then
47033      { $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
47034$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47035      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47036$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47037      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47038    fi
47039    # Remove Copyright and legalese from version string, and
47040    # collapse into a single line
47041    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47042        $SED -e 's/ *Copyright .*//'`
47043    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47044        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47045  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47046    # clang --version output typically looks like
47047    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47048    #    clang version 3.3 (tags/RELEASE_33/final)
47049    # or
47050    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47051    #    Target: x86_64-pc-linux-gnu
47052    #    Thread model: posix
47053    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47054    # Check that this is likely to be clang
47055    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47056    if test $? -ne 0; then
47057      { $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
47058$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47059      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47060$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47061      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47062    fi
47063    # Collapse compiler output into a single line
47064    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47065    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47066        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47067  else
47068      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47069  fi
47070  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47071  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47072  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47073  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47074
47075  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47076$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47077
47078
47079  COMPILER=$BUILD_CXX
47080  COMPILER_NAME=BuildC++
47081
47082  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47083    # cc -V output typically looks like
47084    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47085    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47086    # Check that this is likely to be the Solaris Studio cc.
47087    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
47088    if test $? -ne 0; then
47089      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47090      { $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
47091$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47092      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47093$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47094      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47095$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47096      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47097    fi
47098    # Remove usage instructions (if present), and
47099    # collapse compiler output into a single line
47100    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47101        $SED -e 's/ *[Uu]sage:.*//'`
47102    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47103        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47104  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47105    # xlc -qversion output typically looks like
47106    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47107    #     Version: 11.01.0000.0015
47108    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47109    # Check that this is likely to be the IBM XL C compiler.
47110    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47111    if test $? -ne 0; then
47112      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47113      { $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
47114$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47115      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47116$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47117      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47118$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47119      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47120    fi
47121    # Collapse compiler output into a single line
47122    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47123    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47124        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47125  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47126    # There is no specific version flag, but all output starts with a version string.
47127    # First line typically looks something like:
47128    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47129    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47130    # Check that this is likely to be Microsoft CL.EXE.
47131    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47132    if test $? -ne 0; then
47133      { $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
47134$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47135      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47136$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47137      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47138    fi
47139    # Collapse compiler output into a single line
47140    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47141    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47142        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47143  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47144    # gcc --version output typically looks like
47145    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47146    #     Copyright (C) 2013 Free Software Foundation, Inc.
47147    #     This is free software; see the source for copying conditions.  There is NO
47148    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47149    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47150    # Check that this is likely to be GCC.
47151    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47152    if test $? -ne 0; then
47153      { $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
47154$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47155      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47156$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47157      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47158    fi
47159    # Remove Copyright and legalese from version string, and
47160    # collapse into a single line
47161    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47162        $SED -e 's/ *Copyright .*//'`
47163    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47164        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47165  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47166    # clang --version output typically looks like
47167    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47168    #    clang version 3.3 (tags/RELEASE_33/final)
47169    # or
47170    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47171    #    Target: x86_64-pc-linux-gnu
47172    #    Thread model: posix
47173    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47174    # Check that this is likely to be clang
47175    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47176    if test $? -ne 0; then
47177      { $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
47178$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47179      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47180$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47181      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47182    fi
47183    # Collapse compiler output into a single line
47184    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47185    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47186        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47187  else
47188      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47189  fi
47190  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47191  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47192  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47193  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47194
47195  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47196$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47197
47198
47199  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47200    { $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
47201$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47202    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47203$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47204  fi
47205
47206  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47207  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47208    { $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
47209$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;}
47210  fi
47211
47212  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47213    { $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
47214$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47215  fi
47216
47217  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47218
47219  else
47220    # If we are not cross compiling, use the normal target compilers for
47221    # building the build platform executables.
47222    BUILD_CC="$CC"
47223    BUILD_CXX="$CXX"
47224    BUILD_LD="$LD"
47225    BUILD_LDCXX="$LDCXX"
47226    BUILD_NM="$NM"
47227    BUILD_AS="$AS"
47228    BUILD_OBJCOPY="$OBJCOPY"
47229    BUILD_STRIP="$STRIP"
47230    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47231    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47232    BUILD_AR="$AR"
47233
47234
47235  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47236    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47237$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47238    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47239$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47240  fi
47241
47242  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47243  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47244    { $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
47245$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;}
47246  fi
47247
47248  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47249    { $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
47250$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47251  fi
47252
47253  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
47254
47255  fi
47256
47257
47258
47259
47260
47261
47262
47263
47264
47265
47266
47267
47268  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47269    # For hotspot, we need these in Windows mixed path,
47270    # so rewrite them all. Need added .exe suffix.
47271    HOTSPOT_CXX="$CXX.exe"
47272    HOTSPOT_LD="$LD.exe"
47273    HOTSPOT_MT="$MT.exe"
47274    HOTSPOT_RC="$RC.exe"
47275
47276  unix_path="$HOTSPOT_CXX"
47277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47278    windows_path=`$CYGPATH -m "$unix_path"`
47279    HOTSPOT_CXX="$windows_path"
47280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47281    windows_path=`cmd //c echo $unix_path`
47282    HOTSPOT_CXX="$windows_path"
47283  fi
47284
47285
47286  unix_path="$HOTSPOT_LD"
47287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47288    windows_path=`$CYGPATH -m "$unix_path"`
47289    HOTSPOT_LD="$windows_path"
47290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47291    windows_path=`cmd //c echo $unix_path`
47292    HOTSPOT_LD="$windows_path"
47293  fi
47294
47295
47296  unix_path="$HOTSPOT_MT"
47297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47298    windows_path=`$CYGPATH -m "$unix_path"`
47299    HOTSPOT_MT="$windows_path"
47300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47301    windows_path=`cmd //c echo $unix_path`
47302    HOTSPOT_MT="$windows_path"
47303  fi
47304
47305
47306  unix_path="$HOTSPOT_RC"
47307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47308    windows_path=`$CYGPATH -m "$unix_path"`
47309    HOTSPOT_RC="$windows_path"
47310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47311    windows_path=`cmd //c echo $unix_path`
47312    HOTSPOT_RC="$windows_path"
47313  fi
47314
47315
47316
47317  else
47318    HOTSPOT_CXX="$CXX"
47319    HOTSPOT_LD="$LD"
47320  fi
47321
47322
47323
47324  if test  "x$TOOLCHAIN_TYPE" = xclang; then
47325    USE_CLANG=true
47326  fi
47327
47328
47329
47330
47331
47332  # The package path is used only on macosx?
47333  # FIXME: clean this up, and/or move it elsewhere.
47334  PACKAGE_PATH=/opt/local
47335
47336
47337  # Check for extra potential brokenness.
47338  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47339    # On Windows, double-check that we got the right compiler.
47340    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47341    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47342    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47343      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47344        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
47345      fi
47346    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47347      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47348        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47349      fi
47350    fi
47351  fi
47352
47353  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47354    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47355    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47356    # This is later checked when setting flags.
47357
47358    # "-Og" suppported for GCC 4.8 and later
47359    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403
47404
47405
47406
47407    # Execute function body
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
47451
47452
47453
47454
47455
47456    # Execute function body
47457
47458  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47459$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47460  supports=yes
47461
47462  saved_cflags="$CFLAGS"
47463  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47464  ac_ext=c
47465ac_cpp='$CPP $CPPFLAGS'
47466ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47467ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47468ac_compiler_gnu=$ac_cv_c_compiler_gnu
47469
47470  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47471/* end confdefs.h.  */
47472int i;
47473_ACEOF
47474if ac_fn_c_try_compile "$LINENO"; then :
47475
47476else
47477  supports=no
47478fi
47479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47480  ac_ext=cpp
47481ac_cpp='$CXXCPP $CPPFLAGS'
47482ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47483ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47484ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47485
47486  CFLAGS="$saved_cflags"
47487
47488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47489$as_echo "$supports" >&6; }
47490  if test "x$supports" = "xyes" ; then
47491    :
47492    C_COMP_SUPPORTS="yes"
47493  else
47494    :
47495    C_COMP_SUPPORTS="no"
47496  fi
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
47551
47552
47553
47554
47555
47556    # Execute function body
47557
47558  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47559$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47560  supports=yes
47561
47562  saved_cxxflags="$CXXFLAGS"
47563  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47564  ac_ext=cpp
47565ac_cpp='$CXXCPP $CPPFLAGS'
47566ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47567ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47568ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47569
47570  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47571/* end confdefs.h.  */
47572int i;
47573_ACEOF
47574if ac_fn_cxx_try_compile "$LINENO"; then :
47575
47576else
47577  supports=no
47578fi
47579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47580  ac_ext=cpp
47581ac_cpp='$CXXCPP $CPPFLAGS'
47582ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47583ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47584ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47585
47586  CXXFLAGS="$saved_cxxflags"
47587
47588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47589$as_echo "$supports" >&6; }
47590  if test "x$supports" = "xyes" ; then
47591    :
47592    CXX_COMP_SUPPORTS="yes"
47593  else
47594    :
47595    CXX_COMP_SUPPORTS="no"
47596  fi
47597
47598
47599
47600
47601
47602
47603
47604
47605
47606
47607
47608
47609
47610  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47611$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47612  supports=no
47613  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47614
47615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47616$as_echo "$supports" >&6; }
47617  if test "x$supports" = "xyes" ; then
47618    :
47619    HAS_CFLAG_OPTIMIZE_DEBUG=true
47620  else
47621    :
47622    HAS_CFLAG_OPTIMIZE_DEBUG=false
47623  fi
47624
47625
47626
47627
47628
47629
47630
47631    # "-z relro" supported in GNU binutils 2.17 and later
47632    LINKER_RELRO_FLAG="-Wl,-z,relro"
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
47675
47676
47677
47678
47679
47680    # Execute function body
47681
47682  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47683$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47684  supports=yes
47685
47686  saved_ldflags="$LDFLAGS"
47687  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47688  ac_ext=c
47689ac_cpp='$CPP $CPPFLAGS'
47690ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47691ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47692ac_compiler_gnu=$ac_cv_c_compiler_gnu
47693
47694  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47695/* end confdefs.h.  */
47696
47697int
47698main ()
47699{
47700
47701  ;
47702  return 0;
47703}
47704_ACEOF
47705if ac_fn_c_try_link "$LINENO"; then :
47706
47707else
47708  supports=no
47709fi
47710rm -f core conftest.err conftest.$ac_objext \
47711    conftest$ac_exeext conftest.$ac_ext
47712  ac_ext=cpp
47713ac_cpp='$CXXCPP $CPPFLAGS'
47714ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47715ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47716ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47717
47718  LDFLAGS="$saved_ldflags"
47719
47720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47721$as_echo "$supports" >&6; }
47722  if test "x$supports" = "xyes" ; then
47723    :
47724    HAS_LINKER_RELRO=true
47725  else
47726    :
47727    HAS_LINKER_RELRO=false
47728  fi
47729
47730
47731
47732
47733
47734
47735
47736
47737
47738
47739
47740
47741
47742    # "-z now" supported in GNU binutils 2.11 and later
47743    LINKER_NOW_FLAG="-Wl,-z,now"
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
47786
47787
47788
47789
47790
47791    # Execute function body
47792
47793  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47794$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47795  supports=yes
47796
47797  saved_ldflags="$LDFLAGS"
47798  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47799  ac_ext=c
47800ac_cpp='$CPP $CPPFLAGS'
47801ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47802ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47803ac_compiler_gnu=$ac_cv_c_compiler_gnu
47804
47805  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47806/* end confdefs.h.  */
47807
47808int
47809main ()
47810{
47811
47812  ;
47813  return 0;
47814}
47815_ACEOF
47816if ac_fn_c_try_link "$LINENO"; then :
47817
47818else
47819  supports=no
47820fi
47821rm -f core conftest.err conftest.$ac_objext \
47822    conftest$ac_exeext conftest.$ac_ext
47823  ac_ext=cpp
47824ac_cpp='$CXXCPP $CPPFLAGS'
47825ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47826ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47827ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47828
47829  LDFLAGS="$saved_ldflags"
47830
47831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47832$as_echo "$supports" >&6; }
47833  if test "x$supports" = "xyes" ; then
47834    :
47835    HAS_LINKER_NOW=true
47836  else
47837    :
47838    HAS_LINKER_NOW=false
47839  fi
47840
47841
47842
47843
47844
47845
47846
47847
47848
47849
47850
47851
47852  fi
47853
47854  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47855  # in executable.'
47856  USING_BROKEN_SUSE_LD=no
47857  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47858    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47859$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47860    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47861    $ECHO "int main() { }" > main.c
47862    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47863      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47864$as_echo "no" >&6; }
47865      USING_BROKEN_SUSE_LD=no
47866    else
47867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47868$as_echo "yes" >&6; }
47869      USING_BROKEN_SUSE_LD=yes
47870    fi
47871    $RM version-script.map main.c a.out
47872  fi
47873
47874
47875  # Setup hotspot lecagy names for toolchains
47876  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47877  if test "x$TOOLCHAIN_TYPE" = xclang; then
47878    HOTSPOT_TOOLCHAIN_TYPE=gcc
47879  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47880    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47881  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47882    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47883  fi
47884
47885
47886
47887# Setup the JTReg Regression Test Harness.
47888
47889
47890# Check whether --with-jtreg was given.
47891if test "${with_jtreg+set}" = set; then :
47892  withval=$with_jtreg;
47893else
47894  with_jtreg=no
47895fi
47896
47897
47898  if test "x$with_jtreg" = xno; then
47899    # jtreg disabled
47900    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47901$as_echo_n "checking for jtreg... " >&6; }
47902    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47903$as_echo "no" >&6; }
47904  else
47905    if test "x$with_jtreg" != xyes; then
47906      # with path specified.
47907      JT_HOME="$with_jtreg"
47908    fi
47909
47910    if test "x$JT_HOME" != x; then
47911      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47912$as_echo_n "checking for jtreg... " >&6; }
47913
47914      # use JT_HOME enviroment var.
47915
47916  # Only process if variable expands to non-empty
47917
47918  if test "x$JT_HOME" != x; then
47919    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47920
47921  # Input might be given as Windows format, start by converting to
47922  # unix format.
47923  path="$JT_HOME"
47924  new_path=`$CYGPATH -u "$path"`
47925
47926  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47927  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47928  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47929  # "foo.exe" is OK but "foo" is an error.
47930  #
47931  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47932  # It is also a way to make sure we got the proper file name for the real test later on.
47933  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47934  if test "x$test_shortpath" = x; then
47935    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47936$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47937    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47938  fi
47939
47940  # Call helper function which possibly converts this using DOS-style short mode.
47941  # If so, the updated path is stored in $new_path.
47942
47943  input_path="$new_path"
47944  # Check if we need to convert this using DOS-style short mode. If the path
47945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47946  # take no chances and rewrite it.
47947  # Note: m4 eats our [], so we need to use [ and ] instead.
47948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47949  if test "x$has_forbidden_chars" != x; then
47950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47951    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47952    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47953    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47954      # Going to short mode and back again did indeed matter. Since short mode is
47955      # case insensitive, let's make it lowercase to improve readability.
47956      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47957      # Now convert it back to Unix-style (cygpath)
47958      input_path=`$CYGPATH -u "$shortmode_path"`
47959      new_path="$input_path"
47960    fi
47961  fi
47962
47963  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47964  if test "x$test_cygdrive_prefix" = x; then
47965    # As a simple fix, exclude /usr/bin since it's not a real path.
47966    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47967      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47968      # a path prefixed by /cygdrive for fixpath to work.
47969      new_path="$CYGWIN_ROOT_PATH$input_path"
47970    fi
47971  fi
47972
47973
47974  if test "x$path" != "x$new_path"; then
47975    JT_HOME="$new_path"
47976    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47977$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47978  fi
47979
47980    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47981
47982  path="$JT_HOME"
47983  has_colon=`$ECHO $path | $GREP ^.:`
47984  new_path="$path"
47985  if test "x$has_colon" = x; then
47986    # Not in mixed or Windows style, start by that.
47987    new_path=`cmd //c echo $path`
47988  fi
47989
47990
47991  input_path="$new_path"
47992  # Check if we need to convert this using DOS-style short mode. If the path
47993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47994  # take no chances and rewrite it.
47995  # Note: m4 eats our [], so we need to use [ and ] instead.
47996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47997  if test "x$has_forbidden_chars" != x; then
47998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47999    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48000  fi
48001
48002
48003  windows_path="$new_path"
48004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48005    unix_path=`$CYGPATH -u "$windows_path"`
48006    new_path="$unix_path"
48007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48009    new_path="$unix_path"
48010  fi
48011
48012  if test "x$path" != "x$new_path"; then
48013    JT_HOME="$new_path"
48014    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48015$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48016  fi
48017
48018  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48019  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48020
48021    else
48022      # We're on a unix platform. Hooray! :)
48023      path="$JT_HOME"
48024      has_space=`$ECHO "$path" | $GREP " "`
48025      if test "x$has_space" != x; then
48026        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48027$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48028        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48029      fi
48030
48031      # Use eval to expand a potential ~
48032      eval path="$path"
48033      if test ! -f "$path" && test ! -d "$path"; then
48034        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48035      fi
48036
48037      if test -d "$path"; then
48038        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48039      else
48040        dir="`$DIRNAME "$path"`"
48041        base="`$BASENAME "$path"`"
48042        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48043      fi
48044    fi
48045  fi
48046
48047
48048      # jtreg win32 script works for everybody
48049      JTREGEXE="$JT_HOME/bin/jtreg"
48050
48051      if test ! -f "$JTREGEXE"; then
48052        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48053      fi
48054
48055      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48056$as_echo "$JTREGEXE" >&6; }
48057    else
48058      # try to find jtreg on path
48059
48060
48061
48062  # Publish this variable in the help.
48063
48064
48065  if [ -z "${JTREGEXE+x}" ]; then
48066    # The variable is not set by user, try to locate tool using the code snippet
48067    for ac_prog in jtreg
48068do
48069  # Extract the first word of "$ac_prog", so it can be a program name with args.
48070set dummy $ac_prog; ac_word=$2
48071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48072$as_echo_n "checking for $ac_word... " >&6; }
48073if ${ac_cv_path_JTREGEXE+:} false; then :
48074  $as_echo_n "(cached) " >&6
48075else
48076  case $JTREGEXE in
48077  [\\/]* | ?:[\\/]*)
48078  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48079  ;;
48080  *)
48081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48082for as_dir in $PATH
48083do
48084  IFS=$as_save_IFS
48085  test -z "$as_dir" && as_dir=.
48086    for ac_exec_ext in '' $ac_executable_extensions; do
48087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48088    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48090    break 2
48091  fi
48092done
48093  done
48094IFS=$as_save_IFS
48095
48096  ;;
48097esac
48098fi
48099JTREGEXE=$ac_cv_path_JTREGEXE
48100if test -n "$JTREGEXE"; then
48101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48102$as_echo "$JTREGEXE" >&6; }
48103else
48104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48105$as_echo "no" >&6; }
48106fi
48107
48108
48109  test -n "$JTREGEXE" && break
48110done
48111
48112  else
48113    # The variable is set, but is it from the command line or the environment?
48114
48115    # Try to remove the string !JTREGEXE! from our list.
48116    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48117    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48118      # If it failed, the variable was not from the command line. Ignore it,
48119      # but warn the user (except for BASH, which is always set by the calling BASH).
48120      if test "xJTREGEXE" != xBASH; then
48121        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48122$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48123      fi
48124      # Try to locate tool using the code snippet
48125      for ac_prog in jtreg
48126do
48127  # Extract the first word of "$ac_prog", so it can be a program name with args.
48128set dummy $ac_prog; ac_word=$2
48129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48130$as_echo_n "checking for $ac_word... " >&6; }
48131if ${ac_cv_path_JTREGEXE+:} false; then :
48132  $as_echo_n "(cached) " >&6
48133else
48134  case $JTREGEXE in
48135  [\\/]* | ?:[\\/]*)
48136  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48137  ;;
48138  *)
48139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48140for as_dir in $PATH
48141do
48142  IFS=$as_save_IFS
48143  test -z "$as_dir" && as_dir=.
48144    for ac_exec_ext in '' $ac_executable_extensions; do
48145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48146    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48148    break 2
48149  fi
48150done
48151  done
48152IFS=$as_save_IFS
48153
48154  ;;
48155esac
48156fi
48157JTREGEXE=$ac_cv_path_JTREGEXE
48158if test -n "$JTREGEXE"; then
48159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48160$as_echo "$JTREGEXE" >&6; }
48161else
48162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48163$as_echo "no" >&6; }
48164fi
48165
48166
48167  test -n "$JTREGEXE" && break
48168done
48169
48170    else
48171      # If it succeeded, then it was overridden by the user. We will use it
48172      # for the tool.
48173
48174      # First remove it from the list of overridden variables, so we can test
48175      # for unknown variables in the end.
48176      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48177
48178      # Check if we try to supply an empty value
48179      if test "x$JTREGEXE" = x; then
48180        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48181$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48182        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48183$as_echo_n "checking for JTREGEXE... " >&6; }
48184        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48185$as_echo "disabled" >&6; }
48186      else
48187        # Check if the provided tool contains a complete path.
48188        tool_specified="$JTREGEXE"
48189        tool_basename="${tool_specified##*/}"
48190        if test "x$tool_basename" = "x$tool_specified"; then
48191          # A command without a complete path is provided, search $PATH.
48192          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48193$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48194          # Extract the first word of "$tool_basename", so it can be a program name with args.
48195set dummy $tool_basename; ac_word=$2
48196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48197$as_echo_n "checking for $ac_word... " >&6; }
48198if ${ac_cv_path_JTREGEXE+:} false; then :
48199  $as_echo_n "(cached) " >&6
48200else
48201  case $JTREGEXE in
48202  [\\/]* | ?:[\\/]*)
48203  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48204  ;;
48205  *)
48206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48207for as_dir in $PATH
48208do
48209  IFS=$as_save_IFS
48210  test -z "$as_dir" && as_dir=.
48211    for ac_exec_ext in '' $ac_executable_extensions; do
48212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48213    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48215    break 2
48216  fi
48217done
48218  done
48219IFS=$as_save_IFS
48220
48221  ;;
48222esac
48223fi
48224JTREGEXE=$ac_cv_path_JTREGEXE
48225if test -n "$JTREGEXE"; then
48226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48227$as_echo "$JTREGEXE" >&6; }
48228else
48229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48230$as_echo "no" >&6; }
48231fi
48232
48233
48234          if test "x$JTREGEXE" = x; then
48235            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48236          fi
48237        else
48238          # Otherwise we believe it is a complete path. Use it as it is.
48239          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48240$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48241          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48242$as_echo_n "checking for JTREGEXE... " >&6; }
48243          if test ! -x "$tool_specified"; then
48244            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48245$as_echo "not found" >&6; }
48246            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48247          fi
48248          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48249$as_echo "$tool_specified" >&6; }
48250        fi
48251      fi
48252    fi
48253
48254  fi
48255
48256
48257
48258  if test "x$JTREGEXE" = x; then
48259    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48260  fi
48261
48262
48263      JT_HOME="`$DIRNAME $JTREGEXE`"
48264    fi
48265  fi
48266
48267
48268
48269
48270
48271
48272  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48273  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48274  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48275  #                              commands produced by the link step (currently AIX only)
48276  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48277    COMPILER_TARGET_BITS_FLAG="-q"
48278    COMPILER_COMMAND_FILE_FLAG="-f"
48279    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48280  else
48281    COMPILER_TARGET_BITS_FLAG="-m"
48282    COMPILER_COMMAND_FILE_FLAG="@"
48283    COMPILER_BINDCMD_FILE_FLAG=""
48284
48285    # The solstudio linker does not support @-files.
48286    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48287      COMPILER_COMMAND_FILE_FLAG=
48288    fi
48289
48290    # Check if @file is supported by gcc
48291    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48292      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48293$as_echo_n "checking if @file is supported by gcc... " >&6; }
48294      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48295      $ECHO "" "--version" > command.file
48296      if $CXX @command.file 2>&5 >&5; then
48297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48298$as_echo "yes" >&6; }
48299        COMPILER_COMMAND_FILE_FLAG="@"
48300      else
48301        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48302$as_echo "no" >&6; }
48303        COMPILER_COMMAND_FILE_FLAG=
48304      fi
48305      $RM command.file
48306    fi
48307  fi
48308
48309
48310
48311
48312  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48313  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48314    ARFLAGS="-r"
48315  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48316    ARFLAGS="-X64"
48317  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48318    # lib.exe is used as AR to create static libraries.
48319    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48320  else
48321    ARFLAGS=""
48322  fi
48323
48324
48325  ## Setup strip.
48326  # FIXME: should this really be per platform, or should it be per toolchain type?
48327  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48328  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48329  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48330    STRIPFLAGS="-g"
48331  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48332    STRIPFLAGS="-x"
48333  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48334    STRIPFLAGS="-S"
48335  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48336    STRIPFLAGS="-X32_64"
48337  fi
48338
48339
48340
48341  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48342    CC_OUT_OPTION=-Fo
48343    EXE_OUT_OPTION=-out:
48344    LD_OUT_OPTION=-out:
48345    AR_OUT_OPTION=-out:
48346  else
48347    # The option used to specify the target .o,.a or .so file.
48348    # When compiling, how to specify the to be created object file.
48349    CC_OUT_OPTION='-o$(SPACE)'
48350    # When linking, how to specify the to be created executable.
48351    EXE_OUT_OPTION='-o$(SPACE)'
48352    # When linking, how to specify the to be created dynamically linkable library.
48353    LD_OUT_OPTION='-o$(SPACE)'
48354    # When archiving, how to specify the to be create static archive for object files.
48355    AR_OUT_OPTION='rcs$(SPACE)'
48356  fi
48357
48358
48359
48360
48361
48362  # On Windows, we need to set RC flags.
48363  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48364    RC_FLAGS="-nologo -l0x409"
48365    JVM_RCFLAGS="-nologo"
48366    if test "x$DEBUG_LEVEL" = xrelease; then
48367      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48368      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48369    fi
48370
48371    # The version variables used to create RC_FLAGS may be overridden
48372    # in a custom configure script, or possibly the command line.
48373    # Let those variables be expanded at make time in spec.gmk.
48374    # The \$ are escaped to the shell, and the $(...) variables
48375    # are evaluated by make.
48376    RC_FLAGS="$RC_FLAGS \
48377        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48378        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48379        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48380        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48381        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48382        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48383        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48384
48385    JVM_RCFLAGS="$JVM_RCFLAGS \
48386        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48387        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48388        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48389        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48390        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48391        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48392        -D\"HS_FNAME=jvm.dll\" \
48393        -D\"HS_INTERNAL_NAME=jvm\""
48394  fi
48395
48396
48397
48398  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48399    # silence copyright notice and other headers.
48400    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48401  fi
48402
48403
48404# Now we can test some aspects on the target using configure macros.
48405
48406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48407$as_echo_n "checking for ANSI C header files... " >&6; }
48408if ${ac_cv_header_stdc+:} false; then :
48409  $as_echo_n "(cached) " >&6
48410else
48411  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48412/* end confdefs.h.  */
48413#include <stdlib.h>
48414#include <stdarg.h>
48415#include <string.h>
48416#include <float.h>
48417
48418int
48419main ()
48420{
48421
48422  ;
48423  return 0;
48424}
48425_ACEOF
48426if ac_fn_cxx_try_compile "$LINENO"; then :
48427  ac_cv_header_stdc=yes
48428else
48429  ac_cv_header_stdc=no
48430fi
48431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48432
48433if test $ac_cv_header_stdc = yes; then
48434  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48435  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48436/* end confdefs.h.  */
48437#include <string.h>
48438
48439_ACEOF
48440if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48441  $EGREP "memchr" >/dev/null 2>&1; then :
48442
48443else
48444  ac_cv_header_stdc=no
48445fi
48446rm -f conftest*
48447
48448fi
48449
48450if test $ac_cv_header_stdc = yes; then
48451  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48452  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48453/* end confdefs.h.  */
48454#include <stdlib.h>
48455
48456_ACEOF
48457if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48458  $EGREP "free" >/dev/null 2>&1; then :
48459
48460else
48461  ac_cv_header_stdc=no
48462fi
48463rm -f conftest*
48464
48465fi
48466
48467if test $ac_cv_header_stdc = yes; then
48468  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48469  if test "$cross_compiling" = yes; then :
48470  :
48471else
48472  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48473/* end confdefs.h.  */
48474#include <ctype.h>
48475#include <stdlib.h>
48476#if ((' ' & 0x0FF) == 0x020)
48477# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48478# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48479#else
48480# define ISLOWER(c) \
48481		   (('a' <= (c) && (c) <= 'i') \
48482		     || ('j' <= (c) && (c) <= 'r') \
48483		     || ('s' <= (c) && (c) <= 'z'))
48484# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48485#endif
48486
48487#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48488int
48489main ()
48490{
48491  int i;
48492  for (i = 0; i < 256; i++)
48493    if (XOR (islower (i), ISLOWER (i))
48494	|| toupper (i) != TOUPPER (i))
48495      return 2;
48496  return 0;
48497}
48498_ACEOF
48499if ac_fn_cxx_try_run "$LINENO"; then :
48500
48501else
48502  ac_cv_header_stdc=no
48503fi
48504rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48505  conftest.$ac_objext conftest.beam conftest.$ac_ext
48506fi
48507
48508fi
48509fi
48510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48511$as_echo "$ac_cv_header_stdc" >&6; }
48512if test $ac_cv_header_stdc = yes; then
48513
48514$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48515
48516fi
48517
48518# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48519for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48520		  inttypes.h stdint.h unistd.h
48521do :
48522  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48523ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48524"
48525if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48526  cat >>confdefs.h <<_ACEOF
48527#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48528_ACEOF
48529
48530fi
48531
48532done
48533
48534
48535
48536  ###############################################################################
48537  #
48538  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48539  # (The JVM can use 32 or 64 bit Java pointers but that decision
48540  # is made at runtime.)
48541  #
48542
48543  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48544    # Always specify -m flag on Solaris
48545    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48546
48547  # When we add flags to the "official" CFLAGS etc, we need to
48548  # keep track of these additions in ADDED_CFLAGS etc. These
48549  # will later be checked to make sure only controlled additions
48550  # have been made to CFLAGS etc.
48551  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48552  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48553  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48554
48555  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48556  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48557  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48558
48559  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48560  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48561  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48562
48563  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48564  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48565  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48566
48567  elif test "x$COMPILE_TYPE" = xreduced; then
48568    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48569      # Specify -m if running reduced on unix platforms
48570
48571  # When we add flags to the "official" CFLAGS etc, we need to
48572  # keep track of these additions in ADDED_CFLAGS etc. These
48573  # will later be checked to make sure only controlled additions
48574  # have been made to CFLAGS etc.
48575  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48576  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48577  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48578
48579  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48580  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48581  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48582
48583  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48584  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48585  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48586
48587  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48588  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48589  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48590
48591    fi
48592  fi
48593  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48594    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48595    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48596    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48597  fi
48598
48599  # Make compilation sanity check
48600  for ac_header in stdio.h
48601do :
48602  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48603if test "x$ac_cv_header_stdio_h" = xyes; then :
48604  cat >>confdefs.h <<_ACEOF
48605#define HAVE_STDIO_H 1
48606_ACEOF
48607
48608else
48609
48610    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48611$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48612    if test "x$COMPILE_TYPE" = xreduced; then
48613
48614  # Print a helpful message on how to acquire the necessary build dependency.
48615  # reduced is the help tag: freetype, cups, alsa etc
48616  MISSING_DEPENDENCY=reduced
48617
48618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48619    cygwin_help $MISSING_DEPENDENCY
48620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48621    msys_help $MISSING_DEPENDENCY
48622  else
48623    PKGHANDLER_COMMAND=
48624
48625    case $PKGHANDLER in
48626      apt-get)
48627        apt_help     $MISSING_DEPENDENCY ;;
48628      yum)
48629        yum_help     $MISSING_DEPENDENCY ;;
48630      port)
48631        port_help    $MISSING_DEPENDENCY ;;
48632      pkgutil)
48633        pkgutil_help $MISSING_DEPENDENCY ;;
48634      pkgadd)
48635        pkgadd_help  $MISSING_DEPENDENCY ;;
48636    esac
48637
48638    if test "x$PKGHANDLER_COMMAND" != x; then
48639      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48640    fi
48641  fi
48642
48643      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48644$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48645    elif test "x$COMPILE_TYPE" = xcross; then
48646      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48647$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48648    fi
48649    as_fn_error $? "Cannot continue." "$LINENO" 5
48650
48651fi
48652
48653done
48654
48655
48656  # The cast to long int works around a bug in the HP C Compiler
48657# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48658# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48659# This bug is HP SR number 8606223364.
48660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48661$as_echo_n "checking size of int *... " >&6; }
48662if ${ac_cv_sizeof_int_p+:} false; then :
48663  $as_echo_n "(cached) " >&6
48664else
48665  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48666
48667else
48668  if test "$ac_cv_type_int_p" = yes; then
48669     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48670$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48671as_fn_error 77 "cannot compute sizeof (int *)
48672See \`config.log' for more details" "$LINENO" 5; }
48673   else
48674     ac_cv_sizeof_int_p=0
48675   fi
48676fi
48677
48678fi
48679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48680$as_echo "$ac_cv_sizeof_int_p" >&6; }
48681
48682
48683
48684cat >>confdefs.h <<_ACEOF
48685#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48686_ACEOF
48687
48688
48689
48690  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48691  if test "x$ac_cv_sizeof_int_p" = x; then
48692    # The test failed, lets stick to the assumed value.
48693    { $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
48694$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48695  else
48696    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48697
48698    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48699      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48700      # Let's try to implicitely set the compilers target architecture and retry the test
48701      { $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
48702$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;}
48703      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48704$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48705
48706  # When we add flags to the "official" CFLAGS etc, we need to
48707  # keep track of these additions in ADDED_CFLAGS etc. These
48708  # will later be checked to make sure only controlled additions
48709  # have been made to CFLAGS etc.
48710  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48711  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48712  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48713
48714  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48715  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48716  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48717
48718  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48719  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48720  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48721
48722  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48723  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48724  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48725
48726
48727      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48728      unset ac_cv_sizeof_int_p
48729      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48730      cat >>confdefs.h <<_ACEOF
48731#undef SIZEOF_INT_P
48732_ACEOF
48733
48734      # The cast to long int works around a bug in the HP C Compiler
48735# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48736# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48737# This bug is HP SR number 8606223364.
48738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48739$as_echo_n "checking size of int *... " >&6; }
48740if ${ac_cv_sizeof_int_p+:} false; then :
48741  $as_echo_n "(cached) " >&6
48742else
48743  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48744
48745else
48746  if test "$ac_cv_type_int_p" = yes; then
48747     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48748$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48749as_fn_error 77 "cannot compute sizeof (int *)
48750See \`config.log' for more details" "$LINENO" 5; }
48751   else
48752     ac_cv_sizeof_int_p=0
48753   fi
48754fi
48755
48756fi
48757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48758$as_echo "$ac_cv_sizeof_int_p" >&6; }
48759
48760
48761
48762cat >>confdefs.h <<_ACEOF
48763#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48764_ACEOF
48765
48766
48767
48768      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48769
48770      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48771        { $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
48772$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;}
48773        if test "x$COMPILE_TYPE" = xreduced; then
48774
48775  # Print a helpful message on how to acquire the necessary build dependency.
48776  # reduced is the help tag: freetype, cups, alsa etc
48777  MISSING_DEPENDENCY=reduced
48778
48779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48780    cygwin_help $MISSING_DEPENDENCY
48781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48782    msys_help $MISSING_DEPENDENCY
48783  else
48784    PKGHANDLER_COMMAND=
48785
48786    case $PKGHANDLER in
48787      apt-get)
48788        apt_help     $MISSING_DEPENDENCY ;;
48789      yum)
48790        yum_help     $MISSING_DEPENDENCY ;;
48791      port)
48792        port_help    $MISSING_DEPENDENCY ;;
48793      pkgutil)
48794        pkgutil_help $MISSING_DEPENDENCY ;;
48795      pkgadd)
48796        pkgadd_help  $MISSING_DEPENDENCY ;;
48797    esac
48798
48799    if test "x$PKGHANDLER_COMMAND" != x; then
48800      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48801    fi
48802  fi
48803
48804          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48805$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48806        elif test "x$COMPILE_TYPE" = xcross; then
48807          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48808$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48809        fi
48810        as_fn_error $? "Cannot continue." "$LINENO" 5
48811      fi
48812    fi
48813  fi
48814
48815  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48816$as_echo_n "checking for target address size... " >&6; }
48817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48818$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48819
48820
48821  ###############################################################################
48822  #
48823  # Is the target little of big endian?
48824  #
48825   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48826$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48827if ${ac_cv_c_bigendian+:} false; then :
48828  $as_echo_n "(cached) " >&6
48829else
48830  ac_cv_c_bigendian=unknown
48831    # See if we're dealing with a universal compiler.
48832    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48833/* end confdefs.h.  */
48834#ifndef __APPLE_CC__
48835	       not a universal capable compiler
48836	     #endif
48837	     typedef int dummy;
48838
48839_ACEOF
48840if ac_fn_cxx_try_compile "$LINENO"; then :
48841
48842	# Check for potential -arch flags.  It is not universal unless
48843	# there are at least two -arch flags with different values.
48844	ac_arch=
48845	ac_prev=
48846	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48847	 if test -n "$ac_prev"; then
48848	   case $ac_word in
48849	     i?86 | x86_64 | ppc | ppc64)
48850	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48851		 ac_arch=$ac_word
48852	       else
48853		 ac_cv_c_bigendian=universal
48854		 break
48855	       fi
48856	       ;;
48857	   esac
48858	   ac_prev=
48859	 elif test "x$ac_word" = "x-arch"; then
48860	   ac_prev=arch
48861	 fi
48862       done
48863fi
48864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48865    if test $ac_cv_c_bigendian = unknown; then
48866      # See if sys/param.h defines the BYTE_ORDER macro.
48867      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48868/* end confdefs.h.  */
48869#include <sys/types.h>
48870	     #include <sys/param.h>
48871
48872int
48873main ()
48874{
48875#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48876		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48877		     && LITTLE_ENDIAN)
48878	      bogus endian macros
48879	     #endif
48880
48881  ;
48882  return 0;
48883}
48884_ACEOF
48885if ac_fn_cxx_try_compile "$LINENO"; then :
48886  # It does; now see whether it defined to BIG_ENDIAN or not.
48887	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48888/* end confdefs.h.  */
48889#include <sys/types.h>
48890		#include <sys/param.h>
48891
48892int
48893main ()
48894{
48895#if BYTE_ORDER != BIG_ENDIAN
48896		 not big endian
48897		#endif
48898
48899  ;
48900  return 0;
48901}
48902_ACEOF
48903if ac_fn_cxx_try_compile "$LINENO"; then :
48904  ac_cv_c_bigendian=yes
48905else
48906  ac_cv_c_bigendian=no
48907fi
48908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48909fi
48910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48911    fi
48912    if test $ac_cv_c_bigendian = unknown; then
48913      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48914      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48915/* end confdefs.h.  */
48916#include <limits.h>
48917
48918int
48919main ()
48920{
48921#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48922	      bogus endian macros
48923	     #endif
48924
48925  ;
48926  return 0;
48927}
48928_ACEOF
48929if ac_fn_cxx_try_compile "$LINENO"; then :
48930  # It does; now see whether it defined to _BIG_ENDIAN or not.
48931	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48932/* end confdefs.h.  */
48933#include <limits.h>
48934
48935int
48936main ()
48937{
48938#ifndef _BIG_ENDIAN
48939		 not big endian
48940		#endif
48941
48942  ;
48943  return 0;
48944}
48945_ACEOF
48946if ac_fn_cxx_try_compile "$LINENO"; then :
48947  ac_cv_c_bigendian=yes
48948else
48949  ac_cv_c_bigendian=no
48950fi
48951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48952fi
48953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48954    fi
48955    if test $ac_cv_c_bigendian = unknown; then
48956      # Compile a test program.
48957      if test "$cross_compiling" = yes; then :
48958  # Try to guess by grepping values from an object file.
48959	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48960/* end confdefs.h.  */
48961short int ascii_mm[] =
48962		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48963		short int ascii_ii[] =
48964		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48965		int use_ascii (int i) {
48966		  return ascii_mm[i] + ascii_ii[i];
48967		}
48968		short int ebcdic_ii[] =
48969		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48970		short int ebcdic_mm[] =
48971		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48972		int use_ebcdic (int i) {
48973		  return ebcdic_mm[i] + ebcdic_ii[i];
48974		}
48975		extern int foo;
48976
48977int
48978main ()
48979{
48980return use_ascii (foo) == use_ebcdic (foo);
48981  ;
48982  return 0;
48983}
48984_ACEOF
48985if ac_fn_cxx_try_compile "$LINENO"; then :
48986  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48987	      ac_cv_c_bigendian=yes
48988	    fi
48989	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48990	      if test "$ac_cv_c_bigendian" = unknown; then
48991		ac_cv_c_bigendian=no
48992	      else
48993		# finding both strings is unlikely to happen, but who knows?
48994		ac_cv_c_bigendian=unknown
48995	      fi
48996	    fi
48997fi
48998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48999else
49000  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49001/* end confdefs.h.  */
49002$ac_includes_default
49003int
49004main ()
49005{
49006
49007	     /* Are we little or big endian?  From Harbison&Steele.  */
49008	     union
49009	     {
49010	       long int l;
49011	       char c[sizeof (long int)];
49012	     } u;
49013	     u.l = 1;
49014	     return u.c[sizeof (long int) - 1] == 1;
49015
49016  ;
49017  return 0;
49018}
49019_ACEOF
49020if ac_fn_cxx_try_run "$LINENO"; then :
49021  ac_cv_c_bigendian=no
49022else
49023  ac_cv_c_bigendian=yes
49024fi
49025rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49026  conftest.$ac_objext conftest.beam conftest.$ac_ext
49027fi
49028
49029    fi
49030fi
49031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49032$as_echo "$ac_cv_c_bigendian" >&6; }
49033 case $ac_cv_c_bigendian in #(
49034   yes)
49035     ENDIAN="big";; #(
49036   no)
49037     ENDIAN="little" ;; #(
49038   universal)
49039     ENDIAN="universal_endianness"
49040     ;; #(
49041   *)
49042     ENDIAN="unknown" ;;
49043 esac
49044
49045
49046  if test "x$ENDIAN" = xuniversal_endianness; then
49047    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49048  fi
49049  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49050    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
49051  fi
49052
49053
49054# Configure flags for the tools
49055
49056  ###############################################################################
49057  #
49058  # How to compile shared libraries.
49059  #
49060
49061  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49062    PICFLAG="-fPIC"
49063    C_FLAG_REORDER=''
49064    CXX_FLAG_REORDER=''
49065
49066    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49067      # Linking is different on MacOSX
49068      if test "x$STATIC_BUILD" = xtrue; then
49069        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49070      else
49071        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49072        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49073      fi
49074      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49075      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49076      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49077      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49078    else
49079      # Default works for linux, might work on other platforms as well.
49080      SHARED_LIBRARY_FLAGS='-shared'
49081      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49082      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49083      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49084      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49085    fi
49086  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49087    C_FLAG_REORDER=''
49088    CXX_FLAG_REORDER=''
49089
49090    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49091      # Linking is different on MacOSX
49092      PICFLAG=''
49093      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49094      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49095      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49096      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49097      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49098
49099      if test "x$STATIC_BUILD" = xfalse; then
49100        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49101      fi
49102    else
49103      # Default works for linux, might work on other platforms as well.
49104      PICFLAG='-fPIC'
49105      SHARED_LIBRARY_FLAGS='-shared'
49106      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49107      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49108      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49109      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49110    fi
49111  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49112    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49113      PICFLAG="-xcode=pic32"
49114    else
49115      PICFLAG="-KPIC"
49116    fi
49117    C_FLAG_REORDER='-xF'
49118    CXX_FLAG_REORDER='-xF'
49119    SHARED_LIBRARY_FLAGS="-G"
49120    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49121    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49122    SET_SHARED_LIBRARY_NAME='-h $1'
49123    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49124  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49125    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49126    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49127    # will have to patch this single instruction with a call to some out-of-order code which
49128    # does the load from the TOC. This is of course slow. But in that case we also would have
49129    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49130    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49131    # can be patched directly by the linker and does not require a jump to out-of-order code.
49132    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49133    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49134    # loads for accessing a global variable). But there are rumors that this may be seen as a
49135    # 'performance feature' because of improved code locality of the symbols used in a
49136    # compilation unit.
49137    PICFLAG="-qpic"
49138    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49139    C_FLAG_REORDER=''
49140    CXX_FLAG_REORDER=''
49141    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49142    SET_EXECUTABLE_ORIGIN=""
49143    SET_SHARED_LIBRARY_ORIGIN=''
49144    SET_SHARED_LIBRARY_NAME=''
49145    SET_SHARED_LIBRARY_MAPFILE=''
49146  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49147    PICFLAG=""
49148    C_FLAG_REORDER=''
49149    CXX_FLAG_REORDER=''
49150    SHARED_LIBRARY_FLAGS="-dll"
49151    SET_EXECUTABLE_ORIGIN=''
49152    SET_SHARED_LIBRARY_ORIGIN=''
49153    SET_SHARED_LIBRARY_NAME=''
49154    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49155  fi
49156
49157
49158
49159
49160
49161
49162
49163
49164
49165  # The (cross) compiler is now configured, we can now test capabilities
49166  # of the target platform.
49167
49168
49169
49170  ###############################################################################
49171  #
49172  # Setup the opt flags for different compilers
49173  # and different operating systems.
49174  #
49175
49176  # FIXME: this was indirectly the old default, but just inherited.
49177  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49178  #   C_FLAG_DEPS="-MMD -MF"
49179  # fi
49180
49181  # Generate make dependency files
49182  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49183    C_FLAG_DEPS="-MMD -MF"
49184  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49185    C_FLAG_DEPS="-MMD -MF"
49186  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49187    C_FLAG_DEPS="-xMMD -xMF"
49188  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49189    C_FLAG_DEPS="-qmakedep=gcc -MF"
49190  fi
49191  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49192
49193
49194
49195  # Debug symbols
49196  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49197    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49198      # reduce from default "-g2" option to save space
49199      CFLAGS_DEBUG_SYMBOLS="-g1"
49200      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49201    else
49202      CFLAGS_DEBUG_SYMBOLS="-g"
49203      CXXFLAGS_DEBUG_SYMBOLS="-g"
49204    fi
49205  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49206    CFLAGS_DEBUG_SYMBOLS="-g"
49207    CXXFLAGS_DEBUG_SYMBOLS="-g"
49208  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49209    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49210    # -g0 enables debug symbols without disabling inlining.
49211    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49212  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49213    CFLAGS_DEBUG_SYMBOLS="-g"
49214    CXXFLAGS_DEBUG_SYMBOLS="-g"
49215  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49216    CFLAGS_DEBUG_SYMBOLS="-Zi"
49217    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49218  fi
49219
49220
49221
49222  # Debug symbols for JVM_CFLAGS
49223  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49224    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49225    if test "x$DEBUG_LEVEL" = xslowdebug; then
49226      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49227    else
49228      # -g0 does not disable inlining, which -g does.
49229      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49230    fi
49231  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49232    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49233  else
49234    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49235  fi
49236
49237
49238  # bounds, memory and behavior checking options
49239  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49240    case $DEBUG_LEVEL in
49241    release )
49242      # no adjustment
49243      ;;
49244    fastdebug )
49245      # no adjustment
49246      ;;
49247    slowdebug )
49248      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49249      # get's added conditionally on whether we produce debug symbols or not.
49250      # This is most likely not really correct.
49251
49252      # Add runtime stack smashing and undefined behavior checks.
49253      # Not all versions of gcc support -fstack-protector
49254      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
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
49292
49293
49294
49295
49296
49297    # Execute function body
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
49341
49342
49343
49344
49345
49346    # Execute function body
49347
49348  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49349$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49350  supports=yes
49351
49352  saved_cflags="$CFLAGS"
49353  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49354  ac_ext=c
49355ac_cpp='$CPP $CPPFLAGS'
49356ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49357ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49358ac_compiler_gnu=$ac_cv_c_compiler_gnu
49359
49360  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49361/* end confdefs.h.  */
49362int i;
49363_ACEOF
49364if ac_fn_c_try_compile "$LINENO"; then :
49365
49366else
49367  supports=no
49368fi
49369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49370  ac_ext=cpp
49371ac_cpp='$CXXCPP $CPPFLAGS'
49372ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49373ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49374ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49375
49376  CFLAGS="$saved_cflags"
49377
49378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49379$as_echo "$supports" >&6; }
49380  if test "x$supports" = "xyes" ; then
49381    :
49382    C_COMP_SUPPORTS="yes"
49383  else
49384    :
49385    C_COMP_SUPPORTS="no"
49386  fi
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
49441
49442
49443
49444
49445
49446    # Execute function body
49447
49448  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49449$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49450  supports=yes
49451
49452  saved_cxxflags="$CXXFLAGS"
49453  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49454  ac_ext=cpp
49455ac_cpp='$CXXCPP $CPPFLAGS'
49456ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49457ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49458ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49459
49460  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49461/* end confdefs.h.  */
49462int i;
49463_ACEOF
49464if ac_fn_cxx_try_compile "$LINENO"; then :
49465
49466else
49467  supports=no
49468fi
49469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49470  ac_ext=cpp
49471ac_cpp='$CXXCPP $CPPFLAGS'
49472ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49473ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49474ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49475
49476  CXXFLAGS="$saved_cxxflags"
49477
49478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49479$as_echo "$supports" >&6; }
49480  if test "x$supports" = "xyes" ; then
49481    :
49482    CXX_COMP_SUPPORTS="yes"
49483  else
49484    :
49485    CXX_COMP_SUPPORTS="no"
49486  fi
49487
49488
49489
49490
49491
49492
49493
49494
49495
49496
49497
49498
49499
49500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49501$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49502  supports=no
49503  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49504
49505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49506$as_echo "$supports" >&6; }
49507  if test "x$supports" = "xyes" ; then
49508    :
49509
49510  else
49511    :
49512    STACK_PROTECTOR_CFLAG=""
49513  fi
49514
49515
49516
49517
49518
49519
49520
49521      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49522      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49523      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49524        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49525      fi
49526      ;;
49527    esac
49528  fi
49529
49530  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49531    if test "x$DEBUG_LEVEL" != xrelease; then
49532      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49533        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49534      fi
49535    fi
49536  fi
49537
49538  # Optimization levels
49539  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49540    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49541
49542    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49543      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49544      C_O_FLAG_HIGHEST_JVM="-xO4"
49545      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49546      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49547      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49548      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49549      C_O_FLAG_DEBUG_JVM=""
49550      C_O_FLAG_NONE="-xregs=no%frameptr"
49551      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49552      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49553      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49554      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49555      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49556      CXX_O_FLAG_DEBUG_JVM=""
49557      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49558      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49559        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49560        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49561      fi
49562    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49563      C_O_FLAG_HIGHEST_JVM="-xO4"
49564      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49565      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49566      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49567      C_O_FLAG_DEBUG=""
49568      C_O_FLAG_DEBUG_JVM=""
49569      C_O_FLAG_NONE=""
49570      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49571      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49572      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49573      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49574      CXX_O_FLAG_DEBUG=""
49575      CXX_O_FLAG_DEBUG_JVM=""
49576      CXX_O_FLAG_NONE=""
49577    fi
49578  else
49579    # The remaining toolchains share opt flags between CC and CXX;
49580    # setup for C and duplicate afterwards.
49581    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49582      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49583        # On MacOSX we optimize for size, something
49584        # we should do for all platforms?
49585        C_O_FLAG_HIGHEST_JVM="-Os"
49586        C_O_FLAG_HIGHEST="-Os"
49587        C_O_FLAG_HI="-Os"
49588        C_O_FLAG_NORM="-Os"
49589        C_O_FLAG_SIZE="-Os"
49590      else
49591        C_O_FLAG_HIGHEST_JVM="-O3"
49592        C_O_FLAG_HIGHEST="-O3"
49593        C_O_FLAG_HI="-O3"
49594        C_O_FLAG_NORM="-O2"
49595        C_O_FLAG_SIZE="-Os"
49596      fi
49597      C_O_FLAG_DEBUG="-O0"
49598      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49599        C_O_FLAG_DEBUG_JVM=""
49600      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49601        C_O_FLAG_DEBUG_JVM="-O0"
49602      fi
49603      C_O_FLAG_NONE="-O0"
49604    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49605      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49606        # On MacOSX we optimize for size, something
49607        # we should do for all platforms?
49608        C_O_FLAG_HIGHEST_JVM="-Os"
49609        C_O_FLAG_HIGHEST="-Os"
49610        C_O_FLAG_HI="-Os"
49611        C_O_FLAG_NORM="-Os"
49612        C_O_FLAG_SIZE="-Os"
49613      else
49614        C_O_FLAG_HIGHEST_JVM="-O3"
49615        C_O_FLAG_HIGHEST="-O3"
49616        C_O_FLAG_HI="-O3"
49617        C_O_FLAG_NORM="-O2"
49618        C_O_FLAG_SIZE="-Os"
49619      fi
49620      C_O_FLAG_DEBUG="-O0"
49621      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49622        C_O_FLAG_DEBUG_JVM=""
49623      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49624        C_O_FLAG_DEBUG_JVM="-O0"
49625      fi
49626      C_O_FLAG_NONE="-O0"
49627    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49628      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49629      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49630      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49631      C_O_FLAG_NORM="-O2"
49632      C_O_FLAG_DEBUG="-qnoopt"
49633      # FIXME: Value below not verified.
49634      C_O_FLAG_DEBUG_JVM=""
49635      C_O_FLAG_NONE="-qnoopt"
49636    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49637      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49638      C_O_FLAG_HIGHEST="-O2"
49639      C_O_FLAG_HI="-O1"
49640      C_O_FLAG_NORM="-O1"
49641      C_O_FLAG_DEBUG="-Od"
49642      C_O_FLAG_DEBUG_JVM=""
49643      C_O_FLAG_NONE="-Od"
49644      C_O_FLAG_SIZE="-Os"
49645    fi
49646    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49647    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49648    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49649    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49650    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49651    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49652    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49653    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49654  fi
49655
49656  # Adjust optimization flags according to debug level.
49657  case $DEBUG_LEVEL in
49658    release )
49659      # no adjustment
49660      ;;
49661    fastdebug )
49662      # Not quite so much optimization
49663      C_O_FLAG_HI="$C_O_FLAG_NORM"
49664      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49665      ;;
49666    slowdebug )
49667      # Disable optimization
49668      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49669      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49670      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49671      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49672      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49673      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49674      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49675      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49676      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49677      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49678      ;;
49679  esac
49680
49681
49682
49683
49684
49685
49686
49687
49688
49689
49690
49691
49692
49693
49694
49695
49696
49697
49698
49699  # Special extras...
49700  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49701    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49702      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49703      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49704    fi
49705    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49706    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49707  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49708    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49709    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49710  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49711    CXXSTD_CXXFLAG="-std=gnu++98"
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
49749
49750
49751
49752
49753
49754    # Execute function body
49755
49756  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49757$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49758  supports=yes
49759
49760  saved_cxxflags="$CXXFLAGS"
49761  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49762  ac_ext=cpp
49763ac_cpp='$CXXCPP $CPPFLAGS'
49764ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49765ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49766ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49767
49768  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49769/* end confdefs.h.  */
49770int i;
49771_ACEOF
49772if ac_fn_cxx_try_compile "$LINENO"; then :
49773
49774else
49775  supports=no
49776fi
49777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49778  ac_ext=cpp
49779ac_cpp='$CXXCPP $CPPFLAGS'
49780ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49781ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49782ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49783
49784  CXXFLAGS="$saved_cxxflags"
49785
49786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49787$as_echo "$supports" >&6; }
49788  if test "x$supports" = "xyes" ; then
49789    :
49790
49791  else
49792    :
49793    CXXSTD_CXXFLAG=""
49794  fi
49795
49796
49797
49798
49799
49800
49801
49802
49803
49804
49805
49806
49807    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49808    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49809
49810  fi
49811  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49812    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49813    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49814  fi
49815
49816  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49817    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49818    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49819  fi
49820
49821  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49822  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49823  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49824
49825  ###############################################################################
49826  #
49827  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49828  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49829  #
49830
49831  # Setup compiler/platform specific flags into
49832  #    CFLAGS_JDK    - C Compiler flags
49833  #    CXXFLAGS_JDK  - C++ Compiler flags
49834  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49835  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49836    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49837    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49838    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49839    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49840      # Force compatibility with i586 on 32 bit intel platforms.
49841      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49842      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49843    fi
49844    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49845        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49846    case $OPENJDK_TARGET_CPU_ARCH in
49847      arm )
49848        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49849        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49850        ;;
49851      ppc )
49852        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49853        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49854        ;;
49855      s390 )
49856        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
49857        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49858        ;;
49859      * )
49860        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49861        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49862        ;;
49863    esac
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
49913
49914
49915
49916
49917
49918    # Execute function body
49919
49920  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49921  REFERENCE_VERSION=6
49922
49923  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49924    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49925  fi
49926
49927  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49928    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49929  fi
49930
49931  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49932  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49933
49934  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49935    :
49936
49937  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49938  # runs afoul of the more aggressive versions of these optimisations.
49939  # Notably, value range propagation now assumes that the this pointer of C++
49940  # member functions is non-null.
49941  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
49942        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49943        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
49944$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
49945  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49946  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49947
49948  else
49949    :
49950
49951  fi
49952
49953
49954
49955
49956
49957
49958
49959
49960
49961
49962
49963
49964
49965
49966  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49967    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49968
49969    # Restrict the debug information created by Clang to avoid
49970    # too big object files and speed the build up a little bit
49971    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49972    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49973    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49974      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49975        # Force compatibility with i586 on 32 bit intel platforms.
49976        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49977        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49978      fi
49979      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49980      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49981          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49982      case $OPENJDK_TARGET_CPU_ARCH in
49983        ppc )
49984          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49985          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49986          ;;
49987        * )
49988          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49989          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49990          ;;
49991      esac
49992    fi
49993  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49994    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49995    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49996    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49997      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49998    fi
49999
50000    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50001    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50002  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50003    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50004    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50005    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50006  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50007    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50008        -MD -Zc:wchar_t- -W3 -wd4800 \
50009        -DWIN32_LEAN_AND_MEAN \
50010        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50011        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50012        -DWIN32 -DIAL"
50013    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50014      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50015    else
50016      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50017    fi
50018    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50019    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50020    # studio.
50021    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50022      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50023      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50024      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50025    fi
50026  fi
50027
50028  ###############################################################################
50029
50030  # Adjust flags according to debug level.
50031  case $DEBUG_LEVEL in
50032    fastdebug | slowdebug )
50033      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50034      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50035      ;;
50036    release )
50037      ;;
50038    * )
50039      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50040      ;;
50041  esac
50042
50043  # Set some common defines. These works for all compilers, but assume
50044  # -D is universally accepted.
50045
50046  # Setup endianness
50047  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50048    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50049    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50050    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50051    #   Note: -Dmacro         is the same as    #define macro 1
50052    #         -Dmacro=        is the same as    #define macro
50053    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50054      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50055    else
50056      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50057    fi
50058  else
50059    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50060    # are defined in the system?
50061    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50062      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50063    else
50064      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50065    fi
50066  fi
50067
50068  # Setup target OS define. Use OS target name but in upper case.
50069  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50070  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50071
50072  # Setup target CPU
50073  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50074      $OPENJDK_TARGET_ADD_LP64 \
50075      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50076
50077  # Setup debug/release defines
50078  if test "x$DEBUG_LEVEL" = xrelease; then
50079    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50080    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50081      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50082    fi
50083  else
50084    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50085  fi
50086
50087  # Set some additional per-OS defines.
50088  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50089    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50090    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50091        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50092  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50093    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50094    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50095        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50096  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50097    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50098    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50099    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50100    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50101        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50102        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50103        -fno-omit-frame-pointer"
50104  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50105    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50106    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50107    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50108        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50109        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50110  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50111    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50112  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50113    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50114    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50115  fi
50116
50117  # Set some additional per-CPU defines.
50118  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50119    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50120  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50121    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50122  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50123    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50124      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50125      # fixes `relocation truncated to fit' error for gcc 4.1.
50126      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50127      # Use ppc64 instructions, but schedule for power5
50128      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50129    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50130      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50131    fi
50132  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50133    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50134      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50135      # Little endian machine uses ELFv2 ABI.
50136      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50137      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50138      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50139    fi
50140  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50141    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50142      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50143    fi
50144  fi
50145
50146  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50147    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50148  fi
50149
50150  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50151    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50152      # Solaris does not have _LP64=1 in the old build.
50153      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50154      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50155    fi
50156  fi
50157
50158  # Set JVM_CFLAGS warning handling
50159  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50160    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50161        -Wunused-value -Woverloaded-virtual"
50162
50163    if test "x$TOOLCHAIN_TYPE" = xgcc; then
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
50213
50214
50215
50216
50217
50218    # Execute function body
50219
50220  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50221  REFERENCE_VERSION=4.8
50222
50223  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50224    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50225  fi
50226
50227  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50228    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50229  fi
50230
50231  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50232  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50233
50234  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50235    :
50236
50237            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50238            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50239
50240
50241  else
50242    :
50243
50244  fi
50245
50246
50247
50248
50249
50250
50251
50252
50253
50254
50255
50256
50257
50258
50259    fi
50260    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50261      # Non-zero builds have stricter warnings
50262      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50263    else
50264      if test "x$TOOLCHAIN_TYPE" = xclang; then
50265        # Some versions of llvm do not like -Wundef
50266        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50267      fi
50268    fi
50269  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50270    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50271        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50272  fi
50273
50274  # Additional macosx handling
50275  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50276    # Setting these parameters makes it an error to link to macosx APIs that are
50277    # newer than the given OS version and makes the linked binaries compatible
50278    # even if built on a newer version of the OS.
50279    # The expected format is X.Y.Z
50280    MACOSX_VERSION_MIN=10.7.0
50281
50282
50283    # The macro takes the version with no dots, ex: 1070
50284    # Let the flags variables get resolved in make for easier override on make
50285    # command line.
50286    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50287    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50288  fi
50289
50290  # Setup some hard coded includes
50291  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50292      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50293      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50294      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50295      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50296      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50297      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50298
50299  # The shared libraries are compiled using the picflag.
50300  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50301      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50302  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50303      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50304
50305  # Executable flags
50306  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50307  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50308
50309
50310
50311
50312
50313
50314  # Setup LDFLAGS et al.
50315  #
50316
50317  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50318    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50319    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50320    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50321    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50322      LDFLAGS_SAFESH="-safeseh"
50323      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50324      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50325      # NOTE: Old build added -machine. Probably not needed.
50326      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50327    else
50328      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50329    fi
50330  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50331      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50332      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50333        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50334        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50335    fi
50336  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50337    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50338    # We have previously set HAS_GNU_HASH if this is the case
50339    if test -n "$HAS_GNU_HASH"; then
50340      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50341      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50342      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50343    fi
50344      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50345        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50346    fi
50347    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50348      # And since we now know that the linker is gnu, then add -z defs, to forbid
50349      # undefined symbols in object files.
50350      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50351      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50352      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50353      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50354      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50355      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50356        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50357      fi
50358      case $DEBUG_LEVEL in
50359        release )
50360          # tell linker to optimize libraries.
50361          # Should this be supplied to the OSS linker as well?
50362          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50363          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50364          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50365          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50366            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50367          fi
50368          ;;
50369        slowdebug )
50370          # Hotspot always let the linker optimize
50371          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50372          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50373            # do relocations at load
50374            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50375            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50376            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50377          fi
50378          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50379            # mark relocations read only
50380            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50381            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50382            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50383          fi
50384          ;;
50385        fastdebug )
50386          # Hotspot always let the linker optimize
50387          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50388          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50389            # mark relocations read only
50390            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50391            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50392            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50393          fi
50394          ;;
50395        * )
50396          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50397          ;;
50398        esac
50399    fi
50400  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50401    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50402    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50403    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50404    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50405    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50406    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50407      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50408    fi
50409  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50410    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50411    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50412    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50413  fi
50414
50415  # Customize LDFLAGS for executables
50416
50417  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50418
50419  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50420    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50421      LDFLAGS_STACK_SIZE=1048576
50422    else
50423      LDFLAGS_STACK_SIZE=327680
50424    fi
50425    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50426  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50427    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50428  fi
50429
50430  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50431
50432  # Customize LDFLAGS for libs
50433  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50434
50435  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50436  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50437    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50438        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50439    JDKLIB_LIBS=""
50440  else
50441    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50442        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50443
50444    if test "xTARGET" = "xTARGET"; then
50445    # On some platforms (mac) the linker warns about non existing -L dirs.
50446    # Add server first if available. Linking aginst client does not always produce the same results.
50447      # Only add client/minimal dir if client/minimal is being built.
50448    # Default to server for other variants.
50449      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50450        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50451      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50452        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50453      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50454        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50455    else
50456        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50457    fi
50458    elif test "xTARGET" = "xBUILD"; then
50459      # When building a buildjdk, it's always only the server variant
50460      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50461          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50462    fi
50463
50464    JDKLIB_LIBS="-ljava -ljvm"
50465    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50466      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50467    fi
50468
50469  fi
50470
50471LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50472
50473  # Set JVM_LIBS (per os)
50474  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50475    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50476  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50477    # FIXME: This hard-coded path is not really proper.
50478    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50479      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50480    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50481      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50482    fi
50483    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50484        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50485  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50486    JVM_LIBS="$JVM_LIBS -lm"
50487  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50488    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50489  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50490    JVM_LIBS="$JVM_LIBS -lm"
50491  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50492    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50493        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50494        wsock32.lib winmm.lib version.lib psapi.lib"
50495    fi
50496
50497  # Set JVM_ASFLAGS
50498  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50499    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50500      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50501    fi
50502  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50503    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50504  fi
50505
50506  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50507
50508
50509
50510
50511
50512
50513
50514
50515
50516
50517
50518
50519
50520
50521
50522  # Special extras...
50523  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50524    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50525      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50526      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50527    fi
50528    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50529    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50530  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50531    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50532    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50533  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50534    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
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
50572
50573
50574
50575
50576
50577    # Execute function body
50578
50579  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50580$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50581  supports=yes
50582
50583  saved_cxxflags="$CXXFLAGS"
50584  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50585  ac_ext=cpp
50586ac_cpp='$CXXCPP $CPPFLAGS'
50587ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50588ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50589ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50590
50591  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50592/* end confdefs.h.  */
50593int i;
50594_ACEOF
50595if ac_fn_cxx_try_compile "$LINENO"; then :
50596
50597else
50598  supports=no
50599fi
50600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50601  ac_ext=cpp
50602ac_cpp='$CXXCPP $CPPFLAGS'
50603ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50604ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50605ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50606
50607  CXXFLAGS="$saved_cxxflags"
50608
50609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50610$as_echo "$supports" >&6; }
50611  if test "x$supports" = "xyes" ; then
50612    :
50613
50614  else
50615    :
50616    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50617  fi
50618
50619
50620
50621
50622
50623
50624
50625
50626
50627
50628
50629
50630    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50631    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50632
50633  fi
50634  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50635    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50636    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50637  fi
50638
50639  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50640    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50641    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50642  fi
50643
50644  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50645  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50646  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50647
50648  ###############################################################################
50649  #
50650  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50651  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50652  #
50653
50654  # Setup compiler/platform specific flags into
50655  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50656  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50657  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50658  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50659    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50660    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50661    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50662    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50663      # Force compatibility with i586 on 32 bit intel platforms.
50664      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50665      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50666    fi
50667    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50668        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50669    case $OPENJDK_BUILD_CPU_ARCH in
50670      arm )
50671        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50672        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50673        ;;
50674      ppc )
50675        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50676        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50677        ;;
50678      s390 )
50679        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50680        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50681        ;;
50682      * )
50683        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50684        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50685        ;;
50686    esac
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
50736
50737
50738
50739
50740
50741    # Execute function body
50742
50743  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50744  REFERENCE_VERSION=6
50745
50746  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50747    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50748  fi
50749
50750  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50751    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50752  fi
50753
50754  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50755  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50756
50757  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50758    :
50759
50760  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50761  # runs afoul of the more aggressive versions of these optimisations.
50762  # Notably, value range propagation now assumes that the this pointer of C++
50763  # member functions is non-null.
50764  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50765        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50766        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50767$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50768  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50769  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50770
50771  else
50772    :
50773
50774  fi
50775
50776
50777
50778
50779
50780
50781
50782
50783
50784
50785
50786
50787
50788
50789  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50790    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50791
50792    # Restrict the debug information created by Clang to avoid
50793    # too big object files and speed the build up a little bit
50794    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50795    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50796    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50797      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50798        # Force compatibility with i586 on 32 bit intel platforms.
50799        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50800        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50801      fi
50802      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50803      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50804          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50805      case $OPENJDK_BUILD_CPU_ARCH in
50806        ppc )
50807          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50808          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50809          ;;
50810        * )
50811          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50812          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50813          ;;
50814      esac
50815    fi
50816  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50817    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50818    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50819    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50820      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50821    fi
50822
50823    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50824    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50825  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50826    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50827    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50828    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50829  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50830    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50831        -MD -Zc:wchar_t- -W3 -wd4800 \
50832        -DWIN32_LEAN_AND_MEAN \
50833        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50834        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50835        -DWIN32 -DIAL"
50836    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50837      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50838    else
50839      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50840    fi
50841    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50842    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50843    # studio.
50844    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50845      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50846      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50847      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50848    fi
50849  fi
50850
50851  ###############################################################################
50852
50853  # Adjust flags according to debug level.
50854  case $DEBUG_LEVEL in
50855    fastdebug | slowdebug )
50856      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50857      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50858      ;;
50859    release )
50860      ;;
50861    * )
50862      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50863      ;;
50864  esac
50865
50866  # Set some common defines. These works for all compilers, but assume
50867  # -D is universally accepted.
50868
50869  # Setup endianness
50870  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50871    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50872    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50873    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50874    #   Note: -Dmacro         is the same as    #define macro 1
50875    #         -Dmacro=        is the same as    #define macro
50876    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50877      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50878    else
50879      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50880    fi
50881  else
50882    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50883    # are defined in the system?
50884    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50885      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50886    else
50887      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50888    fi
50889  fi
50890
50891  # Setup target OS define. Use OS target name but in upper case.
50892  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50893  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50894
50895  # Setup target CPU
50896  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50897      $OPENJDK_BUILD_ADD_LP64 \
50898      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50899
50900  # Setup debug/release defines
50901  if test "x$DEBUG_LEVEL" = xrelease; then
50902    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50903    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50904      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50905    fi
50906  else
50907    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50908  fi
50909
50910  # Set some additional per-OS defines.
50911  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50912    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50913    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50914        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50915  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50916    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50917    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50918        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50919  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50920    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50921    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50922    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50923    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50924        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50925        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50926        -fno-omit-frame-pointer"
50927  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50928    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50929    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50930    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
50931        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50932        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50933  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50934    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50935  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50936    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50937    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50938  fi
50939
50940  # Set some additional per-CPU defines.
50941  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50942    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50943  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50944    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50945  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50946    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50947      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50948      # fixes `relocation truncated to fit' error for gcc 4.1.
50949      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50950      # Use ppc64 instructions, but schedule for power5
50951      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50952    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50953      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50954    fi
50955  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50956    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50957      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50958      # Little endian machine uses ELFv2 ABI.
50959      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50960      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50961      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
50962    fi
50963  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
50964    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50965      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
50966    fi
50967  fi
50968
50969  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50970    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50971  fi
50972
50973  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50974    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50975      # Solaris does not have _LP64=1 in the old build.
50976      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50977      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50978    fi
50979  fi
50980
50981  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50982  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50983    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50984        -Wunused-value -Woverloaded-virtual"
50985
50986    if test "x$TOOLCHAIN_TYPE" = xgcc; then
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
51036
51037
51038
51039
51040
51041    # Execute function body
51042
51043  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51044  REFERENCE_VERSION=4.8
51045
51046  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51047    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
51048  fi
51049
51050  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51051    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51052  fi
51053
51054  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51055  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51056
51057  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51058    :
51059
51060            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51061            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51062
51063
51064  else
51065    :
51066
51067  fi
51068
51069
51070
51071
51072
51073
51074
51075
51076
51077
51078
51079
51080
51081
51082    fi
51083    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51084      # Non-zero builds have stricter warnings
51085      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51086    else
51087      if test "x$TOOLCHAIN_TYPE" = xclang; then
51088        # Some versions of llvm do not like -Wundef
51089        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51090      fi
51091    fi
51092  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51093    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51094        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51095  fi
51096
51097  # Additional macosx handling
51098  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51099    # Setting these parameters makes it an error to link to macosx APIs that are
51100    # newer than the given OS version and makes the linked binaries compatible
51101    # even if built on a newer version of the OS.
51102    # The expected format is X.Y.Z
51103    MACOSX_VERSION_MIN=10.7.0
51104
51105
51106    # The macro takes the version with no dots, ex: 1070
51107    # Let the flags variables get resolved in make for easier override on make
51108    # command line.
51109    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)"
51110    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51111  fi
51112
51113  # Setup some hard coded includes
51114  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51115      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51116      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51117      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51118      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51119      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51120      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51121
51122  # The shared libraries are compiled using the picflag.
51123  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51124      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51125  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51126      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51127
51128  # Executable flags
51129  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51130  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51131
51132
51133
51134
51135
51136
51137  # Setup LDFLAGS et al.
51138  #
51139
51140  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51141    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51142    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51143    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51144    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51145      LDFLAGS_SAFESH="-safeseh"
51146      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51147      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51148      # NOTE: Old build added -machine. Probably not needed.
51149      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51150    else
51151      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51152    fi
51153  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51154      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51155      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51156        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51157        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51158    fi
51159  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51160    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51161    # We have previously set HAS_GNU_HASH if this is the case
51162    if test -n "$HAS_GNU_HASH"; then
51163      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51164      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51165      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51166    fi
51167      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51168        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51169    fi
51170    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51171      # And since we now know that the linker is gnu, then add -z defs, to forbid
51172      # undefined symbols in object files.
51173      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51174      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51175      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51176      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51177      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51178      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51179        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51180      fi
51181      case $DEBUG_LEVEL in
51182        release )
51183          # tell linker to optimize libraries.
51184          # Should this be supplied to the OSS linker as well?
51185          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51186          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51187          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51188          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51189            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51190          fi
51191          ;;
51192        slowdebug )
51193          # Hotspot always let the linker optimize
51194          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51195          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51196            # do relocations at load
51197            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51198            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51199            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51200          fi
51201          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51202            # mark relocations read only
51203            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51204            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51205            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51206          fi
51207          ;;
51208        fastdebug )
51209          # Hotspot always let the linker optimize
51210          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51211          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51212            # mark relocations read only
51213            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51214            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51215            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51216          fi
51217          ;;
51218        * )
51219          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51220          ;;
51221        esac
51222    fi
51223  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51224    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51225    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51226    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51227    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51228    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51229    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51230      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51231    fi
51232  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51233    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51234    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51235    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51236  fi
51237
51238  # Customize LDFLAGS for executables
51239
51240  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51241
51242  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51243    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51244      LDFLAGS_STACK_SIZE=1048576
51245    else
51246      LDFLAGS_STACK_SIZE=327680
51247    fi
51248    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51249  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51250    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51251  fi
51252
51253  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51254
51255  # Customize LDFLAGS for libs
51256  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51257
51258  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51259  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51260    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51261        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51262    OPENJDK_BUILD_JDKLIB_LIBS=""
51263  else
51264    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51265        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51266
51267    if test "xBUILD" = "xTARGET"; then
51268    # On some platforms (mac) the linker warns about non existing -L dirs.
51269    # Add server first if available. Linking aginst client does not always produce the same results.
51270      # Only add client/minimal dir if client/minimal is being built.
51271    # Default to server for other variants.
51272      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
51273        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51274      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
51275        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
51276      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51277        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
51278    else
51279        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51280    fi
51281    elif test "xBUILD" = "xBUILD"; then
51282      # When building a buildjdk, it's always only the server variant
51283      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51284          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51285    fi
51286
51287    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51288    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51289      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51290    fi
51291
51292  fi
51293
51294OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51295
51296  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51297  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51298    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51299  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51300    # FIXME: This hard-coded path is not really proper.
51301    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51302      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51303    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51304      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51305    fi
51306    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51307        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51308  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51309    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51310  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51311    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51312  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51313    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51314  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51315    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51316        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51317        wsock32.lib winmm.lib version.lib psapi.lib"
51318    fi
51319
51320  # Set OPENJDK_BUILD_JVM_ASFLAGS
51321  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51322    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51323      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51324    fi
51325  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51326    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51327  fi
51328
51329  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51330
51331
51332
51333
51334
51335
51336
51337
51338
51339
51340
51341
51342
51343
51344
51345  # Tests are only ever compiled for TARGET
51346  # Flags for compiling test libraries
51347  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51348  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51349
51350  # Flags for compiling test executables
51351  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51352  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51353
51354
51355
51356
51357
51358
51359  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51360  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51361
51362
51363
51364
51365
51366
51367  # Some Zero and Shark settings.
51368  # ZERO_ARCHFLAG tells the compiler which mode to build for
51369  case "${OPENJDK_TARGET_CPU}" in
51370    s390)
51371      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51372      ;;
51373    *)
51374      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51375  esac
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
51413
51414
51415
51416
51417
51418    # Execute function body
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
51462
51463
51464
51465
51466
51467    # Execute function body
51468
51469  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51470$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51471  supports=yes
51472
51473  saved_cflags="$CFLAGS"
51474  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51475  ac_ext=c
51476ac_cpp='$CPP $CPPFLAGS'
51477ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51478ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51479ac_compiler_gnu=$ac_cv_c_compiler_gnu
51480
51481  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51482/* end confdefs.h.  */
51483int i;
51484_ACEOF
51485if ac_fn_c_try_compile "$LINENO"; then :
51486
51487else
51488  supports=no
51489fi
51490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51491  ac_ext=cpp
51492ac_cpp='$CXXCPP $CPPFLAGS'
51493ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51494ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51495ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51496
51497  CFLAGS="$saved_cflags"
51498
51499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51500$as_echo "$supports" >&6; }
51501  if test "x$supports" = "xyes" ; then
51502    :
51503    C_COMP_SUPPORTS="yes"
51504  else
51505    :
51506    C_COMP_SUPPORTS="no"
51507  fi
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
51562
51563
51564
51565
51566
51567    # Execute function body
51568
51569  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51570$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51571  supports=yes
51572
51573  saved_cxxflags="$CXXFLAGS"
51574  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51575  ac_ext=cpp
51576ac_cpp='$CXXCPP $CPPFLAGS'
51577ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51578ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51579ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51580
51581  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51582/* end confdefs.h.  */
51583int i;
51584_ACEOF
51585if ac_fn_cxx_try_compile "$LINENO"; then :
51586
51587else
51588  supports=no
51589fi
51590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51591  ac_ext=cpp
51592ac_cpp='$CXXCPP $CPPFLAGS'
51593ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51594ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51595ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51596
51597  CXXFLAGS="$saved_cxxflags"
51598
51599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51600$as_echo "$supports" >&6; }
51601  if test "x$supports" = "xyes" ; then
51602    :
51603    CXX_COMP_SUPPORTS="yes"
51604  else
51605    :
51606    CXX_COMP_SUPPORTS="no"
51607  fi
51608
51609
51610
51611
51612
51613
51614
51615
51616
51617
51618
51619
51620
51621  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51622$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51623  supports=no
51624  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51625
51626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51627$as_echo "$supports" >&6; }
51628  if test "x$supports" = "xyes" ; then
51629    :
51630
51631  else
51632    :
51633    ZERO_ARCHFLAG=""
51634  fi
51635
51636
51637
51638
51639
51640
51641
51642
51643  # Check that the compiler supports -mX (or -qX on AIX) flags
51644  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
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
51687
51688
51689
51690
51691
51692    # Execute function body
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
51736
51737
51738
51739
51740
51741    # Execute function body
51742
51743  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51744$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51745  supports=yes
51746
51747  saved_cflags="$CFLAGS"
51748  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51749  ac_ext=c
51750ac_cpp='$CPP $CPPFLAGS'
51751ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51752ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51753ac_compiler_gnu=$ac_cv_c_compiler_gnu
51754
51755  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51756/* end confdefs.h.  */
51757int i;
51758_ACEOF
51759if ac_fn_c_try_compile "$LINENO"; then :
51760
51761else
51762  supports=no
51763fi
51764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51765  ac_ext=cpp
51766ac_cpp='$CXXCPP $CPPFLAGS'
51767ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51768ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51769ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51770
51771  CFLAGS="$saved_cflags"
51772
51773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51774$as_echo "$supports" >&6; }
51775  if test "x$supports" = "xyes" ; then
51776    :
51777    C_COMP_SUPPORTS="yes"
51778  else
51779    :
51780    C_COMP_SUPPORTS="no"
51781  fi
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
51836
51837
51838
51839
51840
51841    # Execute function body
51842
51843  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51844$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51845  supports=yes
51846
51847  saved_cxxflags="$CXXFLAGS"
51848  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51849  ac_ext=cpp
51850ac_cpp='$CXXCPP $CPPFLAGS'
51851ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51852ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51853ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51854
51855  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51856/* end confdefs.h.  */
51857int i;
51858_ACEOF
51859if ac_fn_cxx_try_compile "$LINENO"; then :
51860
51861else
51862  supports=no
51863fi
51864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51865  ac_ext=cpp
51866ac_cpp='$CXXCPP $CPPFLAGS'
51867ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51868ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51869ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51870
51871  CXXFLAGS="$saved_cxxflags"
51872
51873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51874$as_echo "$supports" >&6; }
51875  if test "x$supports" = "xyes" ; then
51876    :
51877    CXX_COMP_SUPPORTS="yes"
51878  else
51879    :
51880    CXX_COMP_SUPPORTS="no"
51881  fi
51882
51883
51884
51885
51886
51887
51888
51889
51890
51891
51892
51893
51894
51895  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51896$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51897  supports=no
51898  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51899
51900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51901$as_echo "$supports" >&6; }
51902  if test "x$supports" = "xyes" ; then
51903    :
51904    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51905  else
51906    :
51907    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51908  fi
51909
51910
51911
51912
51913
51914
51915
51916
51917  # Check whether --enable-warnings-as-errors was given.
51918if test "${enable_warnings_as_errors+set}" = set; then :
51919  enableval=$enable_warnings_as_errors;
51920fi
51921
51922
51923  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51924$as_echo_n "checking if native warnings are errors... " >&6; }
51925  if test "x$enable_warnings_as_errors" = "xyes"; then
51926    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51927$as_echo "yes (explicitely set)" >&6; }
51928    WARNINGS_AS_ERRORS=true
51929  elif test "x$enable_warnings_as_errors" = "xno"; then
51930    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51931$as_echo "no" >&6; }
51932    WARNINGS_AS_ERRORS=false
51933  elif test "x$enable_warnings_as_errors" = "x"; then
51934    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51935$as_echo "yes (default)" >&6; }
51936    WARNINGS_AS_ERRORS=true
51937  else
51938    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51939  fi
51940
51941  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51942    # Set legacy hotspot variable
51943    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51944  else
51945    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51946  fi
51947
51948
51949
51950
51951  case "${TOOLCHAIN_TYPE}" in
51952    microsoft)
51953      DISABLE_WARNING_PREFIX="-wd"
51954      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51955      ;;
51956    solstudio)
51957      DISABLE_WARNING_PREFIX="-erroff="
51958      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51959      ;;
51960    gcc)
51961      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
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
52004
52005
52006
52007
52008
52009    # Execute function body
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
52053
52054
52055
52056
52057
52058    # Execute function body
52059
52060  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52061$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52062  supports=yes
52063
52064  saved_cflags="$CFLAGS"
52065  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52066  ac_ext=c
52067ac_cpp='$CPP $CPPFLAGS'
52068ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52069ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52070ac_compiler_gnu=$ac_cv_c_compiler_gnu
52071
52072  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52073/* end confdefs.h.  */
52074int i;
52075_ACEOF
52076if ac_fn_c_try_compile "$LINENO"; then :
52077
52078else
52079  supports=no
52080fi
52081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52082  ac_ext=cpp
52083ac_cpp='$CXXCPP $CPPFLAGS'
52084ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52085ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52086ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52087
52088  CFLAGS="$saved_cflags"
52089
52090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52091$as_echo "$supports" >&6; }
52092  if test "x$supports" = "xyes" ; then
52093    :
52094    C_COMP_SUPPORTS="yes"
52095  else
52096    :
52097    C_COMP_SUPPORTS="no"
52098  fi
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
52153
52154
52155
52156
52157
52158    # Execute function body
52159
52160  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52161$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52162  supports=yes
52163
52164  saved_cxxflags="$CXXFLAGS"
52165  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52166  ac_ext=cpp
52167ac_cpp='$CXXCPP $CPPFLAGS'
52168ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52169ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52170ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52171
52172  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52173/* end confdefs.h.  */
52174int i;
52175_ACEOF
52176if ac_fn_cxx_try_compile "$LINENO"; then :
52177
52178else
52179  supports=no
52180fi
52181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52182  ac_ext=cpp
52183ac_cpp='$CXXCPP $CPPFLAGS'
52184ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52185ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52186ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52187
52188  CXXFLAGS="$saved_cxxflags"
52189
52190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52191$as_echo "$supports" >&6; }
52192  if test "x$supports" = "xyes" ; then
52193    :
52194    CXX_COMP_SUPPORTS="yes"
52195  else
52196    :
52197    CXX_COMP_SUPPORTS="no"
52198  fi
52199
52200
52201
52202
52203
52204
52205
52206
52207
52208
52209
52210
52211
52212  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52213$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52214  supports=no
52215  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52216
52217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52218$as_echo "$supports" >&6; }
52219  if test "x$supports" = "xyes" ; then
52220    :
52221    GCC_CAN_DISABLE_WARNINGS=true
52222  else
52223    :
52224    GCC_CAN_DISABLE_WARNINGS=false
52225
52226  fi
52227
52228
52229
52230
52231
52232
52233      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52234        DISABLE_WARNING_PREFIX="-Wno-"
52235      else
52236        DISABLE_WARNING_PREFIX=
52237      fi
52238      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52239      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52240      # CFLAGS since any target specific flags will likely not work with the
52241      # build compiler
52242      CC_OLD="$CC"
52243      CXX_OLD="$CXX"
52244      CC="$BUILD_CC"
52245      CXX="$BUILD_CXX"
52246      CFLAGS_OLD="$CFLAGS"
52247      CFLAGS=""
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
52290
52291
52292
52293
52294
52295    # Execute function body
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
52339
52340
52341
52342
52343
52344    # Execute function body
52345
52346  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52347$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52348  supports=yes
52349
52350  saved_cflags="$CFLAGS"
52351  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52352  ac_ext=c
52353ac_cpp='$CPP $CPPFLAGS'
52354ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52355ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52356ac_compiler_gnu=$ac_cv_c_compiler_gnu
52357
52358  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52359/* end confdefs.h.  */
52360int i;
52361_ACEOF
52362if ac_fn_c_try_compile "$LINENO"; then :
52363
52364else
52365  supports=no
52366fi
52367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52368  ac_ext=cpp
52369ac_cpp='$CXXCPP $CPPFLAGS'
52370ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52371ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52372ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52373
52374  CFLAGS="$saved_cflags"
52375
52376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52377$as_echo "$supports" >&6; }
52378  if test "x$supports" = "xyes" ; then
52379    :
52380    C_COMP_SUPPORTS="yes"
52381  else
52382    :
52383    C_COMP_SUPPORTS="no"
52384  fi
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
52439
52440
52441
52442
52443
52444    # Execute function body
52445
52446  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52447$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52448  supports=yes
52449
52450  saved_cxxflags="$CXXFLAGS"
52451  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52452  ac_ext=cpp
52453ac_cpp='$CXXCPP $CPPFLAGS'
52454ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52455ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52456ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52457
52458  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52459/* end confdefs.h.  */
52460int i;
52461_ACEOF
52462if ac_fn_cxx_try_compile "$LINENO"; then :
52463
52464else
52465  supports=no
52466fi
52467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52468  ac_ext=cpp
52469ac_cpp='$CXXCPP $CPPFLAGS'
52470ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52471ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52472ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52473
52474  CXXFLAGS="$saved_cxxflags"
52475
52476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52477$as_echo "$supports" >&6; }
52478  if test "x$supports" = "xyes" ; then
52479    :
52480    CXX_COMP_SUPPORTS="yes"
52481  else
52482    :
52483    CXX_COMP_SUPPORTS="no"
52484  fi
52485
52486
52487
52488
52489
52490
52491
52492
52493
52494
52495
52496
52497
52498  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52499$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52500  supports=no
52501  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52502
52503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52504$as_echo "$supports" >&6; }
52505  if test "x$supports" = "xyes" ; then
52506    :
52507    BUILD_CC_CAN_DISABLE_WARNINGS=true
52508  else
52509    :
52510    BUILD_CC_CAN_DISABLE_WARNINGS=false
52511
52512  fi
52513
52514
52515
52516
52517
52518
52519      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52520        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52521      else
52522        BUILD_CC_DISABLE_WARNING_PREFIX=
52523      fi
52524      CC="$CC_OLD"
52525      CXX="$CXX_OLD"
52526      CFLAGS="$CFLAGS_OLD"
52527      ;;
52528    clang)
52529      DISABLE_WARNING_PREFIX="-Wno-"
52530      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52531      ;;
52532    xlc)
52533      DISABLE_WARNING_PREFIX="-qsuppress="
52534      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52535      ;;
52536  esac
52537
52538
52539
52540
52541
52542# Setup debug symbols (need objcopy from the toolchain for that)
52543
52544  #
52545  # NATIVE_DEBUG_SYMBOLS
52546  # This must be done after the toolchain is setup, since we're looking at objcopy.
52547  #
52548  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52549$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52550
52551# Check whether --with-native-debug-symbols was given.
52552if test "${with_native_debug_symbols+set}" = set; then :
52553  withval=$with_native_debug_symbols;
52554        if test "x$OPENJDK_TARGET_OS" = xaix; then
52555          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52556            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52557          fi
52558        fi
52559
52560else
52561
52562        if test "x$OPENJDK_TARGET_OS" = xaix; then
52563          # AIX doesn't support 'zipped' so use 'internal' as default
52564          with_native_debug_symbols="internal"
52565        else
52566          if test "x$STATIC_BUILD" = xtrue; then
52567            with_native_debug_symbols="none"
52568          else
52569            with_native_debug_symbols="zipped"
52570          fi
52571        fi
52572
52573fi
52574
52575  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52577$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52578
52579  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52580
52581    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52582      if test "x$OBJCOPY" = x; then
52583        # enabling of enable-debug-symbols and can't find objcopy
52584        # this is an error
52585        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52586      fi
52587    fi
52588
52589    COMPILE_WITH_DEBUG_SYMBOLS=true
52590    COPY_DEBUG_SYMBOLS=true
52591    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52592
52593    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52594    DEBUG_BINARIES=false
52595    STRIP_POLICY=min_strip
52596
52597  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52598    COMPILE_WITH_DEBUG_SYMBOLS=false
52599    COPY_DEBUG_SYMBOLS=false
52600    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52601
52602    DEBUG_BINARIES=false
52603    STRIP_POLICY=no_strip
52604  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52605    COMPILE_WITH_DEBUG_SYMBOLS=true
52606    COPY_DEBUG_SYMBOLS=false
52607    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52608
52609    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52610    DEBUG_BINARIES=true
52611    STRIP_POLICY=no_strip
52612    STRIP=""
52613
52614  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52615
52616    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52617      if test "x$OBJCOPY" = x; then
52618        # enabling of enable-debug-symbols and can't find objcopy
52619        # this is an error
52620        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52621      fi
52622    fi
52623
52624    COMPILE_WITH_DEBUG_SYMBOLS=true
52625    COPY_DEBUG_SYMBOLS=true
52626    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52627
52628    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52629    DEBUG_BINARIES=false
52630    STRIP_POLICY=min_strip
52631  else
52632    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52633  fi
52634
52635  # --enable-debug-symbols is deprecated.
52636  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52637
52638  # Check whether --enable-debug-symbols was given.
52639if test "${enable_debug_symbols+set}" = set; then :
52640  enableval=$enable_debug_symbols;
52641fi
52642
52643  if test "x$enable_debug_symbols" != x; then
52644    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52645$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52646
52647    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52648      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52649$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52650    fi
52651
52652  fi
52653
52654
52655  # --enable-zip-debug-info is deprecated.
52656  # Please use --with-native-debug-symbols=zipped .
52657
52658  # Check whether --enable-zip-debug-info was given.
52659if test "${enable_zip_debug_info+set}" = set; then :
52660  enableval=$enable_zip_debug_info;
52661fi
52662
52663  if test "x$enable_zip_debug_info" != x; then
52664    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52665$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52666
52667    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52668      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52669$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52670    fi
52671
52672  fi
52673
52674
52675
52676
52677
52678
52679  # Legacy values
52680
52681
52682
52683
52684  # Check whether --enable-native-coverage was given.
52685if test "${enable_native_coverage+set}" = set; then :
52686  enableval=$enable_native_coverage;
52687fi
52688
52689  GCOV_ENABLED="false"
52690  if test "x$enable_native_coverage" = "xyes"; then
52691    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52692      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52693$as_echo_n "checking if native coverage is enabled... " >&6; }
52694      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52695$as_echo "yes" >&6; }
52696      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52697      GCOV_LDFLAGS="-fprofile-arcs"
52698      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52699      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52700      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52701      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52702      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52703      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52704      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52705      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52706      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52707      GCOV_ENABLED="true"
52708    else
52709      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52710    fi
52711  elif test "x$enable_native_coverage" = "xno"; then
52712    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52713$as_echo_n "checking if native coverage is enabled... " >&6; }
52714    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52715$as_echo "no" >&6; }
52716  elif test "x$enable_native_coverage" != "x"; then
52717    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52718  fi
52719
52720
52721
52722
52723# Need toolchain to setup dtrace
52724
52725  # Test for dtrace dependencies
52726  # Check whether --enable-dtrace was given.
52727if test "${enable_dtrace+set}" = set; then :
52728  enableval=$enable_dtrace;
52729fi
52730
52731
52732  DTRACE_DEP_MISSING=false
52733
52734  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52735$as_echo_n "checking for dtrace tool... " >&6; }
52736  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52737    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52738$as_echo "$DTRACE" >&6; }
52739  else
52740    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52741$as_echo "not found, cannot build dtrace" >&6; }
52742    DTRACE_DEP_MISSING=true
52743  fi
52744
52745  for ac_header in sys/sdt.h
52746do :
52747  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52748if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52749  cat >>confdefs.h <<_ACEOF
52750#define HAVE_SYS_SDT_H 1
52751_ACEOF
52752 DTRACE_HEADERS_OK=yes
52753else
52754  DTRACE_HEADERS_OK=no
52755fi
52756
52757done
52758
52759  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52760    DTRACE_DEP_MISSING=true
52761  fi
52762
52763  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52764$as_echo_n "checking if dtrace should be built... " >&6; }
52765  if test "x$enable_dtrace" = "xyes"; then
52766    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52767      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52768$as_echo "no, missing dependencies" >&6; }
52769
52770  # Print a helpful message on how to acquire the necessary build dependency.
52771  # dtrace is the help tag: freetype, cups, alsa etc
52772  MISSING_DEPENDENCY=dtrace
52773
52774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52775    cygwin_help $MISSING_DEPENDENCY
52776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52777    msys_help $MISSING_DEPENDENCY
52778  else
52779    PKGHANDLER_COMMAND=
52780
52781    case $PKGHANDLER in
52782      apt-get)
52783        apt_help     $MISSING_DEPENDENCY ;;
52784      yum)
52785        yum_help     $MISSING_DEPENDENCY ;;
52786      port)
52787        port_help    $MISSING_DEPENDENCY ;;
52788      pkgutil)
52789        pkgutil_help $MISSING_DEPENDENCY ;;
52790      pkgadd)
52791        pkgadd_help  $MISSING_DEPENDENCY ;;
52792    esac
52793
52794    if test "x$PKGHANDLER_COMMAND" != x; then
52795      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52796    fi
52797  fi
52798
52799      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52800    else
52801      INCLUDE_DTRACE=true
52802      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52803$as_echo "yes, forced" >&6; }
52804    fi
52805  elif test "x$enable_dtrace" = "xno"; then
52806    INCLUDE_DTRACE=false
52807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52808$as_echo "no, forced" >&6; }
52809  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52810    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52811      INCLUDE_DTRACE=false
52812      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52813$as_echo "no, missing dependencies" >&6; }
52814    else
52815      INCLUDE_DTRACE=true
52816      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52817$as_echo "yes, dependencies present" >&6; }
52818    fi
52819  else
52820    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52821  fi
52822
52823
52824
52825  # The user can in some cases supply additional jvm features. For the custom
52826  # variant, this defines the entire variant.
52827
52828# Check whether --with-jvm-features was given.
52829if test "${with_jvm_features+set}" = set; then :
52830  withval=$with_jvm_features;
52831fi
52832
52833  if test "x$with_jvm_features" != x; then
52834    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52835$as_echo_n "checking additional JVM features... " >&6; }
52836    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52837    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52838$as_echo "$JVM_FEATURES" >&6; }
52839  fi
52840
52841  # Verify that dependencies are met for explicitly set features.
52842  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52843    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52844  fi
52845
52846  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52847    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52848  fi
52849
52850  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
52851    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
52852  fi
52853
52854  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52855    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52856  fi
52857
52858  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52859    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52860  fi
52861
52862  # Turn on additional features based on other parts of configure
52863  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52864    JVM_FEATURES="$JVM_FEATURES dtrace"
52865  else
52866    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52867      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52868    fi
52869  fi
52870
52871  if test "x$STATIC_BUILD" = "xtrue"; then
52872    JVM_FEATURES="$JVM_FEATURES static-build"
52873  else
52874    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52875      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52876    fi
52877  fi
52878
52879  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52880    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52881      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52882    fi
52883  fi
52884
52885  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52886    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52887      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52888    fi
52889  fi
52890
52891  # Only enable jvmci on x86_64, sparcv9 and aarch64.
52892  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52893      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52894      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52895    JVM_FEATURES_jvmci="jvmci"
52896  else
52897    JVM_FEATURES_jvmci=""
52898  fi
52899
52900  # All variants but minimal (and custom) get these features
52901  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52902
52903  # Enable features depending on variant.
52904  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52905  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52906  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52907  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52908  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52909  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52910  JVM_FEATURES_custom="$JVM_FEATURES"
52911
52912
52913
52914
52915
52916
52917
52918
52919
52920  # Used for verification of Makefiles by check-jvm-feature
52921
52922
52923  # We don't support --with-jvm-interpreter anymore, use zero instead.
52924
52925
52926# Check whether --with-jvm-interpreter was given.
52927if test "${with_jvm_interpreter+set}" = set; then :
52928  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52929$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52930fi
52931
52932
52933
52934
52935  # Check whether --enable-hotspot-gtest was given.
52936if test "${enable_hotspot_gtest+set}" = set; then :
52937  enableval=$enable_hotspot_gtest;
52938fi
52939
52940
52941  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52942    GTEST_DIR_EXISTS="true"
52943  else
52944    GTEST_DIR_EXISTS="false"
52945  fi
52946
52947  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52948$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52949  if test "x$enable_hotspot_gtest" = "xyes"; then
52950    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52951      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52952$as_echo "yes, forced" >&6; }
52953      BUILD_GTEST="true"
52954    else
52955      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52956    fi
52957  elif test "x$enable_hotspot_gtest" = "xno"; then
52958    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52959$as_echo "no, forced" >&6; }
52960    BUILD_GTEST="false"
52961  elif test "x$enable_hotspot_gtest" = "x"; then
52962    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
52963      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52964$as_echo "yes" >&6; }
52965      BUILD_GTEST="true"
52966    else
52967      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52968$as_echo "no" >&6; }
52969      BUILD_GTEST="false"
52970    fi
52971  else
52972    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52973  fi
52974
52975
52976
52977
52978###############################################################################
52979#
52980# Check dependencies for external and internal libraries.
52981#
52982###############################################################################
52983
52984# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52985
52986  # When using cygwin or msys, we need a wrapper binary that renames
52987  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52988  # @files and rewrites these too! This wrapper binary is
52989  # called fixpath.
52990  FIXPATH=
52991  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52992    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52993$as_echo_n "checking if fixpath can be created... " >&6; }
52994    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52995    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52996    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52997    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52998      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52999      FIXPATH="$FIXPATH_BIN -c"
53000    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53001      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53002      # @ was chosen as separator to minimize risk of other tools messing around with it
53003      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53004          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53005      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53006      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53007    fi
53008    FIXPATH_SRC_W="$FIXPATH_SRC"
53009    FIXPATH_BIN_W="$FIXPATH_BIN"
53010
53011  unix_path="$FIXPATH_SRC_W"
53012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53013    windows_path=`$CYGPATH -m "$unix_path"`
53014    FIXPATH_SRC_W="$windows_path"
53015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53016    windows_path=`cmd //c echo $unix_path`
53017    FIXPATH_SRC_W="$windows_path"
53018  fi
53019
53020
53021  unix_path="$FIXPATH_BIN_W"
53022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53023    windows_path=`$CYGPATH -m "$unix_path"`
53024    FIXPATH_BIN_W="$windows_path"
53025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53026    windows_path=`cmd //c echo $unix_path`
53027    FIXPATH_BIN_W="$windows_path"
53028  fi
53029
53030    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53031    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53032    cd $FIXPATH_DIR
53033    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53034    cd $CURDIR
53035
53036    if test ! -x $FIXPATH_BIN; then
53037      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53038$as_echo "no" >&6; }
53039      cat $FIXPATH_DIR/fixpath1.log
53040      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53041    fi
53042    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53043$as_echo "yes" >&6; }
53044    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53045$as_echo_n "checking if fixpath.exe works... " >&6; }
53046    cd $FIXPATH_DIR
53047    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53048        > $FIXPATH_DIR/fixpath2.log 2>&1
53049    cd $CURDIR
53050    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53051      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53052$as_echo "no" >&6; }
53053      cat $FIXPATH_DIR/fixpath2.log
53054      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53055    fi
53056    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53057$as_echo "yes" >&6; }
53058
53059    FIXPATH_DETACH_FLAG="--detach"
53060  fi
53061
53062
53063
53064
53065
53066
53067  # Check if X11 is needed
53068  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53069    # No X11 support on windows or macosx
53070    NEEDS_LIB_X11=false
53071  else
53072    # All other instances need X11, even if building headless only, libawt still
53073    # needs X11 headers.
53074    NEEDS_LIB_X11=true
53075  fi
53076
53077  # Check if cups is needed
53078  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53079    # Windows have a separate print system
53080    NEEDS_LIB_CUPS=false
53081  else
53082    NEEDS_LIB_CUPS=true
53083  fi
53084
53085  # A custom hook may have set this already
53086  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53087    NEEDS_LIB_FREETYPE=true
53088  fi
53089
53090  # Check if alsa is needed
53091  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53092    NEEDS_LIB_ALSA=true
53093  else
53094    NEEDS_LIB_ALSA=false
53095  fi
53096
53097  # Check if ffi is needed
53098  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53099    NEEDS_LIB_FFI=true
53100  else
53101    NEEDS_LIB_FFI=false
53102  fi
53103
53104
53105  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53106  # dynamic build is configured on command line.
53107
53108# Check whether --with-stdc++lib was given.
53109if test "${with_stdc__lib+set}" = set; then :
53110  withval=$with_stdc__lib;
53111        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53112                && test "x$with_stdc__lib" != xdefault; then
53113          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53114        fi
53115
53116else
53117  with_stdc__lib=default
53118
53119fi
53120
53121
53122  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53123    # Test if stdc++ can be linked statically.
53124    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53125$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53126    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53127    ac_ext=cpp
53128ac_cpp='$CXXCPP $CPPFLAGS'
53129ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53130ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53131ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53132
53133    OLD_LIBS="$LIBS"
53134    LIBS="$STATIC_STDCXX_FLAGS"
53135    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53136/* end confdefs.h.  */
53137
53138int
53139main ()
53140{
53141return 0;
53142  ;
53143  return 0;
53144}
53145_ACEOF
53146if ac_fn_cxx_try_link "$LINENO"; then :
53147  has_static_libstdcxx=yes
53148else
53149  has_static_libstdcxx=no
53150fi
53151rm -f core conftest.err conftest.$ac_objext \
53152    conftest$ac_exeext conftest.$ac_ext
53153    LIBS="$OLD_LIBS"
53154    ac_ext=cpp
53155ac_cpp='$CXXCPP $CPPFLAGS'
53156ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53157ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53158ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53159
53160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53161$as_echo "$has_static_libstdcxx" >&6; }
53162
53163    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53164      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53165    fi
53166
53167    # If dynamic was requested, it's available since it would fail above otherwise.
53168    # If dynamic wasn't requested, go with static unless it isn't available.
53169    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53170$as_echo_n "checking how to link with libstdc++... " >&6; }
53171    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53172        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53173      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53174$as_echo "dynamic" >&6; }
53175    else
53176      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53177      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53178      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53179      # just use the same setting as for the TARGET toolchain.
53180      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53181      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53182$as_echo "static" >&6; }
53183    fi
53184  fi
53185
53186  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53187  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53188    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53189  fi
53190
53191
53192
53193  # Setup Windows runtime dlls
53194  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53195
53196
53197# Check whether --with-msvcr-dll was given.
53198if test "${with_msvcr_dll+set}" = set; then :
53199  withval=$with_msvcr_dll;
53200fi
53201
53202
53203  if test "x$with_msvcr_dll" != x; then
53204    # If given explicitely by user, do not probe. If not present, fail directly.
53205
53206  DLL_NAME="$MSVCR_NAME"
53207  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53208  METHOD="--with-msvcr-dll"
53209  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53210    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53211$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53212
53213    # Need to check if the found msvcr is correct architecture
53214    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53215$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53216    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53217    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53218      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53219      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53220      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53221        CORRECT_MSVCR_ARCH="PE32 executable"
53222      else
53223        CORRECT_MSVCR_ARCH="PE32+ executable"
53224      fi
53225    else
53226      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53227        CORRECT_MSVCR_ARCH=386
53228      else
53229        CORRECT_MSVCR_ARCH=x86-64
53230      fi
53231    fi
53232    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53233      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53234$as_echo "ok" >&6; }
53235      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53236
53237  # Only process if variable expands to non-empty
53238
53239  if test "x$MSVC_DLL" != x; then
53240    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53241
53242  # Input might be given as Windows format, start by converting to
53243  # unix format.
53244  path="$MSVC_DLL"
53245  new_path=`$CYGPATH -u "$path"`
53246
53247  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53248  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53249  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53250  # "foo.exe" is OK but "foo" is an error.
53251  #
53252  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53253  # It is also a way to make sure we got the proper file name for the real test later on.
53254  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53255  if test "x$test_shortpath" = x; then
53256    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53257$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53258    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53259  fi
53260
53261  # Call helper function which possibly converts this using DOS-style short mode.
53262  # If so, the updated path is stored in $new_path.
53263
53264  input_path="$new_path"
53265  # Check if we need to convert this using DOS-style short mode. If the path
53266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53267  # take no chances and rewrite it.
53268  # Note: m4 eats our [], so we need to use [ and ] instead.
53269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53270  if test "x$has_forbidden_chars" != x; then
53271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53272    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53273    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53274    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53275      # Going to short mode and back again did indeed matter. Since short mode is
53276      # case insensitive, let's make it lowercase to improve readability.
53277      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53278      # Now convert it back to Unix-style (cygpath)
53279      input_path=`$CYGPATH -u "$shortmode_path"`
53280      new_path="$input_path"
53281    fi
53282  fi
53283
53284  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53285  if test "x$test_cygdrive_prefix" = x; then
53286    # As a simple fix, exclude /usr/bin since it's not a real path.
53287    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53288      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53289      # a path prefixed by /cygdrive for fixpath to work.
53290      new_path="$CYGWIN_ROOT_PATH$input_path"
53291    fi
53292  fi
53293
53294
53295  if test "x$path" != "x$new_path"; then
53296    MSVC_DLL="$new_path"
53297    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53298$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53299  fi
53300
53301    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53302
53303  path="$MSVC_DLL"
53304  has_colon=`$ECHO $path | $GREP ^.:`
53305  new_path="$path"
53306  if test "x$has_colon" = x; then
53307    # Not in mixed or Windows style, start by that.
53308    new_path=`cmd //c echo $path`
53309  fi
53310
53311
53312  input_path="$new_path"
53313  # Check if we need to convert this using DOS-style short mode. If the path
53314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53315  # take no chances and rewrite it.
53316  # Note: m4 eats our [], so we need to use [ and ] instead.
53317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53318  if test "x$has_forbidden_chars" != x; then
53319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53320    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53321  fi
53322
53323
53324  windows_path="$new_path"
53325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53326    unix_path=`$CYGPATH -u "$windows_path"`
53327    new_path="$unix_path"
53328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53330    new_path="$unix_path"
53331  fi
53332
53333  if test "x$path" != "x$new_path"; then
53334    MSVC_DLL="$new_path"
53335    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53336$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53337  fi
53338
53339  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53340  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53341
53342    else
53343      # We're on a unix platform. Hooray! :)
53344      path="$MSVC_DLL"
53345      has_space=`$ECHO "$path" | $GREP " "`
53346      if test "x$has_space" != x; then
53347        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53348$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53349        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53350      fi
53351
53352      # Use eval to expand a potential ~
53353      eval path="$path"
53354      if test ! -f "$path" && test ! -d "$path"; then
53355        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53356      fi
53357
53358      if test -d "$path"; then
53359        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53360      else
53361        dir="`$DIRNAME "$path"`"
53362        base="`$BASENAME "$path"`"
53363        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53364      fi
53365    fi
53366  fi
53367
53368      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53369$as_echo_n "checking for $DLL_NAME... " >&6; }
53370      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53371$as_echo "$MSVC_DLL" >&6; }
53372    else
53373      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53374$as_echo "incorrect, ignoring" >&6; }
53375      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53376$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53377    fi
53378  fi
53379
53380    if test "x$MSVC_DLL" = x; then
53381      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53382    fi
53383    MSVCR_DLL="$MSVC_DLL"
53384  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53385
53386  DLL_NAME="$MSVCR_NAME"
53387  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53388  METHOD="devkit"
53389  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53390    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53391$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53392
53393    # Need to check if the found msvcr is correct architecture
53394    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53395$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53396    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53397    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53398      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53399      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53400      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53401        CORRECT_MSVCR_ARCH="PE32 executable"
53402      else
53403        CORRECT_MSVCR_ARCH="PE32+ executable"
53404      fi
53405    else
53406      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53407        CORRECT_MSVCR_ARCH=386
53408      else
53409        CORRECT_MSVCR_ARCH=x86-64
53410      fi
53411    fi
53412    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53413      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53414$as_echo "ok" >&6; }
53415      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53416
53417  # Only process if variable expands to non-empty
53418
53419  if test "x$MSVC_DLL" != x; then
53420    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53421
53422  # Input might be given as Windows format, start by converting to
53423  # unix format.
53424  path="$MSVC_DLL"
53425  new_path=`$CYGPATH -u "$path"`
53426
53427  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53428  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53429  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53430  # "foo.exe" is OK but "foo" is an error.
53431  #
53432  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53433  # It is also a way to make sure we got the proper file name for the real test later on.
53434  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53435  if test "x$test_shortpath" = x; then
53436    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53437$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53438    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53439  fi
53440
53441  # Call helper function which possibly converts this using DOS-style short mode.
53442  # If so, the updated path is stored in $new_path.
53443
53444  input_path="$new_path"
53445  # Check if we need to convert this using DOS-style short mode. If the path
53446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53447  # take no chances and rewrite it.
53448  # Note: m4 eats our [], so we need to use [ and ] instead.
53449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53450  if test "x$has_forbidden_chars" != x; then
53451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53452    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53453    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53454    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53455      # Going to short mode and back again did indeed matter. Since short mode is
53456      # case insensitive, let's make it lowercase to improve readability.
53457      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53458      # Now convert it back to Unix-style (cygpath)
53459      input_path=`$CYGPATH -u "$shortmode_path"`
53460      new_path="$input_path"
53461    fi
53462  fi
53463
53464  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53465  if test "x$test_cygdrive_prefix" = x; then
53466    # As a simple fix, exclude /usr/bin since it's not a real path.
53467    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53468      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53469      # a path prefixed by /cygdrive for fixpath to work.
53470      new_path="$CYGWIN_ROOT_PATH$input_path"
53471    fi
53472  fi
53473
53474
53475  if test "x$path" != "x$new_path"; then
53476    MSVC_DLL="$new_path"
53477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53478$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53479  fi
53480
53481    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53482
53483  path="$MSVC_DLL"
53484  has_colon=`$ECHO $path | $GREP ^.:`
53485  new_path="$path"
53486  if test "x$has_colon" = x; then
53487    # Not in mixed or Windows style, start by that.
53488    new_path=`cmd //c echo $path`
53489  fi
53490
53491
53492  input_path="$new_path"
53493  # Check if we need to convert this using DOS-style short mode. If the path
53494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53495  # take no chances and rewrite it.
53496  # Note: m4 eats our [], so we need to use [ and ] instead.
53497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53498  if test "x$has_forbidden_chars" != x; then
53499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53500    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53501  fi
53502
53503
53504  windows_path="$new_path"
53505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53506    unix_path=`$CYGPATH -u "$windows_path"`
53507    new_path="$unix_path"
53508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53510    new_path="$unix_path"
53511  fi
53512
53513  if test "x$path" != "x$new_path"; then
53514    MSVC_DLL="$new_path"
53515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53516$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53517  fi
53518
53519  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53520  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53521
53522    else
53523      # We're on a unix platform. Hooray! :)
53524      path="$MSVC_DLL"
53525      has_space=`$ECHO "$path" | $GREP " "`
53526      if test "x$has_space" != x; then
53527        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53528$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53529        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53530      fi
53531
53532      # Use eval to expand a potential ~
53533      eval path="$path"
53534      if test ! -f "$path" && test ! -d "$path"; then
53535        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53536      fi
53537
53538      if test -d "$path"; then
53539        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53540      else
53541        dir="`$DIRNAME "$path"`"
53542        base="`$BASENAME "$path"`"
53543        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53544      fi
53545    fi
53546  fi
53547
53548      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53549$as_echo_n "checking for $DLL_NAME... " >&6; }
53550      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53551$as_echo "$MSVC_DLL" >&6; }
53552    else
53553      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53554$as_echo "incorrect, ignoring" >&6; }
53555      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53556$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53557    fi
53558  fi
53559
53560    if test "x$MSVC_DLL" = x; then
53561      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53562    fi
53563    MSVCR_DLL="$MSVC_DLL"
53564  else
53565
53566  DLL_NAME="${MSVCR_NAME}"
53567  MSVC_DLL=
53568
53569  if test "x$MSVC_DLL" = x; then
53570    # Probe: Using well-known location from Visual Studio 10.0
53571    if test "x$VCINSTALLDIR" != x; then
53572      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53573
53574  windows_path="$CYGWIN_VC_INSTALL_DIR"
53575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53576    unix_path=`$CYGPATH -u "$windows_path"`
53577    CYGWIN_VC_INSTALL_DIR="$unix_path"
53578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53580    CYGWIN_VC_INSTALL_DIR="$unix_path"
53581  fi
53582
53583      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53584        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53585      else
53586        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53587      fi
53588      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53589
53590  DLL_NAME="$DLL_NAME"
53591  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53592  METHOD="well-known location in VCINSTALLDIR"
53593  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53594    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53595$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53596
53597    # Need to check if the found msvcr is correct architecture
53598    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53599$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53600    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53601    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53602      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53603      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53604      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53605        CORRECT_MSVCR_ARCH="PE32 executable"
53606      else
53607        CORRECT_MSVCR_ARCH="PE32+ executable"
53608      fi
53609    else
53610      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53611        CORRECT_MSVCR_ARCH=386
53612      else
53613        CORRECT_MSVCR_ARCH=x86-64
53614      fi
53615    fi
53616    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53617      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53618$as_echo "ok" >&6; }
53619      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53620
53621  # Only process if variable expands to non-empty
53622
53623  if test "x$MSVC_DLL" != x; then
53624    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53625
53626  # Input might be given as Windows format, start by converting to
53627  # unix format.
53628  path="$MSVC_DLL"
53629  new_path=`$CYGPATH -u "$path"`
53630
53631  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53632  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53633  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53634  # "foo.exe" is OK but "foo" is an error.
53635  #
53636  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53637  # It is also a way to make sure we got the proper file name for the real test later on.
53638  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53639  if test "x$test_shortpath" = x; then
53640    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53641$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53642    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53643  fi
53644
53645  # Call helper function which possibly converts this using DOS-style short mode.
53646  # If so, the updated path is stored in $new_path.
53647
53648  input_path="$new_path"
53649  # Check if we need to convert this using DOS-style short mode. If the path
53650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53651  # take no chances and rewrite it.
53652  # Note: m4 eats our [], so we need to use [ and ] instead.
53653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53654  if test "x$has_forbidden_chars" != x; then
53655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53656    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53657    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53658    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53659      # Going to short mode and back again did indeed matter. Since short mode is
53660      # case insensitive, let's make it lowercase to improve readability.
53661      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53662      # Now convert it back to Unix-style (cygpath)
53663      input_path=`$CYGPATH -u "$shortmode_path"`
53664      new_path="$input_path"
53665    fi
53666  fi
53667
53668  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53669  if test "x$test_cygdrive_prefix" = x; then
53670    # As a simple fix, exclude /usr/bin since it's not a real path.
53671    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53672      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53673      # a path prefixed by /cygdrive for fixpath to work.
53674      new_path="$CYGWIN_ROOT_PATH$input_path"
53675    fi
53676  fi
53677
53678
53679  if test "x$path" != "x$new_path"; then
53680    MSVC_DLL="$new_path"
53681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53682$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53683  fi
53684
53685    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53686
53687  path="$MSVC_DLL"
53688  has_colon=`$ECHO $path | $GREP ^.:`
53689  new_path="$path"
53690  if test "x$has_colon" = x; then
53691    # Not in mixed or Windows style, start by that.
53692    new_path=`cmd //c echo $path`
53693  fi
53694
53695
53696  input_path="$new_path"
53697  # Check if we need to convert this using DOS-style short mode. If the path
53698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53699  # take no chances and rewrite it.
53700  # Note: m4 eats our [], so we need to use [ and ] instead.
53701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53702  if test "x$has_forbidden_chars" != x; then
53703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53704    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53705  fi
53706
53707
53708  windows_path="$new_path"
53709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53710    unix_path=`$CYGPATH -u "$windows_path"`
53711    new_path="$unix_path"
53712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53714    new_path="$unix_path"
53715  fi
53716
53717  if test "x$path" != "x$new_path"; then
53718    MSVC_DLL="$new_path"
53719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53720$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53721  fi
53722
53723  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53724  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53725
53726    else
53727      # We're on a unix platform. Hooray! :)
53728      path="$MSVC_DLL"
53729      has_space=`$ECHO "$path" | $GREP " "`
53730      if test "x$has_space" != x; then
53731        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53732$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53733        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53734      fi
53735
53736      # Use eval to expand a potential ~
53737      eval path="$path"
53738      if test ! -f "$path" && test ! -d "$path"; then
53739        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53740      fi
53741
53742      if test -d "$path"; then
53743        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53744      else
53745        dir="`$DIRNAME "$path"`"
53746        base="`$BASENAME "$path"`"
53747        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53748      fi
53749    fi
53750  fi
53751
53752      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53753$as_echo_n "checking for $DLL_NAME... " >&6; }
53754      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53755$as_echo "$MSVC_DLL" >&6; }
53756    else
53757      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53758$as_echo "incorrect, ignoring" >&6; }
53759      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53760$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53761    fi
53762  fi
53763
53764    fi
53765  fi
53766
53767  if test "x$MSVC_DLL" = x; then
53768    # Probe: Check in the Boot JDK directory.
53769    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53770
53771  DLL_NAME="$DLL_NAME"
53772  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53773  METHOD="well-known location in Boot JDK"
53774  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53775    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53776$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53777
53778    # Need to check if the found msvcr is correct architecture
53779    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53780$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53781    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53782    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53783      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53784      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53785      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53786        CORRECT_MSVCR_ARCH="PE32 executable"
53787      else
53788        CORRECT_MSVCR_ARCH="PE32+ executable"
53789      fi
53790    else
53791      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53792        CORRECT_MSVCR_ARCH=386
53793      else
53794        CORRECT_MSVCR_ARCH=x86-64
53795      fi
53796    fi
53797    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53798      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53799$as_echo "ok" >&6; }
53800      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53801
53802  # Only process if variable expands to non-empty
53803
53804  if test "x$MSVC_DLL" != x; then
53805    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53806
53807  # Input might be given as Windows format, start by converting to
53808  # unix format.
53809  path="$MSVC_DLL"
53810  new_path=`$CYGPATH -u "$path"`
53811
53812  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53813  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53814  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53815  # "foo.exe" is OK but "foo" is an error.
53816  #
53817  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53818  # It is also a way to make sure we got the proper file name for the real test later on.
53819  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53820  if test "x$test_shortpath" = x; then
53821    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53822$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53823    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53824  fi
53825
53826  # Call helper function which possibly converts this using DOS-style short mode.
53827  # If so, the updated path is stored in $new_path.
53828
53829  input_path="$new_path"
53830  # Check if we need to convert this using DOS-style short mode. If the path
53831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53832  # take no chances and rewrite it.
53833  # Note: m4 eats our [], so we need to use [ and ] instead.
53834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53835  if test "x$has_forbidden_chars" != x; then
53836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53837    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53838    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53839    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53840      # Going to short mode and back again did indeed matter. Since short mode is
53841      # case insensitive, let's make it lowercase to improve readability.
53842      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53843      # Now convert it back to Unix-style (cygpath)
53844      input_path=`$CYGPATH -u "$shortmode_path"`
53845      new_path="$input_path"
53846    fi
53847  fi
53848
53849  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53850  if test "x$test_cygdrive_prefix" = x; then
53851    # As a simple fix, exclude /usr/bin since it's not a real path.
53852    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53853      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53854      # a path prefixed by /cygdrive for fixpath to work.
53855      new_path="$CYGWIN_ROOT_PATH$input_path"
53856    fi
53857  fi
53858
53859
53860  if test "x$path" != "x$new_path"; then
53861    MSVC_DLL="$new_path"
53862    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53863$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53864  fi
53865
53866    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53867
53868  path="$MSVC_DLL"
53869  has_colon=`$ECHO $path | $GREP ^.:`
53870  new_path="$path"
53871  if test "x$has_colon" = x; then
53872    # Not in mixed or Windows style, start by that.
53873    new_path=`cmd //c echo $path`
53874  fi
53875
53876
53877  input_path="$new_path"
53878  # Check if we need to convert this using DOS-style short mode. If the path
53879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53880  # take no chances and rewrite it.
53881  # Note: m4 eats our [], so we need to use [ and ] instead.
53882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53883  if test "x$has_forbidden_chars" != x; then
53884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53885    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53886  fi
53887
53888
53889  windows_path="$new_path"
53890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53891    unix_path=`$CYGPATH -u "$windows_path"`
53892    new_path="$unix_path"
53893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53895    new_path="$unix_path"
53896  fi
53897
53898  if test "x$path" != "x$new_path"; then
53899    MSVC_DLL="$new_path"
53900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53901$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53902  fi
53903
53904  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53905  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53906
53907    else
53908      # We're on a unix platform. Hooray! :)
53909      path="$MSVC_DLL"
53910      has_space=`$ECHO "$path" | $GREP " "`
53911      if test "x$has_space" != x; then
53912        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53913$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53914        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53915      fi
53916
53917      # Use eval to expand a potential ~
53918      eval path="$path"
53919      if test ! -f "$path" && test ! -d "$path"; then
53920        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53921      fi
53922
53923      if test -d "$path"; then
53924        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53925      else
53926        dir="`$DIRNAME "$path"`"
53927        base="`$BASENAME "$path"`"
53928        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53929      fi
53930    fi
53931  fi
53932
53933      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53934$as_echo_n "checking for $DLL_NAME... " >&6; }
53935      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53936$as_echo "$MSVC_DLL" >&6; }
53937    else
53938      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53939$as_echo "incorrect, ignoring" >&6; }
53940      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53941$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53942    fi
53943  fi
53944
53945  fi
53946
53947  if test "x$MSVC_DLL" = x; then
53948    # Probe: Look in the Windows system32 directory
53949    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53950
53951  windows_path="$CYGWIN_SYSTEMROOT"
53952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53953    unix_path=`$CYGPATH -u "$windows_path"`
53954    CYGWIN_SYSTEMROOT="$unix_path"
53955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53957    CYGWIN_SYSTEMROOT="$unix_path"
53958  fi
53959
53960    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53961
53962  DLL_NAME="$DLL_NAME"
53963  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53964  METHOD="well-known location in SYSTEMROOT"
53965  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53966    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53967$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53968
53969    # Need to check if the found msvcr is correct architecture
53970    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53971$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53972    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53973    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53974      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53975      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53976      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53977        CORRECT_MSVCR_ARCH="PE32 executable"
53978      else
53979        CORRECT_MSVCR_ARCH="PE32+ executable"
53980      fi
53981    else
53982      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53983        CORRECT_MSVCR_ARCH=386
53984      else
53985        CORRECT_MSVCR_ARCH=x86-64
53986      fi
53987    fi
53988    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53989      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53990$as_echo "ok" >&6; }
53991      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53992
53993  # Only process if variable expands to non-empty
53994
53995  if test "x$MSVC_DLL" != x; then
53996    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53997
53998  # Input might be given as Windows format, start by converting to
53999  # unix format.
54000  path="$MSVC_DLL"
54001  new_path=`$CYGPATH -u "$path"`
54002
54003  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54004  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54005  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54006  # "foo.exe" is OK but "foo" is an error.
54007  #
54008  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54009  # It is also a way to make sure we got the proper file name for the real test later on.
54010  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54011  if test "x$test_shortpath" = x; then
54012    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54013$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54014    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54015  fi
54016
54017  # Call helper function which possibly converts this using DOS-style short mode.
54018  # If so, the updated path is stored in $new_path.
54019
54020  input_path="$new_path"
54021  # Check if we need to convert this using DOS-style short mode. If the path
54022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54023  # take no chances and rewrite it.
54024  # Note: m4 eats our [], so we need to use [ and ] instead.
54025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54026  if test "x$has_forbidden_chars" != x; then
54027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54028    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54029    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54030    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54031      # Going to short mode and back again did indeed matter. Since short mode is
54032      # case insensitive, let's make it lowercase to improve readability.
54033      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54034      # Now convert it back to Unix-style (cygpath)
54035      input_path=`$CYGPATH -u "$shortmode_path"`
54036      new_path="$input_path"
54037    fi
54038  fi
54039
54040  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54041  if test "x$test_cygdrive_prefix" = x; then
54042    # As a simple fix, exclude /usr/bin since it's not a real path.
54043    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54044      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54045      # a path prefixed by /cygdrive for fixpath to work.
54046      new_path="$CYGWIN_ROOT_PATH$input_path"
54047    fi
54048  fi
54049
54050
54051  if test "x$path" != "x$new_path"; then
54052    MSVC_DLL="$new_path"
54053    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54054$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54055  fi
54056
54057    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54058
54059  path="$MSVC_DLL"
54060  has_colon=`$ECHO $path | $GREP ^.:`
54061  new_path="$path"
54062  if test "x$has_colon" = x; then
54063    # Not in mixed or Windows style, start by that.
54064    new_path=`cmd //c echo $path`
54065  fi
54066
54067
54068  input_path="$new_path"
54069  # Check if we need to convert this using DOS-style short mode. If the path
54070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54071  # take no chances and rewrite it.
54072  # Note: m4 eats our [], so we need to use [ and ] instead.
54073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54074  if test "x$has_forbidden_chars" != x; then
54075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54076    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54077  fi
54078
54079
54080  windows_path="$new_path"
54081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54082    unix_path=`$CYGPATH -u "$windows_path"`
54083    new_path="$unix_path"
54084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54086    new_path="$unix_path"
54087  fi
54088
54089  if test "x$path" != "x$new_path"; then
54090    MSVC_DLL="$new_path"
54091    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54092$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54093  fi
54094
54095  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54096  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54097
54098    else
54099      # We're on a unix platform. Hooray! :)
54100      path="$MSVC_DLL"
54101      has_space=`$ECHO "$path" | $GREP " "`
54102      if test "x$has_space" != x; then
54103        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54104$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54105        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54106      fi
54107
54108      # Use eval to expand a potential ~
54109      eval path="$path"
54110      if test ! -f "$path" && test ! -d "$path"; then
54111        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54112      fi
54113
54114      if test -d "$path"; then
54115        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54116      else
54117        dir="`$DIRNAME "$path"`"
54118        base="`$BASENAME "$path"`"
54119        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54120      fi
54121    fi
54122  fi
54123
54124      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54125$as_echo_n "checking for $DLL_NAME... " >&6; }
54126      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54127$as_echo "$MSVC_DLL" >&6; }
54128    else
54129      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54130$as_echo "incorrect, ignoring" >&6; }
54131      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54132$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54133    fi
54134  fi
54135
54136  fi
54137
54138  if test "x$MSVC_DLL" = x; then
54139    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54140    if test "x$VS100COMNTOOLS" != x; then
54141      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54142
54143  windows_path="$CYGWIN_VS_TOOLS_DIR"
54144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54145    unix_path=`$CYGPATH -u "$windows_path"`
54146    CYGWIN_VS_TOOLS_DIR="$unix_path"
54147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54149    CYGWIN_VS_TOOLS_DIR="$unix_path"
54150  fi
54151
54152      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54153        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54154	    | $GREP -i /x64/ | $HEAD --lines 1`
54155      else
54156        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54157	    | $GREP -i /x86/ | $HEAD --lines 1`
54158      fi
54159
54160  DLL_NAME="$DLL_NAME"
54161  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54162  METHOD="search of VS100COMNTOOLS"
54163  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54164    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54165$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54166
54167    # Need to check if the found msvcr is correct architecture
54168    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54169$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54170    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54171    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54172      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54173      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54174      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54175        CORRECT_MSVCR_ARCH="PE32 executable"
54176      else
54177        CORRECT_MSVCR_ARCH="PE32+ executable"
54178      fi
54179    else
54180      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54181        CORRECT_MSVCR_ARCH=386
54182      else
54183        CORRECT_MSVCR_ARCH=x86-64
54184      fi
54185    fi
54186    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54187      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54188$as_echo "ok" >&6; }
54189      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54190
54191  # Only process if variable expands to non-empty
54192
54193  if test "x$MSVC_DLL" != x; then
54194    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54195
54196  # Input might be given as Windows format, start by converting to
54197  # unix format.
54198  path="$MSVC_DLL"
54199  new_path=`$CYGPATH -u "$path"`
54200
54201  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54202  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54203  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54204  # "foo.exe" is OK but "foo" is an error.
54205  #
54206  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54207  # It is also a way to make sure we got the proper file name for the real test later on.
54208  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54209  if test "x$test_shortpath" = x; then
54210    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54211$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54212    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54213  fi
54214
54215  # Call helper function which possibly converts this using DOS-style short mode.
54216  # If so, the updated path is stored in $new_path.
54217
54218  input_path="$new_path"
54219  # Check if we need to convert this using DOS-style short mode. If the path
54220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54221  # take no chances and rewrite it.
54222  # Note: m4 eats our [], so we need to use [ and ] instead.
54223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54224  if test "x$has_forbidden_chars" != x; then
54225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54226    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54227    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54228    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54229      # Going to short mode and back again did indeed matter. Since short mode is
54230      # case insensitive, let's make it lowercase to improve readability.
54231      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54232      # Now convert it back to Unix-style (cygpath)
54233      input_path=`$CYGPATH -u "$shortmode_path"`
54234      new_path="$input_path"
54235    fi
54236  fi
54237
54238  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54239  if test "x$test_cygdrive_prefix" = x; then
54240    # As a simple fix, exclude /usr/bin since it's not a real path.
54241    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54242      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54243      # a path prefixed by /cygdrive for fixpath to work.
54244      new_path="$CYGWIN_ROOT_PATH$input_path"
54245    fi
54246  fi
54247
54248
54249  if test "x$path" != "x$new_path"; then
54250    MSVC_DLL="$new_path"
54251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54252$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54253  fi
54254
54255    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54256
54257  path="$MSVC_DLL"
54258  has_colon=`$ECHO $path | $GREP ^.:`
54259  new_path="$path"
54260  if test "x$has_colon" = x; then
54261    # Not in mixed or Windows style, start by that.
54262    new_path=`cmd //c echo $path`
54263  fi
54264
54265
54266  input_path="$new_path"
54267  # Check if we need to convert this using DOS-style short mode. If the path
54268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54269  # take no chances and rewrite it.
54270  # Note: m4 eats our [], so we need to use [ and ] instead.
54271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54272  if test "x$has_forbidden_chars" != x; then
54273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54274    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54275  fi
54276
54277
54278  windows_path="$new_path"
54279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54280    unix_path=`$CYGPATH -u "$windows_path"`
54281    new_path="$unix_path"
54282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54284    new_path="$unix_path"
54285  fi
54286
54287  if test "x$path" != "x$new_path"; then
54288    MSVC_DLL="$new_path"
54289    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54290$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54291  fi
54292
54293  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54294  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54295
54296    else
54297      # We're on a unix platform. Hooray! :)
54298      path="$MSVC_DLL"
54299      has_space=`$ECHO "$path" | $GREP " "`
54300      if test "x$has_space" != x; then
54301        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54302$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54303        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54304      fi
54305
54306      # Use eval to expand a potential ~
54307      eval path="$path"
54308      if test ! -f "$path" && test ! -d "$path"; then
54309        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54310      fi
54311
54312      if test -d "$path"; then
54313        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54314      else
54315        dir="`$DIRNAME "$path"`"
54316        base="`$BASENAME "$path"`"
54317        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54318      fi
54319    fi
54320  fi
54321
54322      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54323$as_echo_n "checking for $DLL_NAME... " >&6; }
54324      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54325$as_echo "$MSVC_DLL" >&6; }
54326    else
54327      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54328$as_echo "incorrect, ignoring" >&6; }
54329      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54330$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54331    fi
54332  fi
54333
54334    fi
54335  fi
54336
54337  if test "x$MSVC_DLL" = x; then
54338    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54339    # (This was the original behaviour; kept since it might turn something up)
54340    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54341      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54342        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54343	    | $GREP x64 | $HEAD --lines 1`
54344      else
54345        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54346	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54347        if test "x$POSSIBLE_MSVC_DLL" = x; then
54348          # We're grasping at straws now...
54349          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54350	      | $HEAD --lines 1`
54351        fi
54352      fi
54353
54354
54355  DLL_NAME="$DLL_NAME"
54356  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54357  METHOD="search of VCINSTALLDIR"
54358  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54359    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54360$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54361
54362    # Need to check if the found msvcr is correct architecture
54363    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54364$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54365    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54366    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54367      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54368      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54369      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54370        CORRECT_MSVCR_ARCH="PE32 executable"
54371      else
54372        CORRECT_MSVCR_ARCH="PE32+ executable"
54373      fi
54374    else
54375      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54376        CORRECT_MSVCR_ARCH=386
54377      else
54378        CORRECT_MSVCR_ARCH=x86-64
54379      fi
54380    fi
54381    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54382      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54383$as_echo "ok" >&6; }
54384      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54385
54386  # Only process if variable expands to non-empty
54387
54388  if test "x$MSVC_DLL" != x; then
54389    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54390
54391  # Input might be given as Windows format, start by converting to
54392  # unix format.
54393  path="$MSVC_DLL"
54394  new_path=`$CYGPATH -u "$path"`
54395
54396  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54397  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54398  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54399  # "foo.exe" is OK but "foo" is an error.
54400  #
54401  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54402  # It is also a way to make sure we got the proper file name for the real test later on.
54403  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54404  if test "x$test_shortpath" = x; then
54405    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54406$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54407    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54408  fi
54409
54410  # Call helper function which possibly converts this using DOS-style short mode.
54411  # If so, the updated path is stored in $new_path.
54412
54413  input_path="$new_path"
54414  # Check if we need to convert this using DOS-style short mode. If the path
54415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54416  # take no chances and rewrite it.
54417  # Note: m4 eats our [], so we need to use [ and ] instead.
54418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54419  if test "x$has_forbidden_chars" != x; then
54420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54424      # Going to short mode and back again did indeed matter. Since short mode is
54425      # case insensitive, let's make it lowercase to improve readability.
54426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54427      # Now convert it back to Unix-style (cygpath)
54428      input_path=`$CYGPATH -u "$shortmode_path"`
54429      new_path="$input_path"
54430    fi
54431  fi
54432
54433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54434  if test "x$test_cygdrive_prefix" = x; then
54435    # As a simple fix, exclude /usr/bin since it's not a real path.
54436    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54438      # a path prefixed by /cygdrive for fixpath to work.
54439      new_path="$CYGWIN_ROOT_PATH$input_path"
54440    fi
54441  fi
54442
54443
54444  if test "x$path" != "x$new_path"; then
54445    MSVC_DLL="$new_path"
54446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54447$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54448  fi
54449
54450    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54451
54452  path="$MSVC_DLL"
54453  has_colon=`$ECHO $path | $GREP ^.:`
54454  new_path="$path"
54455  if test "x$has_colon" = x; then
54456    # Not in mixed or Windows style, start by that.
54457    new_path=`cmd //c echo $path`
54458  fi
54459
54460
54461  input_path="$new_path"
54462  # Check if we need to convert this using DOS-style short mode. If the path
54463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54464  # take no chances and rewrite it.
54465  # Note: m4 eats our [], so we need to use [ and ] instead.
54466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54467  if test "x$has_forbidden_chars" != x; then
54468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54470  fi
54471
54472
54473  windows_path="$new_path"
54474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54475    unix_path=`$CYGPATH -u "$windows_path"`
54476    new_path="$unix_path"
54477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54479    new_path="$unix_path"
54480  fi
54481
54482  if test "x$path" != "x$new_path"; then
54483    MSVC_DLL="$new_path"
54484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54485$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54486  fi
54487
54488  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54489  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54490
54491    else
54492      # We're on a unix platform. Hooray! :)
54493      path="$MSVC_DLL"
54494      has_space=`$ECHO "$path" | $GREP " "`
54495      if test "x$has_space" != x; then
54496        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54497$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54498        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54499      fi
54500
54501      # Use eval to expand a potential ~
54502      eval path="$path"
54503      if test ! -f "$path" && test ! -d "$path"; then
54504        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54505      fi
54506
54507      if test -d "$path"; then
54508        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54509      else
54510        dir="`$DIRNAME "$path"`"
54511        base="`$BASENAME "$path"`"
54512        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54513      fi
54514    fi
54515  fi
54516
54517      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54518$as_echo_n "checking for $DLL_NAME... " >&6; }
54519      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54520$as_echo "$MSVC_DLL" >&6; }
54521    else
54522      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54523$as_echo "incorrect, ignoring" >&6; }
54524      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54525$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54526    fi
54527  fi
54528
54529    fi
54530  fi
54531
54532  if test "x$MSVC_DLL" = x; then
54533    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54534$as_echo_n "checking for $DLL_NAME... " >&6; }
54535    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54536$as_echo "no" >&6; }
54537    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54538  fi
54539
54540    MSVCR_DLL="$MSVC_DLL"
54541  fi
54542
54543
54544
54545# Check whether --with-msvcp-dll was given.
54546if test "${with_msvcp_dll+set}" = set; then :
54547  withval=$with_msvcp_dll;
54548fi
54549
54550
54551  if test "x$MSVCP_NAME" != "x"; then
54552    if test "x$with_msvcp_dll" != x; then
54553      # If given explicitely by user, do not probe. If not present, fail directly.
54554
54555  DLL_NAME="$MSVCP_NAME"
54556  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54557  METHOD="--with-msvcp-dll"
54558  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54559    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54560$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54561
54562    # Need to check if the found msvcr is correct architecture
54563    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54564$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54565    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54566    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54567      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54568      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54569      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54570        CORRECT_MSVCR_ARCH="PE32 executable"
54571      else
54572        CORRECT_MSVCR_ARCH="PE32+ executable"
54573      fi
54574    else
54575      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54576        CORRECT_MSVCR_ARCH=386
54577      else
54578        CORRECT_MSVCR_ARCH=x86-64
54579      fi
54580    fi
54581    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54582      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54583$as_echo "ok" >&6; }
54584      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54585
54586  # Only process if variable expands to non-empty
54587
54588  if test "x$MSVC_DLL" != x; then
54589    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54590
54591  # Input might be given as Windows format, start by converting to
54592  # unix format.
54593  path="$MSVC_DLL"
54594  new_path=`$CYGPATH -u "$path"`
54595
54596  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54597  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54598  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54599  # "foo.exe" is OK but "foo" is an error.
54600  #
54601  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54602  # It is also a way to make sure we got the proper file name for the real test later on.
54603  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54604  if test "x$test_shortpath" = x; then
54605    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54606$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54607    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54608  fi
54609
54610  # Call helper function which possibly converts this using DOS-style short mode.
54611  # If so, the updated path is stored in $new_path.
54612
54613  input_path="$new_path"
54614  # Check if we need to convert this using DOS-style short mode. If the path
54615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54616  # take no chances and rewrite it.
54617  # Note: m4 eats our [], so we need to use [ and ] instead.
54618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54619  if test "x$has_forbidden_chars" != x; then
54620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54624      # Going to short mode and back again did indeed matter. Since short mode is
54625      # case insensitive, let's make it lowercase to improve readability.
54626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54627      # Now convert it back to Unix-style (cygpath)
54628      input_path=`$CYGPATH -u "$shortmode_path"`
54629      new_path="$input_path"
54630    fi
54631  fi
54632
54633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54634  if test "x$test_cygdrive_prefix" = x; then
54635    # As a simple fix, exclude /usr/bin since it's not a real path.
54636    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54638      # a path prefixed by /cygdrive for fixpath to work.
54639      new_path="$CYGWIN_ROOT_PATH$input_path"
54640    fi
54641  fi
54642
54643
54644  if test "x$path" != "x$new_path"; then
54645    MSVC_DLL="$new_path"
54646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54647$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54648  fi
54649
54650    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54651
54652  path="$MSVC_DLL"
54653  has_colon=`$ECHO $path | $GREP ^.:`
54654  new_path="$path"
54655  if test "x$has_colon" = x; then
54656    # Not in mixed or Windows style, start by that.
54657    new_path=`cmd //c echo $path`
54658  fi
54659
54660
54661  input_path="$new_path"
54662  # Check if we need to convert this using DOS-style short mode. If the path
54663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54664  # take no chances and rewrite it.
54665  # Note: m4 eats our [], so we need to use [ and ] instead.
54666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54667  if test "x$has_forbidden_chars" != x; then
54668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54669    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54670  fi
54671
54672
54673  windows_path="$new_path"
54674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54675    unix_path=`$CYGPATH -u "$windows_path"`
54676    new_path="$unix_path"
54677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54679    new_path="$unix_path"
54680  fi
54681
54682  if test "x$path" != "x$new_path"; then
54683    MSVC_DLL="$new_path"
54684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54685$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54686  fi
54687
54688  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54689  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54690
54691    else
54692      # We're on a unix platform. Hooray! :)
54693      path="$MSVC_DLL"
54694      has_space=`$ECHO "$path" | $GREP " "`
54695      if test "x$has_space" != x; then
54696        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54697$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54698        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54699      fi
54700
54701      # Use eval to expand a potential ~
54702      eval path="$path"
54703      if test ! -f "$path" && test ! -d "$path"; then
54704        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54705      fi
54706
54707      if test -d "$path"; then
54708        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54709      else
54710        dir="`$DIRNAME "$path"`"
54711        base="`$BASENAME "$path"`"
54712        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54713      fi
54714    fi
54715  fi
54716
54717      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54718$as_echo_n "checking for $DLL_NAME... " >&6; }
54719      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54720$as_echo "$MSVC_DLL" >&6; }
54721    else
54722      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54723$as_echo "incorrect, ignoring" >&6; }
54724      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54725$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54726    fi
54727  fi
54728
54729      if test "x$MSVC_DLL" = x; then
54730        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54731      fi
54732      MSVCP_DLL="$MSVC_DLL"
54733    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54734
54735  DLL_NAME="$MSVCP_NAME"
54736  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54737  METHOD="devkit"
54738  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54739    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54740$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54741
54742    # Need to check if the found msvcr is correct architecture
54743    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54744$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54745    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54746    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54747      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54748      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54749      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54750        CORRECT_MSVCR_ARCH="PE32 executable"
54751      else
54752        CORRECT_MSVCR_ARCH="PE32+ executable"
54753      fi
54754    else
54755      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54756        CORRECT_MSVCR_ARCH=386
54757      else
54758        CORRECT_MSVCR_ARCH=x86-64
54759      fi
54760    fi
54761    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54762      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54763$as_echo "ok" >&6; }
54764      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54765
54766  # Only process if variable expands to non-empty
54767
54768  if test "x$MSVC_DLL" != x; then
54769    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54770
54771  # Input might be given as Windows format, start by converting to
54772  # unix format.
54773  path="$MSVC_DLL"
54774  new_path=`$CYGPATH -u "$path"`
54775
54776  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54777  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54778  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54779  # "foo.exe" is OK but "foo" is an error.
54780  #
54781  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54782  # It is also a way to make sure we got the proper file name for the real test later on.
54783  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54784  if test "x$test_shortpath" = x; then
54785    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54786$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54787    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54788  fi
54789
54790  # Call helper function which possibly converts this using DOS-style short mode.
54791  # If so, the updated path is stored in $new_path.
54792
54793  input_path="$new_path"
54794  # Check if we need to convert this using DOS-style short mode. If the path
54795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54796  # take no chances and rewrite it.
54797  # Note: m4 eats our [], so we need to use [ and ] instead.
54798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54799  if test "x$has_forbidden_chars" != x; then
54800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54801    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54802    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54803    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54804      # Going to short mode and back again did indeed matter. Since short mode is
54805      # case insensitive, let's make it lowercase to improve readability.
54806      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54807      # Now convert it back to Unix-style (cygpath)
54808      input_path=`$CYGPATH -u "$shortmode_path"`
54809      new_path="$input_path"
54810    fi
54811  fi
54812
54813  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54814  if test "x$test_cygdrive_prefix" = x; then
54815    # As a simple fix, exclude /usr/bin since it's not a real path.
54816    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54817      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54818      # a path prefixed by /cygdrive for fixpath to work.
54819      new_path="$CYGWIN_ROOT_PATH$input_path"
54820    fi
54821  fi
54822
54823
54824  if test "x$path" != "x$new_path"; then
54825    MSVC_DLL="$new_path"
54826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54827$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54828  fi
54829
54830    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54831
54832  path="$MSVC_DLL"
54833  has_colon=`$ECHO $path | $GREP ^.:`
54834  new_path="$path"
54835  if test "x$has_colon" = x; then
54836    # Not in mixed or Windows style, start by that.
54837    new_path=`cmd //c echo $path`
54838  fi
54839
54840
54841  input_path="$new_path"
54842  # Check if we need to convert this using DOS-style short mode. If the path
54843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54844  # take no chances and rewrite it.
54845  # Note: m4 eats our [], so we need to use [ and ] instead.
54846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54847  if test "x$has_forbidden_chars" != x; then
54848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54849    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54850  fi
54851
54852
54853  windows_path="$new_path"
54854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54855    unix_path=`$CYGPATH -u "$windows_path"`
54856    new_path="$unix_path"
54857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54859    new_path="$unix_path"
54860  fi
54861
54862  if test "x$path" != "x$new_path"; then
54863    MSVC_DLL="$new_path"
54864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54865$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54866  fi
54867
54868  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54869  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54870
54871    else
54872      # We're on a unix platform. Hooray! :)
54873      path="$MSVC_DLL"
54874      has_space=`$ECHO "$path" | $GREP " "`
54875      if test "x$has_space" != x; then
54876        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54877$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54878        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54879      fi
54880
54881      # Use eval to expand a potential ~
54882      eval path="$path"
54883      if test ! -f "$path" && test ! -d "$path"; then
54884        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54885      fi
54886
54887      if test -d "$path"; then
54888        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54889      else
54890        dir="`$DIRNAME "$path"`"
54891        base="`$BASENAME "$path"`"
54892        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54893      fi
54894    fi
54895  fi
54896
54897      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54898$as_echo_n "checking for $DLL_NAME... " >&6; }
54899      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54900$as_echo "$MSVC_DLL" >&6; }
54901    else
54902      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54903$as_echo "incorrect, ignoring" >&6; }
54904      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54905$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54906    fi
54907  fi
54908
54909      if test "x$MSVC_DLL" = x; then
54910        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54911      fi
54912      MSVCP_DLL="$MSVC_DLL"
54913    else
54914
54915  DLL_NAME="${MSVCP_NAME}"
54916  MSVC_DLL=
54917
54918  if test "x$MSVC_DLL" = x; then
54919    # Probe: Using well-known location from Visual Studio 10.0
54920    if test "x$VCINSTALLDIR" != x; then
54921      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54922
54923  windows_path="$CYGWIN_VC_INSTALL_DIR"
54924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54925    unix_path=`$CYGPATH -u "$windows_path"`
54926    CYGWIN_VC_INSTALL_DIR="$unix_path"
54927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54929    CYGWIN_VC_INSTALL_DIR="$unix_path"
54930  fi
54931
54932      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54933        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54934      else
54935        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54936      fi
54937      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54938
54939  DLL_NAME="$DLL_NAME"
54940  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54941  METHOD="well-known location in VCINSTALLDIR"
54942  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54943    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54944$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54945
54946    # Need to check if the found msvcr is correct architecture
54947    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54948$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54949    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54950    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54951      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54952      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54953      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54954        CORRECT_MSVCR_ARCH="PE32 executable"
54955      else
54956        CORRECT_MSVCR_ARCH="PE32+ executable"
54957      fi
54958    else
54959      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54960        CORRECT_MSVCR_ARCH=386
54961      else
54962        CORRECT_MSVCR_ARCH=x86-64
54963      fi
54964    fi
54965    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54966      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54967$as_echo "ok" >&6; }
54968      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54969
54970  # Only process if variable expands to non-empty
54971
54972  if test "x$MSVC_DLL" != x; then
54973    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54974
54975  # Input might be given as Windows format, start by converting to
54976  # unix format.
54977  path="$MSVC_DLL"
54978  new_path=`$CYGPATH -u "$path"`
54979
54980  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54981  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54982  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54983  # "foo.exe" is OK but "foo" is an error.
54984  #
54985  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54986  # It is also a way to make sure we got the proper file name for the real test later on.
54987  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54988  if test "x$test_shortpath" = x; then
54989    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54990$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54991    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54992  fi
54993
54994  # Call helper function which possibly converts this using DOS-style short mode.
54995  # If so, the updated path is stored in $new_path.
54996
54997  input_path="$new_path"
54998  # Check if we need to convert this using DOS-style short mode. If the path
54999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55000  # take no chances and rewrite it.
55001  # Note: m4 eats our [], so we need to use [ and ] instead.
55002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55003  if test "x$has_forbidden_chars" != x; then
55004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55005    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55006    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55007    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55008      # Going to short mode and back again did indeed matter. Since short mode is
55009      # case insensitive, let's make it lowercase to improve readability.
55010      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55011      # Now convert it back to Unix-style (cygpath)
55012      input_path=`$CYGPATH -u "$shortmode_path"`
55013      new_path="$input_path"
55014    fi
55015  fi
55016
55017  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55018  if test "x$test_cygdrive_prefix" = x; then
55019    # As a simple fix, exclude /usr/bin since it's not a real path.
55020    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55021      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55022      # a path prefixed by /cygdrive for fixpath to work.
55023      new_path="$CYGWIN_ROOT_PATH$input_path"
55024    fi
55025  fi
55026
55027
55028  if test "x$path" != "x$new_path"; then
55029    MSVC_DLL="$new_path"
55030    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55031$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55032  fi
55033
55034    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55035
55036  path="$MSVC_DLL"
55037  has_colon=`$ECHO $path | $GREP ^.:`
55038  new_path="$path"
55039  if test "x$has_colon" = x; then
55040    # Not in mixed or Windows style, start by that.
55041    new_path=`cmd //c echo $path`
55042  fi
55043
55044
55045  input_path="$new_path"
55046  # Check if we need to convert this using DOS-style short mode. If the path
55047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55048  # take no chances and rewrite it.
55049  # Note: m4 eats our [], so we need to use [ and ] instead.
55050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55051  if test "x$has_forbidden_chars" != x; then
55052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55053    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55054  fi
55055
55056
55057  windows_path="$new_path"
55058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55059    unix_path=`$CYGPATH -u "$windows_path"`
55060    new_path="$unix_path"
55061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55063    new_path="$unix_path"
55064  fi
55065
55066  if test "x$path" != "x$new_path"; then
55067    MSVC_DLL="$new_path"
55068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55069$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55070  fi
55071
55072  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55073  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55074
55075    else
55076      # We're on a unix platform. Hooray! :)
55077      path="$MSVC_DLL"
55078      has_space=`$ECHO "$path" | $GREP " "`
55079      if test "x$has_space" != x; then
55080        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55081$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55082        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55083      fi
55084
55085      # Use eval to expand a potential ~
55086      eval path="$path"
55087      if test ! -f "$path" && test ! -d "$path"; then
55088        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55089      fi
55090
55091      if test -d "$path"; then
55092        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55093      else
55094        dir="`$DIRNAME "$path"`"
55095        base="`$BASENAME "$path"`"
55096        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55097      fi
55098    fi
55099  fi
55100
55101      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55102$as_echo_n "checking for $DLL_NAME... " >&6; }
55103      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55104$as_echo "$MSVC_DLL" >&6; }
55105    else
55106      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55107$as_echo "incorrect, ignoring" >&6; }
55108      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55109$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55110    fi
55111  fi
55112
55113    fi
55114  fi
55115
55116  if test "x$MSVC_DLL" = x; then
55117    # Probe: Check in the Boot JDK directory.
55118    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55119
55120  DLL_NAME="$DLL_NAME"
55121  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55122  METHOD="well-known location in Boot JDK"
55123  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55124    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55125$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55126
55127    # Need to check if the found msvcr is correct architecture
55128    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55129$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55130    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55131    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55132      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55133      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55134      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55135        CORRECT_MSVCR_ARCH="PE32 executable"
55136      else
55137        CORRECT_MSVCR_ARCH="PE32+ executable"
55138      fi
55139    else
55140      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55141        CORRECT_MSVCR_ARCH=386
55142      else
55143        CORRECT_MSVCR_ARCH=x86-64
55144      fi
55145    fi
55146    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55147      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55148$as_echo "ok" >&6; }
55149      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55150
55151  # Only process if variable expands to non-empty
55152
55153  if test "x$MSVC_DLL" != x; then
55154    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55155
55156  # Input might be given as Windows format, start by converting to
55157  # unix format.
55158  path="$MSVC_DLL"
55159  new_path=`$CYGPATH -u "$path"`
55160
55161  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55162  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55163  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55164  # "foo.exe" is OK but "foo" is an error.
55165  #
55166  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55167  # It is also a way to make sure we got the proper file name for the real test later on.
55168  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55169  if test "x$test_shortpath" = x; then
55170    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55171$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55172    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55173  fi
55174
55175  # Call helper function which possibly converts this using DOS-style short mode.
55176  # If so, the updated path is stored in $new_path.
55177
55178  input_path="$new_path"
55179  # Check if we need to convert this using DOS-style short mode. If the path
55180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55181  # take no chances and rewrite it.
55182  # Note: m4 eats our [], so we need to use [ and ] instead.
55183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55184  if test "x$has_forbidden_chars" != x; then
55185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55186    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55187    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55188    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55189      # Going to short mode and back again did indeed matter. Since short mode is
55190      # case insensitive, let's make it lowercase to improve readability.
55191      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55192      # Now convert it back to Unix-style (cygpath)
55193      input_path=`$CYGPATH -u "$shortmode_path"`
55194      new_path="$input_path"
55195    fi
55196  fi
55197
55198  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55199  if test "x$test_cygdrive_prefix" = x; then
55200    # As a simple fix, exclude /usr/bin since it's not a real path.
55201    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55202      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55203      # a path prefixed by /cygdrive for fixpath to work.
55204      new_path="$CYGWIN_ROOT_PATH$input_path"
55205    fi
55206  fi
55207
55208
55209  if test "x$path" != "x$new_path"; then
55210    MSVC_DLL="$new_path"
55211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55212$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55213  fi
55214
55215    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55216
55217  path="$MSVC_DLL"
55218  has_colon=`$ECHO $path | $GREP ^.:`
55219  new_path="$path"
55220  if test "x$has_colon" = x; then
55221    # Not in mixed or Windows style, start by that.
55222    new_path=`cmd //c echo $path`
55223  fi
55224
55225
55226  input_path="$new_path"
55227  # Check if we need to convert this using DOS-style short mode. If the path
55228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55229  # take no chances and rewrite it.
55230  # Note: m4 eats our [], so we need to use [ and ] instead.
55231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55232  if test "x$has_forbidden_chars" != x; then
55233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55235  fi
55236
55237
55238  windows_path="$new_path"
55239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55240    unix_path=`$CYGPATH -u "$windows_path"`
55241    new_path="$unix_path"
55242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55244    new_path="$unix_path"
55245  fi
55246
55247  if test "x$path" != "x$new_path"; then
55248    MSVC_DLL="$new_path"
55249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55250$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55251  fi
55252
55253  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55254  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55255
55256    else
55257      # We're on a unix platform. Hooray! :)
55258      path="$MSVC_DLL"
55259      has_space=`$ECHO "$path" | $GREP " "`
55260      if test "x$has_space" != x; then
55261        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55262$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55263        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55264      fi
55265
55266      # Use eval to expand a potential ~
55267      eval path="$path"
55268      if test ! -f "$path" && test ! -d "$path"; then
55269        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55270      fi
55271
55272      if test -d "$path"; then
55273        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55274      else
55275        dir="`$DIRNAME "$path"`"
55276        base="`$BASENAME "$path"`"
55277        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55278      fi
55279    fi
55280  fi
55281
55282      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55283$as_echo_n "checking for $DLL_NAME... " >&6; }
55284      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55285$as_echo "$MSVC_DLL" >&6; }
55286    else
55287      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55288$as_echo "incorrect, ignoring" >&6; }
55289      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55290$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55291    fi
55292  fi
55293
55294  fi
55295
55296  if test "x$MSVC_DLL" = x; then
55297    # Probe: Look in the Windows system32 directory
55298    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55299
55300  windows_path="$CYGWIN_SYSTEMROOT"
55301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55302    unix_path=`$CYGPATH -u "$windows_path"`
55303    CYGWIN_SYSTEMROOT="$unix_path"
55304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55306    CYGWIN_SYSTEMROOT="$unix_path"
55307  fi
55308
55309    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55310
55311  DLL_NAME="$DLL_NAME"
55312  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55313  METHOD="well-known location in SYSTEMROOT"
55314  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55315    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55316$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55317
55318    # Need to check if the found msvcr is correct architecture
55319    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55320$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55321    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55322    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55323      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55324      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55325      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55326        CORRECT_MSVCR_ARCH="PE32 executable"
55327      else
55328        CORRECT_MSVCR_ARCH="PE32+ executable"
55329      fi
55330    else
55331      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55332        CORRECT_MSVCR_ARCH=386
55333      else
55334        CORRECT_MSVCR_ARCH=x86-64
55335      fi
55336    fi
55337    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55338      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55339$as_echo "ok" >&6; }
55340      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55341
55342  # Only process if variable expands to non-empty
55343
55344  if test "x$MSVC_DLL" != x; then
55345    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55346
55347  # Input might be given as Windows format, start by converting to
55348  # unix format.
55349  path="$MSVC_DLL"
55350  new_path=`$CYGPATH -u "$path"`
55351
55352  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55353  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55354  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55355  # "foo.exe" is OK but "foo" is an error.
55356  #
55357  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55358  # It is also a way to make sure we got the proper file name for the real test later on.
55359  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55360  if test "x$test_shortpath" = x; then
55361    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55362$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55363    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55364  fi
55365
55366  # Call helper function which possibly converts this using DOS-style short mode.
55367  # If so, the updated path is stored in $new_path.
55368
55369  input_path="$new_path"
55370  # Check if we need to convert this using DOS-style short mode. If the path
55371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55372  # take no chances and rewrite it.
55373  # Note: m4 eats our [], so we need to use [ and ] instead.
55374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55375  if test "x$has_forbidden_chars" != x; then
55376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55377    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55378    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55379    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55380      # Going to short mode and back again did indeed matter. Since short mode is
55381      # case insensitive, let's make it lowercase to improve readability.
55382      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55383      # Now convert it back to Unix-style (cygpath)
55384      input_path=`$CYGPATH -u "$shortmode_path"`
55385      new_path="$input_path"
55386    fi
55387  fi
55388
55389  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55390  if test "x$test_cygdrive_prefix" = x; then
55391    # As a simple fix, exclude /usr/bin since it's not a real path.
55392    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55393      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55394      # a path prefixed by /cygdrive for fixpath to work.
55395      new_path="$CYGWIN_ROOT_PATH$input_path"
55396    fi
55397  fi
55398
55399
55400  if test "x$path" != "x$new_path"; then
55401    MSVC_DLL="$new_path"
55402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55403$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55404  fi
55405
55406    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55407
55408  path="$MSVC_DLL"
55409  has_colon=`$ECHO $path | $GREP ^.:`
55410  new_path="$path"
55411  if test "x$has_colon" = x; then
55412    # Not in mixed or Windows style, start by that.
55413    new_path=`cmd //c echo $path`
55414  fi
55415
55416
55417  input_path="$new_path"
55418  # Check if we need to convert this using DOS-style short mode. If the path
55419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55420  # take no chances and rewrite it.
55421  # Note: m4 eats our [], so we need to use [ and ] instead.
55422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55423  if test "x$has_forbidden_chars" != x; then
55424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55425    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55426  fi
55427
55428
55429  windows_path="$new_path"
55430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55431    unix_path=`$CYGPATH -u "$windows_path"`
55432    new_path="$unix_path"
55433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55435    new_path="$unix_path"
55436  fi
55437
55438  if test "x$path" != "x$new_path"; then
55439    MSVC_DLL="$new_path"
55440    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55441$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55442  fi
55443
55444  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55445  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55446
55447    else
55448      # We're on a unix platform. Hooray! :)
55449      path="$MSVC_DLL"
55450      has_space=`$ECHO "$path" | $GREP " "`
55451      if test "x$has_space" != x; then
55452        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55453$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55454        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55455      fi
55456
55457      # Use eval to expand a potential ~
55458      eval path="$path"
55459      if test ! -f "$path" && test ! -d "$path"; then
55460        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55461      fi
55462
55463      if test -d "$path"; then
55464        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55465      else
55466        dir="`$DIRNAME "$path"`"
55467        base="`$BASENAME "$path"`"
55468        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55469      fi
55470    fi
55471  fi
55472
55473      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55474$as_echo_n "checking for $DLL_NAME... " >&6; }
55475      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55476$as_echo "$MSVC_DLL" >&6; }
55477    else
55478      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55479$as_echo "incorrect, ignoring" >&6; }
55480      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55481$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55482    fi
55483  fi
55484
55485  fi
55486
55487  if test "x$MSVC_DLL" = x; then
55488    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55489    if test "x$VS100COMNTOOLS" != x; then
55490      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55491
55492  windows_path="$CYGWIN_VS_TOOLS_DIR"
55493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55494    unix_path=`$CYGPATH -u "$windows_path"`
55495    CYGWIN_VS_TOOLS_DIR="$unix_path"
55496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55498    CYGWIN_VS_TOOLS_DIR="$unix_path"
55499  fi
55500
55501      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55502        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55503	    | $GREP -i /x64/ | $HEAD --lines 1`
55504      else
55505        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55506	    | $GREP -i /x86/ | $HEAD --lines 1`
55507      fi
55508
55509  DLL_NAME="$DLL_NAME"
55510  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55511  METHOD="search of VS100COMNTOOLS"
55512  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55513    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55514$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55515
55516    # Need to check if the found msvcr is correct architecture
55517    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55518$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55519    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55520    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55521      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55522      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55523      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55524        CORRECT_MSVCR_ARCH="PE32 executable"
55525      else
55526        CORRECT_MSVCR_ARCH="PE32+ executable"
55527      fi
55528    else
55529      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55530        CORRECT_MSVCR_ARCH=386
55531      else
55532        CORRECT_MSVCR_ARCH=x86-64
55533      fi
55534    fi
55535    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55536      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55537$as_echo "ok" >&6; }
55538      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55539
55540  # Only process if variable expands to non-empty
55541
55542  if test "x$MSVC_DLL" != x; then
55543    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55544
55545  # Input might be given as Windows format, start by converting to
55546  # unix format.
55547  path="$MSVC_DLL"
55548  new_path=`$CYGPATH -u "$path"`
55549
55550  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55551  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55552  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55553  # "foo.exe" is OK but "foo" is an error.
55554  #
55555  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55556  # It is also a way to make sure we got the proper file name for the real test later on.
55557  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55558  if test "x$test_shortpath" = x; then
55559    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55560$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55561    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55562  fi
55563
55564  # Call helper function which possibly converts this using DOS-style short mode.
55565  # If so, the updated path is stored in $new_path.
55566
55567  input_path="$new_path"
55568  # Check if we need to convert this using DOS-style short mode. If the path
55569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55570  # take no chances and rewrite it.
55571  # Note: m4 eats our [], so we need to use [ and ] instead.
55572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55573  if test "x$has_forbidden_chars" != x; then
55574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55575    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55576    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55577    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55578      # Going to short mode and back again did indeed matter. Since short mode is
55579      # case insensitive, let's make it lowercase to improve readability.
55580      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55581      # Now convert it back to Unix-style (cygpath)
55582      input_path=`$CYGPATH -u "$shortmode_path"`
55583      new_path="$input_path"
55584    fi
55585  fi
55586
55587  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55588  if test "x$test_cygdrive_prefix" = x; then
55589    # As a simple fix, exclude /usr/bin since it's not a real path.
55590    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55591      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55592      # a path prefixed by /cygdrive for fixpath to work.
55593      new_path="$CYGWIN_ROOT_PATH$input_path"
55594    fi
55595  fi
55596
55597
55598  if test "x$path" != "x$new_path"; then
55599    MSVC_DLL="$new_path"
55600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55601$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55602  fi
55603
55604    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55605
55606  path="$MSVC_DLL"
55607  has_colon=`$ECHO $path | $GREP ^.:`
55608  new_path="$path"
55609  if test "x$has_colon" = x; then
55610    # Not in mixed or Windows style, start by that.
55611    new_path=`cmd //c echo $path`
55612  fi
55613
55614
55615  input_path="$new_path"
55616  # Check if we need to convert this using DOS-style short mode. If the path
55617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55618  # take no chances and rewrite it.
55619  # Note: m4 eats our [], so we need to use [ and ] instead.
55620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55621  if test "x$has_forbidden_chars" != x; then
55622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55623    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55624  fi
55625
55626
55627  windows_path="$new_path"
55628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55629    unix_path=`$CYGPATH -u "$windows_path"`
55630    new_path="$unix_path"
55631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55633    new_path="$unix_path"
55634  fi
55635
55636  if test "x$path" != "x$new_path"; then
55637    MSVC_DLL="$new_path"
55638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55639$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55640  fi
55641
55642  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55643  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55644
55645    else
55646      # We're on a unix platform. Hooray! :)
55647      path="$MSVC_DLL"
55648      has_space=`$ECHO "$path" | $GREP " "`
55649      if test "x$has_space" != x; then
55650        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55651$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55652        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55653      fi
55654
55655      # Use eval to expand a potential ~
55656      eval path="$path"
55657      if test ! -f "$path" && test ! -d "$path"; then
55658        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55659      fi
55660
55661      if test -d "$path"; then
55662        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55663      else
55664        dir="`$DIRNAME "$path"`"
55665        base="`$BASENAME "$path"`"
55666        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55667      fi
55668    fi
55669  fi
55670
55671      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55672$as_echo_n "checking for $DLL_NAME... " >&6; }
55673      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55674$as_echo "$MSVC_DLL" >&6; }
55675    else
55676      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55677$as_echo "incorrect, ignoring" >&6; }
55678      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55679$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55680    fi
55681  fi
55682
55683    fi
55684  fi
55685
55686  if test "x$MSVC_DLL" = x; then
55687    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55688    # (This was the original behaviour; kept since it might turn something up)
55689    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55690      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55691        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55692	    | $GREP x64 | $HEAD --lines 1`
55693      else
55694        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55695	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55696        if test "x$POSSIBLE_MSVC_DLL" = x; then
55697          # We're grasping at straws now...
55698          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55699	      | $HEAD --lines 1`
55700        fi
55701      fi
55702
55703
55704  DLL_NAME="$DLL_NAME"
55705  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55706  METHOD="search of VCINSTALLDIR"
55707  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55708    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55709$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55710
55711    # Need to check if the found msvcr is correct architecture
55712    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55713$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55714    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55715    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55716      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55717      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55718      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55719        CORRECT_MSVCR_ARCH="PE32 executable"
55720      else
55721        CORRECT_MSVCR_ARCH="PE32+ executable"
55722      fi
55723    else
55724      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55725        CORRECT_MSVCR_ARCH=386
55726      else
55727        CORRECT_MSVCR_ARCH=x86-64
55728      fi
55729    fi
55730    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55731      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55732$as_echo "ok" >&6; }
55733      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55734
55735  # Only process if variable expands to non-empty
55736
55737  if test "x$MSVC_DLL" != x; then
55738    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55739
55740  # Input might be given as Windows format, start by converting to
55741  # unix format.
55742  path="$MSVC_DLL"
55743  new_path=`$CYGPATH -u "$path"`
55744
55745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55748  # "foo.exe" is OK but "foo" is an error.
55749  #
55750  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55751  # It is also a way to make sure we got the proper file name for the real test later on.
55752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55753  if test "x$test_shortpath" = x; then
55754    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55755$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55756    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55757  fi
55758
55759  # Call helper function which possibly converts this using DOS-style short mode.
55760  # If so, the updated path is stored in $new_path.
55761
55762  input_path="$new_path"
55763  # Check if we need to convert this using DOS-style short mode. If the path
55764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55765  # take no chances and rewrite it.
55766  # Note: m4 eats our [], so we need to use [ and ] instead.
55767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55768  if test "x$has_forbidden_chars" != x; then
55769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55770    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55771    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55772    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55773      # Going to short mode and back again did indeed matter. Since short mode is
55774      # case insensitive, let's make it lowercase to improve readability.
55775      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55776      # Now convert it back to Unix-style (cygpath)
55777      input_path=`$CYGPATH -u "$shortmode_path"`
55778      new_path="$input_path"
55779    fi
55780  fi
55781
55782  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55783  if test "x$test_cygdrive_prefix" = x; then
55784    # As a simple fix, exclude /usr/bin since it's not a real path.
55785    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55786      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55787      # a path prefixed by /cygdrive for fixpath to work.
55788      new_path="$CYGWIN_ROOT_PATH$input_path"
55789    fi
55790  fi
55791
55792
55793  if test "x$path" != "x$new_path"; then
55794    MSVC_DLL="$new_path"
55795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55796$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55797  fi
55798
55799    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55800
55801  path="$MSVC_DLL"
55802  has_colon=`$ECHO $path | $GREP ^.:`
55803  new_path="$path"
55804  if test "x$has_colon" = x; then
55805    # Not in mixed or Windows style, start by that.
55806    new_path=`cmd //c echo $path`
55807  fi
55808
55809
55810  input_path="$new_path"
55811  # Check if we need to convert this using DOS-style short mode. If the path
55812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55813  # take no chances and rewrite it.
55814  # Note: m4 eats our [], so we need to use [ and ] instead.
55815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55816  if test "x$has_forbidden_chars" != x; then
55817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55818    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55819  fi
55820
55821
55822  windows_path="$new_path"
55823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55824    unix_path=`$CYGPATH -u "$windows_path"`
55825    new_path="$unix_path"
55826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55828    new_path="$unix_path"
55829  fi
55830
55831  if test "x$path" != "x$new_path"; then
55832    MSVC_DLL="$new_path"
55833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55834$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55835  fi
55836
55837  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55838  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55839
55840    else
55841      # We're on a unix platform. Hooray! :)
55842      path="$MSVC_DLL"
55843      has_space=`$ECHO "$path" | $GREP " "`
55844      if test "x$has_space" != x; then
55845        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55846$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55847        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55848      fi
55849
55850      # Use eval to expand a potential ~
55851      eval path="$path"
55852      if test ! -f "$path" && test ! -d "$path"; then
55853        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55854      fi
55855
55856      if test -d "$path"; then
55857        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55858      else
55859        dir="`$DIRNAME "$path"`"
55860        base="`$BASENAME "$path"`"
55861        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55862      fi
55863    fi
55864  fi
55865
55866      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55867$as_echo_n "checking for $DLL_NAME... " >&6; }
55868      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55869$as_echo "$MSVC_DLL" >&6; }
55870    else
55871      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55872$as_echo "incorrect, ignoring" >&6; }
55873      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55874$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55875    fi
55876  fi
55877
55878    fi
55879  fi
55880
55881  if test "x$MSVC_DLL" = x; then
55882    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55883$as_echo_n "checking for $DLL_NAME... " >&6; }
55884    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55885$as_echo "no" >&6; }
55886    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55887  fi
55888
55889      MSVCP_DLL="$MSVC_DLL"
55890    fi
55891
55892  fi
55893
55894  fi
55895
55896
55897  if test "x$NEEDS_LIB_X11" = xfalse; then
55898    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55899      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55900$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55901    fi
55902    X_CFLAGS=
55903    X_LIBS=
55904  else
55905
55906    if test "x${with_x}" = xno; then
55907      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55908    fi
55909
55910    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55911      # The user has specified a X11 base directory. Use it for includes and
55912      # libraries, unless explicitely overridden.
55913      if test "x$x_includes" = xNONE; then
55914        x_includes="${with_x}/include"
55915      fi
55916      if test "x$x_libraries" = xNONE; then
55917        x_libraries="${with_x}/lib"
55918      fi
55919    else
55920      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55921      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55922      # --x-libraries for the sysroot, if that seems to be correct.
55923      if test "x$SYSROOT" != "x"; then
55924        if test "x$x_includes" = xNONE; then
55925          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55926            x_includes="$SYSROOT/usr/X11R6/include"
55927          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55928            x_includes="$SYSROOT/usr/include"
55929          fi
55930        fi
55931        if test "x$x_libraries" = xNONE; then
55932          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55933            x_libraries="$SYSROOT/usr/X11R6/lib"
55934          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55935            x_libraries="$SYSROOT/usr/lib64"
55936          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55937            x_libraries="$SYSROOT/usr/lib"
55938          fi
55939        fi
55940      fi
55941    fi
55942
55943    # Now let autoconf do it's magic
55944    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55945$as_echo_n "checking for X... " >&6; }
55946
55947
55948# Check whether --with-x was given.
55949if test "${with_x+set}" = set; then :
55950  withval=$with_x;
55951fi
55952
55953# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55954if test "x$with_x" = xno; then
55955  # The user explicitly disabled X.
55956  have_x=disabled
55957else
55958  case $x_includes,$x_libraries in #(
55959    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55960    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55961  $as_echo_n "(cached) " >&6
55962else
55963  # One or both of the vars are not set, and there is no cached value.
55964ac_x_includes=no ac_x_libraries=no
55965rm -f -r conftest.dir
55966if mkdir conftest.dir; then
55967  cd conftest.dir
55968  cat >Imakefile <<'_ACEOF'
55969incroot:
55970	@echo incroot='${INCROOT}'
55971usrlibdir:
55972	@echo usrlibdir='${USRLIBDIR}'
55973libdir:
55974	@echo libdir='${LIBDIR}'
55975_ACEOF
55976  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55977    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55978    for ac_var in incroot usrlibdir libdir; do
55979      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55980    done
55981    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55982    for ac_extension in a so sl dylib la dll; do
55983      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55984	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55985	ac_im_usrlibdir=$ac_im_libdir; break
55986      fi
55987    done
55988    # Screen out bogus values from the imake configuration.  They are
55989    # bogus both because they are the default anyway, and because
55990    # using them would break gcc on systems where it needs fixed includes.
55991    case $ac_im_incroot in
55992	/usr/include) ac_x_includes= ;;
55993	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55994    esac
55995    case $ac_im_usrlibdir in
55996	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55997	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55998    esac
55999  fi
56000  cd ..
56001  rm -f -r conftest.dir
56002fi
56003
56004# Standard set of common directories for X headers.
56005# Check X11 before X11Rn because it is often a symlink to the current release.
56006ac_x_header_dirs='
56007/usr/X11/include
56008/usr/X11R7/include
56009/usr/X11R6/include
56010/usr/X11R5/include
56011/usr/X11R4/include
56012
56013/usr/include/X11
56014/usr/include/X11R7
56015/usr/include/X11R6
56016/usr/include/X11R5
56017/usr/include/X11R4
56018
56019/usr/local/X11/include
56020/usr/local/X11R7/include
56021/usr/local/X11R6/include
56022/usr/local/X11R5/include
56023/usr/local/X11R4/include
56024
56025/usr/local/include/X11
56026/usr/local/include/X11R7
56027/usr/local/include/X11R6
56028/usr/local/include/X11R5
56029/usr/local/include/X11R4
56030
56031/usr/X386/include
56032/usr/x386/include
56033/usr/XFree86/include/X11
56034
56035/usr/include
56036/usr/local/include
56037/usr/unsupported/include
56038/usr/athena/include
56039/usr/local/x11r5/include
56040/usr/lpp/Xamples/include
56041
56042/usr/openwin/include
56043/usr/openwin/share/include'
56044
56045if test "$ac_x_includes" = no; then
56046  # Guess where to find include files, by looking for Xlib.h.
56047  # First, try using that file with no special directory specified.
56048  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56049/* end confdefs.h.  */
56050#include <X11/Xlib.h>
56051_ACEOF
56052if ac_fn_cxx_try_cpp "$LINENO"; then :
56053  # We can compile using X headers with no special include directory.
56054ac_x_includes=
56055else
56056  for ac_dir in $ac_x_header_dirs; do
56057  if test -r "$ac_dir/X11/Xlib.h"; then
56058    ac_x_includes=$ac_dir
56059    break
56060  fi
56061done
56062fi
56063rm -f conftest.err conftest.i conftest.$ac_ext
56064fi # $ac_x_includes = no
56065
56066if test "$ac_x_libraries" = no; then
56067  # Check for the libraries.
56068  # See if we find them without any special options.
56069  # Don't add to $LIBS permanently.
56070  ac_save_LIBS=$LIBS
56071  LIBS="-lX11 $LIBS"
56072  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56073/* end confdefs.h.  */
56074#include <X11/Xlib.h>
56075int
56076main ()
56077{
56078XrmInitialize ()
56079  ;
56080  return 0;
56081}
56082_ACEOF
56083if ac_fn_cxx_try_link "$LINENO"; then :
56084  LIBS=$ac_save_LIBS
56085# We can link X programs with no special library path.
56086ac_x_libraries=
56087else
56088  LIBS=$ac_save_LIBS
56089for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56090do
56091  # Don't even attempt the hair of trying to link an X program!
56092  for ac_extension in a so sl dylib la dll; do
56093    if test -r "$ac_dir/libX11.$ac_extension"; then
56094      ac_x_libraries=$ac_dir
56095      break 2
56096    fi
56097  done
56098done
56099fi
56100rm -f core conftest.err conftest.$ac_objext \
56101    conftest$ac_exeext conftest.$ac_ext
56102fi # $ac_x_libraries = no
56103
56104case $ac_x_includes,$ac_x_libraries in #(
56105  no,* | *,no | *\'*)
56106    # Didn't find X, or a directory has "'" in its name.
56107    ac_cv_have_x="have_x=no";; #(
56108  *)
56109    # Record where we found X for the cache.
56110    ac_cv_have_x="have_x=yes\
56111	ac_x_includes='$ac_x_includes'\
56112	ac_x_libraries='$ac_x_libraries'"
56113esac
56114fi
56115;; #(
56116    *) have_x=yes;;
56117  esac
56118  eval "$ac_cv_have_x"
56119fi # $with_x != no
56120
56121if test "$have_x" != yes; then
56122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56123$as_echo "$have_x" >&6; }
56124  no_x=yes
56125else
56126  # If each of the values was on the command line, it overrides each guess.
56127  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56128  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56129  # Update the cache value to reflect the command line values.
56130  ac_cv_have_x="have_x=yes\
56131	ac_x_includes='$x_includes'\
56132	ac_x_libraries='$x_libraries'"
56133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56134$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56135fi
56136
56137    if test "$no_x" = yes; then
56138  # Not all programs may use this symbol, but it does not hurt to define it.
56139
56140$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56141
56142  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56143else
56144  if test -n "$x_includes"; then
56145    X_CFLAGS="$X_CFLAGS -I$x_includes"
56146  fi
56147
56148  # It would also be nice to do this for all -L options, not just this one.
56149  if test -n "$x_libraries"; then
56150    X_LIBS="$X_LIBS -L$x_libraries"
56151    # For Solaris; some versions of Sun CC require a space after -R and
56152    # others require no space.  Words are not sufficient . . . .
56153    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56154$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56155    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56156    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56157    ac_cxx_werror_flag=yes
56158    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56159/* end confdefs.h.  */
56160
56161int
56162main ()
56163{
56164
56165  ;
56166  return 0;
56167}
56168_ACEOF
56169if ac_fn_cxx_try_link "$LINENO"; then :
56170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56171$as_echo "no" >&6; }
56172       X_LIBS="$X_LIBS -R$x_libraries"
56173else
56174  LIBS="$ac_xsave_LIBS -R $x_libraries"
56175       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56176/* end confdefs.h.  */
56177
56178int
56179main ()
56180{
56181
56182  ;
56183  return 0;
56184}
56185_ACEOF
56186if ac_fn_cxx_try_link "$LINENO"; then :
56187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56188$as_echo "yes" >&6; }
56189	  X_LIBS="$X_LIBS -R $x_libraries"
56190else
56191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56192$as_echo "neither works" >&6; }
56193fi
56194rm -f core conftest.err conftest.$ac_objext \
56195    conftest$ac_exeext conftest.$ac_ext
56196fi
56197rm -f core conftest.err conftest.$ac_objext \
56198    conftest$ac_exeext conftest.$ac_ext
56199    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56200    LIBS=$ac_xsave_LIBS
56201  fi
56202
56203  # Check for system-dependent libraries X programs must link with.
56204  # Do this before checking for the system-independent R6 libraries
56205  # (-lICE), since we may need -lsocket or whatever for X linking.
56206
56207  if test "$ISC" = yes; then
56208    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56209  else
56210    # Martyn Johnson says this is needed for Ultrix, if the X
56211    # libraries were built with DECnet support.  And Karl Berry says
56212    # the Alpha needs dnet_stub (dnet does not exist).
56213    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56214    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56215/* end confdefs.h.  */
56216
56217/* Override any GCC internal prototype to avoid an error.
56218   Use char because int might match the return type of a GCC
56219   builtin and then its argument prototype would still apply.  */
56220#ifdef __cplusplus
56221extern "C"
56222#endif
56223char XOpenDisplay ();
56224int
56225main ()
56226{
56227return XOpenDisplay ();
56228  ;
56229  return 0;
56230}
56231_ACEOF
56232if ac_fn_cxx_try_link "$LINENO"; then :
56233
56234else
56235  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56236$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56237if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56238  $as_echo_n "(cached) " >&6
56239else
56240  ac_check_lib_save_LIBS=$LIBS
56241LIBS="-ldnet  $LIBS"
56242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56243/* end confdefs.h.  */
56244
56245/* Override any GCC internal prototype to avoid an error.
56246   Use char because int might match the return type of a GCC
56247   builtin and then its argument prototype would still apply.  */
56248#ifdef __cplusplus
56249extern "C"
56250#endif
56251char dnet_ntoa ();
56252int
56253main ()
56254{
56255return dnet_ntoa ();
56256  ;
56257  return 0;
56258}
56259_ACEOF
56260if ac_fn_cxx_try_link "$LINENO"; then :
56261  ac_cv_lib_dnet_dnet_ntoa=yes
56262else
56263  ac_cv_lib_dnet_dnet_ntoa=no
56264fi
56265rm -f core conftest.err conftest.$ac_objext \
56266    conftest$ac_exeext conftest.$ac_ext
56267LIBS=$ac_check_lib_save_LIBS
56268fi
56269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56270$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56271if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56272  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56273fi
56274
56275    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56276      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56277$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56278if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56279  $as_echo_n "(cached) " >&6
56280else
56281  ac_check_lib_save_LIBS=$LIBS
56282LIBS="-ldnet_stub  $LIBS"
56283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56284/* end confdefs.h.  */
56285
56286/* Override any GCC internal prototype to avoid an error.
56287   Use char because int might match the return type of a GCC
56288   builtin and then its argument prototype would still apply.  */
56289#ifdef __cplusplus
56290extern "C"
56291#endif
56292char dnet_ntoa ();
56293int
56294main ()
56295{
56296return dnet_ntoa ();
56297  ;
56298  return 0;
56299}
56300_ACEOF
56301if ac_fn_cxx_try_link "$LINENO"; then :
56302  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56303else
56304  ac_cv_lib_dnet_stub_dnet_ntoa=no
56305fi
56306rm -f core conftest.err conftest.$ac_objext \
56307    conftest$ac_exeext conftest.$ac_ext
56308LIBS=$ac_check_lib_save_LIBS
56309fi
56310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56311$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56312if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56313  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56314fi
56315
56316    fi
56317fi
56318rm -f core conftest.err conftest.$ac_objext \
56319    conftest$ac_exeext conftest.$ac_ext
56320    LIBS="$ac_xsave_LIBS"
56321
56322    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56323    # to get the SysV transport functions.
56324    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56325    # needs -lnsl.
56326    # The nsl library prevents programs from opening the X display
56327    # on Irix 5.2, according to T.E. Dickey.
56328    # The functions gethostbyname, getservbyname, and inet_addr are
56329    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56330    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56331if test "x$ac_cv_func_gethostbyname" = xyes; then :
56332
56333fi
56334
56335    if test $ac_cv_func_gethostbyname = no; then
56336      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56337$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56338if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56339  $as_echo_n "(cached) " >&6
56340else
56341  ac_check_lib_save_LIBS=$LIBS
56342LIBS="-lnsl  $LIBS"
56343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56344/* end confdefs.h.  */
56345
56346/* Override any GCC internal prototype to avoid an error.
56347   Use char because int might match the return type of a GCC
56348   builtin and then its argument prototype would still apply.  */
56349#ifdef __cplusplus
56350extern "C"
56351#endif
56352char gethostbyname ();
56353int
56354main ()
56355{
56356return gethostbyname ();
56357  ;
56358  return 0;
56359}
56360_ACEOF
56361if ac_fn_cxx_try_link "$LINENO"; then :
56362  ac_cv_lib_nsl_gethostbyname=yes
56363else
56364  ac_cv_lib_nsl_gethostbyname=no
56365fi
56366rm -f core conftest.err conftest.$ac_objext \
56367    conftest$ac_exeext conftest.$ac_ext
56368LIBS=$ac_check_lib_save_LIBS
56369fi
56370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56371$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56372if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56373  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56374fi
56375
56376      if test $ac_cv_lib_nsl_gethostbyname = no; then
56377	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56378$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56379if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56380  $as_echo_n "(cached) " >&6
56381else
56382  ac_check_lib_save_LIBS=$LIBS
56383LIBS="-lbsd  $LIBS"
56384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56385/* end confdefs.h.  */
56386
56387/* Override any GCC internal prototype to avoid an error.
56388   Use char because int might match the return type of a GCC
56389   builtin and then its argument prototype would still apply.  */
56390#ifdef __cplusplus
56391extern "C"
56392#endif
56393char gethostbyname ();
56394int
56395main ()
56396{
56397return gethostbyname ();
56398  ;
56399  return 0;
56400}
56401_ACEOF
56402if ac_fn_cxx_try_link "$LINENO"; then :
56403  ac_cv_lib_bsd_gethostbyname=yes
56404else
56405  ac_cv_lib_bsd_gethostbyname=no
56406fi
56407rm -f core conftest.err conftest.$ac_objext \
56408    conftest$ac_exeext conftest.$ac_ext
56409LIBS=$ac_check_lib_save_LIBS
56410fi
56411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56412$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56413if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56414  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56415fi
56416
56417      fi
56418    fi
56419
56420    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56421    # socket/setsockopt and other routines are undefined under SCO ODT
56422    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56423    # on later versions), says Simon Leinen: it contains gethostby*
56424    # variants that don't use the name server (or something).  -lsocket
56425    # must be given before -lnsl if both are needed.  We assume that
56426    # if connect needs -lnsl, so does gethostbyname.
56427    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56428if test "x$ac_cv_func_connect" = xyes; then :
56429
56430fi
56431
56432    if test $ac_cv_func_connect = no; then
56433      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56434$as_echo_n "checking for connect in -lsocket... " >&6; }
56435if ${ac_cv_lib_socket_connect+:} false; then :
56436  $as_echo_n "(cached) " >&6
56437else
56438  ac_check_lib_save_LIBS=$LIBS
56439LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56441/* end confdefs.h.  */
56442
56443/* Override any GCC internal prototype to avoid an error.
56444   Use char because int might match the return type of a GCC
56445   builtin and then its argument prototype would still apply.  */
56446#ifdef __cplusplus
56447extern "C"
56448#endif
56449char connect ();
56450int
56451main ()
56452{
56453return connect ();
56454  ;
56455  return 0;
56456}
56457_ACEOF
56458if ac_fn_cxx_try_link "$LINENO"; then :
56459  ac_cv_lib_socket_connect=yes
56460else
56461  ac_cv_lib_socket_connect=no
56462fi
56463rm -f core conftest.err conftest.$ac_objext \
56464    conftest$ac_exeext conftest.$ac_ext
56465LIBS=$ac_check_lib_save_LIBS
56466fi
56467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56468$as_echo "$ac_cv_lib_socket_connect" >&6; }
56469if test "x$ac_cv_lib_socket_connect" = xyes; then :
56470  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56471fi
56472
56473    fi
56474
56475    # Guillermo Gomez says -lposix is necessary on A/UX.
56476    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56477if test "x$ac_cv_func_remove" = xyes; then :
56478
56479fi
56480
56481    if test $ac_cv_func_remove = no; then
56482      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56483$as_echo_n "checking for remove in -lposix... " >&6; }
56484if ${ac_cv_lib_posix_remove+:} false; then :
56485  $as_echo_n "(cached) " >&6
56486else
56487  ac_check_lib_save_LIBS=$LIBS
56488LIBS="-lposix  $LIBS"
56489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56490/* end confdefs.h.  */
56491
56492/* Override any GCC internal prototype to avoid an error.
56493   Use char because int might match the return type of a GCC
56494   builtin and then its argument prototype would still apply.  */
56495#ifdef __cplusplus
56496extern "C"
56497#endif
56498char remove ();
56499int
56500main ()
56501{
56502return remove ();
56503  ;
56504  return 0;
56505}
56506_ACEOF
56507if ac_fn_cxx_try_link "$LINENO"; then :
56508  ac_cv_lib_posix_remove=yes
56509else
56510  ac_cv_lib_posix_remove=no
56511fi
56512rm -f core conftest.err conftest.$ac_objext \
56513    conftest$ac_exeext conftest.$ac_ext
56514LIBS=$ac_check_lib_save_LIBS
56515fi
56516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56517$as_echo "$ac_cv_lib_posix_remove" >&6; }
56518if test "x$ac_cv_lib_posix_remove" = xyes; then :
56519  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56520fi
56521
56522    fi
56523
56524    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56525    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56526if test "x$ac_cv_func_shmat" = xyes; then :
56527
56528fi
56529
56530    if test $ac_cv_func_shmat = no; then
56531      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56532$as_echo_n "checking for shmat in -lipc... " >&6; }
56533if ${ac_cv_lib_ipc_shmat+:} false; then :
56534  $as_echo_n "(cached) " >&6
56535else
56536  ac_check_lib_save_LIBS=$LIBS
56537LIBS="-lipc  $LIBS"
56538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56539/* end confdefs.h.  */
56540
56541/* Override any GCC internal prototype to avoid an error.
56542   Use char because int might match the return type of a GCC
56543   builtin and then its argument prototype would still apply.  */
56544#ifdef __cplusplus
56545extern "C"
56546#endif
56547char shmat ();
56548int
56549main ()
56550{
56551return shmat ();
56552  ;
56553  return 0;
56554}
56555_ACEOF
56556if ac_fn_cxx_try_link "$LINENO"; then :
56557  ac_cv_lib_ipc_shmat=yes
56558else
56559  ac_cv_lib_ipc_shmat=no
56560fi
56561rm -f core conftest.err conftest.$ac_objext \
56562    conftest$ac_exeext conftest.$ac_ext
56563LIBS=$ac_check_lib_save_LIBS
56564fi
56565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56566$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56567if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56568  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56569fi
56570
56571    fi
56572  fi
56573
56574  # Check for libraries that X11R6 Xt/Xaw programs need.
56575  ac_save_LDFLAGS=$LDFLAGS
56576  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56577  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56578  # check for ICE first), but we must link in the order -lSM -lICE or
56579  # we get undefined symbols.  So assume we have SM if we have ICE.
56580  # These have to be linked with before -lX11, unlike the other
56581  # libraries we check for below, so use a different variable.
56582  # John Interrante, Karl Berry
56583  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56584$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56585if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56586  $as_echo_n "(cached) " >&6
56587else
56588  ac_check_lib_save_LIBS=$LIBS
56589LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56591/* end confdefs.h.  */
56592
56593/* Override any GCC internal prototype to avoid an error.
56594   Use char because int might match the return type of a GCC
56595   builtin and then its argument prototype would still apply.  */
56596#ifdef __cplusplus
56597extern "C"
56598#endif
56599char IceConnectionNumber ();
56600int
56601main ()
56602{
56603return IceConnectionNumber ();
56604  ;
56605  return 0;
56606}
56607_ACEOF
56608if ac_fn_cxx_try_link "$LINENO"; then :
56609  ac_cv_lib_ICE_IceConnectionNumber=yes
56610else
56611  ac_cv_lib_ICE_IceConnectionNumber=no
56612fi
56613rm -f core conftest.err conftest.$ac_objext \
56614    conftest$ac_exeext conftest.$ac_ext
56615LIBS=$ac_check_lib_save_LIBS
56616fi
56617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56618$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56619if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56620  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56621fi
56622
56623  LDFLAGS=$ac_save_LDFLAGS
56624
56625fi
56626
56627
56628    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56629    # this doesn't make sense so we remove it.
56630    if test "x$COMPILE_TYPE" = xcross; then
56631      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56632    fi
56633
56634    if test "x$no_x" = xyes; then
56635
56636  # Print a helpful message on how to acquire the necessary build dependency.
56637  # x11 is the help tag: freetype, cups, alsa etc
56638  MISSING_DEPENDENCY=x11
56639
56640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56641    cygwin_help $MISSING_DEPENDENCY
56642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56643    msys_help $MISSING_DEPENDENCY
56644  else
56645    PKGHANDLER_COMMAND=
56646
56647    case $PKGHANDLER in
56648      apt-get)
56649        apt_help     $MISSING_DEPENDENCY ;;
56650      yum)
56651        yum_help     $MISSING_DEPENDENCY ;;
56652      port)
56653        port_help    $MISSING_DEPENDENCY ;;
56654      pkgutil)
56655        pkgutil_help $MISSING_DEPENDENCY ;;
56656      pkgadd)
56657        pkgadd_help  $MISSING_DEPENDENCY ;;
56658    esac
56659
56660    if test "x$PKGHANDLER_COMMAND" != x; then
56661      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56662    fi
56663  fi
56664
56665      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56666    fi
56667
56668    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56669      OPENWIN_HOME="/usr/openwin"
56670      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56671      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56672          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56673    fi
56674
56675    ac_ext=c
56676ac_cpp='$CPP $CPPFLAGS'
56677ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56678ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56679ac_compiler_gnu=$ac_cv_c_compiler_gnu
56680
56681    OLD_CFLAGS="$CFLAGS"
56682    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56683
56684    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56685    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56686do :
56687  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56688ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56689          # include <X11/Xlib.h>
56690          # include <X11/Xutil.h>
56691
56692
56693"
56694if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56695  cat >>confdefs.h <<_ACEOF
56696#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56697_ACEOF
56698 X11_HEADERS_OK=yes
56699else
56700  X11_HEADERS_OK=no; break
56701fi
56702
56703done
56704
56705
56706    if test "x$X11_HEADERS_OK" = xno; then
56707
56708  # Print a helpful message on how to acquire the necessary build dependency.
56709  # x11 is the help tag: freetype, cups, alsa etc
56710  MISSING_DEPENDENCY=x11
56711
56712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56713    cygwin_help $MISSING_DEPENDENCY
56714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56715    msys_help $MISSING_DEPENDENCY
56716  else
56717    PKGHANDLER_COMMAND=
56718
56719    case $PKGHANDLER in
56720      apt-get)
56721        apt_help     $MISSING_DEPENDENCY ;;
56722      yum)
56723        yum_help     $MISSING_DEPENDENCY ;;
56724      port)
56725        port_help    $MISSING_DEPENDENCY ;;
56726      pkgutil)
56727        pkgutil_help $MISSING_DEPENDENCY ;;
56728      pkgadd)
56729        pkgadd_help  $MISSING_DEPENDENCY ;;
56730    esac
56731
56732    if test "x$PKGHANDLER_COMMAND" != x; then
56733      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56734    fi
56735  fi
56736
56737      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56738    fi
56739
56740    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56741    # defined in libawt_xawt.
56742    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56743$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56744    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56745/* end confdefs.h.  */
56746#include <X11/extensions/Xrender.h>
56747int
56748main ()
56749{
56750XLinearGradient x;
56751  ;
56752  return 0;
56753}
56754_ACEOF
56755if ac_fn_c_try_compile "$LINENO"; then :
56756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56757$as_echo "yes" >&6; }
56758else
56759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56760$as_echo "no" >&6; }
56761         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56762fi
56763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56764
56765    CFLAGS="$OLD_CFLAGS"
56766    ac_ext=cpp
56767ac_cpp='$CXXCPP $CPPFLAGS'
56768ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56769ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56770ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56771
56772  fi # NEEDS_LIB_X11
56773
56774
56775
56776
56777
56778
56779# Check whether --with-cups was given.
56780if test "${with_cups+set}" = set; then :
56781  withval=$with_cups;
56782fi
56783
56784
56785# Check whether --with-cups-include was given.
56786if test "${with_cups_include+set}" = set; then :
56787  withval=$with_cups_include;
56788fi
56789
56790
56791  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56792    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56793        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56794      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56795$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56796    fi
56797    CUPS_CFLAGS=
56798  else
56799    CUPS_FOUND=no
56800
56801    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56802      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56803    fi
56804
56805    if test "x${with_cups}" != x; then
56806      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56807$as_echo_n "checking for cups headers... " >&6; }
56808      if test -s "${with_cups}/include/cups/cups.h"; then
56809        CUPS_CFLAGS="-I${with_cups}/include"
56810        CUPS_FOUND=yes
56811        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56812$as_echo "$CUPS_FOUND" >&6; }
56813      else
56814        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56815      fi
56816    fi
56817    if test "x${with_cups_include}" != x; then
56818      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56819$as_echo_n "checking for cups headers... " >&6; }
56820      if test -s "${with_cups_include}/cups/cups.h"; then
56821        CUPS_CFLAGS="-I${with_cups_include}"
56822        CUPS_FOUND=yes
56823        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56824$as_echo "$CUPS_FOUND" >&6; }
56825      else
56826        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56827      fi
56828    fi
56829    if test "x$CUPS_FOUND" = xno; then
56830      # Are the cups headers installed in the default /usr/include location?
56831      for ac_header in cups/cups.h cups/ppd.h
56832do :
56833  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56834ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56835if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56836  cat >>confdefs.h <<_ACEOF
56837#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56838_ACEOF
56839
56840          CUPS_FOUND=yes
56841          CUPS_CFLAGS=
56842          DEFAULT_CUPS=yes
56843
56844fi
56845
56846done
56847
56848    fi
56849    if test "x$CUPS_FOUND" = xno; then
56850
56851  # Print a helpful message on how to acquire the necessary build dependency.
56852  # cups is the help tag: freetype, cups, alsa etc
56853  MISSING_DEPENDENCY=cups
56854
56855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56856    cygwin_help $MISSING_DEPENDENCY
56857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56858    msys_help $MISSING_DEPENDENCY
56859  else
56860    PKGHANDLER_COMMAND=
56861
56862    case $PKGHANDLER in
56863      apt-get)
56864        apt_help     $MISSING_DEPENDENCY ;;
56865      yum)
56866        yum_help     $MISSING_DEPENDENCY ;;
56867      port)
56868        port_help    $MISSING_DEPENDENCY ;;
56869      pkgutil)
56870        pkgutil_help $MISSING_DEPENDENCY ;;
56871      pkgadd)
56872        pkgadd_help  $MISSING_DEPENDENCY ;;
56873    esac
56874
56875    if test "x$PKGHANDLER_COMMAND" != x; then
56876      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56877    fi
56878  fi
56879
56880      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56881    fi
56882  fi
56883
56884
56885
56886
56887
56888# Check whether --with-freetype was given.
56889if test "${with_freetype+set}" = set; then :
56890  withval=$with_freetype;
56891fi
56892
56893
56894# Check whether --with-freetype-include was given.
56895if test "${with_freetype_include+set}" = set; then :
56896  withval=$with_freetype_include;
56897fi
56898
56899
56900# Check whether --with-freetype-lib was given.
56901if test "${with_freetype_lib+set}" = set; then :
56902  withval=$with_freetype_lib;
56903fi
56904
56905
56906# Check whether --with-freetype-src was given.
56907if test "${with_freetype_src+set}" = set; then :
56908  withval=$with_freetype_src;
56909fi
56910
56911  # Check whether --enable-freetype-bundling was given.
56912if test "${enable_freetype_bundling+set}" = set; then :
56913  enableval=$enable_freetype_bundling;
56914fi
56915
56916
56917  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56918  FREETYPE_BASE_NAME=freetype
56919  FREETYPE_CFLAGS=
56920  FREETYPE_LIBS=
56921  FREETYPE_BUNDLE_LIB_PATH=
56922
56923  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56924    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56925        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56926        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56927        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56928      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56929$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56930    fi
56931    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56932      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56933$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56934    fi
56935  else
56936    # freetype is needed to build; go get it!
56937
56938    BUNDLE_FREETYPE="$enable_freetype_bundling"
56939
56940    if  test "x$with_freetype_src" != x; then
56941      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56942        # Try to build freetype if --with-freetype-src was given on Windows
56943
56944  FREETYPE_SRC_PATH="$with_freetype_src"
56945  BUILD_FREETYPE=yes
56946
56947  # Check if the freetype sources are acessible..
56948  if ! test -d $FREETYPE_SRC_PATH; then
56949    { $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
56950$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56951    BUILD_FREETYPE=no
56952  fi
56953  # ..and contain a vc2010 project file
56954  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56955  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56956    { $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
56957$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56958    BUILD_FREETYPE=no
56959  fi
56960  # Now check if configure found a version of 'msbuild.exe'
56961  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56962    { $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
56963$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;}
56964    BUILD_FREETYPE=no
56965  fi
56966
56967  # Ready to go..
56968  if test "x$BUILD_FREETYPE" = xyes; then
56969    # msbuild requires trailing slashes for output directories
56970    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56971    freetype_lib_path_unix="$freetype_lib_path"
56972    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56973
56974  unix_path="$vcxproj_path"
56975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56976    windows_path=`$CYGPATH -m "$unix_path"`
56977    vcxproj_path="$windows_path"
56978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56979    windows_path=`cmd //c echo $unix_path`
56980    vcxproj_path="$windows_path"
56981  fi
56982
56983
56984  unix_path="$freetype_lib_path"
56985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56986    windows_path=`$CYGPATH -m "$unix_path"`
56987    freetype_lib_path="$windows_path"
56988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56989    windows_path=`cmd //c echo $unix_path`
56990    freetype_lib_path="$windows_path"
56991  fi
56992
56993
56994  unix_path="$freetype_obj_path"
56995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56996    windows_path=`$CYGPATH -m "$unix_path"`
56997    freetype_obj_path="$windows_path"
56998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56999    windows_path=`cmd //c echo $unix_path`
57000    freetype_obj_path="$windows_path"
57001  fi
57002
57003    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57004      freetype_platform=x64
57005    else
57006      freetype_platform=win32
57007    fi
57008
57009    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57010    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57011    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57012    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57013    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57014$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57015
57016    # First we try to build the freetype.dll
57017    $ECHO -e "@echo off\n"\
57018        "$MSBUILD $vcxproj_path "\
57019        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57020        "/p:Configuration=\"Release Multithreaded\" "\
57021        "/p:Platform=$freetype_platform "\
57022        "/p:ConfigurationType=DynamicLibrary "\
57023        "/p:TargetName=freetype "\
57024        "/p:OutDir=\"$freetype_lib_path\" "\
57025        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57026    cmd /c freetype.bat
57027
57028    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57029      # If that succeeds we also build freetype.lib
57030      $ECHO -e "@echo off\n"\
57031          "$MSBUILD $vcxproj_path "\
57032          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57033          "/p:Configuration=\"Release Multithreaded\" "\
57034          "/p:Platform=$freetype_platform "\
57035          "/p:ConfigurationType=StaticLibrary "\
57036          "/p:TargetName=freetype "\
57037          "/p:OutDir=\"$freetype_lib_path\" "\
57038          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57039      cmd /c freetype.bat
57040
57041      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57042        # Once we build both, lib and dll, set freetype lib and include path appropriately
57043        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57044        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57045        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57046$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57047      else
57048        BUILD_FREETYPE=no
57049      fi
57050    else
57051      BUILD_FREETYPE=no
57052    fi
57053  fi
57054
57055        if test "x$BUILD_FREETYPE" = xyes; then
57056          # Okay, we built it. Check that it works.
57057
57058  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57059  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57060  METHOD="--with-freetype-src"
57061
57062  # Let's start with an optimistic view of the world :-)
57063  FOUND_FREETYPE=yes
57064
57065  # First look for the canonical freetype main include file ft2build.h.
57066  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57067    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57068    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57069    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57070      # Fail.
57071      FOUND_FREETYPE=no
57072    fi
57073  fi
57074
57075  if test "x$FOUND_FREETYPE" = xyes; then
57076    # Include file found, let's continue the sanity check.
57077    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57078$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57079
57080    # Reset to default value
57081    FREETYPE_BASE_NAME=freetype
57082    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57083    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57084      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57085          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57086        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57087        # for the .6 version explicitly.
57088        FREETYPE_BASE_NAME=freetype.6
57089        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57090        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57091$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57092      else
57093        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57094$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57095        FOUND_FREETYPE=no
57096      fi
57097    else
57098      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57099        # On Windows, we will need both .lib and .dll file.
57100        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57101          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57102$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57103          FOUND_FREETYPE=no
57104        fi
57105      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57106          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57107        # Found lib in isa dir, use that instead.
57108        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57109        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57110$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57111      fi
57112    fi
57113  fi
57114
57115  if test "x$FOUND_FREETYPE" = xyes; then
57116
57117  # Only process if variable expands to non-empty
57118
57119  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57120    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57121
57122  # Input might be given as Windows format, start by converting to
57123  # unix format.
57124  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57125  new_path=`$CYGPATH -u "$path"`
57126
57127  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57128  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57129  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57130  # "foo.exe" is OK but "foo" is an error.
57131  #
57132  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57133  # It is also a way to make sure we got the proper file name for the real test later on.
57134  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57135  if test "x$test_shortpath" = x; then
57136    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57137$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57138    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57139  fi
57140
57141  # Call helper function which possibly converts this using DOS-style short mode.
57142  # If so, the updated path is stored in $new_path.
57143
57144  input_path="$new_path"
57145  # Check if we need to convert this using DOS-style short mode. If the path
57146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57147  # take no chances and rewrite it.
57148  # Note: m4 eats our [], so we need to use [ and ] instead.
57149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57150  if test "x$has_forbidden_chars" != x; then
57151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57152    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57153    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57154    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57155      # Going to short mode and back again did indeed matter. Since short mode is
57156      # case insensitive, let's make it lowercase to improve readability.
57157      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57158      # Now convert it back to Unix-style (cygpath)
57159      input_path=`$CYGPATH -u "$shortmode_path"`
57160      new_path="$input_path"
57161    fi
57162  fi
57163
57164  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57165  if test "x$test_cygdrive_prefix" = x; then
57166    # As a simple fix, exclude /usr/bin since it's not a real path.
57167    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57168      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57169      # a path prefixed by /cygdrive for fixpath to work.
57170      new_path="$CYGWIN_ROOT_PATH$input_path"
57171    fi
57172  fi
57173
57174
57175  if test "x$path" != "x$new_path"; then
57176    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57177    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57178$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57179  fi
57180
57181    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57182
57183  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57184  has_colon=`$ECHO $path | $GREP ^.:`
57185  new_path="$path"
57186  if test "x$has_colon" = x; then
57187    # Not in mixed or Windows style, start by that.
57188    new_path=`cmd //c echo $path`
57189  fi
57190
57191
57192  input_path="$new_path"
57193  # Check if we need to convert this using DOS-style short mode. If the path
57194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57195  # take no chances and rewrite it.
57196  # Note: m4 eats our [], so we need to use [ and ] instead.
57197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57198  if test "x$has_forbidden_chars" != x; then
57199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57200    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57201  fi
57202
57203
57204  windows_path="$new_path"
57205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57206    unix_path=`$CYGPATH -u "$windows_path"`
57207    new_path="$unix_path"
57208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57210    new_path="$unix_path"
57211  fi
57212
57213  if test "x$path" != "x$new_path"; then
57214    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57216$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57217  fi
57218
57219  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57220  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57221
57222    else
57223      # We're on a unix platform. Hooray! :)
57224      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57225      has_space=`$ECHO "$path" | $GREP " "`
57226      if test "x$has_space" != x; then
57227        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57228$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57229        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57230      fi
57231
57232      # Use eval to expand a potential ~
57233      eval path="$path"
57234      if test ! -f "$path" && test ! -d "$path"; then
57235        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57236      fi
57237
57238      if test -d "$path"; then
57239        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57240      else
57241        dir="`$DIRNAME "$path"`"
57242        base="`$BASENAME "$path"`"
57243        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57244      fi
57245    fi
57246  fi
57247
57248
57249  # Only process if variable expands to non-empty
57250
57251  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57252    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57253
57254  # Input might be given as Windows format, start by converting to
57255  # unix format.
57256  path="$POTENTIAL_FREETYPE_LIB_PATH"
57257  new_path=`$CYGPATH -u "$path"`
57258
57259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57262  # "foo.exe" is OK but "foo" is an error.
57263  #
57264  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57265  # It is also a way to make sure we got the proper file name for the real test later on.
57266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57267  if test "x$test_shortpath" = x; then
57268    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57269$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57270    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57271  fi
57272
57273  # Call helper function which possibly converts this using DOS-style short mode.
57274  # If so, the updated path is stored in $new_path.
57275
57276  input_path="$new_path"
57277  # Check if we need to convert this using DOS-style short mode. If the path
57278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57279  # take no chances and rewrite it.
57280  # Note: m4 eats our [], so we need to use [ and ] instead.
57281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57282  if test "x$has_forbidden_chars" != x; then
57283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57287      # Going to short mode and back again did indeed matter. Since short mode is
57288      # case insensitive, let's make it lowercase to improve readability.
57289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57290      # Now convert it back to Unix-style (cygpath)
57291      input_path=`$CYGPATH -u "$shortmode_path"`
57292      new_path="$input_path"
57293    fi
57294  fi
57295
57296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57297  if test "x$test_cygdrive_prefix" = x; then
57298    # As a simple fix, exclude /usr/bin since it's not a real path.
57299    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57301      # a path prefixed by /cygdrive for fixpath to work.
57302      new_path="$CYGWIN_ROOT_PATH$input_path"
57303    fi
57304  fi
57305
57306
57307  if test "x$path" != "x$new_path"; then
57308    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57310$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57311  fi
57312
57313    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57314
57315  path="$POTENTIAL_FREETYPE_LIB_PATH"
57316  has_colon=`$ECHO $path | $GREP ^.:`
57317  new_path="$path"
57318  if test "x$has_colon" = x; then
57319    # Not in mixed or Windows style, start by that.
57320    new_path=`cmd //c echo $path`
57321  fi
57322
57323
57324  input_path="$new_path"
57325  # Check if we need to convert this using DOS-style short mode. If the path
57326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57327  # take no chances and rewrite it.
57328  # Note: m4 eats our [], so we need to use [ and ] instead.
57329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57330  if test "x$has_forbidden_chars" != x; then
57331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57333  fi
57334
57335
57336  windows_path="$new_path"
57337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57338    unix_path=`$CYGPATH -u "$windows_path"`
57339    new_path="$unix_path"
57340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57342    new_path="$unix_path"
57343  fi
57344
57345  if test "x$path" != "x$new_path"; then
57346    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57348$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57349  fi
57350
57351  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57352  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57353
57354    else
57355      # We're on a unix platform. Hooray! :)
57356      path="$POTENTIAL_FREETYPE_LIB_PATH"
57357      has_space=`$ECHO "$path" | $GREP " "`
57358      if test "x$has_space" != x; then
57359        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57360$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57361        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57362      fi
57363
57364      # Use eval to expand a potential ~
57365      eval path="$path"
57366      if test ! -f "$path" && test ! -d "$path"; then
57367        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57368      fi
57369
57370      if test -d "$path"; then
57371        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57372      else
57373        dir="`$DIRNAME "$path"`"
57374        base="`$BASENAME "$path"`"
57375        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57376      fi
57377    fi
57378  fi
57379
57380
57381    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57382    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57383$as_echo_n "checking for freetype includes... " >&6; }
57384    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57385$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57386    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57387    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57388$as_echo_n "checking for freetype libraries... " >&6; }
57389    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57390$as_echo "$FREETYPE_LIB_PATH" >&6; }
57391  fi
57392
57393          if test "x$FOUND_FREETYPE" != xyes; then
57394            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57395          fi
57396        else
57397          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57398$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57399          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57400        fi
57401      else
57402        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57403$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57404      fi
57405    fi
57406
57407    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57408      # User has specified settings
57409
57410      if test "x$BUNDLE_FREETYPE" = x; then
57411        # If not specified, default is to bundle freetype
57412        BUNDLE_FREETYPE=yes
57413      fi
57414
57415      if test "x$with_freetype" != x; then
57416        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57417        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57418      fi
57419
57420      # Allow --with-freetype-lib and --with-freetype-include to override
57421      if test "x$with_freetype_include" != x; then
57422        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57423      fi
57424      if test "x$with_freetype_lib" != x; then
57425        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57426      fi
57427
57428      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57429        # Okay, we got it. Check that it works.
57430
57431  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57432  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57433  METHOD="--with-freetype"
57434
57435  # Let's start with an optimistic view of the world :-)
57436  FOUND_FREETYPE=yes
57437
57438  # First look for the canonical freetype main include file ft2build.h.
57439  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57440    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57441    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57442    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57443      # Fail.
57444      FOUND_FREETYPE=no
57445    fi
57446  fi
57447
57448  if test "x$FOUND_FREETYPE" = xyes; then
57449    # Include file found, let's continue the sanity check.
57450    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57451$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57452
57453    # Reset to default value
57454    FREETYPE_BASE_NAME=freetype
57455    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57456    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57457      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57458          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57459        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57460        # for the .6 version explicitly.
57461        FREETYPE_BASE_NAME=freetype.6
57462        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57463        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57464$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57465      else
57466        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57467$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57468        FOUND_FREETYPE=no
57469      fi
57470    else
57471      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57472        # On Windows, we will need both .lib and .dll file.
57473        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57474          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57475$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57476          FOUND_FREETYPE=no
57477        fi
57478      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57479          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57480        # Found lib in isa dir, use that instead.
57481        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57482        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57483$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57484      fi
57485    fi
57486  fi
57487
57488  if test "x$FOUND_FREETYPE" = xyes; then
57489
57490  # Only process if variable expands to non-empty
57491
57492  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57493    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57494
57495  # Input might be given as Windows format, start by converting to
57496  # unix format.
57497  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57498  new_path=`$CYGPATH -u "$path"`
57499
57500  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57501  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57502  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57503  # "foo.exe" is OK but "foo" is an error.
57504  #
57505  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57506  # It is also a way to make sure we got the proper file name for the real test later on.
57507  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57508  if test "x$test_shortpath" = x; then
57509    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57510$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57511    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57512  fi
57513
57514  # Call helper function which possibly converts this using DOS-style short mode.
57515  # If so, the updated path is stored in $new_path.
57516
57517  input_path="$new_path"
57518  # Check if we need to convert this using DOS-style short mode. If the path
57519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57520  # take no chances and rewrite it.
57521  # Note: m4 eats our [], so we need to use [ and ] instead.
57522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57523  if test "x$has_forbidden_chars" != x; then
57524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57525    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57526    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57527    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57528      # Going to short mode and back again did indeed matter. Since short mode is
57529      # case insensitive, let's make it lowercase to improve readability.
57530      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57531      # Now convert it back to Unix-style (cygpath)
57532      input_path=`$CYGPATH -u "$shortmode_path"`
57533      new_path="$input_path"
57534    fi
57535  fi
57536
57537  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57538  if test "x$test_cygdrive_prefix" = x; then
57539    # As a simple fix, exclude /usr/bin since it's not a real path.
57540    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57541      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57542      # a path prefixed by /cygdrive for fixpath to work.
57543      new_path="$CYGWIN_ROOT_PATH$input_path"
57544    fi
57545  fi
57546
57547
57548  if test "x$path" != "x$new_path"; then
57549    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57551$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57552  fi
57553
57554    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57555
57556  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57557  has_colon=`$ECHO $path | $GREP ^.:`
57558  new_path="$path"
57559  if test "x$has_colon" = x; then
57560    # Not in mixed or Windows style, start by that.
57561    new_path=`cmd //c echo $path`
57562  fi
57563
57564
57565  input_path="$new_path"
57566  # Check if we need to convert this using DOS-style short mode. If the path
57567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57568  # take no chances and rewrite it.
57569  # Note: m4 eats our [], so we need to use [ and ] instead.
57570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57571  if test "x$has_forbidden_chars" != x; then
57572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57573    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57574  fi
57575
57576
57577  windows_path="$new_path"
57578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57579    unix_path=`$CYGPATH -u "$windows_path"`
57580    new_path="$unix_path"
57581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57583    new_path="$unix_path"
57584  fi
57585
57586  if test "x$path" != "x$new_path"; then
57587    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57588    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57589$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57590  fi
57591
57592  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57593  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57594
57595    else
57596      # We're on a unix platform. Hooray! :)
57597      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57598      has_space=`$ECHO "$path" | $GREP " "`
57599      if test "x$has_space" != x; then
57600        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57601$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57602        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57603      fi
57604
57605      # Use eval to expand a potential ~
57606      eval path="$path"
57607      if test ! -f "$path" && test ! -d "$path"; then
57608        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57609      fi
57610
57611      if test -d "$path"; then
57612        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57613      else
57614        dir="`$DIRNAME "$path"`"
57615        base="`$BASENAME "$path"`"
57616        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57617      fi
57618    fi
57619  fi
57620
57621
57622  # Only process if variable expands to non-empty
57623
57624  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57625    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57626
57627  # Input might be given as Windows format, start by converting to
57628  # unix format.
57629  path="$POTENTIAL_FREETYPE_LIB_PATH"
57630  new_path=`$CYGPATH -u "$path"`
57631
57632  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57633  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57634  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57635  # "foo.exe" is OK but "foo" is an error.
57636  #
57637  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57638  # It is also a way to make sure we got the proper file name for the real test later on.
57639  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57640  if test "x$test_shortpath" = x; then
57641    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57642$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57643    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57644  fi
57645
57646  # Call helper function which possibly converts this using DOS-style short mode.
57647  # If so, the updated path is stored in $new_path.
57648
57649  input_path="$new_path"
57650  # Check if we need to convert this using DOS-style short mode. If the path
57651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57652  # take no chances and rewrite it.
57653  # Note: m4 eats our [], so we need to use [ and ] instead.
57654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57655  if test "x$has_forbidden_chars" != x; then
57656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57657    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57658    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57659    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57660      # Going to short mode and back again did indeed matter. Since short mode is
57661      # case insensitive, let's make it lowercase to improve readability.
57662      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57663      # Now convert it back to Unix-style (cygpath)
57664      input_path=`$CYGPATH -u "$shortmode_path"`
57665      new_path="$input_path"
57666    fi
57667  fi
57668
57669  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57670  if test "x$test_cygdrive_prefix" = x; then
57671    # As a simple fix, exclude /usr/bin since it's not a real path.
57672    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57673      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57674      # a path prefixed by /cygdrive for fixpath to work.
57675      new_path="$CYGWIN_ROOT_PATH$input_path"
57676    fi
57677  fi
57678
57679
57680  if test "x$path" != "x$new_path"; then
57681    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57683$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57684  fi
57685
57686    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57687
57688  path="$POTENTIAL_FREETYPE_LIB_PATH"
57689  has_colon=`$ECHO $path | $GREP ^.:`
57690  new_path="$path"
57691  if test "x$has_colon" = x; then
57692    # Not in mixed or Windows style, start by that.
57693    new_path=`cmd //c echo $path`
57694  fi
57695
57696
57697  input_path="$new_path"
57698  # Check if we need to convert this using DOS-style short mode. If the path
57699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57700  # take no chances and rewrite it.
57701  # Note: m4 eats our [], so we need to use [ and ] instead.
57702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57703  if test "x$has_forbidden_chars" != x; then
57704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57705    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57706  fi
57707
57708
57709  windows_path="$new_path"
57710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57711    unix_path=`$CYGPATH -u "$windows_path"`
57712    new_path="$unix_path"
57713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57715    new_path="$unix_path"
57716  fi
57717
57718  if test "x$path" != "x$new_path"; then
57719    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57721$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57722  fi
57723
57724  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57725  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57726
57727    else
57728      # We're on a unix platform. Hooray! :)
57729      path="$POTENTIAL_FREETYPE_LIB_PATH"
57730      has_space=`$ECHO "$path" | $GREP " "`
57731      if test "x$has_space" != x; then
57732        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57733$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57734        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57735      fi
57736
57737      # Use eval to expand a potential ~
57738      eval path="$path"
57739      if test ! -f "$path" && test ! -d "$path"; then
57740        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57741      fi
57742
57743      if test -d "$path"; then
57744        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57745      else
57746        dir="`$DIRNAME "$path"`"
57747        base="`$BASENAME "$path"`"
57748        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57749      fi
57750    fi
57751  fi
57752
57753
57754    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57755    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57756$as_echo_n "checking for freetype includes... " >&6; }
57757    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57758$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57759    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57760    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57761$as_echo_n "checking for freetype libraries... " >&6; }
57762    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57763$as_echo "$FREETYPE_LIB_PATH" >&6; }
57764  fi
57765
57766        if test "x$FOUND_FREETYPE" != xyes; then
57767          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57768        fi
57769      else
57770        # User specified only one of lib or include. This is an error.
57771        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57772          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57773$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57774          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57775        else
57776          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57777$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57778          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57779        fi
57780      fi
57781    else
57782      # User did not specify settings, but we need freetype. Try to locate it.
57783
57784      if test "x$BUNDLE_FREETYPE" = x; then
57785        # If not specified, default is to bundle freetype only on windows
57786        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57787          BUNDLE_FREETYPE=yes
57788        else
57789          BUNDLE_FREETYPE=no
57790        fi
57791      fi
57792
57793      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57794      if test "x$SYSROOT" = x; then
57795        if test "x$FOUND_FREETYPE" != xyes; then
57796          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57797          if test "x$PKG_CONFIG" != x; then
57798
57799pkg_failed=no
57800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57801$as_echo_n "checking for FREETYPE... " >&6; }
57802
57803if test -n "$FREETYPE_CFLAGS"; then
57804    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57805 elif test -n "$PKG_CONFIG"; then
57806    if test -n "$PKG_CONFIG" && \
57807    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57808  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57809  ac_status=$?
57810  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57811  test $ac_status = 0; }; then
57812  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57813else
57814  pkg_failed=yes
57815fi
57816 else
57817    pkg_failed=untried
57818fi
57819if test -n "$FREETYPE_LIBS"; then
57820    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57821 elif test -n "$PKG_CONFIG"; then
57822    if test -n "$PKG_CONFIG" && \
57823    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57824  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57825  ac_status=$?
57826  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57827  test $ac_status = 0; }; then
57828  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57829else
57830  pkg_failed=yes
57831fi
57832 else
57833    pkg_failed=untried
57834fi
57835
57836
57837
57838if test $pkg_failed = yes; then
57839
57840if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57841        _pkg_short_errors_supported=yes
57842else
57843        _pkg_short_errors_supported=no
57844fi
57845        if test $_pkg_short_errors_supported = yes; then
57846	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57847        else
57848	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57849        fi
57850	# Put the nasty error message in config.log where it belongs
57851	echo "$FREETYPE_PKG_ERRORS" >&5
57852
57853	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57854$as_echo "no" >&6; }
57855                FOUND_FREETYPE=no
57856elif test $pkg_failed = untried; then
57857	FOUND_FREETYPE=no
57858else
57859	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57860	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57861        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57862$as_echo "yes" >&6; }
57863	FOUND_FREETYPE=yes
57864fi
57865            if test "x$FOUND_FREETYPE" = xyes; then
57866              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57867              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57868              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57869              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57870                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57871              fi
57872              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57873              if test "x$BUNDLE_FREETYPE" = xyes; then
57874                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57875$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57876                FOUND_FREETYPE=no
57877              else
57878                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57879$as_echo_n "checking for freetype... " >&6; }
57880                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57881$as_echo "yes (using pkg-config)" >&6; }
57882              fi
57883            fi
57884          fi
57885        fi
57886      fi
57887
57888      if test "x$FOUND_FREETYPE" != xyes; then
57889        # Check in well-known locations
57890        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57891          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57892
57893  windows_path="$FREETYPE_BASE_DIR"
57894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57895    unix_path=`$CYGPATH -u "$windows_path"`
57896    FREETYPE_BASE_DIR="$unix_path"
57897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57899    FREETYPE_BASE_DIR="$unix_path"
57900  fi
57901
57902
57903  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57904  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57905  METHOD="well-known location"
57906
57907  # Let's start with an optimistic view of the world :-)
57908  FOUND_FREETYPE=yes
57909
57910  # First look for the canonical freetype main include file ft2build.h.
57911  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57912    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57913    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57914    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57915      # Fail.
57916      FOUND_FREETYPE=no
57917    fi
57918  fi
57919
57920  if test "x$FOUND_FREETYPE" = xyes; then
57921    # Include file found, let's continue the sanity check.
57922    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57923$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57924
57925    # Reset to default value
57926    FREETYPE_BASE_NAME=freetype
57927    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57928    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57929      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57930          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57931        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57932        # for the .6 version explicitly.
57933        FREETYPE_BASE_NAME=freetype.6
57934        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57935        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57936$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57937      else
57938        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57939$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57940        FOUND_FREETYPE=no
57941      fi
57942    else
57943      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57944        # On Windows, we will need both .lib and .dll file.
57945        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57946          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57947$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57948          FOUND_FREETYPE=no
57949        fi
57950      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57951          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57952        # Found lib in isa dir, use that instead.
57953        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57954        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57955$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57956      fi
57957    fi
57958  fi
57959
57960  if test "x$FOUND_FREETYPE" = xyes; then
57961
57962  # Only process if variable expands to non-empty
57963
57964  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57965    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57966
57967  # Input might be given as Windows format, start by converting to
57968  # unix format.
57969  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57970  new_path=`$CYGPATH -u "$path"`
57971
57972  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57973  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57974  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57975  # "foo.exe" is OK but "foo" is an error.
57976  #
57977  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57978  # It is also a way to make sure we got the proper file name for the real test later on.
57979  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57980  if test "x$test_shortpath" = x; then
57981    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57982$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57983    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57984  fi
57985
57986  # Call helper function which possibly converts this using DOS-style short mode.
57987  # If so, the updated path is stored in $new_path.
57988
57989  input_path="$new_path"
57990  # Check if we need to convert this using DOS-style short mode. If the path
57991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57992  # take no chances and rewrite it.
57993  # Note: m4 eats our [], so we need to use [ and ] instead.
57994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57995  if test "x$has_forbidden_chars" != x; then
57996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57997    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57998    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57999    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58000      # Going to short mode and back again did indeed matter. Since short mode is
58001      # case insensitive, let's make it lowercase to improve readability.
58002      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58003      # Now convert it back to Unix-style (cygpath)
58004      input_path=`$CYGPATH -u "$shortmode_path"`
58005      new_path="$input_path"
58006    fi
58007  fi
58008
58009  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58010  if test "x$test_cygdrive_prefix" = x; then
58011    # As a simple fix, exclude /usr/bin since it's not a real path.
58012    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58013      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58014      # a path prefixed by /cygdrive for fixpath to work.
58015      new_path="$CYGWIN_ROOT_PATH$input_path"
58016    fi
58017  fi
58018
58019
58020  if test "x$path" != "x$new_path"; then
58021    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58023$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58024  fi
58025
58026    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58027
58028  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58029  has_colon=`$ECHO $path | $GREP ^.:`
58030  new_path="$path"
58031  if test "x$has_colon" = x; then
58032    # Not in mixed or Windows style, start by that.
58033    new_path=`cmd //c echo $path`
58034  fi
58035
58036
58037  input_path="$new_path"
58038  # Check if we need to convert this using DOS-style short mode. If the path
58039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58040  # take no chances and rewrite it.
58041  # Note: m4 eats our [], so we need to use [ and ] instead.
58042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58043  if test "x$has_forbidden_chars" != x; then
58044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58045    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58046  fi
58047
58048
58049  windows_path="$new_path"
58050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58051    unix_path=`$CYGPATH -u "$windows_path"`
58052    new_path="$unix_path"
58053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58055    new_path="$unix_path"
58056  fi
58057
58058  if test "x$path" != "x$new_path"; then
58059    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58060    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58061$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58062  fi
58063
58064  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58065  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58066
58067    else
58068      # We're on a unix platform. Hooray! :)
58069      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58070      has_space=`$ECHO "$path" | $GREP " "`
58071      if test "x$has_space" != x; then
58072        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58073$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58074        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58075      fi
58076
58077      # Use eval to expand a potential ~
58078      eval path="$path"
58079      if test ! -f "$path" && test ! -d "$path"; then
58080        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58081      fi
58082
58083      if test -d "$path"; then
58084        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58085      else
58086        dir="`$DIRNAME "$path"`"
58087        base="`$BASENAME "$path"`"
58088        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58089      fi
58090    fi
58091  fi
58092
58093
58094  # Only process if variable expands to non-empty
58095
58096  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58097    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58098
58099  # Input might be given as Windows format, start by converting to
58100  # unix format.
58101  path="$POTENTIAL_FREETYPE_LIB_PATH"
58102  new_path=`$CYGPATH -u "$path"`
58103
58104  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58105  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58106  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58107  # "foo.exe" is OK but "foo" is an error.
58108  #
58109  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58110  # It is also a way to make sure we got the proper file name for the real test later on.
58111  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58112  if test "x$test_shortpath" = x; then
58113    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58114$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58115    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58116  fi
58117
58118  # Call helper function which possibly converts this using DOS-style short mode.
58119  # If so, the updated path is stored in $new_path.
58120
58121  input_path="$new_path"
58122  # Check if we need to convert this using DOS-style short mode. If the path
58123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58124  # take no chances and rewrite it.
58125  # Note: m4 eats our [], so we need to use [ and ] instead.
58126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58127  if test "x$has_forbidden_chars" != x; then
58128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58129    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58130    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58131    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58132      # Going to short mode and back again did indeed matter. Since short mode is
58133      # case insensitive, let's make it lowercase to improve readability.
58134      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58135      # Now convert it back to Unix-style (cygpath)
58136      input_path=`$CYGPATH -u "$shortmode_path"`
58137      new_path="$input_path"
58138    fi
58139  fi
58140
58141  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58142  if test "x$test_cygdrive_prefix" = x; then
58143    # As a simple fix, exclude /usr/bin since it's not a real path.
58144    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58145      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58146      # a path prefixed by /cygdrive for fixpath to work.
58147      new_path="$CYGWIN_ROOT_PATH$input_path"
58148    fi
58149  fi
58150
58151
58152  if test "x$path" != "x$new_path"; then
58153    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58154    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58155$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58156  fi
58157
58158    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58159
58160  path="$POTENTIAL_FREETYPE_LIB_PATH"
58161  has_colon=`$ECHO $path | $GREP ^.:`
58162  new_path="$path"
58163  if test "x$has_colon" = x; then
58164    # Not in mixed or Windows style, start by that.
58165    new_path=`cmd //c echo $path`
58166  fi
58167
58168
58169  input_path="$new_path"
58170  # Check if we need to convert this using DOS-style short mode. If the path
58171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58172  # take no chances and rewrite it.
58173  # Note: m4 eats our [], so we need to use [ and ] instead.
58174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58175  if test "x$has_forbidden_chars" != x; then
58176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58177    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58178  fi
58179
58180
58181  windows_path="$new_path"
58182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58183    unix_path=`$CYGPATH -u "$windows_path"`
58184    new_path="$unix_path"
58185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58187    new_path="$unix_path"
58188  fi
58189
58190  if test "x$path" != "x$new_path"; then
58191    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58193$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58194  fi
58195
58196  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58197  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58198
58199    else
58200      # We're on a unix platform. Hooray! :)
58201      path="$POTENTIAL_FREETYPE_LIB_PATH"
58202      has_space=`$ECHO "$path" | $GREP " "`
58203      if test "x$has_space" != x; then
58204        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58205$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58206        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58207      fi
58208
58209      # Use eval to expand a potential ~
58210      eval path="$path"
58211      if test ! -f "$path" && test ! -d "$path"; then
58212        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58213      fi
58214
58215      if test -d "$path"; then
58216        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58217      else
58218        dir="`$DIRNAME "$path"`"
58219        base="`$BASENAME "$path"`"
58220        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58221      fi
58222    fi
58223  fi
58224
58225
58226    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58227    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58228$as_echo_n "checking for freetype includes... " >&6; }
58229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58230$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58231    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58232    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58233$as_echo_n "checking for freetype libraries... " >&6; }
58234    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58235$as_echo "$FREETYPE_LIB_PATH" >&6; }
58236  fi
58237
58238          if test "x$FOUND_FREETYPE" != xyes; then
58239            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58240
58241  windows_path="$FREETYPE_BASE_DIR"
58242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58243    unix_path=`$CYGPATH -u "$windows_path"`
58244    FREETYPE_BASE_DIR="$unix_path"
58245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58247    FREETYPE_BASE_DIR="$unix_path"
58248  fi
58249
58250
58251  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58252  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58253  METHOD="well-known location"
58254
58255  # Let's start with an optimistic view of the world :-)
58256  FOUND_FREETYPE=yes
58257
58258  # First look for the canonical freetype main include file ft2build.h.
58259  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58260    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58261    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58262    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58263      # Fail.
58264      FOUND_FREETYPE=no
58265    fi
58266  fi
58267
58268  if test "x$FOUND_FREETYPE" = xyes; then
58269    # Include file found, let's continue the sanity check.
58270    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58271$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58272
58273    # Reset to default value
58274    FREETYPE_BASE_NAME=freetype
58275    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58276    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58277      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58278          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58279        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58280        # for the .6 version explicitly.
58281        FREETYPE_BASE_NAME=freetype.6
58282        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58283        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58284$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58285      else
58286        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58287$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58288        FOUND_FREETYPE=no
58289      fi
58290    else
58291      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58292        # On Windows, we will need both .lib and .dll file.
58293        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58294          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58295$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58296          FOUND_FREETYPE=no
58297        fi
58298      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58299          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58300        # Found lib in isa dir, use that instead.
58301        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58302        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58303$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58304      fi
58305    fi
58306  fi
58307
58308  if test "x$FOUND_FREETYPE" = xyes; then
58309
58310  # Only process if variable expands to non-empty
58311
58312  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58313    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58314
58315  # Input might be given as Windows format, start by converting to
58316  # unix format.
58317  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58318  new_path=`$CYGPATH -u "$path"`
58319
58320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58323  # "foo.exe" is OK but "foo" is an error.
58324  #
58325  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58326  # It is also a way to make sure we got the proper file name for the real test later on.
58327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58328  if test "x$test_shortpath" = x; then
58329    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58330$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58331    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58332  fi
58333
58334  # Call helper function which possibly converts this using DOS-style short mode.
58335  # If so, the updated path is stored in $new_path.
58336
58337  input_path="$new_path"
58338  # Check if we need to convert this using DOS-style short mode. If the path
58339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58340  # take no chances and rewrite it.
58341  # Note: m4 eats our [], so we need to use [ and ] instead.
58342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58343  if test "x$has_forbidden_chars" != x; then
58344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58345    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58346    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58347    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58348      # Going to short mode and back again did indeed matter. Since short mode is
58349      # case insensitive, let's make it lowercase to improve readability.
58350      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58351      # Now convert it back to Unix-style (cygpath)
58352      input_path=`$CYGPATH -u "$shortmode_path"`
58353      new_path="$input_path"
58354    fi
58355  fi
58356
58357  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58358  if test "x$test_cygdrive_prefix" = x; then
58359    # As a simple fix, exclude /usr/bin since it's not a real path.
58360    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58361      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58362      # a path prefixed by /cygdrive for fixpath to work.
58363      new_path="$CYGWIN_ROOT_PATH$input_path"
58364    fi
58365  fi
58366
58367
58368  if test "x$path" != "x$new_path"; then
58369    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58371$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58372  fi
58373
58374    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58375
58376  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58377  has_colon=`$ECHO $path | $GREP ^.:`
58378  new_path="$path"
58379  if test "x$has_colon" = x; then
58380    # Not in mixed or Windows style, start by that.
58381    new_path=`cmd //c echo $path`
58382  fi
58383
58384
58385  input_path="$new_path"
58386  # Check if we need to convert this using DOS-style short mode. If the path
58387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58388  # take no chances and rewrite it.
58389  # Note: m4 eats our [], so we need to use [ and ] instead.
58390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58391  if test "x$has_forbidden_chars" != x; then
58392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58394  fi
58395
58396
58397  windows_path="$new_path"
58398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58399    unix_path=`$CYGPATH -u "$windows_path"`
58400    new_path="$unix_path"
58401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58403    new_path="$unix_path"
58404  fi
58405
58406  if test "x$path" != "x$new_path"; then
58407    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58409$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58410  fi
58411
58412  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58413  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58414
58415    else
58416      # We're on a unix platform. Hooray! :)
58417      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58418      has_space=`$ECHO "$path" | $GREP " "`
58419      if test "x$has_space" != x; then
58420        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58421$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58422        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58423      fi
58424
58425      # Use eval to expand a potential ~
58426      eval path="$path"
58427      if test ! -f "$path" && test ! -d "$path"; then
58428        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58429      fi
58430
58431      if test -d "$path"; then
58432        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58433      else
58434        dir="`$DIRNAME "$path"`"
58435        base="`$BASENAME "$path"`"
58436        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58437      fi
58438    fi
58439  fi
58440
58441
58442  # Only process if variable expands to non-empty
58443
58444  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58445    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58446
58447  # Input might be given as Windows format, start by converting to
58448  # unix format.
58449  path="$POTENTIAL_FREETYPE_LIB_PATH"
58450  new_path=`$CYGPATH -u "$path"`
58451
58452  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58453  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58454  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58455  # "foo.exe" is OK but "foo" is an error.
58456  #
58457  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58458  # It is also a way to make sure we got the proper file name for the real test later on.
58459  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58460  if test "x$test_shortpath" = x; then
58461    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58462$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58463    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58464  fi
58465
58466  # Call helper function which possibly converts this using DOS-style short mode.
58467  # If so, the updated path is stored in $new_path.
58468
58469  input_path="$new_path"
58470  # Check if we need to convert this using DOS-style short mode. If the path
58471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58472  # take no chances and rewrite it.
58473  # Note: m4 eats our [], so we need to use [ and ] instead.
58474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58475  if test "x$has_forbidden_chars" != x; then
58476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58477    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58478    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58479    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58480      # Going to short mode and back again did indeed matter. Since short mode is
58481      # case insensitive, let's make it lowercase to improve readability.
58482      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58483      # Now convert it back to Unix-style (cygpath)
58484      input_path=`$CYGPATH -u "$shortmode_path"`
58485      new_path="$input_path"
58486    fi
58487  fi
58488
58489  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58490  if test "x$test_cygdrive_prefix" = x; then
58491    # As a simple fix, exclude /usr/bin since it's not a real path.
58492    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58493      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58494      # a path prefixed by /cygdrive for fixpath to work.
58495      new_path="$CYGWIN_ROOT_PATH$input_path"
58496    fi
58497  fi
58498
58499
58500  if test "x$path" != "x$new_path"; then
58501    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58502    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58503$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58504  fi
58505
58506    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58507
58508  path="$POTENTIAL_FREETYPE_LIB_PATH"
58509  has_colon=`$ECHO $path | $GREP ^.:`
58510  new_path="$path"
58511  if test "x$has_colon" = x; then
58512    # Not in mixed or Windows style, start by that.
58513    new_path=`cmd //c echo $path`
58514  fi
58515
58516
58517  input_path="$new_path"
58518  # Check if we need to convert this using DOS-style short mode. If the path
58519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58520  # take no chances and rewrite it.
58521  # Note: m4 eats our [], so we need to use [ and ] instead.
58522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58523  if test "x$has_forbidden_chars" != x; then
58524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58525    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58526  fi
58527
58528
58529  windows_path="$new_path"
58530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58531    unix_path=`$CYGPATH -u "$windows_path"`
58532    new_path="$unix_path"
58533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58535    new_path="$unix_path"
58536  fi
58537
58538  if test "x$path" != "x$new_path"; then
58539    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58540    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58541$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58542  fi
58543
58544  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58545  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58546
58547    else
58548      # We're on a unix platform. Hooray! :)
58549      path="$POTENTIAL_FREETYPE_LIB_PATH"
58550      has_space=`$ECHO "$path" | $GREP " "`
58551      if test "x$has_space" != x; then
58552        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58553$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58554        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58555      fi
58556
58557      # Use eval to expand a potential ~
58558      eval path="$path"
58559      if test ! -f "$path" && test ! -d "$path"; then
58560        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58561      fi
58562
58563      if test -d "$path"; then
58564        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58565      else
58566        dir="`$DIRNAME "$path"`"
58567        base="`$BASENAME "$path"`"
58568        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58569      fi
58570    fi
58571  fi
58572
58573
58574    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58575    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58576$as_echo_n "checking for freetype includes... " >&6; }
58577    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58578$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58579    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58580    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58581$as_echo_n "checking for freetype libraries... " >&6; }
58582    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58583$as_echo "$FREETYPE_LIB_PATH" >&6; }
58584  fi
58585
58586          fi
58587          if test "x$FOUND_FREETYPE" != xyes; then
58588            FREETYPE_BASE_DIR="$HOME/freetype"
58589
58590  windows_path="$FREETYPE_BASE_DIR"
58591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58592    unix_path=`$CYGPATH -u "$windows_path"`
58593    FREETYPE_BASE_DIR="$unix_path"
58594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58596    FREETYPE_BASE_DIR="$unix_path"
58597  fi
58598
58599            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58600
58601  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58602  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58603  METHOD="well-known location"
58604
58605  # Let's start with an optimistic view of the world :-)
58606  FOUND_FREETYPE=yes
58607
58608  # First look for the canonical freetype main include file ft2build.h.
58609  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58610    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58611    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58612    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58613      # Fail.
58614      FOUND_FREETYPE=no
58615    fi
58616  fi
58617
58618  if test "x$FOUND_FREETYPE" = xyes; then
58619    # Include file found, let's continue the sanity check.
58620    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58621$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58622
58623    # Reset to default value
58624    FREETYPE_BASE_NAME=freetype
58625    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58626    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58627      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58628          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58629        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58630        # for the .6 version explicitly.
58631        FREETYPE_BASE_NAME=freetype.6
58632        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58633        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58634$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58635      else
58636        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58637$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58638        FOUND_FREETYPE=no
58639      fi
58640    else
58641      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58642        # On Windows, we will need both .lib and .dll file.
58643        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58644          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58645$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58646          FOUND_FREETYPE=no
58647        fi
58648      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58649          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58650        # Found lib in isa dir, use that instead.
58651        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58652        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58653$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58654      fi
58655    fi
58656  fi
58657
58658  if test "x$FOUND_FREETYPE" = xyes; then
58659
58660  # Only process if variable expands to non-empty
58661
58662  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58663    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58664
58665  # Input might be given as Windows format, start by converting to
58666  # unix format.
58667  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58668  new_path=`$CYGPATH -u "$path"`
58669
58670  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58671  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58672  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58673  # "foo.exe" is OK but "foo" is an error.
58674  #
58675  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58676  # It is also a way to make sure we got the proper file name for the real test later on.
58677  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58678  if test "x$test_shortpath" = x; then
58679    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58680$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58681    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58682  fi
58683
58684  # Call helper function which possibly converts this using DOS-style short mode.
58685  # If so, the updated path is stored in $new_path.
58686
58687  input_path="$new_path"
58688  # Check if we need to convert this using DOS-style short mode. If the path
58689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58690  # take no chances and rewrite it.
58691  # Note: m4 eats our [], so we need to use [ and ] instead.
58692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58693  if test "x$has_forbidden_chars" != x; then
58694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58695    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58696    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58697    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58698      # Going to short mode and back again did indeed matter. Since short mode is
58699      # case insensitive, let's make it lowercase to improve readability.
58700      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58701      # Now convert it back to Unix-style (cygpath)
58702      input_path=`$CYGPATH -u "$shortmode_path"`
58703      new_path="$input_path"
58704    fi
58705  fi
58706
58707  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58708  if test "x$test_cygdrive_prefix" = x; then
58709    # As a simple fix, exclude /usr/bin since it's not a real path.
58710    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58711      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58712      # a path prefixed by /cygdrive for fixpath to work.
58713      new_path="$CYGWIN_ROOT_PATH$input_path"
58714    fi
58715  fi
58716
58717
58718  if test "x$path" != "x$new_path"; then
58719    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58721$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58722  fi
58723
58724    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58725
58726  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58727  has_colon=`$ECHO $path | $GREP ^.:`
58728  new_path="$path"
58729  if test "x$has_colon" = x; then
58730    # Not in mixed or Windows style, start by that.
58731    new_path=`cmd //c echo $path`
58732  fi
58733
58734
58735  input_path="$new_path"
58736  # Check if we need to convert this using DOS-style short mode. If the path
58737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58738  # take no chances and rewrite it.
58739  # Note: m4 eats our [], so we need to use [ and ] instead.
58740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58741  if test "x$has_forbidden_chars" != x; then
58742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58743    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58744  fi
58745
58746
58747  windows_path="$new_path"
58748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58749    unix_path=`$CYGPATH -u "$windows_path"`
58750    new_path="$unix_path"
58751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58753    new_path="$unix_path"
58754  fi
58755
58756  if test "x$path" != "x$new_path"; then
58757    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58758    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58759$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58760  fi
58761
58762  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58763  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58764
58765    else
58766      # We're on a unix platform. Hooray! :)
58767      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58768      has_space=`$ECHO "$path" | $GREP " "`
58769      if test "x$has_space" != x; then
58770        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58771$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58772        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58773      fi
58774
58775      # Use eval to expand a potential ~
58776      eval path="$path"
58777      if test ! -f "$path" && test ! -d "$path"; then
58778        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58779      fi
58780
58781      if test -d "$path"; then
58782        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58783      else
58784        dir="`$DIRNAME "$path"`"
58785        base="`$BASENAME "$path"`"
58786        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58787      fi
58788    fi
58789  fi
58790
58791
58792  # Only process if variable expands to non-empty
58793
58794  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58795    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58796
58797  # Input might be given as Windows format, start by converting to
58798  # unix format.
58799  path="$POTENTIAL_FREETYPE_LIB_PATH"
58800  new_path=`$CYGPATH -u "$path"`
58801
58802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58805  # "foo.exe" is OK but "foo" is an error.
58806  #
58807  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58808  # It is also a way to make sure we got the proper file name for the real test later on.
58809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58810  if test "x$test_shortpath" = x; then
58811    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58812$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58813    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58814  fi
58815
58816  # Call helper function which possibly converts this using DOS-style short mode.
58817  # If so, the updated path is stored in $new_path.
58818
58819  input_path="$new_path"
58820  # Check if we need to convert this using DOS-style short mode. If the path
58821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58822  # take no chances and rewrite it.
58823  # Note: m4 eats our [], so we need to use [ and ] instead.
58824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58825  if test "x$has_forbidden_chars" != x; then
58826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58827    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58828    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58829    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58830      # Going to short mode and back again did indeed matter. Since short mode is
58831      # case insensitive, let's make it lowercase to improve readability.
58832      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58833      # Now convert it back to Unix-style (cygpath)
58834      input_path=`$CYGPATH -u "$shortmode_path"`
58835      new_path="$input_path"
58836    fi
58837  fi
58838
58839  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58840  if test "x$test_cygdrive_prefix" = x; then
58841    # As a simple fix, exclude /usr/bin since it's not a real path.
58842    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58843      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58844      # a path prefixed by /cygdrive for fixpath to work.
58845      new_path="$CYGWIN_ROOT_PATH$input_path"
58846    fi
58847  fi
58848
58849
58850  if test "x$path" != "x$new_path"; then
58851    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58853$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58854  fi
58855
58856    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58857
58858  path="$POTENTIAL_FREETYPE_LIB_PATH"
58859  has_colon=`$ECHO $path | $GREP ^.:`
58860  new_path="$path"
58861  if test "x$has_colon" = x; then
58862    # Not in mixed or Windows style, start by that.
58863    new_path=`cmd //c echo $path`
58864  fi
58865
58866
58867  input_path="$new_path"
58868  # Check if we need to convert this using DOS-style short mode. If the path
58869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58870  # take no chances and rewrite it.
58871  # Note: m4 eats our [], so we need to use [ and ] instead.
58872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58873  if test "x$has_forbidden_chars" != x; then
58874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58875    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58876  fi
58877
58878
58879  windows_path="$new_path"
58880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58881    unix_path=`$CYGPATH -u "$windows_path"`
58882    new_path="$unix_path"
58883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58885    new_path="$unix_path"
58886  fi
58887
58888  if test "x$path" != "x$new_path"; then
58889    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58891$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58892  fi
58893
58894  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58895  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58896
58897    else
58898      # We're on a unix platform. Hooray! :)
58899      path="$POTENTIAL_FREETYPE_LIB_PATH"
58900      has_space=`$ECHO "$path" | $GREP " "`
58901      if test "x$has_space" != x; then
58902        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58903$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58904        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58905      fi
58906
58907      # Use eval to expand a potential ~
58908      eval path="$path"
58909      if test ! -f "$path" && test ! -d "$path"; then
58910        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58911      fi
58912
58913      if test -d "$path"; then
58914        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58915      else
58916        dir="`$DIRNAME "$path"`"
58917        base="`$BASENAME "$path"`"
58918        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58919      fi
58920    fi
58921  fi
58922
58923
58924    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58925    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58926$as_echo_n "checking for freetype includes... " >&6; }
58927    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58928$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58929    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58930    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58931$as_echo_n "checking for freetype libraries... " >&6; }
58932    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58933$as_echo "$FREETYPE_LIB_PATH" >&6; }
58934  fi
58935
58936            else
58937
58938  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58939  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58940  METHOD="well-known location"
58941
58942  # Let's start with an optimistic view of the world :-)
58943  FOUND_FREETYPE=yes
58944
58945  # First look for the canonical freetype main include file ft2build.h.
58946  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58947    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58948    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58949    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58950      # Fail.
58951      FOUND_FREETYPE=no
58952    fi
58953  fi
58954
58955  if test "x$FOUND_FREETYPE" = xyes; then
58956    # Include file found, let's continue the sanity check.
58957    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58958$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58959
58960    # Reset to default value
58961    FREETYPE_BASE_NAME=freetype
58962    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58963    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58964      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58965          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58966        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58967        # for the .6 version explicitly.
58968        FREETYPE_BASE_NAME=freetype.6
58969        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58970        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58971$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58972      else
58973        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58974$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58975        FOUND_FREETYPE=no
58976      fi
58977    else
58978      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58979        # On Windows, we will need both .lib and .dll file.
58980        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58981          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58982$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58983          FOUND_FREETYPE=no
58984        fi
58985      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58986          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58987        # Found lib in isa dir, use that instead.
58988        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58989        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58990$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58991      fi
58992    fi
58993  fi
58994
58995  if test "x$FOUND_FREETYPE" = xyes; then
58996
58997  # Only process if variable expands to non-empty
58998
58999  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59000    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59001
59002  # Input might be given as Windows format, start by converting to
59003  # unix format.
59004  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59005  new_path=`$CYGPATH -u "$path"`
59006
59007  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59008  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59009  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59010  # "foo.exe" is OK but "foo" is an error.
59011  #
59012  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59013  # It is also a way to make sure we got the proper file name for the real test later on.
59014  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59015  if test "x$test_shortpath" = x; then
59016    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59017$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59018    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59019  fi
59020
59021  # Call helper function which possibly converts this using DOS-style short mode.
59022  # If so, the updated path is stored in $new_path.
59023
59024  input_path="$new_path"
59025  # Check if we need to convert this using DOS-style short mode. If the path
59026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59027  # take no chances and rewrite it.
59028  # Note: m4 eats our [], so we need to use [ and ] instead.
59029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59030  if test "x$has_forbidden_chars" != x; then
59031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59032    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59033    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59034    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59035      # Going to short mode and back again did indeed matter. Since short mode is
59036      # case insensitive, let's make it lowercase to improve readability.
59037      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59038      # Now convert it back to Unix-style (cygpath)
59039      input_path=`$CYGPATH -u "$shortmode_path"`
59040      new_path="$input_path"
59041    fi
59042  fi
59043
59044  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59045  if test "x$test_cygdrive_prefix" = x; then
59046    # As a simple fix, exclude /usr/bin since it's not a real path.
59047    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59048      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59049      # a path prefixed by /cygdrive for fixpath to work.
59050      new_path="$CYGWIN_ROOT_PATH$input_path"
59051    fi
59052  fi
59053
59054
59055  if test "x$path" != "x$new_path"; then
59056    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59058$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59059  fi
59060
59061    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59062
59063  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59064  has_colon=`$ECHO $path | $GREP ^.:`
59065  new_path="$path"
59066  if test "x$has_colon" = x; then
59067    # Not in mixed or Windows style, start by that.
59068    new_path=`cmd //c echo $path`
59069  fi
59070
59071
59072  input_path="$new_path"
59073  # Check if we need to convert this using DOS-style short mode. If the path
59074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59075  # take no chances and rewrite it.
59076  # Note: m4 eats our [], so we need to use [ and ] instead.
59077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59078  if test "x$has_forbidden_chars" != x; then
59079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59080    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59081  fi
59082
59083
59084  windows_path="$new_path"
59085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59086    unix_path=`$CYGPATH -u "$windows_path"`
59087    new_path="$unix_path"
59088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59090    new_path="$unix_path"
59091  fi
59092
59093  if test "x$path" != "x$new_path"; then
59094    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59096$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59097  fi
59098
59099  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59100  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59101
59102    else
59103      # We're on a unix platform. Hooray! :)
59104      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59105      has_space=`$ECHO "$path" | $GREP " "`
59106      if test "x$has_space" != x; then
59107        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59108$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59109        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59110      fi
59111
59112      # Use eval to expand a potential ~
59113      eval path="$path"
59114      if test ! -f "$path" && test ! -d "$path"; then
59115        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59116      fi
59117
59118      if test -d "$path"; then
59119        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59120      else
59121        dir="`$DIRNAME "$path"`"
59122        base="`$BASENAME "$path"`"
59123        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59124      fi
59125    fi
59126  fi
59127
59128
59129  # Only process if variable expands to non-empty
59130
59131  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59132    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59133
59134  # Input might be given as Windows format, start by converting to
59135  # unix format.
59136  path="$POTENTIAL_FREETYPE_LIB_PATH"
59137  new_path=`$CYGPATH -u "$path"`
59138
59139  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59140  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59141  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59142  # "foo.exe" is OK but "foo" is an error.
59143  #
59144  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59145  # It is also a way to make sure we got the proper file name for the real test later on.
59146  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59147  if test "x$test_shortpath" = x; then
59148    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59149$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59150    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59151  fi
59152
59153  # Call helper function which possibly converts this using DOS-style short mode.
59154  # If so, the updated path is stored in $new_path.
59155
59156  input_path="$new_path"
59157  # Check if we need to convert this using DOS-style short mode. If the path
59158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59159  # take no chances and rewrite it.
59160  # Note: m4 eats our [], so we need to use [ and ] instead.
59161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59162  if test "x$has_forbidden_chars" != x; then
59163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59164    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59165    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59166    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59167      # Going to short mode and back again did indeed matter. Since short mode is
59168      # case insensitive, let's make it lowercase to improve readability.
59169      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59170      # Now convert it back to Unix-style (cygpath)
59171      input_path=`$CYGPATH -u "$shortmode_path"`
59172      new_path="$input_path"
59173    fi
59174  fi
59175
59176  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59177  if test "x$test_cygdrive_prefix" = x; then
59178    # As a simple fix, exclude /usr/bin since it's not a real path.
59179    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59180      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59181      # a path prefixed by /cygdrive for fixpath to work.
59182      new_path="$CYGWIN_ROOT_PATH$input_path"
59183    fi
59184  fi
59185
59186
59187  if test "x$path" != "x$new_path"; then
59188    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59190$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59191  fi
59192
59193    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59194
59195  path="$POTENTIAL_FREETYPE_LIB_PATH"
59196  has_colon=`$ECHO $path | $GREP ^.:`
59197  new_path="$path"
59198  if test "x$has_colon" = x; then
59199    # Not in mixed or Windows style, start by that.
59200    new_path=`cmd //c echo $path`
59201  fi
59202
59203
59204  input_path="$new_path"
59205  # Check if we need to convert this using DOS-style short mode. If the path
59206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59207  # take no chances and rewrite it.
59208  # Note: m4 eats our [], so we need to use [ and ] instead.
59209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59210  if test "x$has_forbidden_chars" != x; then
59211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59212    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59213  fi
59214
59215
59216  windows_path="$new_path"
59217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59218    unix_path=`$CYGPATH -u "$windows_path"`
59219    new_path="$unix_path"
59220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59222    new_path="$unix_path"
59223  fi
59224
59225  if test "x$path" != "x$new_path"; then
59226    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59228$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59229  fi
59230
59231  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59232  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59233
59234    else
59235      # We're on a unix platform. Hooray! :)
59236      path="$POTENTIAL_FREETYPE_LIB_PATH"
59237      has_space=`$ECHO "$path" | $GREP " "`
59238      if test "x$has_space" != x; then
59239        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59240$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59241        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59242      fi
59243
59244      # Use eval to expand a potential ~
59245      eval path="$path"
59246      if test ! -f "$path" && test ! -d "$path"; then
59247        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59248      fi
59249
59250      if test -d "$path"; then
59251        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59252      else
59253        dir="`$DIRNAME "$path"`"
59254        base="`$BASENAME "$path"`"
59255        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59256      fi
59257    fi
59258  fi
59259
59260
59261    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59262    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59263$as_echo_n "checking for freetype includes... " >&6; }
59264    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59265$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59266    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59267    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59268$as_echo_n "checking for freetype libraries... " >&6; }
59269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59270$as_echo "$FREETYPE_LIB_PATH" >&6; }
59271  fi
59272
59273            fi
59274            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59275                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59276              # Source is available, as a last resort try to build freetype in default location
59277
59278  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59279  BUILD_FREETYPE=yes
59280
59281  # Check if the freetype sources are acessible..
59282  if ! test -d $FREETYPE_SRC_PATH; then
59283    { $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
59284$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59285    BUILD_FREETYPE=no
59286  fi
59287  # ..and contain a vc2010 project file
59288  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59289  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59290    { $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
59291$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59292    BUILD_FREETYPE=no
59293  fi
59294  # Now check if configure found a version of 'msbuild.exe'
59295  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59296    { $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
59297$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;}
59298    BUILD_FREETYPE=no
59299  fi
59300
59301  # Ready to go..
59302  if test "x$BUILD_FREETYPE" = xyes; then
59303    # msbuild requires trailing slashes for output directories
59304    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59305    freetype_lib_path_unix="$freetype_lib_path"
59306    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59307
59308  unix_path="$vcxproj_path"
59309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59310    windows_path=`$CYGPATH -m "$unix_path"`
59311    vcxproj_path="$windows_path"
59312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59313    windows_path=`cmd //c echo $unix_path`
59314    vcxproj_path="$windows_path"
59315  fi
59316
59317
59318  unix_path="$freetype_lib_path"
59319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59320    windows_path=`$CYGPATH -m "$unix_path"`
59321    freetype_lib_path="$windows_path"
59322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59323    windows_path=`cmd //c echo $unix_path`
59324    freetype_lib_path="$windows_path"
59325  fi
59326
59327
59328  unix_path="$freetype_obj_path"
59329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59330    windows_path=`$CYGPATH -m "$unix_path"`
59331    freetype_obj_path="$windows_path"
59332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59333    windows_path=`cmd //c echo $unix_path`
59334    freetype_obj_path="$windows_path"
59335  fi
59336
59337    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59338      freetype_platform=x64
59339    else
59340      freetype_platform=win32
59341    fi
59342
59343    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59344    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59345    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59346    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59347    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59348$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59349
59350    # First we try to build the freetype.dll
59351    $ECHO -e "@echo off\n"\
59352        "$MSBUILD $vcxproj_path "\
59353        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59354        "/p:Configuration=\"Release Multithreaded\" "\
59355        "/p:Platform=$freetype_platform "\
59356        "/p:ConfigurationType=DynamicLibrary "\
59357        "/p:TargetName=freetype "\
59358        "/p:OutDir=\"$freetype_lib_path\" "\
59359        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59360    cmd /c freetype.bat
59361
59362    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59363      # If that succeeds we also build freetype.lib
59364      $ECHO -e "@echo off\n"\
59365          "$MSBUILD $vcxproj_path "\
59366          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59367          "/p:Configuration=\"Release Multithreaded\" "\
59368          "/p:Platform=$freetype_platform "\
59369          "/p:ConfigurationType=StaticLibrary "\
59370          "/p:TargetName=freetype "\
59371          "/p:OutDir=\"$freetype_lib_path\" "\
59372          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59373      cmd /c freetype.bat
59374
59375      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59376        # Once we build both, lib and dll, set freetype lib and include path appropriately
59377        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59378        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59379        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59380$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59381      else
59382        BUILD_FREETYPE=no
59383      fi
59384    else
59385      BUILD_FREETYPE=no
59386    fi
59387  fi
59388
59389              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59390
59391  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59392  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59393  METHOD="well-known location"
59394
59395  # Let's start with an optimistic view of the world :-)
59396  FOUND_FREETYPE=yes
59397
59398  # First look for the canonical freetype main include file ft2build.h.
59399  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59400    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59401    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59402    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59403      # Fail.
59404      FOUND_FREETYPE=no
59405    fi
59406  fi
59407
59408  if test "x$FOUND_FREETYPE" = xyes; then
59409    # Include file found, let's continue the sanity check.
59410    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59411$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59412
59413    # Reset to default value
59414    FREETYPE_BASE_NAME=freetype
59415    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59416    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59417      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59418          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59419        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59420        # for the .6 version explicitly.
59421        FREETYPE_BASE_NAME=freetype.6
59422        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59423        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59424$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59425      else
59426        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59427$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59428        FOUND_FREETYPE=no
59429      fi
59430    else
59431      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59432        # On Windows, we will need both .lib and .dll file.
59433        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59434          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59435$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59436          FOUND_FREETYPE=no
59437        fi
59438      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59439          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59440        # Found lib in isa dir, use that instead.
59441        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59442        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59443$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59444      fi
59445    fi
59446  fi
59447
59448  if test "x$FOUND_FREETYPE" = xyes; then
59449
59450  # Only process if variable expands to non-empty
59451
59452  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59453    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59454
59455  # Input might be given as Windows format, start by converting to
59456  # unix format.
59457  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59458  new_path=`$CYGPATH -u "$path"`
59459
59460  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59461  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59462  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59463  # "foo.exe" is OK but "foo" is an error.
59464  #
59465  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59466  # It is also a way to make sure we got the proper file name for the real test later on.
59467  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59468  if test "x$test_shortpath" = x; then
59469    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59470$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59471    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59472  fi
59473
59474  # Call helper function which possibly converts this using DOS-style short mode.
59475  # If so, the updated path is stored in $new_path.
59476
59477  input_path="$new_path"
59478  # Check if we need to convert this using DOS-style short mode. If the path
59479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59480  # take no chances and rewrite it.
59481  # Note: m4 eats our [], so we need to use [ and ] instead.
59482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59483  if test "x$has_forbidden_chars" != x; then
59484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59485    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59486    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59487    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59488      # Going to short mode and back again did indeed matter. Since short mode is
59489      # case insensitive, let's make it lowercase to improve readability.
59490      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59491      # Now convert it back to Unix-style (cygpath)
59492      input_path=`$CYGPATH -u "$shortmode_path"`
59493      new_path="$input_path"
59494    fi
59495  fi
59496
59497  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59498  if test "x$test_cygdrive_prefix" = x; then
59499    # As a simple fix, exclude /usr/bin since it's not a real path.
59500    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59501      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59502      # a path prefixed by /cygdrive for fixpath to work.
59503      new_path="$CYGWIN_ROOT_PATH$input_path"
59504    fi
59505  fi
59506
59507
59508  if test "x$path" != "x$new_path"; then
59509    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59511$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59512  fi
59513
59514    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59515
59516  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59517  has_colon=`$ECHO $path | $GREP ^.:`
59518  new_path="$path"
59519  if test "x$has_colon" = x; then
59520    # Not in mixed or Windows style, start by that.
59521    new_path=`cmd //c echo $path`
59522  fi
59523
59524
59525  input_path="$new_path"
59526  # Check if we need to convert this using DOS-style short mode. If the path
59527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59528  # take no chances and rewrite it.
59529  # Note: m4 eats our [], so we need to use [ and ] instead.
59530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59531  if test "x$has_forbidden_chars" != x; then
59532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59533    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59534  fi
59535
59536
59537  windows_path="$new_path"
59538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59539    unix_path=`$CYGPATH -u "$windows_path"`
59540    new_path="$unix_path"
59541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59543    new_path="$unix_path"
59544  fi
59545
59546  if test "x$path" != "x$new_path"; then
59547    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59549$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59550  fi
59551
59552  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59553  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59554
59555    else
59556      # We're on a unix platform. Hooray! :)
59557      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59558      has_space=`$ECHO "$path" | $GREP " "`
59559      if test "x$has_space" != x; then
59560        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59561$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59562        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59563      fi
59564
59565      # Use eval to expand a potential ~
59566      eval path="$path"
59567      if test ! -f "$path" && test ! -d "$path"; then
59568        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59569      fi
59570
59571      if test -d "$path"; then
59572        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59573      else
59574        dir="`$DIRNAME "$path"`"
59575        base="`$BASENAME "$path"`"
59576        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59577      fi
59578    fi
59579  fi
59580
59581
59582  # Only process if variable expands to non-empty
59583
59584  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59585    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59586
59587  # Input might be given as Windows format, start by converting to
59588  # unix format.
59589  path="$POTENTIAL_FREETYPE_LIB_PATH"
59590  new_path=`$CYGPATH -u "$path"`
59591
59592  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59593  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59594  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59595  # "foo.exe" is OK but "foo" is an error.
59596  #
59597  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59598  # It is also a way to make sure we got the proper file name for the real test later on.
59599  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59600  if test "x$test_shortpath" = x; then
59601    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59602$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59603    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59604  fi
59605
59606  # Call helper function which possibly converts this using DOS-style short mode.
59607  # If so, the updated path is stored in $new_path.
59608
59609  input_path="$new_path"
59610  # Check if we need to convert this using DOS-style short mode. If the path
59611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59612  # take no chances and rewrite it.
59613  # Note: m4 eats our [], so we need to use [ and ] instead.
59614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59615  if test "x$has_forbidden_chars" != x; then
59616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59617    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59618    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59619    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59620      # Going to short mode and back again did indeed matter. Since short mode is
59621      # case insensitive, let's make it lowercase to improve readability.
59622      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59623      # Now convert it back to Unix-style (cygpath)
59624      input_path=`$CYGPATH -u "$shortmode_path"`
59625      new_path="$input_path"
59626    fi
59627  fi
59628
59629  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59630  if test "x$test_cygdrive_prefix" = x; then
59631    # As a simple fix, exclude /usr/bin since it's not a real path.
59632    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59633      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59634      # a path prefixed by /cygdrive for fixpath to work.
59635      new_path="$CYGWIN_ROOT_PATH$input_path"
59636    fi
59637  fi
59638
59639
59640  if test "x$path" != "x$new_path"; then
59641    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59643$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59644  fi
59645
59646    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59647
59648  path="$POTENTIAL_FREETYPE_LIB_PATH"
59649  has_colon=`$ECHO $path | $GREP ^.:`
59650  new_path="$path"
59651  if test "x$has_colon" = x; then
59652    # Not in mixed or Windows style, start by that.
59653    new_path=`cmd //c echo $path`
59654  fi
59655
59656
59657  input_path="$new_path"
59658  # Check if we need to convert this using DOS-style short mode. If the path
59659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59660  # take no chances and rewrite it.
59661  # Note: m4 eats our [], so we need to use [ and ] instead.
59662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59663  if test "x$has_forbidden_chars" != x; then
59664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59665    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59666  fi
59667
59668
59669  windows_path="$new_path"
59670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59671    unix_path=`$CYGPATH -u "$windows_path"`
59672    new_path="$unix_path"
59673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59675    new_path="$unix_path"
59676  fi
59677
59678  if test "x$path" != "x$new_path"; then
59679    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59681$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59682  fi
59683
59684  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59685  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59686
59687    else
59688      # We're on a unix platform. Hooray! :)
59689      path="$POTENTIAL_FREETYPE_LIB_PATH"
59690      has_space=`$ECHO "$path" | $GREP " "`
59691      if test "x$has_space" != x; then
59692        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59693$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59694        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59695      fi
59696
59697      # Use eval to expand a potential ~
59698      eval path="$path"
59699      if test ! -f "$path" && test ! -d "$path"; then
59700        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59701      fi
59702
59703      if test -d "$path"; then
59704        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59705      else
59706        dir="`$DIRNAME "$path"`"
59707        base="`$BASENAME "$path"`"
59708        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59709      fi
59710    fi
59711  fi
59712
59713
59714    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59715    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59716$as_echo_n "checking for freetype includes... " >&6; }
59717    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59718$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59719    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59720    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59721$as_echo_n "checking for freetype libraries... " >&6; }
59722    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59723$as_echo "$FREETYPE_LIB_PATH" >&6; }
59724  fi
59725
59726              else
59727
59728  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59729  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59730  METHOD="well-known location"
59731
59732  # Let's start with an optimistic view of the world :-)
59733  FOUND_FREETYPE=yes
59734
59735  # First look for the canonical freetype main include file ft2build.h.
59736  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59737    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59738    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59739    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59740      # Fail.
59741      FOUND_FREETYPE=no
59742    fi
59743  fi
59744
59745  if test "x$FOUND_FREETYPE" = xyes; then
59746    # Include file found, let's continue the sanity check.
59747    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59748$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59749
59750    # Reset to default value
59751    FREETYPE_BASE_NAME=freetype
59752    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59753    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59754      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59755          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59756        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59757        # for the .6 version explicitly.
59758        FREETYPE_BASE_NAME=freetype.6
59759        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59760        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59761$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59762      else
59763        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59764$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59765        FOUND_FREETYPE=no
59766      fi
59767    else
59768      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59769        # On Windows, we will need both .lib and .dll file.
59770        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59771          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59772$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59773          FOUND_FREETYPE=no
59774        fi
59775      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59776          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59777        # Found lib in isa dir, use that instead.
59778        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59779        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59780$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59781      fi
59782    fi
59783  fi
59784
59785  if test "x$FOUND_FREETYPE" = xyes; then
59786
59787  # Only process if variable expands to non-empty
59788
59789  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59790    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59791
59792  # Input might be given as Windows format, start by converting to
59793  # unix format.
59794  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59795  new_path=`$CYGPATH -u "$path"`
59796
59797  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59798  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59799  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59800  # "foo.exe" is OK but "foo" is an error.
59801  #
59802  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59803  # It is also a way to make sure we got the proper file name for the real test later on.
59804  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59805  if test "x$test_shortpath" = x; then
59806    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59807$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59808    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59809  fi
59810
59811  # Call helper function which possibly converts this using DOS-style short mode.
59812  # If so, the updated path is stored in $new_path.
59813
59814  input_path="$new_path"
59815  # Check if we need to convert this using DOS-style short mode. If the path
59816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59817  # take no chances and rewrite it.
59818  # Note: m4 eats our [], so we need to use [ and ] instead.
59819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59820  if test "x$has_forbidden_chars" != x; then
59821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59822    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59823    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59824    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59825      # Going to short mode and back again did indeed matter. Since short mode is
59826      # case insensitive, let's make it lowercase to improve readability.
59827      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59828      # Now convert it back to Unix-style (cygpath)
59829      input_path=`$CYGPATH -u "$shortmode_path"`
59830      new_path="$input_path"
59831    fi
59832  fi
59833
59834  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59835  if test "x$test_cygdrive_prefix" = x; then
59836    # As a simple fix, exclude /usr/bin since it's not a real path.
59837    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59838      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59839      # a path prefixed by /cygdrive for fixpath to work.
59840      new_path="$CYGWIN_ROOT_PATH$input_path"
59841    fi
59842  fi
59843
59844
59845  if test "x$path" != "x$new_path"; then
59846    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59848$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59849  fi
59850
59851    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59852
59853  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59854  has_colon=`$ECHO $path | $GREP ^.:`
59855  new_path="$path"
59856  if test "x$has_colon" = x; then
59857    # Not in mixed or Windows style, start by that.
59858    new_path=`cmd //c echo $path`
59859  fi
59860
59861
59862  input_path="$new_path"
59863  # Check if we need to convert this using DOS-style short mode. If the path
59864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59865  # take no chances and rewrite it.
59866  # Note: m4 eats our [], so we need to use [ and ] instead.
59867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59868  if test "x$has_forbidden_chars" != x; then
59869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59870    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59871  fi
59872
59873
59874  windows_path="$new_path"
59875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59876    unix_path=`$CYGPATH -u "$windows_path"`
59877    new_path="$unix_path"
59878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59880    new_path="$unix_path"
59881  fi
59882
59883  if test "x$path" != "x$new_path"; then
59884    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59886$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59887  fi
59888
59889  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59890  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59891
59892    else
59893      # We're on a unix platform. Hooray! :)
59894      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59895      has_space=`$ECHO "$path" | $GREP " "`
59896      if test "x$has_space" != x; then
59897        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59898$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59899        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59900      fi
59901
59902      # Use eval to expand a potential ~
59903      eval path="$path"
59904      if test ! -f "$path" && test ! -d "$path"; then
59905        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59906      fi
59907
59908      if test -d "$path"; then
59909        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59910      else
59911        dir="`$DIRNAME "$path"`"
59912        base="`$BASENAME "$path"`"
59913        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59914      fi
59915    fi
59916  fi
59917
59918
59919  # Only process if variable expands to non-empty
59920
59921  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59922    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59923
59924  # Input might be given as Windows format, start by converting to
59925  # unix format.
59926  path="$POTENTIAL_FREETYPE_LIB_PATH"
59927  new_path=`$CYGPATH -u "$path"`
59928
59929  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59930  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59931  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59932  # "foo.exe" is OK but "foo" is an error.
59933  #
59934  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59935  # It is also a way to make sure we got the proper file name for the real test later on.
59936  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59937  if test "x$test_shortpath" = x; then
59938    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59939$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59940    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59941  fi
59942
59943  # Call helper function which possibly converts this using DOS-style short mode.
59944  # If so, the updated path is stored in $new_path.
59945
59946  input_path="$new_path"
59947  # Check if we need to convert this using DOS-style short mode. If the path
59948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59949  # take no chances and rewrite it.
59950  # Note: m4 eats our [], so we need to use [ and ] instead.
59951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59952  if test "x$has_forbidden_chars" != x; then
59953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59954    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59955    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59956    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59957      # Going to short mode and back again did indeed matter. Since short mode is
59958      # case insensitive, let's make it lowercase to improve readability.
59959      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59960      # Now convert it back to Unix-style (cygpath)
59961      input_path=`$CYGPATH -u "$shortmode_path"`
59962      new_path="$input_path"
59963    fi
59964  fi
59965
59966  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59967  if test "x$test_cygdrive_prefix" = x; then
59968    # As a simple fix, exclude /usr/bin since it's not a real path.
59969    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59970      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59971      # a path prefixed by /cygdrive for fixpath to work.
59972      new_path="$CYGWIN_ROOT_PATH$input_path"
59973    fi
59974  fi
59975
59976
59977  if test "x$path" != "x$new_path"; then
59978    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59980$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59981  fi
59982
59983    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59984
59985  path="$POTENTIAL_FREETYPE_LIB_PATH"
59986  has_colon=`$ECHO $path | $GREP ^.:`
59987  new_path="$path"
59988  if test "x$has_colon" = x; then
59989    # Not in mixed or Windows style, start by that.
59990    new_path=`cmd //c echo $path`
59991  fi
59992
59993
59994  input_path="$new_path"
59995  # Check if we need to convert this using DOS-style short mode. If the path
59996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59997  # take no chances and rewrite it.
59998  # Note: m4 eats our [], so we need to use [ and ] instead.
59999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60000  if test "x$has_forbidden_chars" != x; then
60001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60002    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60003  fi
60004
60005
60006  windows_path="$new_path"
60007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60008    unix_path=`$CYGPATH -u "$windows_path"`
60009    new_path="$unix_path"
60010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60012    new_path="$unix_path"
60013  fi
60014
60015  if test "x$path" != "x$new_path"; then
60016    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60017    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60018$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60019  fi
60020
60021  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60022  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60023
60024    else
60025      # We're on a unix platform. Hooray! :)
60026      path="$POTENTIAL_FREETYPE_LIB_PATH"
60027      has_space=`$ECHO "$path" | $GREP " "`
60028      if test "x$has_space" != x; then
60029        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60030$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60031        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60032      fi
60033
60034      # Use eval to expand a potential ~
60035      eval path="$path"
60036      if test ! -f "$path" && test ! -d "$path"; then
60037        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60038      fi
60039
60040      if test -d "$path"; then
60041        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60042      else
60043        dir="`$DIRNAME "$path"`"
60044        base="`$BASENAME "$path"`"
60045        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60046      fi
60047    fi
60048  fi
60049
60050
60051    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60052    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60053$as_echo_n "checking for freetype includes... " >&6; }
60054    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60055$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60056    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60057    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60058$as_echo_n "checking for freetype libraries... " >&6; }
60059    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60060$as_echo "$FREETYPE_LIB_PATH" >&6; }
60061  fi
60062
60063              fi
60064            fi
60065          fi
60066        else
60067          FREETYPE_BASE_DIR="$SYSROOT/usr"
60068
60069  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60070  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60071  METHOD="well-known location"
60072
60073  # Let's start with an optimistic view of the world :-)
60074  FOUND_FREETYPE=yes
60075
60076  # First look for the canonical freetype main include file ft2build.h.
60077  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60078    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60079    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60080    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60081      # Fail.
60082      FOUND_FREETYPE=no
60083    fi
60084  fi
60085
60086  if test "x$FOUND_FREETYPE" = xyes; then
60087    # Include file found, let's continue the sanity check.
60088    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60089$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60090
60091    # Reset to default value
60092    FREETYPE_BASE_NAME=freetype
60093    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60094    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60095      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60096          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60097        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60098        # for the .6 version explicitly.
60099        FREETYPE_BASE_NAME=freetype.6
60100        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60101        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60102$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60103      else
60104        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60105$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60106        FOUND_FREETYPE=no
60107      fi
60108    else
60109      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60110        # On Windows, we will need both .lib and .dll file.
60111        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60112          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60113$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60114          FOUND_FREETYPE=no
60115        fi
60116      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60117          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60118        # Found lib in isa dir, use that instead.
60119        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60120        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60121$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60122      fi
60123    fi
60124  fi
60125
60126  if test "x$FOUND_FREETYPE" = xyes; then
60127
60128  # Only process if variable expands to non-empty
60129
60130  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60131    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60132
60133  # Input might be given as Windows format, start by converting to
60134  # unix format.
60135  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60136  new_path=`$CYGPATH -u "$path"`
60137
60138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60141  # "foo.exe" is OK but "foo" is an error.
60142  #
60143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60144  # It is also a way to make sure we got the proper file name for the real test later on.
60145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60146  if test "x$test_shortpath" = x; then
60147    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60148$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60149    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60150  fi
60151
60152  # Call helper function which possibly converts this using DOS-style short mode.
60153  # If so, the updated path is stored in $new_path.
60154
60155  input_path="$new_path"
60156  # Check if we need to convert this using DOS-style short mode. If the path
60157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60158  # take no chances and rewrite it.
60159  # Note: m4 eats our [], so we need to use [ and ] instead.
60160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60161  if test "x$has_forbidden_chars" != x; then
60162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60166      # Going to short mode and back again did indeed matter. Since short mode is
60167      # case insensitive, let's make it lowercase to improve readability.
60168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60169      # Now convert it back to Unix-style (cygpath)
60170      input_path=`$CYGPATH -u "$shortmode_path"`
60171      new_path="$input_path"
60172    fi
60173  fi
60174
60175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60176  if test "x$test_cygdrive_prefix" = x; then
60177    # As a simple fix, exclude /usr/bin since it's not a real path.
60178    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60180      # a path prefixed by /cygdrive for fixpath to work.
60181      new_path="$CYGWIN_ROOT_PATH$input_path"
60182    fi
60183  fi
60184
60185
60186  if test "x$path" != "x$new_path"; then
60187    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60189$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60190  fi
60191
60192    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60193
60194  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60195  has_colon=`$ECHO $path | $GREP ^.:`
60196  new_path="$path"
60197  if test "x$has_colon" = x; then
60198    # Not in mixed or Windows style, start by that.
60199    new_path=`cmd //c echo $path`
60200  fi
60201
60202
60203  input_path="$new_path"
60204  # Check if we need to convert this using DOS-style short mode. If the path
60205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60206  # take no chances and rewrite it.
60207  # Note: m4 eats our [], so we need to use [ and ] instead.
60208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60209  if test "x$has_forbidden_chars" != x; then
60210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60212  fi
60213
60214
60215  windows_path="$new_path"
60216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60217    unix_path=`$CYGPATH -u "$windows_path"`
60218    new_path="$unix_path"
60219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60221    new_path="$unix_path"
60222  fi
60223
60224  if test "x$path" != "x$new_path"; then
60225    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60227$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60228  fi
60229
60230  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60231  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60232
60233    else
60234      # We're on a unix platform. Hooray! :)
60235      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60236      has_space=`$ECHO "$path" | $GREP " "`
60237      if test "x$has_space" != x; then
60238        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60239$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60240        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60241      fi
60242
60243      # Use eval to expand a potential ~
60244      eval path="$path"
60245      if test ! -f "$path" && test ! -d "$path"; then
60246        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60247      fi
60248
60249      if test -d "$path"; then
60250        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60251      else
60252        dir="`$DIRNAME "$path"`"
60253        base="`$BASENAME "$path"`"
60254        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60255      fi
60256    fi
60257  fi
60258
60259
60260  # Only process if variable expands to non-empty
60261
60262  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60263    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60264
60265  # Input might be given as Windows format, start by converting to
60266  # unix format.
60267  path="$POTENTIAL_FREETYPE_LIB_PATH"
60268  new_path=`$CYGPATH -u "$path"`
60269
60270  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60271  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60272  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60273  # "foo.exe" is OK but "foo" is an error.
60274  #
60275  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60276  # It is also a way to make sure we got the proper file name for the real test later on.
60277  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60278  if test "x$test_shortpath" = x; then
60279    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60280$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60281    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60282  fi
60283
60284  # Call helper function which possibly converts this using DOS-style short mode.
60285  # If so, the updated path is stored in $new_path.
60286
60287  input_path="$new_path"
60288  # Check if we need to convert this using DOS-style short mode. If the path
60289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60290  # take no chances and rewrite it.
60291  # Note: m4 eats our [], so we need to use [ and ] instead.
60292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60293  if test "x$has_forbidden_chars" != x; then
60294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60295    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60296    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60297    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60298      # Going to short mode and back again did indeed matter. Since short mode is
60299      # case insensitive, let's make it lowercase to improve readability.
60300      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60301      # Now convert it back to Unix-style (cygpath)
60302      input_path=`$CYGPATH -u "$shortmode_path"`
60303      new_path="$input_path"
60304    fi
60305  fi
60306
60307  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60308  if test "x$test_cygdrive_prefix" = x; then
60309    # As a simple fix, exclude /usr/bin since it's not a real path.
60310    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60311      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60312      # a path prefixed by /cygdrive for fixpath to work.
60313      new_path="$CYGWIN_ROOT_PATH$input_path"
60314    fi
60315  fi
60316
60317
60318  if test "x$path" != "x$new_path"; then
60319    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60321$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60322  fi
60323
60324    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60325
60326  path="$POTENTIAL_FREETYPE_LIB_PATH"
60327  has_colon=`$ECHO $path | $GREP ^.:`
60328  new_path="$path"
60329  if test "x$has_colon" = x; then
60330    # Not in mixed or Windows style, start by that.
60331    new_path=`cmd //c echo $path`
60332  fi
60333
60334
60335  input_path="$new_path"
60336  # Check if we need to convert this using DOS-style short mode. If the path
60337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60338  # take no chances and rewrite it.
60339  # Note: m4 eats our [], so we need to use [ and ] instead.
60340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60341  if test "x$has_forbidden_chars" != x; then
60342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60343    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60344  fi
60345
60346
60347  windows_path="$new_path"
60348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60349    unix_path=`$CYGPATH -u "$windows_path"`
60350    new_path="$unix_path"
60351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60353    new_path="$unix_path"
60354  fi
60355
60356  if test "x$path" != "x$new_path"; then
60357    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60359$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60360  fi
60361
60362  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60363  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60364
60365    else
60366      # We're on a unix platform. Hooray! :)
60367      path="$POTENTIAL_FREETYPE_LIB_PATH"
60368      has_space=`$ECHO "$path" | $GREP " "`
60369      if test "x$has_space" != x; then
60370        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60371$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60372        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60373      fi
60374
60375      # Use eval to expand a potential ~
60376      eval path="$path"
60377      if test ! -f "$path" && test ! -d "$path"; then
60378        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60379      fi
60380
60381      if test -d "$path"; then
60382        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60383      else
60384        dir="`$DIRNAME "$path"`"
60385        base="`$BASENAME "$path"`"
60386        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60387      fi
60388    fi
60389  fi
60390
60391
60392    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60393    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60394$as_echo_n "checking for freetype includes... " >&6; }
60395    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60396$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60397    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60398    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60399$as_echo_n "checking for freetype libraries... " >&6; }
60400    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60401$as_echo "$FREETYPE_LIB_PATH" >&6; }
60402  fi
60403
60404
60405          if test "x$FOUND_FREETYPE" != xyes; then
60406            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60407
60408  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60409  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60410  METHOD="well-known location"
60411
60412  # Let's start with an optimistic view of the world :-)
60413  FOUND_FREETYPE=yes
60414
60415  # First look for the canonical freetype main include file ft2build.h.
60416  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60417    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60418    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60419    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60420      # Fail.
60421      FOUND_FREETYPE=no
60422    fi
60423  fi
60424
60425  if test "x$FOUND_FREETYPE" = xyes; then
60426    # Include file found, let's continue the sanity check.
60427    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60428$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60429
60430    # Reset to default value
60431    FREETYPE_BASE_NAME=freetype
60432    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60433    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60434      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60435          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60436        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60437        # for the .6 version explicitly.
60438        FREETYPE_BASE_NAME=freetype.6
60439        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60440        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60441$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60442      else
60443        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60444$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60445        FOUND_FREETYPE=no
60446      fi
60447    else
60448      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60449        # On Windows, we will need both .lib and .dll file.
60450        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60451          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60452$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60453          FOUND_FREETYPE=no
60454        fi
60455      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60456          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60457        # Found lib in isa dir, use that instead.
60458        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60459        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60460$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60461      fi
60462    fi
60463  fi
60464
60465  if test "x$FOUND_FREETYPE" = xyes; then
60466
60467  # Only process if variable expands to non-empty
60468
60469  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60470    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60471
60472  # Input might be given as Windows format, start by converting to
60473  # unix format.
60474  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60475  new_path=`$CYGPATH -u "$path"`
60476
60477  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60478  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60479  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60480  # "foo.exe" is OK but "foo" is an error.
60481  #
60482  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60483  # It is also a way to make sure we got the proper file name for the real test later on.
60484  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60485  if test "x$test_shortpath" = x; then
60486    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60487$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60488    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60489  fi
60490
60491  # Call helper function which possibly converts this using DOS-style short mode.
60492  # If so, the updated path is stored in $new_path.
60493
60494  input_path="$new_path"
60495  # Check if we need to convert this using DOS-style short mode. If the path
60496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60497  # take no chances and rewrite it.
60498  # Note: m4 eats our [], so we need to use [ and ] instead.
60499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60500  if test "x$has_forbidden_chars" != x; then
60501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60502    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60503    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60504    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60505      # Going to short mode and back again did indeed matter. Since short mode is
60506      # case insensitive, let's make it lowercase to improve readability.
60507      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60508      # Now convert it back to Unix-style (cygpath)
60509      input_path=`$CYGPATH -u "$shortmode_path"`
60510      new_path="$input_path"
60511    fi
60512  fi
60513
60514  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60515  if test "x$test_cygdrive_prefix" = x; then
60516    # As a simple fix, exclude /usr/bin since it's not a real path.
60517    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60518      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60519      # a path prefixed by /cygdrive for fixpath to work.
60520      new_path="$CYGWIN_ROOT_PATH$input_path"
60521    fi
60522  fi
60523
60524
60525  if test "x$path" != "x$new_path"; then
60526    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60528$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60529  fi
60530
60531    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60532
60533  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60534  has_colon=`$ECHO $path | $GREP ^.:`
60535  new_path="$path"
60536  if test "x$has_colon" = x; then
60537    # Not in mixed or Windows style, start by that.
60538    new_path=`cmd //c echo $path`
60539  fi
60540
60541
60542  input_path="$new_path"
60543  # Check if we need to convert this using DOS-style short mode. If the path
60544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60545  # take no chances and rewrite it.
60546  # Note: m4 eats our [], so we need to use [ and ] instead.
60547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60548  if test "x$has_forbidden_chars" != x; then
60549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60550    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60551  fi
60552
60553
60554  windows_path="$new_path"
60555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60556    unix_path=`$CYGPATH -u "$windows_path"`
60557    new_path="$unix_path"
60558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60560    new_path="$unix_path"
60561  fi
60562
60563  if test "x$path" != "x$new_path"; then
60564    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60566$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60567  fi
60568
60569  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60570  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60571
60572    else
60573      # We're on a unix platform. Hooray! :)
60574      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60575      has_space=`$ECHO "$path" | $GREP " "`
60576      if test "x$has_space" != x; then
60577        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60578$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60579        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60580      fi
60581
60582      # Use eval to expand a potential ~
60583      eval path="$path"
60584      if test ! -f "$path" && test ! -d "$path"; then
60585        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60586      fi
60587
60588      if test -d "$path"; then
60589        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60590      else
60591        dir="`$DIRNAME "$path"`"
60592        base="`$BASENAME "$path"`"
60593        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60594      fi
60595    fi
60596  fi
60597
60598
60599  # Only process if variable expands to non-empty
60600
60601  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60602    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60603
60604  # Input might be given as Windows format, start by converting to
60605  # unix format.
60606  path="$POTENTIAL_FREETYPE_LIB_PATH"
60607  new_path=`$CYGPATH -u "$path"`
60608
60609  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60610  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60611  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60612  # "foo.exe" is OK but "foo" is an error.
60613  #
60614  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60615  # It is also a way to make sure we got the proper file name for the real test later on.
60616  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60617  if test "x$test_shortpath" = x; then
60618    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60619$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60620    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60621  fi
60622
60623  # Call helper function which possibly converts this using DOS-style short mode.
60624  # If so, the updated path is stored in $new_path.
60625
60626  input_path="$new_path"
60627  # Check if we need to convert this using DOS-style short mode. If the path
60628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60629  # take no chances and rewrite it.
60630  # Note: m4 eats our [], so we need to use [ and ] instead.
60631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60632  if test "x$has_forbidden_chars" != x; then
60633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60634    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60635    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60636    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60637      # Going to short mode and back again did indeed matter. Since short mode is
60638      # case insensitive, let's make it lowercase to improve readability.
60639      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60640      # Now convert it back to Unix-style (cygpath)
60641      input_path=`$CYGPATH -u "$shortmode_path"`
60642      new_path="$input_path"
60643    fi
60644  fi
60645
60646  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60647  if test "x$test_cygdrive_prefix" = x; then
60648    # As a simple fix, exclude /usr/bin since it's not a real path.
60649    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60650      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60651      # a path prefixed by /cygdrive for fixpath to work.
60652      new_path="$CYGWIN_ROOT_PATH$input_path"
60653    fi
60654  fi
60655
60656
60657  if test "x$path" != "x$new_path"; then
60658    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60659    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60660$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60661  fi
60662
60663    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60664
60665  path="$POTENTIAL_FREETYPE_LIB_PATH"
60666  has_colon=`$ECHO $path | $GREP ^.:`
60667  new_path="$path"
60668  if test "x$has_colon" = x; then
60669    # Not in mixed or Windows style, start by that.
60670    new_path=`cmd //c echo $path`
60671  fi
60672
60673
60674  input_path="$new_path"
60675  # Check if we need to convert this using DOS-style short mode. If the path
60676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60677  # take no chances and rewrite it.
60678  # Note: m4 eats our [], so we need to use [ and ] instead.
60679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60680  if test "x$has_forbidden_chars" != x; then
60681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60682    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60683  fi
60684
60685
60686  windows_path="$new_path"
60687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60688    unix_path=`$CYGPATH -u "$windows_path"`
60689    new_path="$unix_path"
60690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60692    new_path="$unix_path"
60693  fi
60694
60695  if test "x$path" != "x$new_path"; then
60696    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60698$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60699  fi
60700
60701  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60702  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60703
60704    else
60705      # We're on a unix platform. Hooray! :)
60706      path="$POTENTIAL_FREETYPE_LIB_PATH"
60707      has_space=`$ECHO "$path" | $GREP " "`
60708      if test "x$has_space" != x; then
60709        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60710$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60711        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60712      fi
60713
60714      # Use eval to expand a potential ~
60715      eval path="$path"
60716      if test ! -f "$path" && test ! -d "$path"; then
60717        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60718      fi
60719
60720      if test -d "$path"; then
60721        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60722      else
60723        dir="`$DIRNAME "$path"`"
60724        base="`$BASENAME "$path"`"
60725        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60726      fi
60727    fi
60728  fi
60729
60730
60731    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60732    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60733$as_echo_n "checking for freetype includes... " >&6; }
60734    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60735$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60736    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60737    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60738$as_echo_n "checking for freetype libraries... " >&6; }
60739    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60740$as_echo "$FREETYPE_LIB_PATH" >&6; }
60741  fi
60742
60743          fi
60744
60745          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60746            if test "x$FOUND_FREETYPE" != xyes; then
60747              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60748              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60749
60750  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60751  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60752  METHOD="well-known location"
60753
60754  # Let's start with an optimistic view of the world :-)
60755  FOUND_FREETYPE=yes
60756
60757  # First look for the canonical freetype main include file ft2build.h.
60758  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60759    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60760    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60761    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60762      # Fail.
60763      FOUND_FREETYPE=no
60764    fi
60765  fi
60766
60767  if test "x$FOUND_FREETYPE" = xyes; then
60768    # Include file found, let's continue the sanity check.
60769    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60770$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60771
60772    # Reset to default value
60773    FREETYPE_BASE_NAME=freetype
60774    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60775    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60776      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60777          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60778        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60779        # for the .6 version explicitly.
60780        FREETYPE_BASE_NAME=freetype.6
60781        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60782        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60783$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60784      else
60785        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60786$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60787        FOUND_FREETYPE=no
60788      fi
60789    else
60790      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60791        # On Windows, we will need both .lib and .dll file.
60792        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60793          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60794$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60795          FOUND_FREETYPE=no
60796        fi
60797      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60798          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60799        # Found lib in isa dir, use that instead.
60800        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60801        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60802$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60803      fi
60804    fi
60805  fi
60806
60807  if test "x$FOUND_FREETYPE" = xyes; then
60808
60809  # Only process if variable expands to non-empty
60810
60811  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60812    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60813
60814  # Input might be given as Windows format, start by converting to
60815  # unix format.
60816  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60817  new_path=`$CYGPATH -u "$path"`
60818
60819  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60820  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60821  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60822  # "foo.exe" is OK but "foo" is an error.
60823  #
60824  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60825  # It is also a way to make sure we got the proper file name for the real test later on.
60826  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60827  if test "x$test_shortpath" = x; then
60828    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60829$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60830    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60831  fi
60832
60833  # Call helper function which possibly converts this using DOS-style short mode.
60834  # If so, the updated path is stored in $new_path.
60835
60836  input_path="$new_path"
60837  # Check if we need to convert this using DOS-style short mode. If the path
60838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60839  # take no chances and rewrite it.
60840  # Note: m4 eats our [], so we need to use [ and ] instead.
60841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60842  if test "x$has_forbidden_chars" != x; then
60843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60844    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60845    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60846    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60847      # Going to short mode and back again did indeed matter. Since short mode is
60848      # case insensitive, let's make it lowercase to improve readability.
60849      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60850      # Now convert it back to Unix-style (cygpath)
60851      input_path=`$CYGPATH -u "$shortmode_path"`
60852      new_path="$input_path"
60853    fi
60854  fi
60855
60856  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60857  if test "x$test_cygdrive_prefix" = x; then
60858    # As a simple fix, exclude /usr/bin since it's not a real path.
60859    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60860      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60861      # a path prefixed by /cygdrive for fixpath to work.
60862      new_path="$CYGWIN_ROOT_PATH$input_path"
60863    fi
60864  fi
60865
60866
60867  if test "x$path" != "x$new_path"; then
60868    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60869    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60870$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60871  fi
60872
60873    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60874
60875  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60876  has_colon=`$ECHO $path | $GREP ^.:`
60877  new_path="$path"
60878  if test "x$has_colon" = x; then
60879    # Not in mixed or Windows style, start by that.
60880    new_path=`cmd //c echo $path`
60881  fi
60882
60883
60884  input_path="$new_path"
60885  # Check if we need to convert this using DOS-style short mode. If the path
60886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60887  # take no chances and rewrite it.
60888  # Note: m4 eats our [], so we need to use [ and ] instead.
60889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60890  if test "x$has_forbidden_chars" != x; then
60891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60892    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60893  fi
60894
60895
60896  windows_path="$new_path"
60897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60898    unix_path=`$CYGPATH -u "$windows_path"`
60899    new_path="$unix_path"
60900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60902    new_path="$unix_path"
60903  fi
60904
60905  if test "x$path" != "x$new_path"; then
60906    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60907    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60908$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60909  fi
60910
60911  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60912  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60913
60914    else
60915      # We're on a unix platform. Hooray! :)
60916      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60917      has_space=`$ECHO "$path" | $GREP " "`
60918      if test "x$has_space" != x; then
60919        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60920$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60921        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60922      fi
60923
60924      # Use eval to expand a potential ~
60925      eval path="$path"
60926      if test ! -f "$path" && test ! -d "$path"; then
60927        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60928      fi
60929
60930      if test -d "$path"; then
60931        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60932      else
60933        dir="`$DIRNAME "$path"`"
60934        base="`$BASENAME "$path"`"
60935        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60936      fi
60937    fi
60938  fi
60939
60940
60941  # Only process if variable expands to non-empty
60942
60943  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60944    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60945
60946  # Input might be given as Windows format, start by converting to
60947  # unix format.
60948  path="$POTENTIAL_FREETYPE_LIB_PATH"
60949  new_path=`$CYGPATH -u "$path"`
60950
60951  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60952  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60953  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60954  # "foo.exe" is OK but "foo" is an error.
60955  #
60956  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60957  # It is also a way to make sure we got the proper file name for the real test later on.
60958  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60959  if test "x$test_shortpath" = x; then
60960    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60961$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60962    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60963  fi
60964
60965  # Call helper function which possibly converts this using DOS-style short mode.
60966  # If so, the updated path is stored in $new_path.
60967
60968  input_path="$new_path"
60969  # Check if we need to convert this using DOS-style short mode. If the path
60970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60971  # take no chances and rewrite it.
60972  # Note: m4 eats our [], so we need to use [ and ] instead.
60973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60974  if test "x$has_forbidden_chars" != x; then
60975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60976    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60977    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60978    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60979      # Going to short mode and back again did indeed matter. Since short mode is
60980      # case insensitive, let's make it lowercase to improve readability.
60981      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60982      # Now convert it back to Unix-style (cygpath)
60983      input_path=`$CYGPATH -u "$shortmode_path"`
60984      new_path="$input_path"
60985    fi
60986  fi
60987
60988  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60989  if test "x$test_cygdrive_prefix" = x; then
60990    # As a simple fix, exclude /usr/bin since it's not a real path.
60991    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60992      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60993      # a path prefixed by /cygdrive for fixpath to work.
60994      new_path="$CYGWIN_ROOT_PATH$input_path"
60995    fi
60996  fi
60997
60998
60999  if test "x$path" != "x$new_path"; then
61000    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61002$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61003  fi
61004
61005    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61006
61007  path="$POTENTIAL_FREETYPE_LIB_PATH"
61008  has_colon=`$ECHO $path | $GREP ^.:`
61009  new_path="$path"
61010  if test "x$has_colon" = x; then
61011    # Not in mixed or Windows style, start by that.
61012    new_path=`cmd //c echo $path`
61013  fi
61014
61015
61016  input_path="$new_path"
61017  # Check if we need to convert this using DOS-style short mode. If the path
61018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61019  # take no chances and rewrite it.
61020  # Note: m4 eats our [], so we need to use [ and ] instead.
61021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61022  if test "x$has_forbidden_chars" != x; then
61023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61024    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61025  fi
61026
61027
61028  windows_path="$new_path"
61029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61030    unix_path=`$CYGPATH -u "$windows_path"`
61031    new_path="$unix_path"
61032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61034    new_path="$unix_path"
61035  fi
61036
61037  if test "x$path" != "x$new_path"; then
61038    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61040$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61041  fi
61042
61043  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61044  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61045
61046    else
61047      # We're on a unix platform. Hooray! :)
61048      path="$POTENTIAL_FREETYPE_LIB_PATH"
61049      has_space=`$ECHO "$path" | $GREP " "`
61050      if test "x$has_space" != x; then
61051        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61052$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61053        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61054      fi
61055
61056      # Use eval to expand a potential ~
61057      eval path="$path"
61058      if test ! -f "$path" && test ! -d "$path"; then
61059        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61060      fi
61061
61062      if test -d "$path"; then
61063        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61064      else
61065        dir="`$DIRNAME "$path"`"
61066        base="`$BASENAME "$path"`"
61067        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61068      fi
61069    fi
61070  fi
61071
61072
61073    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61074    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61075$as_echo_n "checking for freetype includes... " >&6; }
61076    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61077$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61078    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61079    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61080$as_echo_n "checking for freetype libraries... " >&6; }
61081    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61082$as_echo "$FREETYPE_LIB_PATH" >&6; }
61083  fi
61084
61085            fi
61086          fi
61087
61088          if test "x$FOUND_FREETYPE" != xyes; then
61089            FREETYPE_BASE_DIR="$SYSROOT/usr"
61090            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61091
61092  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61093  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61094  METHOD="well-known location"
61095
61096  # Let's start with an optimistic view of the world :-)
61097  FOUND_FREETYPE=yes
61098
61099  # First look for the canonical freetype main include file ft2build.h.
61100  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61101    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61102    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61103    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61104      # Fail.
61105      FOUND_FREETYPE=no
61106    fi
61107  fi
61108
61109  if test "x$FOUND_FREETYPE" = xyes; then
61110    # Include file found, let's continue the sanity check.
61111    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61112$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61113
61114    # Reset to default value
61115    FREETYPE_BASE_NAME=freetype
61116    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61117    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61118      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61119          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61120        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61121        # for the .6 version explicitly.
61122        FREETYPE_BASE_NAME=freetype.6
61123        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61124        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61125$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61126      else
61127        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61128$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61129        FOUND_FREETYPE=no
61130      fi
61131    else
61132      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61133        # On Windows, we will need both .lib and .dll file.
61134        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61135          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61136$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61137          FOUND_FREETYPE=no
61138        fi
61139      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61140          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61141        # Found lib in isa dir, use that instead.
61142        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61143        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61144$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61145      fi
61146    fi
61147  fi
61148
61149  if test "x$FOUND_FREETYPE" = xyes; then
61150
61151  # Only process if variable expands to non-empty
61152
61153  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61154    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61155
61156  # Input might be given as Windows format, start by converting to
61157  # unix format.
61158  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61159  new_path=`$CYGPATH -u "$path"`
61160
61161  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61162  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61163  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61164  # "foo.exe" is OK but "foo" is an error.
61165  #
61166  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61167  # It is also a way to make sure we got the proper file name for the real test later on.
61168  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61169  if test "x$test_shortpath" = x; then
61170    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61171$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61172    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61173  fi
61174
61175  # Call helper function which possibly converts this using DOS-style short mode.
61176  # If so, the updated path is stored in $new_path.
61177
61178  input_path="$new_path"
61179  # Check if we need to convert this using DOS-style short mode. If the path
61180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61181  # take no chances and rewrite it.
61182  # Note: m4 eats our [], so we need to use [ and ] instead.
61183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61184  if test "x$has_forbidden_chars" != x; then
61185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61186    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61187    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61188    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61189      # Going to short mode and back again did indeed matter. Since short mode is
61190      # case insensitive, let's make it lowercase to improve readability.
61191      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61192      # Now convert it back to Unix-style (cygpath)
61193      input_path=`$CYGPATH -u "$shortmode_path"`
61194      new_path="$input_path"
61195    fi
61196  fi
61197
61198  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61199  if test "x$test_cygdrive_prefix" = x; then
61200    # As a simple fix, exclude /usr/bin since it's not a real path.
61201    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61202      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61203      # a path prefixed by /cygdrive for fixpath to work.
61204      new_path="$CYGWIN_ROOT_PATH$input_path"
61205    fi
61206  fi
61207
61208
61209  if test "x$path" != "x$new_path"; then
61210    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61212$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61213  fi
61214
61215    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61216
61217  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61218  has_colon=`$ECHO $path | $GREP ^.:`
61219  new_path="$path"
61220  if test "x$has_colon" = x; then
61221    # Not in mixed or Windows style, start by that.
61222    new_path=`cmd //c echo $path`
61223  fi
61224
61225
61226  input_path="$new_path"
61227  # Check if we need to convert this using DOS-style short mode. If the path
61228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61229  # take no chances and rewrite it.
61230  # Note: m4 eats our [], so we need to use [ and ] instead.
61231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61232  if test "x$has_forbidden_chars" != x; then
61233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61235  fi
61236
61237
61238  windows_path="$new_path"
61239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61240    unix_path=`$CYGPATH -u "$windows_path"`
61241    new_path="$unix_path"
61242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61244    new_path="$unix_path"
61245  fi
61246
61247  if test "x$path" != "x$new_path"; then
61248    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61250$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61251  fi
61252
61253  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61254  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61255
61256    else
61257      # We're on a unix platform. Hooray! :)
61258      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61259      has_space=`$ECHO "$path" | $GREP " "`
61260      if test "x$has_space" != x; then
61261        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61262$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61263        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61264      fi
61265
61266      # Use eval to expand a potential ~
61267      eval path="$path"
61268      if test ! -f "$path" && test ! -d "$path"; then
61269        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61270      fi
61271
61272      if test -d "$path"; then
61273        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61274      else
61275        dir="`$DIRNAME "$path"`"
61276        base="`$BASENAME "$path"`"
61277        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61278      fi
61279    fi
61280  fi
61281
61282
61283  # Only process if variable expands to non-empty
61284
61285  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61286    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61287
61288  # Input might be given as Windows format, start by converting to
61289  # unix format.
61290  path="$POTENTIAL_FREETYPE_LIB_PATH"
61291  new_path=`$CYGPATH -u "$path"`
61292
61293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61296  # "foo.exe" is OK but "foo" is an error.
61297  #
61298  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61299  # It is also a way to make sure we got the proper file name for the real test later on.
61300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61301  if test "x$test_shortpath" = x; then
61302    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61303$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61304    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61305  fi
61306
61307  # Call helper function which possibly converts this using DOS-style short mode.
61308  # If so, the updated path is stored in $new_path.
61309
61310  input_path="$new_path"
61311  # Check if we need to convert this using DOS-style short mode. If the path
61312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61313  # take no chances and rewrite it.
61314  # Note: m4 eats our [], so we need to use [ and ] instead.
61315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61316  if test "x$has_forbidden_chars" != x; then
61317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61318    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61319    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61320    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61321      # Going to short mode and back again did indeed matter. Since short mode is
61322      # case insensitive, let's make it lowercase to improve readability.
61323      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61324      # Now convert it back to Unix-style (cygpath)
61325      input_path=`$CYGPATH -u "$shortmode_path"`
61326      new_path="$input_path"
61327    fi
61328  fi
61329
61330  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61331  if test "x$test_cygdrive_prefix" = x; then
61332    # As a simple fix, exclude /usr/bin since it's not a real path.
61333    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61334      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61335      # a path prefixed by /cygdrive for fixpath to work.
61336      new_path="$CYGWIN_ROOT_PATH$input_path"
61337    fi
61338  fi
61339
61340
61341  if test "x$path" != "x$new_path"; then
61342    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61344$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61345  fi
61346
61347    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61348
61349  path="$POTENTIAL_FREETYPE_LIB_PATH"
61350  has_colon=`$ECHO $path | $GREP ^.:`
61351  new_path="$path"
61352  if test "x$has_colon" = x; then
61353    # Not in mixed or Windows style, start by that.
61354    new_path=`cmd //c echo $path`
61355  fi
61356
61357
61358  input_path="$new_path"
61359  # Check if we need to convert this using DOS-style short mode. If the path
61360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61361  # take no chances and rewrite it.
61362  # Note: m4 eats our [], so we need to use [ and ] instead.
61363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61364  if test "x$has_forbidden_chars" != x; then
61365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61366    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61367  fi
61368
61369
61370  windows_path="$new_path"
61371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61372    unix_path=`$CYGPATH -u "$windows_path"`
61373    new_path="$unix_path"
61374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61376    new_path="$unix_path"
61377  fi
61378
61379  if test "x$path" != "x$new_path"; then
61380    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61381    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61382$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61383  fi
61384
61385  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61386  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61387
61388    else
61389      # We're on a unix platform. Hooray! :)
61390      path="$POTENTIAL_FREETYPE_LIB_PATH"
61391      has_space=`$ECHO "$path" | $GREP " "`
61392      if test "x$has_space" != x; then
61393        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61394$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61395        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61396      fi
61397
61398      # Use eval to expand a potential ~
61399      eval path="$path"
61400      if test ! -f "$path" && test ! -d "$path"; then
61401        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61402      fi
61403
61404      if test -d "$path"; then
61405        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61406      else
61407        dir="`$DIRNAME "$path"`"
61408        base="`$BASENAME "$path"`"
61409        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61410      fi
61411    fi
61412  fi
61413
61414
61415    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61416    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61417$as_echo_n "checking for freetype includes... " >&6; }
61418    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61419$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61420    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61421    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61422$as_echo_n "checking for freetype libraries... " >&6; }
61423    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61424$as_echo "$FREETYPE_LIB_PATH" >&6; }
61425  fi
61426
61427            else
61428
61429  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61430  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61431  METHOD="well-known location"
61432
61433  # Let's start with an optimistic view of the world :-)
61434  FOUND_FREETYPE=yes
61435
61436  # First look for the canonical freetype main include file ft2build.h.
61437  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61438    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61439    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61440    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61441      # Fail.
61442      FOUND_FREETYPE=no
61443    fi
61444  fi
61445
61446  if test "x$FOUND_FREETYPE" = xyes; then
61447    # Include file found, let's continue the sanity check.
61448    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61449$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61450
61451    # Reset to default value
61452    FREETYPE_BASE_NAME=freetype
61453    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61454    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61455      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61456          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61457        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61458        # for the .6 version explicitly.
61459        FREETYPE_BASE_NAME=freetype.6
61460        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61461        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61462$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61463      else
61464        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61465$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61466        FOUND_FREETYPE=no
61467      fi
61468    else
61469      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61470        # On Windows, we will need both .lib and .dll file.
61471        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61472          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61473$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61474          FOUND_FREETYPE=no
61475        fi
61476      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61477          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61478        # Found lib in isa dir, use that instead.
61479        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61480        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61481$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61482      fi
61483    fi
61484  fi
61485
61486  if test "x$FOUND_FREETYPE" = xyes; then
61487
61488  # Only process if variable expands to non-empty
61489
61490  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61491    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61492
61493  # Input might be given as Windows format, start by converting to
61494  # unix format.
61495  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61496  new_path=`$CYGPATH -u "$path"`
61497
61498  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61499  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61500  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61501  # "foo.exe" is OK but "foo" is an error.
61502  #
61503  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61504  # It is also a way to make sure we got the proper file name for the real test later on.
61505  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61506  if test "x$test_shortpath" = x; then
61507    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61508$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61509    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61510  fi
61511
61512  # Call helper function which possibly converts this using DOS-style short mode.
61513  # If so, the updated path is stored in $new_path.
61514
61515  input_path="$new_path"
61516  # Check if we need to convert this using DOS-style short mode. If the path
61517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61518  # take no chances and rewrite it.
61519  # Note: m4 eats our [], so we need to use [ and ] instead.
61520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61521  if test "x$has_forbidden_chars" != x; then
61522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61523    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61524    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61525    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61526      # Going to short mode and back again did indeed matter. Since short mode is
61527      # case insensitive, let's make it lowercase to improve readability.
61528      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61529      # Now convert it back to Unix-style (cygpath)
61530      input_path=`$CYGPATH -u "$shortmode_path"`
61531      new_path="$input_path"
61532    fi
61533  fi
61534
61535  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61536  if test "x$test_cygdrive_prefix" = x; then
61537    # As a simple fix, exclude /usr/bin since it's not a real path.
61538    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61539      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61540      # a path prefixed by /cygdrive for fixpath to work.
61541      new_path="$CYGWIN_ROOT_PATH$input_path"
61542    fi
61543  fi
61544
61545
61546  if test "x$path" != "x$new_path"; then
61547    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61549$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61550  fi
61551
61552    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61553
61554  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61555  has_colon=`$ECHO $path | $GREP ^.:`
61556  new_path="$path"
61557  if test "x$has_colon" = x; then
61558    # Not in mixed or Windows style, start by that.
61559    new_path=`cmd //c echo $path`
61560  fi
61561
61562
61563  input_path="$new_path"
61564  # Check if we need to convert this using DOS-style short mode. If the path
61565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61566  # take no chances and rewrite it.
61567  # Note: m4 eats our [], so we need to use [ and ] instead.
61568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61569  if test "x$has_forbidden_chars" != x; then
61570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61571    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61572  fi
61573
61574
61575  windows_path="$new_path"
61576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61577    unix_path=`$CYGPATH -u "$windows_path"`
61578    new_path="$unix_path"
61579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61581    new_path="$unix_path"
61582  fi
61583
61584  if test "x$path" != "x$new_path"; then
61585    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61587$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61588  fi
61589
61590  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61591  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61592
61593    else
61594      # We're on a unix platform. Hooray! :)
61595      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61596      has_space=`$ECHO "$path" | $GREP " "`
61597      if test "x$has_space" != x; then
61598        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61599$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61600        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61601      fi
61602
61603      # Use eval to expand a potential ~
61604      eval path="$path"
61605      if test ! -f "$path" && test ! -d "$path"; then
61606        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61607      fi
61608
61609      if test -d "$path"; then
61610        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61611      else
61612        dir="`$DIRNAME "$path"`"
61613        base="`$BASENAME "$path"`"
61614        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61615      fi
61616    fi
61617  fi
61618
61619
61620  # Only process if variable expands to non-empty
61621
61622  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61623    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61624
61625  # Input might be given as Windows format, start by converting to
61626  # unix format.
61627  path="$POTENTIAL_FREETYPE_LIB_PATH"
61628  new_path=`$CYGPATH -u "$path"`
61629
61630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61633  # "foo.exe" is OK but "foo" is an error.
61634  #
61635  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61636  # It is also a way to make sure we got the proper file name for the real test later on.
61637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61638  if test "x$test_shortpath" = x; then
61639    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61640$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61641    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61642  fi
61643
61644  # Call helper function which possibly converts this using DOS-style short mode.
61645  # If so, the updated path is stored in $new_path.
61646
61647  input_path="$new_path"
61648  # Check if we need to convert this using DOS-style short mode. If the path
61649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61650  # take no chances and rewrite it.
61651  # Note: m4 eats our [], so we need to use [ and ] instead.
61652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61653  if test "x$has_forbidden_chars" != x; then
61654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61655    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61656    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61657    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61658      # Going to short mode and back again did indeed matter. Since short mode is
61659      # case insensitive, let's make it lowercase to improve readability.
61660      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61661      # Now convert it back to Unix-style (cygpath)
61662      input_path=`$CYGPATH -u "$shortmode_path"`
61663      new_path="$input_path"
61664    fi
61665  fi
61666
61667  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61668  if test "x$test_cygdrive_prefix" = x; then
61669    # As a simple fix, exclude /usr/bin since it's not a real path.
61670    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61671      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61672      # a path prefixed by /cygdrive for fixpath to work.
61673      new_path="$CYGWIN_ROOT_PATH$input_path"
61674    fi
61675  fi
61676
61677
61678  if test "x$path" != "x$new_path"; then
61679    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61681$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61682  fi
61683
61684    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61685
61686  path="$POTENTIAL_FREETYPE_LIB_PATH"
61687  has_colon=`$ECHO $path | $GREP ^.:`
61688  new_path="$path"
61689  if test "x$has_colon" = x; then
61690    # Not in mixed or Windows style, start by that.
61691    new_path=`cmd //c echo $path`
61692  fi
61693
61694
61695  input_path="$new_path"
61696  # Check if we need to convert this using DOS-style short mode. If the path
61697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61698  # take no chances and rewrite it.
61699  # Note: m4 eats our [], so we need to use [ and ] instead.
61700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61701  if test "x$has_forbidden_chars" != x; then
61702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61704  fi
61705
61706
61707  windows_path="$new_path"
61708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61709    unix_path=`$CYGPATH -u "$windows_path"`
61710    new_path="$unix_path"
61711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61713    new_path="$unix_path"
61714  fi
61715
61716  if test "x$path" != "x$new_path"; then
61717    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61719$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61720  fi
61721
61722  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61723  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61724
61725    else
61726      # We're on a unix platform. Hooray! :)
61727      path="$POTENTIAL_FREETYPE_LIB_PATH"
61728      has_space=`$ECHO "$path" | $GREP " "`
61729      if test "x$has_space" != x; then
61730        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61731$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61732        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61733      fi
61734
61735      # Use eval to expand a potential ~
61736      eval path="$path"
61737      if test ! -f "$path" && test ! -d "$path"; then
61738        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61739      fi
61740
61741      if test -d "$path"; then
61742        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61743      else
61744        dir="`$DIRNAME "$path"`"
61745        base="`$BASENAME "$path"`"
61746        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61747      fi
61748    fi
61749  fi
61750
61751
61752    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61753    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61754$as_echo_n "checking for freetype includes... " >&6; }
61755    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61756$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61757    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61758    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61759$as_echo_n "checking for freetype libraries... " >&6; }
61760    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61761$as_echo "$FREETYPE_LIB_PATH" >&6; }
61762  fi
61763
61764              if test "x$FOUND_FREETYPE" != xyes; then
61765
61766  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61767  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61768  METHOD="well-known location"
61769
61770  # Let's start with an optimistic view of the world :-)
61771  FOUND_FREETYPE=yes
61772
61773  # First look for the canonical freetype main include file ft2build.h.
61774  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61775    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61776    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61777    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61778      # Fail.
61779      FOUND_FREETYPE=no
61780    fi
61781  fi
61782
61783  if test "x$FOUND_FREETYPE" = xyes; then
61784    # Include file found, let's continue the sanity check.
61785    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61786$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61787
61788    # Reset to default value
61789    FREETYPE_BASE_NAME=freetype
61790    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61791    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61792      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61793          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61794        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61795        # for the .6 version explicitly.
61796        FREETYPE_BASE_NAME=freetype.6
61797        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61798        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61799$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61800      else
61801        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61802$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61803        FOUND_FREETYPE=no
61804      fi
61805    else
61806      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61807        # On Windows, we will need both .lib and .dll file.
61808        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61809          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61810$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61811          FOUND_FREETYPE=no
61812        fi
61813      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61814          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61815        # Found lib in isa dir, use that instead.
61816        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61817        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61818$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61819      fi
61820    fi
61821  fi
61822
61823  if test "x$FOUND_FREETYPE" = xyes; then
61824
61825  # Only process if variable expands to non-empty
61826
61827  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61828    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61829
61830  # Input might be given as Windows format, start by converting to
61831  # unix format.
61832  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61833  new_path=`$CYGPATH -u "$path"`
61834
61835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61838  # "foo.exe" is OK but "foo" is an error.
61839  #
61840  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61841  # It is also a way to make sure we got the proper file name for the real test later on.
61842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61843  if test "x$test_shortpath" = x; then
61844    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61845$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61846    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61847  fi
61848
61849  # Call helper function which possibly converts this using DOS-style short mode.
61850  # If so, the updated path is stored in $new_path.
61851
61852  input_path="$new_path"
61853  # Check if we need to convert this using DOS-style short mode. If the path
61854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61855  # take no chances and rewrite it.
61856  # Note: m4 eats our [], so we need to use [ and ] instead.
61857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61858  if test "x$has_forbidden_chars" != x; then
61859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61863      # Going to short mode and back again did indeed matter. Since short mode is
61864      # case insensitive, let's make it lowercase to improve readability.
61865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61866      # Now convert it back to Unix-style (cygpath)
61867      input_path=`$CYGPATH -u "$shortmode_path"`
61868      new_path="$input_path"
61869    fi
61870  fi
61871
61872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61873  if test "x$test_cygdrive_prefix" = x; then
61874    # As a simple fix, exclude /usr/bin since it's not a real path.
61875    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61877      # a path prefixed by /cygdrive for fixpath to work.
61878      new_path="$CYGWIN_ROOT_PATH$input_path"
61879    fi
61880  fi
61881
61882
61883  if test "x$path" != "x$new_path"; then
61884    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61886$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61887  fi
61888
61889    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61890
61891  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61892  has_colon=`$ECHO $path | $GREP ^.:`
61893  new_path="$path"
61894  if test "x$has_colon" = x; then
61895    # Not in mixed or Windows style, start by that.
61896    new_path=`cmd //c echo $path`
61897  fi
61898
61899
61900  input_path="$new_path"
61901  # Check if we need to convert this using DOS-style short mode. If the path
61902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61903  # take no chances and rewrite it.
61904  # Note: m4 eats our [], so we need to use [ and ] instead.
61905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61906  if test "x$has_forbidden_chars" != x; then
61907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61909  fi
61910
61911
61912  windows_path="$new_path"
61913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61914    unix_path=`$CYGPATH -u "$windows_path"`
61915    new_path="$unix_path"
61916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61918    new_path="$unix_path"
61919  fi
61920
61921  if test "x$path" != "x$new_path"; then
61922    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61924$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61925  fi
61926
61927  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61928  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61929
61930    else
61931      # We're on a unix platform. Hooray! :)
61932      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61933      has_space=`$ECHO "$path" | $GREP " "`
61934      if test "x$has_space" != x; then
61935        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61936$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61937        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61938      fi
61939
61940      # Use eval to expand a potential ~
61941      eval path="$path"
61942      if test ! -f "$path" && test ! -d "$path"; then
61943        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61944      fi
61945
61946      if test -d "$path"; then
61947        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61948      else
61949        dir="`$DIRNAME "$path"`"
61950        base="`$BASENAME "$path"`"
61951        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61952      fi
61953    fi
61954  fi
61955
61956
61957  # Only process if variable expands to non-empty
61958
61959  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61960    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61961
61962  # Input might be given as Windows format, start by converting to
61963  # unix format.
61964  path="$POTENTIAL_FREETYPE_LIB_PATH"
61965  new_path=`$CYGPATH -u "$path"`
61966
61967  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61968  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61969  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61970  # "foo.exe" is OK but "foo" is an error.
61971  #
61972  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61973  # It is also a way to make sure we got the proper file name for the real test later on.
61974  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61975  if test "x$test_shortpath" = x; then
61976    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61977$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61978    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61979  fi
61980
61981  # Call helper function which possibly converts this using DOS-style short mode.
61982  # If so, the updated path is stored in $new_path.
61983
61984  input_path="$new_path"
61985  # Check if we need to convert this using DOS-style short mode. If the path
61986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61987  # take no chances and rewrite it.
61988  # Note: m4 eats our [], so we need to use [ and ] instead.
61989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61990  if test "x$has_forbidden_chars" != x; then
61991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61992    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61993    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61994    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61995      # Going to short mode and back again did indeed matter. Since short mode is
61996      # case insensitive, let's make it lowercase to improve readability.
61997      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61998      # Now convert it back to Unix-style (cygpath)
61999      input_path=`$CYGPATH -u "$shortmode_path"`
62000      new_path="$input_path"
62001    fi
62002  fi
62003
62004  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62005  if test "x$test_cygdrive_prefix" = x; then
62006    # As a simple fix, exclude /usr/bin since it's not a real path.
62007    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62008      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62009      # a path prefixed by /cygdrive for fixpath to work.
62010      new_path="$CYGWIN_ROOT_PATH$input_path"
62011    fi
62012  fi
62013
62014
62015  if test "x$path" != "x$new_path"; then
62016    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62017    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62018$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62019  fi
62020
62021    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62022
62023  path="$POTENTIAL_FREETYPE_LIB_PATH"
62024  has_colon=`$ECHO $path | $GREP ^.:`
62025  new_path="$path"
62026  if test "x$has_colon" = x; then
62027    # Not in mixed or Windows style, start by that.
62028    new_path=`cmd //c echo $path`
62029  fi
62030
62031
62032  input_path="$new_path"
62033  # Check if we need to convert this using DOS-style short mode. If the path
62034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62035  # take no chances and rewrite it.
62036  # Note: m4 eats our [], so we need to use [ and ] instead.
62037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62038  if test "x$has_forbidden_chars" != x; then
62039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62040    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62041  fi
62042
62043
62044  windows_path="$new_path"
62045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62046    unix_path=`$CYGPATH -u "$windows_path"`
62047    new_path="$unix_path"
62048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62050    new_path="$unix_path"
62051  fi
62052
62053  if test "x$path" != "x$new_path"; then
62054    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62055    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62056$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62057  fi
62058
62059  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62060  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62061
62062    else
62063      # We're on a unix platform. Hooray! :)
62064      path="$POTENTIAL_FREETYPE_LIB_PATH"
62065      has_space=`$ECHO "$path" | $GREP " "`
62066      if test "x$has_space" != x; then
62067        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62068$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62069        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62070      fi
62071
62072      # Use eval to expand a potential ~
62073      eval path="$path"
62074      if test ! -f "$path" && test ! -d "$path"; then
62075        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62076      fi
62077
62078      if test -d "$path"; then
62079        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62080      else
62081        dir="`$DIRNAME "$path"`"
62082        base="`$BASENAME "$path"`"
62083        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62084      fi
62085    fi
62086  fi
62087
62088
62089    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62090    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62091$as_echo_n "checking for freetype includes... " >&6; }
62092    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62093$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62094    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62095    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62096$as_echo_n "checking for freetype libraries... " >&6; }
62097    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62098$as_echo "$FREETYPE_LIB_PATH" >&6; }
62099  fi
62100
62101              fi
62102            fi
62103          fi
62104        fi
62105      fi # end check in well-known locations
62106
62107      if test "x$FOUND_FREETYPE" != xyes; then
62108
62109  # Print a helpful message on how to acquire the necessary build dependency.
62110  # freetype is the help tag: freetype, cups, alsa etc
62111  MISSING_DEPENDENCY=freetype
62112
62113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62114    cygwin_help $MISSING_DEPENDENCY
62115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62116    msys_help $MISSING_DEPENDENCY
62117  else
62118    PKGHANDLER_COMMAND=
62119
62120    case $PKGHANDLER in
62121      apt-get)
62122        apt_help     $MISSING_DEPENDENCY ;;
62123      yum)
62124        yum_help     $MISSING_DEPENDENCY ;;
62125      port)
62126        port_help    $MISSING_DEPENDENCY ;;
62127      pkgutil)
62128        pkgutil_help $MISSING_DEPENDENCY ;;
62129      pkgadd)
62130        pkgadd_help  $MISSING_DEPENDENCY ;;
62131    esac
62132
62133    if test "x$PKGHANDLER_COMMAND" != x; then
62134      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62135    fi
62136  fi
62137
62138        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62139      fi
62140    fi # end user specified settings
62141
62142    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62143    if test "x$FREETYPE_CFLAGS" = x; then
62144
62145  # Only process if variable expands to non-empty
62146
62147  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62148    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62149
62150  # Input might be given as Windows format, start by converting to
62151  # unix format.
62152  path="$FREETYPE_INCLUDE_PATH"
62153  new_path=`$CYGPATH -u "$path"`
62154
62155  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62156  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62157  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62158  # "foo.exe" is OK but "foo" is an error.
62159  #
62160  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62161  # It is also a way to make sure we got the proper file name for the real test later on.
62162  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62163  if test "x$test_shortpath" = x; then
62164    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62165$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62166    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62167  fi
62168
62169  # Call helper function which possibly converts this using DOS-style short mode.
62170  # If so, the updated path is stored in $new_path.
62171
62172  input_path="$new_path"
62173  # Check if we need to convert this using DOS-style short mode. If the path
62174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62175  # take no chances and rewrite it.
62176  # Note: m4 eats our [], so we need to use [ and ] instead.
62177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62178  if test "x$has_forbidden_chars" != x; then
62179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62180    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62181    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62182    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62183      # Going to short mode and back again did indeed matter. Since short mode is
62184      # case insensitive, let's make it lowercase to improve readability.
62185      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62186      # Now convert it back to Unix-style (cygpath)
62187      input_path=`$CYGPATH -u "$shortmode_path"`
62188      new_path="$input_path"
62189    fi
62190  fi
62191
62192  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62193  if test "x$test_cygdrive_prefix" = x; then
62194    # As a simple fix, exclude /usr/bin since it's not a real path.
62195    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62196      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62197      # a path prefixed by /cygdrive for fixpath to work.
62198      new_path="$CYGWIN_ROOT_PATH$input_path"
62199    fi
62200  fi
62201
62202
62203  if test "x$path" != "x$new_path"; then
62204    FREETYPE_INCLUDE_PATH="$new_path"
62205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62206$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62207  fi
62208
62209    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62210
62211  path="$FREETYPE_INCLUDE_PATH"
62212  has_colon=`$ECHO $path | $GREP ^.:`
62213  new_path="$path"
62214  if test "x$has_colon" = x; then
62215    # Not in mixed or Windows style, start by that.
62216    new_path=`cmd //c echo $path`
62217  fi
62218
62219
62220  input_path="$new_path"
62221  # Check if we need to convert this using DOS-style short mode. If the path
62222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62223  # take no chances and rewrite it.
62224  # Note: m4 eats our [], so we need to use [ and ] instead.
62225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62226  if test "x$has_forbidden_chars" != x; then
62227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62228    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62229  fi
62230
62231
62232  windows_path="$new_path"
62233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62234    unix_path=`$CYGPATH -u "$windows_path"`
62235    new_path="$unix_path"
62236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62238    new_path="$unix_path"
62239  fi
62240
62241  if test "x$path" != "x$new_path"; then
62242    FREETYPE_INCLUDE_PATH="$new_path"
62243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62244$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62245  fi
62246
62247  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62248  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62249
62250    else
62251      # We're on a unix platform. Hooray! :)
62252      path="$FREETYPE_INCLUDE_PATH"
62253      has_space=`$ECHO "$path" | $GREP " "`
62254      if test "x$has_space" != x; then
62255        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62256$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62257        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62258      fi
62259
62260      # Use eval to expand a potential ~
62261      eval path="$path"
62262      if test ! -f "$path" && test ! -d "$path"; then
62263        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62264      fi
62265
62266      if test -d "$path"; then
62267        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62268      else
62269        dir="`$DIRNAME "$path"`"
62270        base="`$BASENAME "$path"`"
62271        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62272      fi
62273    fi
62274  fi
62275
62276      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62277        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62278      else
62279        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62280      fi
62281    fi
62282
62283    if test "x$FREETYPE_LIBS" = x; then
62284
62285  # Only process if variable expands to non-empty
62286
62287  if test "x$FREETYPE_LIB_PATH" != x; then
62288    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62289
62290  # Input might be given as Windows format, start by converting to
62291  # unix format.
62292  path="$FREETYPE_LIB_PATH"
62293  new_path=`$CYGPATH -u "$path"`
62294
62295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62298  # "foo.exe" is OK but "foo" is an error.
62299  #
62300  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62301  # It is also a way to make sure we got the proper file name for the real test later on.
62302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62303  if test "x$test_shortpath" = x; then
62304    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62305$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62306    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62307  fi
62308
62309  # Call helper function which possibly converts this using DOS-style short mode.
62310  # If so, the updated path is stored in $new_path.
62311
62312  input_path="$new_path"
62313  # Check if we need to convert this using DOS-style short mode. If the path
62314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62315  # take no chances and rewrite it.
62316  # Note: m4 eats our [], so we need to use [ and ] instead.
62317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62318  if test "x$has_forbidden_chars" != x; then
62319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62323      # Going to short mode and back again did indeed matter. Since short mode is
62324      # case insensitive, let's make it lowercase to improve readability.
62325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62326      # Now convert it back to Unix-style (cygpath)
62327      input_path=`$CYGPATH -u "$shortmode_path"`
62328      new_path="$input_path"
62329    fi
62330  fi
62331
62332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62333  if test "x$test_cygdrive_prefix" = x; then
62334    # As a simple fix, exclude /usr/bin since it's not a real path.
62335    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62337      # a path prefixed by /cygdrive for fixpath to work.
62338      new_path="$CYGWIN_ROOT_PATH$input_path"
62339    fi
62340  fi
62341
62342
62343  if test "x$path" != "x$new_path"; then
62344    FREETYPE_LIB_PATH="$new_path"
62345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62346$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62347  fi
62348
62349    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62350
62351  path="$FREETYPE_LIB_PATH"
62352  has_colon=`$ECHO $path | $GREP ^.:`
62353  new_path="$path"
62354  if test "x$has_colon" = x; then
62355    # Not in mixed or Windows style, start by that.
62356    new_path=`cmd //c echo $path`
62357  fi
62358
62359
62360  input_path="$new_path"
62361  # Check if we need to convert this using DOS-style short mode. If the path
62362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62363  # take no chances and rewrite it.
62364  # Note: m4 eats our [], so we need to use [ and ] instead.
62365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62366  if test "x$has_forbidden_chars" != x; then
62367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62369  fi
62370
62371
62372  windows_path="$new_path"
62373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62374    unix_path=`$CYGPATH -u "$windows_path"`
62375    new_path="$unix_path"
62376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62378    new_path="$unix_path"
62379  fi
62380
62381  if test "x$path" != "x$new_path"; then
62382    FREETYPE_LIB_PATH="$new_path"
62383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62384$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62385  fi
62386
62387  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62388  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62389
62390    else
62391      # We're on a unix platform. Hooray! :)
62392      path="$FREETYPE_LIB_PATH"
62393      has_space=`$ECHO "$path" | $GREP " "`
62394      if test "x$has_space" != x; then
62395        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62396$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62397        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62398      fi
62399
62400      # Use eval to expand a potential ~
62401      eval path="$path"
62402      if test ! -f "$path" && test ! -d "$path"; then
62403        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62404      fi
62405
62406      if test -d "$path"; then
62407        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62408      else
62409        dir="`$DIRNAME "$path"`"
62410        base="`$BASENAME "$path"`"
62411        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62412      fi
62413    fi
62414  fi
62415
62416      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62417        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62418      else
62419        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62420      fi
62421    fi
62422
62423    # Try to compile it
62424    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62425$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62426    ac_ext=cpp
62427ac_cpp='$CXXCPP $CPPFLAGS'
62428ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62429ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62430ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62431
62432    PREV_CXXCFLAGS="$CXXFLAGS"
62433    PREV_LIBS="$LIBS"
62434    PREV_CXX="$CXX"
62435    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62436    LIBS="$LIBS $FREETYPE_LIBS"
62437    CXX="$FIXPATH $CXX"
62438    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62439/* end confdefs.h.  */
62440
62441          #include<ft2build.h>
62442          #include FT_FREETYPE_H
62443          int main () {
62444            FT_Init_FreeType(NULL);
62445            return 0;
62446          }
62447
62448_ACEOF
62449if ac_fn_cxx_try_link "$LINENO"; then :
62450
62451          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62452$as_echo "yes" >&6; }
62453
62454else
62455
62456          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62457$as_echo "no" >&6; }
62458          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62459$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62460          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62461$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62462
62463
62464  # Print a helpful message on how to acquire the necessary build dependency.
62465  # freetype is the help tag: freetype, cups, alsa etc
62466  MISSING_DEPENDENCY=freetype
62467
62468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62469    cygwin_help $MISSING_DEPENDENCY
62470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62471    msys_help $MISSING_DEPENDENCY
62472  else
62473    PKGHANDLER_COMMAND=
62474
62475    case $PKGHANDLER in
62476      apt-get)
62477        apt_help     $MISSING_DEPENDENCY ;;
62478      yum)
62479        yum_help     $MISSING_DEPENDENCY ;;
62480      port)
62481        port_help    $MISSING_DEPENDENCY ;;
62482      pkgutil)
62483        pkgutil_help $MISSING_DEPENDENCY ;;
62484      pkgadd)
62485        pkgadd_help  $MISSING_DEPENDENCY ;;
62486    esac
62487
62488    if test "x$PKGHANDLER_COMMAND" != x; then
62489      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62490    fi
62491  fi
62492
62493
62494          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62495
62496
62497fi
62498rm -f core conftest.err conftest.$ac_objext \
62499    conftest$ac_exeext conftest.$ac_ext
62500    CXXCFLAGS="$PREV_CXXFLAGS"
62501    LIBS="$PREV_LIBS"
62502    CXX="$PREV_CXX"
62503    ac_ext=cpp
62504ac_cpp='$CXXCPP $CPPFLAGS'
62505ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62506ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62507ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62508
62509
62510    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62511$as_echo_n "checking if we should bundle freetype... " >&6; }
62512    if test "x$BUNDLE_FREETYPE" = xyes; then
62513      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62514    fi
62515    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62516$as_echo "$BUNDLE_FREETYPE" >&6; }
62517
62518  fi # end freetype needed
62519
62520
62521
62522
62523
62524
62525
62526# Check whether --with-alsa was given.
62527if test "${with_alsa+set}" = set; then :
62528  withval=$with_alsa;
62529fi
62530
62531
62532# Check whether --with-alsa-include was given.
62533if test "${with_alsa_include+set}" = set; then :
62534  withval=$with_alsa_include;
62535fi
62536
62537
62538# Check whether --with-alsa-lib was given.
62539if test "${with_alsa_lib+set}" = set; then :
62540  withval=$with_alsa_lib;
62541fi
62542
62543
62544  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62545    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62546        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62547        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62548      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62549$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62550    fi
62551    ALSA_CFLAGS=
62552    ALSA_LIBS=
62553  else
62554    ALSA_FOUND=no
62555
62556    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62557      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62558    fi
62559
62560    if test "x${with_alsa}" != x; then
62561      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62562      ALSA_CFLAGS="-I${with_alsa}/include"
62563      ALSA_FOUND=yes
62564    fi
62565    if test "x${with_alsa_include}" != x; then
62566      ALSA_CFLAGS="-I${with_alsa_include}"
62567      ALSA_FOUND=yes
62568    fi
62569    if test "x${with_alsa_lib}" != x; then
62570      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62571      ALSA_FOUND=yes
62572    fi
62573    # Do not try pkg-config if we have a sysroot set.
62574    if test "x$SYSROOT" = x; then
62575      if test "x$ALSA_FOUND" = xno; then
62576
62577pkg_failed=no
62578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62579$as_echo_n "checking for ALSA... " >&6; }
62580
62581if test -n "$ALSA_CFLAGS"; then
62582    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62583 elif test -n "$PKG_CONFIG"; then
62584    if test -n "$PKG_CONFIG" && \
62585    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62586  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62587  ac_status=$?
62588  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62589  test $ac_status = 0; }; then
62590  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62591else
62592  pkg_failed=yes
62593fi
62594 else
62595    pkg_failed=untried
62596fi
62597if test -n "$ALSA_LIBS"; then
62598    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62599 elif test -n "$PKG_CONFIG"; then
62600    if test -n "$PKG_CONFIG" && \
62601    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62602  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62603  ac_status=$?
62604  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62605  test $ac_status = 0; }; then
62606  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62607else
62608  pkg_failed=yes
62609fi
62610 else
62611    pkg_failed=untried
62612fi
62613
62614
62615
62616if test $pkg_failed = yes; then
62617
62618if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62619        _pkg_short_errors_supported=yes
62620else
62621        _pkg_short_errors_supported=no
62622fi
62623        if test $_pkg_short_errors_supported = yes; then
62624	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62625        else
62626	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62627        fi
62628	# Put the nasty error message in config.log where it belongs
62629	echo "$ALSA_PKG_ERRORS" >&5
62630
62631	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62632$as_echo "no" >&6; }
62633                ALSA_FOUND=no
62634elif test $pkg_failed = untried; then
62635	ALSA_FOUND=no
62636else
62637	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62638	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62639        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62640$as_echo "yes" >&6; }
62641	ALSA_FOUND=yes
62642fi
62643      fi
62644    fi
62645    if test "x$ALSA_FOUND" = xno; then
62646      for ac_header in alsa/asoundlib.h
62647do :
62648  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62649if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62650  cat >>confdefs.h <<_ACEOF
62651#define HAVE_ALSA_ASOUNDLIB_H 1
62652_ACEOF
62653
62654            ALSA_FOUND=yes
62655            ALSA_CFLAGS=-Iignoreme
62656            ALSA_LIBS=-lasound
62657            DEFAULT_ALSA=yes
62658
62659else
62660  ALSA_FOUND=no
62661
62662fi
62663
62664done
62665
62666    fi
62667    if test "x$ALSA_FOUND" = xno; then
62668
62669  # Print a helpful message on how to acquire the necessary build dependency.
62670  # alsa is the help tag: freetype, cups, alsa etc
62671  MISSING_DEPENDENCY=alsa
62672
62673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62674    cygwin_help $MISSING_DEPENDENCY
62675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62676    msys_help $MISSING_DEPENDENCY
62677  else
62678    PKGHANDLER_COMMAND=
62679
62680    case $PKGHANDLER in
62681      apt-get)
62682        apt_help     $MISSING_DEPENDENCY ;;
62683      yum)
62684        yum_help     $MISSING_DEPENDENCY ;;
62685      port)
62686        port_help    $MISSING_DEPENDENCY ;;
62687      pkgutil)
62688        pkgutil_help $MISSING_DEPENDENCY ;;
62689      pkgadd)
62690        pkgadd_help  $MISSING_DEPENDENCY ;;
62691    esac
62692
62693    if test "x$PKGHANDLER_COMMAND" != x; then
62694      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62695    fi
62696  fi
62697
62698      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62699    fi
62700  fi
62701
62702
62703
62704
62705
62706
62707# Check whether --with-libffi was given.
62708if test "${with_libffi+set}" = set; then :
62709  withval=$with_libffi;
62710fi
62711
62712
62713# Check whether --with-libffi-include was given.
62714if test "${with_libffi_include+set}" = set; then :
62715  withval=$with_libffi_include;
62716fi
62717
62718
62719# Check whether --with-libffi-lib was given.
62720if test "${with_libffi_lib+set}" = set; then :
62721  withval=$with_libffi_lib;
62722fi
62723
62724
62725  if test "x$NEEDS_LIB_FFI" = xfalse; then
62726    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62727        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62728        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62729      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62730$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62731    fi
62732    LIBFFI_CFLAGS=
62733    LIBFFI_LIBS=
62734  else
62735    LIBFFI_FOUND=no
62736
62737    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62738      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62739    fi
62740
62741    if test "x${with_libffi}" != x; then
62742      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62743      LIBFFI_CFLAGS="-I${with_libffi}/include"
62744      LIBFFI_FOUND=yes
62745    fi
62746    if test "x${with_libffi_include}" != x; then
62747      LIBFFI_CFLAGS="-I${with_libffi_include}"
62748      LIBFFI_FOUND=yes
62749    fi
62750    if test "x${with_libffi_lib}" != x; then
62751      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62752      LIBFFI_FOUND=yes
62753    fi
62754    # Do not try pkg-config if we have a sysroot set.
62755    if test "x$SYSROOT" = x; then
62756      if test "x$LIBFFI_FOUND" = xno; then
62757        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62758
62759pkg_failed=no
62760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62761$as_echo_n "checking for LIBFFI... " >&6; }
62762
62763if test -n "$LIBFFI_CFLAGS"; then
62764    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62765 elif test -n "$PKG_CONFIG"; then
62766    if test -n "$PKG_CONFIG" && \
62767    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62768  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62769  ac_status=$?
62770  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62771  test $ac_status = 0; }; then
62772  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62773else
62774  pkg_failed=yes
62775fi
62776 else
62777    pkg_failed=untried
62778fi
62779if test -n "$LIBFFI_LIBS"; then
62780    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62781 elif test -n "$PKG_CONFIG"; then
62782    if test -n "$PKG_CONFIG" && \
62783    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62784  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62785  ac_status=$?
62786  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62787  test $ac_status = 0; }; then
62788  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62789else
62790  pkg_failed=yes
62791fi
62792 else
62793    pkg_failed=untried
62794fi
62795
62796
62797
62798if test $pkg_failed = yes; then
62799
62800if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62801        _pkg_short_errors_supported=yes
62802else
62803        _pkg_short_errors_supported=no
62804fi
62805        if test $_pkg_short_errors_supported = yes; then
62806	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62807        else
62808	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62809        fi
62810	# Put the nasty error message in config.log where it belongs
62811	echo "$LIBFFI_PKG_ERRORS" >&5
62812
62813	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62814$as_echo "no" >&6; }
62815                LIBFFI_FOUND=no
62816elif test $pkg_failed = untried; then
62817	LIBFFI_FOUND=no
62818else
62819	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62820	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62821        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62822$as_echo "yes" >&6; }
62823	LIBFFI_FOUND=yes
62824fi
62825      fi
62826    fi
62827    if test "x$LIBFFI_FOUND" = xno; then
62828      for ac_header in ffi.h
62829do :
62830  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62831if test "x$ac_cv_header_ffi_h" = xyes; then :
62832  cat >>confdefs.h <<_ACEOF
62833#define HAVE_FFI_H 1
62834_ACEOF
62835
62836            LIBFFI_FOUND=yes
62837            LIBFFI_CFLAGS=
62838            LIBFFI_LIBS=-lffi
62839
62840else
62841  LIBFFI_FOUND=no
62842
62843fi
62844
62845done
62846
62847    fi
62848    if test "x$LIBFFI_FOUND" = xno; then
62849
62850  # Print a helpful message on how to acquire the necessary build dependency.
62851  # ffi is the help tag: freetype, cups, alsa etc
62852  MISSING_DEPENDENCY=ffi
62853
62854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62855    cygwin_help $MISSING_DEPENDENCY
62856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62857    msys_help $MISSING_DEPENDENCY
62858  else
62859    PKGHANDLER_COMMAND=
62860
62861    case $PKGHANDLER in
62862      apt-get)
62863        apt_help     $MISSING_DEPENDENCY ;;
62864      yum)
62865        yum_help     $MISSING_DEPENDENCY ;;
62866      port)
62867        port_help    $MISSING_DEPENDENCY ;;
62868      pkgutil)
62869        pkgutil_help $MISSING_DEPENDENCY ;;
62870      pkgadd)
62871        pkgadd_help  $MISSING_DEPENDENCY ;;
62872    esac
62873
62874    if test "x$PKGHANDLER_COMMAND" != x; then
62875      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62876    fi
62877  fi
62878
62879      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62880    fi
62881
62882    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62883$as_echo_n "checking if libffi works... " >&6; }
62884    ac_ext=c
62885ac_cpp='$CPP $CPPFLAGS'
62886ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62887ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62888ac_compiler_gnu=$ac_cv_c_compiler_gnu
62889
62890    OLD_CFLAGS="$CFLAGS"
62891    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62892    OLD_LIBS="$LIBS"
62893    LIBS="$LIBS $LIBFFI_LIBS"
62894    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62895/* end confdefs.h.  */
62896#include <ffi.h>
62897int
62898main ()
62899{
62900
62901          ffi_call(NULL, NULL, NULL, NULL);
62902          return 0;
62903
62904  ;
62905  return 0;
62906}
62907_ACEOF
62908if ac_fn_c_try_link "$LINENO"; then :
62909  LIBFFI_WORKS=yes
62910else
62911  LIBFFI_WORKS=no
62912
62913fi
62914rm -f core conftest.err conftest.$ac_objext \
62915    conftest$ac_exeext conftest.$ac_ext
62916    CFLAGS="$OLD_CFLAGS"
62917    LIBS="$OLD_LIBS"
62918    ac_ext=cpp
62919ac_cpp='$CXXCPP $CPPFLAGS'
62920ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62921ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62922ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62923
62924    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62925$as_echo "$LIBFFI_WORKS" >&6; }
62926
62927    if test "x$LIBFFI_WORKS" = xno; then
62928
62929  # Print a helpful message on how to acquire the necessary build dependency.
62930  # ffi is the help tag: freetype, cups, alsa etc
62931  MISSING_DEPENDENCY=ffi
62932
62933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62934    cygwin_help $MISSING_DEPENDENCY
62935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62936    msys_help $MISSING_DEPENDENCY
62937  else
62938    PKGHANDLER_COMMAND=
62939
62940    case $PKGHANDLER in
62941      apt-get)
62942        apt_help     $MISSING_DEPENDENCY ;;
62943      yum)
62944        yum_help     $MISSING_DEPENDENCY ;;
62945      port)
62946        port_help    $MISSING_DEPENDENCY ;;
62947      pkgutil)
62948        pkgutil_help $MISSING_DEPENDENCY ;;
62949      pkgadd)
62950        pkgadd_help  $MISSING_DEPENDENCY ;;
62951    esac
62952
62953    if test "x$PKGHANDLER_COMMAND" != x; then
62954      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62955    fi
62956  fi
62957
62958      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
62959    fi
62960  fi
62961
62962
62963
62964
62965
62966  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
62967    # Extract the first word of "llvm-config", so it can be a program name with args.
62968set dummy llvm-config; ac_word=$2
62969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62970$as_echo_n "checking for $ac_word... " >&6; }
62971if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
62972  $as_echo_n "(cached) " >&6
62973else
62974  if test -n "$LLVM_CONFIG"; then
62975  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
62976else
62977as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62978for as_dir in $PATH
62979do
62980  IFS=$as_save_IFS
62981  test -z "$as_dir" && as_dir=.
62982    for ac_exec_ext in '' $ac_executable_extensions; do
62983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62984    ac_cv_prog_LLVM_CONFIG="llvm-config"
62985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62986    break 2
62987  fi
62988done
62989  done
62990IFS=$as_save_IFS
62991
62992fi
62993fi
62994LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
62995if test -n "$LLVM_CONFIG"; then
62996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
62997$as_echo "$LLVM_CONFIG" >&6; }
62998else
62999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63000$as_echo "no" >&6; }
63001fi
63002
63003
63004
63005    if test "x$LLVM_CONFIG" != xllvm-config; then
63006      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63007    fi
63008
63009    llvm_components="jit mcjit engine nativecodegen native"
63010    unset LLVM_CFLAGS
63011    for flag in $("$LLVM_CONFIG" --cxxflags); do
63012      if echo "${flag}" | grep -q '^-[ID]'; then
63013        if test "${flag}" != "-D_DEBUG" ; then
63014          if test "${LLVM_CFLAGS}" != "" ; then
63015            LLVM_CFLAGS="${LLVM_CFLAGS} "
63016          fi
63017          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63018        fi
63019      fi
63020    done
63021    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63022    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63023
63024    unset LLVM_LDFLAGS
63025    for flag in $("${LLVM_CONFIG}" --ldflags); do
63026      if echo "${flag}" | grep -q '^-L'; then
63027        if test "${LLVM_LDFLAGS}" != ""; then
63028          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63029        fi
63030        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63031      fi
63032    done
63033
63034    unset LLVM_LIBS
63035    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63036      if echo "${flag}" | grep -q '^-l'; then
63037        if test "${LLVM_LIBS}" != ""; then
63038          LLVM_LIBS="${LLVM_LIBS} "
63039        fi
63040        LLVM_LIBS="${LLVM_LIBS}${flag}"
63041      fi
63042    done
63043
63044    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63045    # always properly detect -ltinfo
63046    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63047
63048
63049
63050
63051  fi
63052
63053
63054
63055# Check whether --with-libjpeg was given.
63056if test "${with_libjpeg+set}" = set; then :
63057  withval=$with_libjpeg;
63058fi
63059
63060
63061  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63062$as_echo_n "checking for which libjpeg to use... " >&6; }
63063  # default is bundled
63064  DEFAULT_LIBJPEG=bundled
63065  # if user didn't specify, use DEFAULT_LIBJPEG
63066  if test "x${with_libjpeg}" = "x"; then
63067    with_libjpeg=${DEFAULT_LIBJPEG}
63068  fi
63069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63070$as_echo "${with_libjpeg}" >&6; }
63071
63072  if test "x${with_libjpeg}" = "xbundled"; then
63073    USE_EXTERNAL_LIBJPEG=false
63074  elif test "x${with_libjpeg}" = "xsystem"; then
63075    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63076if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63077
63078else
63079   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63080fi
63081
63082
63083    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63084$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63085if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63086  $as_echo_n "(cached) " >&6
63087else
63088  ac_check_lib_save_LIBS=$LIBS
63089LIBS="-ljpeg  $LIBS"
63090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63091/* end confdefs.h.  */
63092
63093/* Override any GCC internal prototype to avoid an error.
63094   Use char because int might match the return type of a GCC
63095   builtin and then its argument prototype would still apply.  */
63096#ifdef __cplusplus
63097extern "C"
63098#endif
63099char jpeg_CreateDecompress ();
63100int
63101main ()
63102{
63103return jpeg_CreateDecompress ();
63104  ;
63105  return 0;
63106}
63107_ACEOF
63108if ac_fn_cxx_try_link "$LINENO"; then :
63109  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63110else
63111  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63112fi
63113rm -f core conftest.err conftest.$ac_objext \
63114    conftest$ac_exeext conftest.$ac_ext
63115LIBS=$ac_check_lib_save_LIBS
63116fi
63117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63118$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63119if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63120  cat >>confdefs.h <<_ACEOF
63121#define HAVE_LIBJPEG 1
63122_ACEOF
63123
63124  LIBS="-ljpeg $LIBS"
63125
63126else
63127   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63128fi
63129
63130
63131    USE_EXTERNAL_LIBJPEG=true
63132  else
63133    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63134  fi
63135
63136
63137
63138
63139
63140# Check whether --with-giflib was given.
63141if test "${with_giflib+set}" = set; then :
63142  withval=$with_giflib;
63143fi
63144
63145
63146  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63147$as_echo_n "checking for which giflib to use... " >&6; }
63148  # default is bundled
63149  DEFAULT_GIFLIB=bundled
63150  # if user didn't specify, use DEFAULT_GIFLIB
63151  if test "x${with_giflib}" = "x"; then
63152    with_giflib=${DEFAULT_GIFLIB}
63153  fi
63154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63155$as_echo "${with_giflib}" >&6; }
63156
63157  if test "x${with_giflib}" = "xbundled"; then
63158    USE_EXTERNAL_LIBGIF=false
63159  elif test "x${with_giflib}" = "xsystem"; then
63160    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63161if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63162
63163else
63164   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63165fi
63166
63167
63168    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63169$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63170if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63171  $as_echo_n "(cached) " >&6
63172else
63173  ac_check_lib_save_LIBS=$LIBS
63174LIBS="-lgif  $LIBS"
63175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63176/* end confdefs.h.  */
63177
63178/* Override any GCC internal prototype to avoid an error.
63179   Use char because int might match the return type of a GCC
63180   builtin and then its argument prototype would still apply.  */
63181#ifdef __cplusplus
63182extern "C"
63183#endif
63184char DGifGetCode ();
63185int
63186main ()
63187{
63188return DGifGetCode ();
63189  ;
63190  return 0;
63191}
63192_ACEOF
63193if ac_fn_cxx_try_link "$LINENO"; then :
63194  ac_cv_lib_gif_DGifGetCode=yes
63195else
63196  ac_cv_lib_gif_DGifGetCode=no
63197fi
63198rm -f core conftest.err conftest.$ac_objext \
63199    conftest$ac_exeext conftest.$ac_ext
63200LIBS=$ac_check_lib_save_LIBS
63201fi
63202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63203$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63204if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63205  cat >>confdefs.h <<_ACEOF
63206#define HAVE_LIBGIF 1
63207_ACEOF
63208
63209  LIBS="-lgif $LIBS"
63210
63211else
63212   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63213fi
63214
63215
63216    USE_EXTERNAL_LIBGIF=true
63217  else
63218    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63219  fi
63220
63221
63222
63223
63224
63225# Check whether --with-libpng was given.
63226if test "${with_libpng+set}" = set; then :
63227  withval=$with_libpng;
63228fi
63229
63230
63231  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63232$as_echo_n "checking for which libpng to use... " >&6; }
63233
63234  # default is bundled
63235  DEFAULT_LIBPNG=bundled
63236  # if user didn't specify, use DEFAULT_LIBPNG
63237  if test "x${with_libpng}" = "x"; then
63238      with_libpng=${DEFAULT_LIBPNG}
63239  fi
63240
63241  if test "x${with_libpng}" = "xbundled"; then
63242      USE_EXTERNAL_LIBPNG=false
63243      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63244$as_echo "bundled" >&6; }
63245  elif test "x${with_libpng}" = "xsystem"; then
63246
63247pkg_failed=no
63248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63249$as_echo_n "checking for PNG... " >&6; }
63250
63251if test -n "$PNG_CFLAGS"; then
63252    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63253 elif test -n "$PKG_CONFIG"; then
63254    if test -n "$PKG_CONFIG" && \
63255    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63256  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63257  ac_status=$?
63258  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63259  test $ac_status = 0; }; then
63260  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63261else
63262  pkg_failed=yes
63263fi
63264 else
63265    pkg_failed=untried
63266fi
63267if test -n "$PNG_LIBS"; then
63268    pkg_cv_PNG_LIBS="$PNG_LIBS"
63269 elif test -n "$PKG_CONFIG"; then
63270    if test -n "$PKG_CONFIG" && \
63271    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63272  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63273  ac_status=$?
63274  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63275  test $ac_status = 0; }; then
63276  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63277else
63278  pkg_failed=yes
63279fi
63280 else
63281    pkg_failed=untried
63282fi
63283
63284
63285
63286if test $pkg_failed = yes; then
63287
63288if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63289        _pkg_short_errors_supported=yes
63290else
63291        _pkg_short_errors_supported=no
63292fi
63293        if test $_pkg_short_errors_supported = yes; then
63294	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63295        else
63296	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63297        fi
63298	# Put the nasty error message in config.log where it belongs
63299	echo "$PNG_PKG_ERRORS" >&5
63300
63301	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63302$as_echo "no" >&6; }
63303                 LIBPNG_FOUND=no
63304elif test $pkg_failed = untried; then
63305	 LIBPNG_FOUND=no
63306else
63307	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63308	PNG_LIBS=$pkg_cv_PNG_LIBS
63309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63310$as_echo "yes" >&6; }
63311	 LIBPNG_FOUND=yes
63312fi
63313      if test "x${LIBPNG_FOUND}" = "xyes"; then
63314          USE_EXTERNAL_LIBPNG=true
63315          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63316$as_echo "system" >&6; }
63317      else
63318          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63319$as_echo "system not found" >&6; }
63320          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63321      fi
63322  else
63323      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63324  fi
63325
63326
63327
63328
63329
63330# Check whether --with-zlib was given.
63331if test "${with_zlib+set}" = set; then :
63332  withval=$with_zlib;
63333fi
63334
63335
63336  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63337$as_echo_n "checking for compress in -lz... " >&6; }
63338if ${ac_cv_lib_z_compress+:} false; then :
63339  $as_echo_n "(cached) " >&6
63340else
63341  ac_check_lib_save_LIBS=$LIBS
63342LIBS="-lz  $LIBS"
63343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63344/* end confdefs.h.  */
63345
63346/* Override any GCC internal prototype to avoid an error.
63347   Use char because int might match the return type of a GCC
63348   builtin and then its argument prototype would still apply.  */
63349#ifdef __cplusplus
63350extern "C"
63351#endif
63352char compress ();
63353int
63354main ()
63355{
63356return compress ();
63357  ;
63358  return 0;
63359}
63360_ACEOF
63361if ac_fn_cxx_try_link "$LINENO"; then :
63362  ac_cv_lib_z_compress=yes
63363else
63364  ac_cv_lib_z_compress=no
63365fi
63366rm -f core conftest.err conftest.$ac_objext \
63367    conftest$ac_exeext conftest.$ac_ext
63368LIBS=$ac_check_lib_save_LIBS
63369fi
63370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63371$as_echo "$ac_cv_lib_z_compress" >&6; }
63372if test "x$ac_cv_lib_z_compress" = xyes; then :
63373   ZLIB_FOUND=yes
63374else
63375   ZLIB_FOUND=no
63376fi
63377
63378
63379  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63380$as_echo_n "checking for which zlib to use... " >&6; }
63381
63382  DEFAULT_ZLIB=system
63383  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63384    # On windows default is bundled...on others default is system
63385    DEFAULT_ZLIB=bundled
63386  fi
63387
63388  if test "x${ZLIB_FOUND}" != "xyes"; then
63389    # If we don't find any system...set default to bundled
63390    DEFAULT_ZLIB=bundled
63391  fi
63392
63393  # If user didn't specify, use DEFAULT_ZLIB
63394  if test "x${with_zlib}" = "x"; then
63395    with_zlib=${DEFAULT_ZLIB}
63396  fi
63397
63398  if test "x${with_zlib}" = "xbundled"; then
63399    USE_EXTERNAL_LIBZ=false
63400    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63401$as_echo "bundled" >&6; }
63402  elif test "x${with_zlib}" = "xsystem"; then
63403    if test "x${ZLIB_FOUND}" = "xyes"; then
63404      USE_EXTERNAL_LIBZ=true
63405      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63406$as_echo "system" >&6; }
63407    else
63408      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63409$as_echo "system not found" >&6; }
63410      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63411    fi
63412  else
63413    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63414  fi
63415
63416
63417
63418
63419
63420# Check whether --with-lcms was given.
63421if test "${with_lcms+set}" = set; then :
63422  withval=$with_lcms;
63423fi
63424
63425
63426  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63427$as_echo_n "checking for which lcms to use... " >&6; }
63428
63429  DEFAULT_LCMS=bundled
63430  # If user didn't specify, use DEFAULT_LCMS
63431  if test "x${with_lcms}" = "x"; then
63432      with_lcms=${DEFAULT_LCMS}
63433  fi
63434
63435  if test "x${with_lcms}" = "xbundled"; then
63436    USE_EXTERNAL_LCMS=false
63437    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63438$as_echo "bundled" >&6; }
63439  elif test "x${with_lcms}" = "xsystem"; then
63440    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63441$as_echo "system" >&6; }
63442
63443pkg_failed=no
63444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63445$as_echo_n "checking for LCMS... " >&6; }
63446
63447if test -n "$LCMS_CFLAGS"; then
63448    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63449 elif test -n "$PKG_CONFIG"; then
63450    if test -n "$PKG_CONFIG" && \
63451    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63452  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63453  ac_status=$?
63454  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63455  test $ac_status = 0; }; then
63456  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63457else
63458  pkg_failed=yes
63459fi
63460 else
63461    pkg_failed=untried
63462fi
63463if test -n "$LCMS_LIBS"; then
63464    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63465 elif test -n "$PKG_CONFIG"; then
63466    if test -n "$PKG_CONFIG" && \
63467    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63468  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63469  ac_status=$?
63470  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63471  test $ac_status = 0; }; then
63472  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63473else
63474  pkg_failed=yes
63475fi
63476 else
63477    pkg_failed=untried
63478fi
63479
63480
63481
63482if test $pkg_failed = yes; then
63483
63484if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63485        _pkg_short_errors_supported=yes
63486else
63487        _pkg_short_errors_supported=no
63488fi
63489        if test $_pkg_short_errors_supported = yes; then
63490	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63491        else
63492	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63493        fi
63494	# Put the nasty error message in config.log where it belongs
63495	echo "$LCMS_PKG_ERRORS" >&5
63496
63497	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63498$as_echo "no" >&6; }
63499                LCMS_FOUND=no
63500elif test $pkg_failed = untried; then
63501	LCMS_FOUND=no
63502else
63503	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63504	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63505        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63506$as_echo "yes" >&6; }
63507	LCMS_FOUND=yes
63508fi
63509    if test "x${LCMS_FOUND}" = "xyes"; then
63510      USE_EXTERNAL_LCMS=true
63511    else
63512      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63513    fi
63514  else
63515    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63516  fi
63517
63518
63519
63520
63521
63522
63523
63524
63525
63526
63527
63528  # Setup libm (the maths library)
63529  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63530    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63531$as_echo_n "checking for cos in -lm... " >&6; }
63532if ${ac_cv_lib_m_cos+:} false; then :
63533  $as_echo_n "(cached) " >&6
63534else
63535  ac_check_lib_save_LIBS=$LIBS
63536LIBS="-lm  $LIBS"
63537cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63538/* end confdefs.h.  */
63539
63540/* Override any GCC internal prototype to avoid an error.
63541   Use char because int might match the return type of a GCC
63542   builtin and then its argument prototype would still apply.  */
63543#ifdef __cplusplus
63544extern "C"
63545#endif
63546char cos ();
63547int
63548main ()
63549{
63550return cos ();
63551  ;
63552  return 0;
63553}
63554_ACEOF
63555if ac_fn_cxx_try_link "$LINENO"; then :
63556  ac_cv_lib_m_cos=yes
63557else
63558  ac_cv_lib_m_cos=no
63559fi
63560rm -f core conftest.err conftest.$ac_objext \
63561    conftest$ac_exeext conftest.$ac_ext
63562LIBS=$ac_check_lib_save_LIBS
63563fi
63564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63565$as_echo "$ac_cv_lib_m_cos" >&6; }
63566if test "x$ac_cv_lib_m_cos" = xyes; then :
63567  cat >>confdefs.h <<_ACEOF
63568#define HAVE_LIBM 1
63569_ACEOF
63570
63571  LIBS="-lm $LIBS"
63572
63573else
63574
63575        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63576$as_echo "$as_me: Maths library was not found" >&6;}
63577
63578fi
63579
63580    LIBM="-lm"
63581  else
63582    LIBM=""
63583  fi
63584
63585
63586  # Setup libdl (for dynamic library loading)
63587  save_LIBS="$LIBS"
63588  LIBS=""
63589  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63590$as_echo_n "checking for dlopen in -ldl... " >&6; }
63591if ${ac_cv_lib_dl_dlopen+:} false; then :
63592  $as_echo_n "(cached) " >&6
63593else
63594  ac_check_lib_save_LIBS=$LIBS
63595LIBS="-ldl  $LIBS"
63596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63597/* end confdefs.h.  */
63598
63599/* Override any GCC internal prototype to avoid an error.
63600   Use char because int might match the return type of a GCC
63601   builtin and then its argument prototype would still apply.  */
63602#ifdef __cplusplus
63603extern "C"
63604#endif
63605char dlopen ();
63606int
63607main ()
63608{
63609return dlopen ();
63610  ;
63611  return 0;
63612}
63613_ACEOF
63614if ac_fn_cxx_try_link "$LINENO"; then :
63615  ac_cv_lib_dl_dlopen=yes
63616else
63617  ac_cv_lib_dl_dlopen=no
63618fi
63619rm -f core conftest.err conftest.$ac_objext \
63620    conftest$ac_exeext conftest.$ac_ext
63621LIBS=$ac_check_lib_save_LIBS
63622fi
63623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63624$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63625if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63626  cat >>confdefs.h <<_ACEOF
63627#define HAVE_LIBDL 1
63628_ACEOF
63629
63630  LIBS="-ldl $LIBS"
63631
63632fi
63633
63634  LIBDL="$LIBS"
63635
63636  LIBS="$save_LIBS"
63637
63638  # Deprecated libraries, keep the flags for backwards compatibility
63639  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63640
63641
63642# Check whether --with-dxsdk was given.
63643if test "${with_dxsdk+set}" = set; then :
63644  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63645$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63646fi
63647
63648
63649
63650
63651# Check whether --with-dxsdk-lib was given.
63652if test "${with_dxsdk_lib+set}" = set; then :
63653  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63654$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63655fi
63656
63657
63658
63659
63660# Check whether --with-dxsdk-include was given.
63661if test "${with_dxsdk_include+set}" = set; then :
63662  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63663$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63664fi
63665
63666
63667  fi
63668
63669  # Control if libzip can use mmap. Available for purposes of overriding.
63670  LIBZIP_CAN_USE_MMAP=true
63671
63672
63673
63674  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
63675    # Find the root of the Solaris Studio installation from the compiler path
63676    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63677    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63678    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63679$as_echo_n "checking for libstlport.so.1... " >&6; }
63680    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
63681      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
63682      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
63683    fi
63684    if test -f "$STLPORT_LIB"; then
63685      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63686$as_echo "yes, $STLPORT_LIB" >&6; }
63687
63688  # Only process if variable expands to non-empty
63689
63690  if test "x$STLPORT_LIB" != x; then
63691    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63692
63693  # Input might be given as Windows format, start by converting to
63694  # unix format.
63695  path="$STLPORT_LIB"
63696  new_path=`$CYGPATH -u "$path"`
63697
63698  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63699  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63700  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63701  # "foo.exe" is OK but "foo" is an error.
63702  #
63703  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63704  # It is also a way to make sure we got the proper file name for the real test later on.
63705  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63706  if test "x$test_shortpath" = x; then
63707    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63708$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63709    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63710  fi
63711
63712  # Call helper function which possibly converts this using DOS-style short mode.
63713  # If so, the updated path is stored in $new_path.
63714
63715  input_path="$new_path"
63716  # Check if we need to convert this using DOS-style short mode. If the path
63717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63718  # take no chances and rewrite it.
63719  # Note: m4 eats our [], so we need to use [ and ] instead.
63720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63721  if test "x$has_forbidden_chars" != x; then
63722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63723    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63724    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63725    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63726      # Going to short mode and back again did indeed matter. Since short mode is
63727      # case insensitive, let's make it lowercase to improve readability.
63728      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63729      # Now convert it back to Unix-style (cygpath)
63730      input_path=`$CYGPATH -u "$shortmode_path"`
63731      new_path="$input_path"
63732    fi
63733  fi
63734
63735  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63736  if test "x$test_cygdrive_prefix" = x; then
63737    # As a simple fix, exclude /usr/bin since it's not a real path.
63738    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63739      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63740      # a path prefixed by /cygdrive for fixpath to work.
63741      new_path="$CYGWIN_ROOT_PATH$input_path"
63742    fi
63743  fi
63744
63745
63746  if test "x$path" != "x$new_path"; then
63747    STLPORT_LIB="$new_path"
63748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63749$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63750  fi
63751
63752    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63753
63754  path="$STLPORT_LIB"
63755  has_colon=`$ECHO $path | $GREP ^.:`
63756  new_path="$path"
63757  if test "x$has_colon" = x; then
63758    # Not in mixed or Windows style, start by that.
63759    new_path=`cmd //c echo $path`
63760  fi
63761
63762
63763  input_path="$new_path"
63764  # Check if we need to convert this using DOS-style short mode. If the path
63765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63766  # take no chances and rewrite it.
63767  # Note: m4 eats our [], so we need to use [ and ] instead.
63768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63769  if test "x$has_forbidden_chars" != x; then
63770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63771    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63772  fi
63773
63774
63775  windows_path="$new_path"
63776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63777    unix_path=`$CYGPATH -u "$windows_path"`
63778    new_path="$unix_path"
63779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63781    new_path="$unix_path"
63782  fi
63783
63784  if test "x$path" != "x$new_path"; then
63785    STLPORT_LIB="$new_path"
63786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63787$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63788  fi
63789
63790  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63791  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63792
63793    else
63794      # We're on a unix platform. Hooray! :)
63795      path="$STLPORT_LIB"
63796      has_space=`$ECHO "$path" | $GREP " "`
63797      if test "x$has_space" != x; then
63798        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63799$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63800        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63801      fi
63802
63803      # Use eval to expand a potential ~
63804      eval path="$path"
63805      if test ! -f "$path" && test ! -d "$path"; then
63806        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63807      fi
63808
63809      if test -d "$path"; then
63810        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63811      else
63812        dir="`$DIRNAME "$path"`"
63813        base="`$BASENAME "$path"`"
63814        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63815      fi
63816    fi
63817  fi
63818
63819    else
63820      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63821$as_echo "no, not found at $STLPORT_LIB" >&6; }
63822      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63823    fi
63824
63825  fi
63826
63827
63828
63829
63830
63831
63832
63833
63834
63835
63836
63837
63838
63839
63840###############################################################################
63841#
63842# We need to do some final tweaking, when everything else is done.
63843#
63844###############################################################################
63845
63846
63847  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63848$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63849
63850  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63851    ENABLE_INTREE_EC=yes
63852    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63853$as_echo "yes" >&6; }
63854  else
63855    ENABLE_INTREE_EC=no
63856    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63857$as_echo "no" >&6; }
63858  fi
63859
63860
63861
63862
63863  # Check whether --enable-jtreg-failure-handler was given.
63864if test "${enable_jtreg_failure_handler+set}" = set; then :
63865  enableval=$enable_jtreg_failure_handler;
63866fi
63867
63868
63869  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
63870$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
63871
63872  if test "x$enable_jtreg_failure_handler" = "xyes"; then
63873    if test "x$JT_HOME" = "x"; then
63874      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
63875    else
63876      BUILD_FAILURE_HANDLER=true
63877      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63878$as_echo "yes, forced" >&6; }
63879    fi
63880  elif test "x$enable_jtreg_failure_handler" = "xno"; then
63881    BUILD_FAILURE_HANDLER=false
63882    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63883$as_echo "no, forced" >&6; }
63884  elif test "x$enable_jtreg_failure_handler" = "xauto" \
63885      || test "x$enable_jtreg_failure_handler" = "x"; then
63886    if test "x$JT_HOME" = "x"; then
63887      BUILD_FAILURE_HANDLER=false
63888      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
63889$as_echo "no, missing jtreg" >&6; }
63890    else
63891      BUILD_FAILURE_HANDLER=true
63892      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
63893$as_echo "yes, jtreg present" >&6; }
63894    fi
63895  else
63896    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
63897  fi
63898
63899
63900
63901
63902  # Check whether --enable-generate-classlist was given.
63903if test "${enable_generate_classlist+set}" = set; then :
63904  enableval=$enable_generate_classlist;
63905fi
63906
63907
63908  # Check if it's likely that it's possible to generate the classlist. Depending
63909  # on exact jvm configuration it could be possible anyway.
63910  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
63911    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
63912  else
63913    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
63914  fi
63915
63916  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
63917$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
63918  if test "x$enable_generate_classlist" = "xyes"; then
63919    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63920$as_echo "yes, forced" >&6; }
63921    ENABLE_GENERATE_CLASSLIST="true"
63922    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
63923      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
63924$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
63925    fi
63926  elif test "x$enable_generate_classlist" = "xno"; then
63927    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63928$as_echo "no, forced" >&6; }
63929    ENABLE_GENERATE_CLASSLIST="false"
63930  elif test "x$enable_generate_classlist" = "x"; then
63931    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
63932      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63933$as_echo "yes" >&6; }
63934      ENABLE_GENERATE_CLASSLIST="true"
63935    else
63936      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63937$as_echo "no" >&6; }
63938      ENABLE_GENERATE_CLASSLIST="false"
63939    fi
63940  else
63941    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
63942  fi
63943
63944
63945
63946
63947###############################################################################
63948#
63949# Configure parts of the build that only affect the build performance,
63950# not the result.
63951#
63952###############################################################################
63953
63954
63955  # How many cores do we have on this build system?
63956
63957# Check whether --with-num-cores was given.
63958if test "${with_num_cores+set}" = set; then :
63959  withval=$with_num_cores;
63960fi
63961
63962  if test "x$with_num_cores" = x; then
63963    # The number of cores were not specified, try to probe them.
63964
63965  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63966$as_echo_n "checking for number of cores... " >&6; }
63967  NUM_CORES=1
63968  FOUND_CORES=no
63969
63970  if test -f /proc/cpuinfo; then
63971    # Looks like a Linux (or cygwin) system
63972    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63973    FOUND_CORES=yes
63974  elif test -x /usr/sbin/psrinfo; then
63975    # Looks like a Solaris system
63976    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63977    FOUND_CORES=yes
63978  elif test -x /usr/sbin/sysctl; then
63979    # Looks like a MacOSX system
63980    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63981    FOUND_CORES=yes
63982  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63983    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63984    FOUND_CORES=yes
63985  elif test -n "$NUMBER_OF_PROCESSORS"; then
63986    # On windows, look in the env
63987    NUM_CORES=$NUMBER_OF_PROCESSORS
63988    FOUND_CORES=yes
63989  fi
63990
63991  if test "x$FOUND_CORES" = xyes; then
63992    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63993$as_echo "$NUM_CORES" >&6; }
63994  else
63995    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
63996$as_echo "could not detect number of cores, defaulting to 1" >&6; }
63997    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
63998$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
63999  fi
64000
64001  else
64002    NUM_CORES=$with_num_cores
64003  fi
64004
64005
64006
64007  # How much memory do we have on this build system?
64008
64009# Check whether --with-memory-size was given.
64010if test "${with_memory_size+set}" = set; then :
64011  withval=$with_memory_size;
64012fi
64013
64014  if test "x$with_memory_size" = x; then
64015    # The memory size was not specified, try to probe it.
64016
64017  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64018$as_echo_n "checking for memory size... " >&6; }
64019  # Default to 1024 MB
64020  MEMORY_SIZE=1024
64021  FOUND_MEM=no
64022
64023  if test -f /proc/meminfo; then
64024    # Looks like a Linux (or cygwin) system
64025    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64026    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64027    FOUND_MEM=yes
64028  elif test -x /usr/sbin/prtconf; then
64029    # Looks like a Solaris or AIX system
64030    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64031    FOUND_MEM=yes
64032  elif test -x /usr/sbin/sysctl; then
64033    # Looks like a MacOSX system
64034    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64035    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64036    FOUND_MEM=yes
64037  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64038    # Windows, but without cygwin
64039    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64040    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64041    FOUND_MEM=yes
64042  fi
64043
64044  if test "x$FOUND_MEM" = xyes; then
64045    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64046$as_echo "$MEMORY_SIZE MB" >&6; }
64047  else
64048    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64049$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64050    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64051$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64052  fi
64053
64054  else
64055    MEMORY_SIZE=$with_memory_size
64056  fi
64057
64058
64059
64060  # Provide a decent default number of parallel jobs for make depending on
64061  # number of cores, amount of memory and machine architecture.
64062
64063# Check whether --with-jobs was given.
64064if test "${with_jobs+set}" = set; then :
64065  withval=$with_jobs;
64066fi
64067
64068  if test "x$with_jobs" = x; then
64069    # Number of jobs was not specified, calculate.
64070    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64071$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64072    # Approximate memory in GB.
64073    memory_gb=`expr $MEMORY_SIZE / 1024`
64074    # Pick the lowest of memory in gb and number of cores.
64075    if test "$memory_gb" -lt "$NUM_CORES"; then
64076      JOBS="$memory_gb"
64077    else
64078      JOBS="$NUM_CORES"
64079    fi
64080    if test "$JOBS" -eq "0"; then
64081      JOBS=1
64082    fi
64083    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64084$as_echo "$JOBS" >&6; }
64085  else
64086    JOBS=$with_jobs
64087  fi
64088
64089
64090
64091  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64092
64093# Check whether --with-test-jobs was given.
64094if test "${with_test_jobs+set}" = set; then :
64095  withval=$with_test_jobs;
64096fi
64097
64098  if test "x$with_test_jobs" = x; then
64099      TEST_JOBS=0
64100  else
64101      TEST_JOBS=$with_test_jobs
64102  fi
64103
64104
64105
64106# Setup arguments for the boot jdk (after cores and memory have been setup)
64107
64108  ##############################################################################
64109  #
64110  # Specify jvm options for anything that is run with the Boot JDK.
64111  # Not all JVM:s accept the same arguments on the command line.
64112  #
64113
64114# Check whether --with-boot-jdk-jvmargs was given.
64115if test "${with_boot_jdk_jvmargs+set}" = set; then :
64116  withval=$with_boot_jdk_jvmargs;
64117fi
64118
64119
64120  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64121$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64122
64123  # Disable special log output when a debug build is used as Boot JDK...
64124
64125  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64126  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64127  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64128  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64129  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64130  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64131    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64132    JVM_ARG_OK=true
64133  else
64134    $ECHO "Arg failed:" >&5
64135    $ECHO "$OUTPUT" >&5
64136    JVM_ARG_OK=false
64137  fi
64138
64139
64140  # Force en-US environment
64141
64142  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64143  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64144  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64145  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64146  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64147  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64148    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64149    JVM_ARG_OK=true
64150  else
64151    $ECHO "Arg failed:" >&5
64152    $ECHO "$OUTPUT" >&5
64153    JVM_ARG_OK=false
64154  fi
64155
64156
64157  # Apply user provided options.
64158
64159  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64160  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64161  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64162  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64163  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64164  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64165    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64166    JVM_ARG_OK=true
64167  else
64168    $ECHO "Arg failed:" >&5
64169    $ECHO "$OUTPUT" >&5
64170    JVM_ARG_OK=false
64171  fi
64172
64173
64174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64175$as_echo "$boot_jdk_jvmargs" >&6; }
64176
64177  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64178  JAVA_FLAGS=$boot_jdk_jvmargs
64179
64180
64181
64182  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64183$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64184
64185  # Starting amount of heap memory.
64186
64187  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64188  $ECHO "Command: $JAVA -Xms64M -version" >&5
64189  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64190  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64191  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64192  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64193    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64194    JVM_ARG_OK=true
64195  else
64196    $ECHO "Arg failed:" >&5
64197    $ECHO "$OUTPUT" >&5
64198    JVM_ARG_OK=false
64199  fi
64200
64201  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64202
64203  # Maximum amount of heap memory and stack size.
64204  JVM_HEAP_LIMIT_32="1024"
64205  # Running a 64 bit JVM allows for and requires a bigger heap
64206  JVM_HEAP_LIMIT_64="1600"
64207  STACK_SIZE_32=768
64208  STACK_SIZE_64=1536
64209  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64210  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64211    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64212  fi
64213  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64214    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64215  fi
64216  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64217    JVM_HEAP_LIMIT_32=512
64218    JVM_HEAP_LIMIT_64=512
64219  fi
64220
64221  if test "x$BOOT_JDK_BITS" = "x32"; then
64222    STACK_SIZE=$STACK_SIZE_32
64223    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64224  else
64225    STACK_SIZE=$STACK_SIZE_64
64226    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64227  fi
64228
64229  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64230  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64231  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64232  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64233  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64234  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64235    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64236    JVM_ARG_OK=true
64237  else
64238    $ECHO "Arg failed:" >&5
64239    $ECHO "$OUTPUT" >&5
64240    JVM_ARG_OK=false
64241  fi
64242
64243
64244  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64245  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64246  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64247  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64248  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64249  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64250    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64251    JVM_ARG_OK=true
64252  else
64253    $ECHO "Arg failed:" >&5
64254    $ECHO "$OUTPUT" >&5
64255    JVM_ARG_OK=false
64256  fi
64257
64258
64259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64260$as_echo "$boot_jdk_jvmargs_big" >&6; }
64261
64262  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64263
64264
64265  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64266    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64267    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64268  else
64269    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64270    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64271  fi
64272  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64273  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64274  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64275$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64277$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64278
64279
64280  # By default, the main javac compilations use big
64281  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64282
64283
64284  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64285$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64286
64287  # Use serial gc for small short lived tools if possible
64288
64289  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64290  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64291  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64292  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64293  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64294  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64295    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64296    JVM_ARG_OK=true
64297  else
64298    $ECHO "Arg failed:" >&5
64299    $ECHO "$OUTPUT" >&5
64300    JVM_ARG_OK=false
64301  fi
64302
64303
64304  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64305  $ECHO "Command: $JAVA -Xms32M -version" >&5
64306  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64307  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64308  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64309  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64310    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64311    JVM_ARG_OK=true
64312  else
64313    $ECHO "Arg failed:" >&5
64314    $ECHO "$OUTPUT" >&5
64315    JVM_ARG_OK=false
64316  fi
64317
64318
64319  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64320  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64321  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64322  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64323  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64324  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64325    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64326    JVM_ARG_OK=true
64327  else
64328    $ECHO "Arg failed:" >&5
64329    $ECHO "$OUTPUT" >&5
64330    JVM_ARG_OK=false
64331  fi
64332
64333
64334  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64335  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64336  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64337  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64338  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64339  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64340    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64341    JVM_ARG_OK=true
64342  else
64343    $ECHO "Arg failed:" >&5
64344    $ECHO "$OUTPUT" >&5
64345    JVM_ARG_OK=false
64346  fi
64347
64348
64349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64350$as_echo "$boot_jdk_jvmargs_small" >&6; }
64351
64352  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64353
64354
64355  JAVA_TOOL_FLAGS_SMALL=""
64356  for f in $JAVA_FLAGS_SMALL; do
64357    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64358  done
64359
64360
64361
64362# Setup smart javac (after cores and memory have been setup)
64363
64364
64365# Check whether --with-sjavac-server-java was given.
64366if test "${with_sjavac_server_java+set}" = set; then :
64367  withval=$with_sjavac_server_java;
64368fi
64369
64370
64371  if test "x$with_sjavac_server_java" != x; then
64372    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64373    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64374    if test "x$FOUND_VERSION" = x; then
64375      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64376    fi
64377  else
64378    SJAVAC_SERVER_JAVA="$JAVA"
64379  fi
64380
64381
64382  if test "$MEMORY_SIZE" -gt "3000"; then
64383
64384  $ECHO "Check if jvm arg is ok: -d64" >&5
64385  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64386  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64387  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64388  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64389  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64390    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64391    JVM_ARG_OK=true
64392  else
64393    $ECHO "Arg failed:" >&5
64394    $ECHO "$OUTPUT" >&5
64395    JVM_ARG_OK=false
64396  fi
64397
64398    if test "$JVM_ARG_OK" = true; then
64399      JVM_64BIT=true
64400      JVM_ARG_OK=false
64401    fi
64402  fi
64403
64404  MX_VALUE=`expr $MEMORY_SIZE / 2`
64405  if test "$JVM_64BIT" = true; then
64406    # Set ms lower than mx since more than one instance of the server might
64407    # get launched at the same time before they figure out which instance won.
64408    MS_VALUE=512
64409    if test "$MX_VALUE" -gt "2048"; then
64410      MX_VALUE=2048
64411    fi
64412  else
64413    MS_VALUE=256
64414    if test "$MX_VALUE" -gt "1500"; then
64415      MX_VALUE=1500
64416    fi
64417  fi
64418  if test "$MX_VALUE" -lt "512"; then
64419    MX_VALUE=512
64420  fi
64421
64422  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64423  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64424  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64425  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64426  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64427  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64428    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64429    JVM_ARG_OK=true
64430  else
64431    $ECHO "Arg failed:" >&5
64432    $ECHO "$OUTPUT" >&5
64433    JVM_ARG_OK=false
64434  fi
64435
64436
64437
64438  # Check whether --enable-sjavac was given.
64439if test "${enable_sjavac+set}" = set; then :
64440  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64441else
64442  ENABLE_SJAVAC="no"
64443fi
64444
64445  if test "x$JVM_ARG_OK" = "xfalse"; then
64446    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64447$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64448    ENABLE_SJAVAC="no"
64449  fi
64450  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64451$as_echo_n "checking whether to use sjavac... " >&6; }
64452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64453$as_echo "$ENABLE_SJAVAC" >&6; }
64454
64455
64456  # Check whether --enable-javac-server was given.
64457if test "${enable_javac_server+set}" = set; then :
64458  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64459else
64460  ENABLE_JAVAC_SERVER="yes"
64461fi
64462
64463  if test "x$JVM_ARG_OK" = "xfalse"; then
64464    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64465$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64466    ENABLE_JAVAC_SERVER="no"
64467  fi
64468  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64469$as_echo_n "checking whether to use javac server... " >&6; }
64470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64471$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64472
64473
64474  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64475    # When using a server javac, the small client instances do not need much
64476    # resources.
64477    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64478  fi
64479
64480
64481# Setup use of icecc if requested
64482
64483  # Check whether --enable-icecc was given.
64484if test "${enable_icecc+set}" = set; then :
64485  enableval=$enable_icecc;
64486fi
64487
64488
64489  if test "x${enable_icecc}" = "xyes"; then
64490
64491
64492
64493  # Publish this variable in the help.
64494
64495
64496  if [ -z "${ICECC_CMD+x}" ]; then
64497    # The variable is not set by user, try to locate tool using the code snippet
64498    for ac_prog in icecc
64499do
64500  # Extract the first word of "$ac_prog", so it can be a program name with args.
64501set dummy $ac_prog; ac_word=$2
64502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64503$as_echo_n "checking for $ac_word... " >&6; }
64504if ${ac_cv_path_ICECC_CMD+:} false; then :
64505  $as_echo_n "(cached) " >&6
64506else
64507  case $ICECC_CMD in
64508  [\\/]* | ?:[\\/]*)
64509  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64510  ;;
64511  *)
64512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64513for as_dir in $PATH
64514do
64515  IFS=$as_save_IFS
64516  test -z "$as_dir" && as_dir=.
64517    for ac_exec_ext in '' $ac_executable_extensions; do
64518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64519    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64521    break 2
64522  fi
64523done
64524  done
64525IFS=$as_save_IFS
64526
64527  ;;
64528esac
64529fi
64530ICECC_CMD=$ac_cv_path_ICECC_CMD
64531if test -n "$ICECC_CMD"; then
64532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64533$as_echo "$ICECC_CMD" >&6; }
64534else
64535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64536$as_echo "no" >&6; }
64537fi
64538
64539
64540  test -n "$ICECC_CMD" && break
64541done
64542
64543  else
64544    # The variable is set, but is it from the command line or the environment?
64545
64546    # Try to remove the string !ICECC_CMD! from our list.
64547    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64548    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64549      # If it failed, the variable was not from the command line. Ignore it,
64550      # but warn the user (except for BASH, which is always set by the calling BASH).
64551      if test "xICECC_CMD" != xBASH; then
64552        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64553$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64554      fi
64555      # Try to locate tool using the code snippet
64556      for ac_prog in icecc
64557do
64558  # Extract the first word of "$ac_prog", so it can be a program name with args.
64559set dummy $ac_prog; ac_word=$2
64560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64561$as_echo_n "checking for $ac_word... " >&6; }
64562if ${ac_cv_path_ICECC_CMD+:} false; then :
64563  $as_echo_n "(cached) " >&6
64564else
64565  case $ICECC_CMD in
64566  [\\/]* | ?:[\\/]*)
64567  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64568  ;;
64569  *)
64570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64571for as_dir in $PATH
64572do
64573  IFS=$as_save_IFS
64574  test -z "$as_dir" && as_dir=.
64575    for ac_exec_ext in '' $ac_executable_extensions; do
64576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64577    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64579    break 2
64580  fi
64581done
64582  done
64583IFS=$as_save_IFS
64584
64585  ;;
64586esac
64587fi
64588ICECC_CMD=$ac_cv_path_ICECC_CMD
64589if test -n "$ICECC_CMD"; then
64590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64591$as_echo "$ICECC_CMD" >&6; }
64592else
64593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64594$as_echo "no" >&6; }
64595fi
64596
64597
64598  test -n "$ICECC_CMD" && break
64599done
64600
64601    else
64602      # If it succeeded, then it was overridden by the user. We will use it
64603      # for the tool.
64604
64605      # First remove it from the list of overridden variables, so we can test
64606      # for unknown variables in the end.
64607      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64608
64609      # Check if we try to supply an empty value
64610      if test "x$ICECC_CMD" = x; then
64611        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64612$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64613        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64614$as_echo_n "checking for ICECC_CMD... " >&6; }
64615        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64616$as_echo "disabled" >&6; }
64617      else
64618        # Check if the provided tool contains a complete path.
64619        tool_specified="$ICECC_CMD"
64620        tool_basename="${tool_specified##*/}"
64621        if test "x$tool_basename" = "x$tool_specified"; then
64622          # A command without a complete path is provided, search $PATH.
64623          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64624$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64625          # Extract the first word of "$tool_basename", so it can be a program name with args.
64626set dummy $tool_basename; ac_word=$2
64627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64628$as_echo_n "checking for $ac_word... " >&6; }
64629if ${ac_cv_path_ICECC_CMD+:} false; then :
64630  $as_echo_n "(cached) " >&6
64631else
64632  case $ICECC_CMD in
64633  [\\/]* | ?:[\\/]*)
64634  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64635  ;;
64636  *)
64637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64638for as_dir in $PATH
64639do
64640  IFS=$as_save_IFS
64641  test -z "$as_dir" && as_dir=.
64642    for ac_exec_ext in '' $ac_executable_extensions; do
64643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64644    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64646    break 2
64647  fi
64648done
64649  done
64650IFS=$as_save_IFS
64651
64652  ;;
64653esac
64654fi
64655ICECC_CMD=$ac_cv_path_ICECC_CMD
64656if test -n "$ICECC_CMD"; then
64657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64658$as_echo "$ICECC_CMD" >&6; }
64659else
64660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64661$as_echo "no" >&6; }
64662fi
64663
64664
64665          if test "x$ICECC_CMD" = x; then
64666            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64667          fi
64668        else
64669          # Otherwise we believe it is a complete path. Use it as it is.
64670          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64671$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64672          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64673$as_echo_n "checking for ICECC_CMD... " >&6; }
64674          if test ! -x "$tool_specified"; then
64675            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64676$as_echo "not found" >&6; }
64677            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64678          fi
64679          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64680$as_echo "$tool_specified" >&6; }
64681        fi
64682      fi
64683    fi
64684
64685  fi
64686
64687
64688
64689  if test "x$ICECC_CMD" = x; then
64690    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64691  fi
64692
64693
64694    old_path="$PATH"
64695
64696    # Look for icecc-create-env in some known places
64697    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64698
64699
64700
64701  # Publish this variable in the help.
64702
64703
64704  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64705    # The variable is not set by user, try to locate tool using the code snippet
64706    for ac_prog in icecc-create-env
64707do
64708  # Extract the first word of "$ac_prog", so it can be a program name with args.
64709set dummy $ac_prog; ac_word=$2
64710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64711$as_echo_n "checking for $ac_word... " >&6; }
64712if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64713  $as_echo_n "(cached) " >&6
64714else
64715  case $ICECC_CREATE_ENV in
64716  [\\/]* | ?:[\\/]*)
64717  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64718  ;;
64719  *)
64720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64721for as_dir in $PATH
64722do
64723  IFS=$as_save_IFS
64724  test -z "$as_dir" && as_dir=.
64725    for ac_exec_ext in '' $ac_executable_extensions; do
64726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64727    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64729    break 2
64730  fi
64731done
64732  done
64733IFS=$as_save_IFS
64734
64735  ;;
64736esac
64737fi
64738ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64739if test -n "$ICECC_CREATE_ENV"; then
64740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64741$as_echo "$ICECC_CREATE_ENV" >&6; }
64742else
64743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64744$as_echo "no" >&6; }
64745fi
64746
64747
64748  test -n "$ICECC_CREATE_ENV" && break
64749done
64750
64751  else
64752    # The variable is set, but is it from the command line or the environment?
64753
64754    # Try to remove the string !ICECC_CREATE_ENV! from our list.
64755    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64756    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64757      # If it failed, the variable was not from the command line. Ignore it,
64758      # but warn the user (except for BASH, which is always set by the calling BASH).
64759      if test "xICECC_CREATE_ENV" != xBASH; then
64760        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64761$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64762      fi
64763      # Try to locate tool using the code snippet
64764      for ac_prog in icecc-create-env
64765do
64766  # Extract the first word of "$ac_prog", so it can be a program name with args.
64767set dummy $ac_prog; ac_word=$2
64768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64769$as_echo_n "checking for $ac_word... " >&6; }
64770if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64771  $as_echo_n "(cached) " >&6
64772else
64773  case $ICECC_CREATE_ENV in
64774  [\\/]* | ?:[\\/]*)
64775  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64776  ;;
64777  *)
64778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64779for as_dir in $PATH
64780do
64781  IFS=$as_save_IFS
64782  test -z "$as_dir" && as_dir=.
64783    for ac_exec_ext in '' $ac_executable_extensions; do
64784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64785    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64787    break 2
64788  fi
64789done
64790  done
64791IFS=$as_save_IFS
64792
64793  ;;
64794esac
64795fi
64796ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64797if test -n "$ICECC_CREATE_ENV"; then
64798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64799$as_echo "$ICECC_CREATE_ENV" >&6; }
64800else
64801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64802$as_echo "no" >&6; }
64803fi
64804
64805
64806  test -n "$ICECC_CREATE_ENV" && break
64807done
64808
64809    else
64810      # If it succeeded, then it was overridden by the user. We will use it
64811      # for the tool.
64812
64813      # First remove it from the list of overridden variables, so we can test
64814      # for unknown variables in the end.
64815      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64816
64817      # Check if we try to supply an empty value
64818      if test "x$ICECC_CREATE_ENV" = x; then
64819        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64820$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64821        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64822$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64823        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64824$as_echo "disabled" >&6; }
64825      else
64826        # Check if the provided tool contains a complete path.
64827        tool_specified="$ICECC_CREATE_ENV"
64828        tool_basename="${tool_specified##*/}"
64829        if test "x$tool_basename" = "x$tool_specified"; then
64830          # A command without a complete path is provided, search $PATH.
64831          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64832$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64833          # Extract the first word of "$tool_basename", so it can be a program name with args.
64834set dummy $tool_basename; ac_word=$2
64835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64836$as_echo_n "checking for $ac_word... " >&6; }
64837if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64838  $as_echo_n "(cached) " >&6
64839else
64840  case $ICECC_CREATE_ENV in
64841  [\\/]* | ?:[\\/]*)
64842  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64843  ;;
64844  *)
64845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64846for as_dir in $PATH
64847do
64848  IFS=$as_save_IFS
64849  test -z "$as_dir" && as_dir=.
64850    for ac_exec_ext in '' $ac_executable_extensions; do
64851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64852    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64854    break 2
64855  fi
64856done
64857  done
64858IFS=$as_save_IFS
64859
64860  ;;
64861esac
64862fi
64863ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64864if test -n "$ICECC_CREATE_ENV"; then
64865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64866$as_echo "$ICECC_CREATE_ENV" >&6; }
64867else
64868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64869$as_echo "no" >&6; }
64870fi
64871
64872
64873          if test "x$ICECC_CREATE_ENV" = x; then
64874            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64875          fi
64876        else
64877          # Otherwise we believe it is a complete path. Use it as it is.
64878          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64879$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64880          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64881$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64882          if test ! -x "$tool_specified"; then
64883            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64884$as_echo "not found" >&6; }
64885            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64886          fi
64887          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64888$as_echo "$tool_specified" >&6; }
64889        fi
64890      fi
64891    fi
64892
64893  fi
64894
64895
64896
64897  if test "x$ICECC_CREATE_ENV" = x; then
64898    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64899  fi
64900
64901
64902    # Use icecc-create-env to create a minimal compilation environment that can
64903    # be sent to the other hosts in the icecream cluster.
64904    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64905    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64906    # Older versions of icecc does not have the --gcc parameter
64907    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64908      icecc_gcc_arg="--gcc"
64909    fi
64910    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64911
64912  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64913      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64914          ${icecc_create_env_log} 2>&1 )
64915  if test "$?" != "0"; then
64916    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64917$as_echo "$as_me: icecc-create-env output:" >&6;}
64918    cat \
64919          ${icecc_create_env_log}
64920    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64921  fi
64922
64923    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64924      # For clang, the icecc compilerwrapper is needed. It usually resides next
64925      # to icecc-create-env.
64926
64927
64928
64929  # Publish this variable in the help.
64930
64931
64932  if [ -z "${ICECC_WRAPPER+x}" ]; then
64933    # The variable is not set by user, try to locate tool using the code snippet
64934    for ac_prog in compilerwrapper
64935do
64936  # Extract the first word of "$ac_prog", so it can be a program name with args.
64937set dummy $ac_prog; ac_word=$2
64938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64939$as_echo_n "checking for $ac_word... " >&6; }
64940if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64941  $as_echo_n "(cached) " >&6
64942else
64943  case $ICECC_WRAPPER in
64944  [\\/]* | ?:[\\/]*)
64945  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64946  ;;
64947  *)
64948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64949for as_dir in $PATH
64950do
64951  IFS=$as_save_IFS
64952  test -z "$as_dir" && as_dir=.
64953    for ac_exec_ext in '' $ac_executable_extensions; do
64954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64955    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64957    break 2
64958  fi
64959done
64960  done
64961IFS=$as_save_IFS
64962
64963  ;;
64964esac
64965fi
64966ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64967if test -n "$ICECC_WRAPPER"; then
64968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64969$as_echo "$ICECC_WRAPPER" >&6; }
64970else
64971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64972$as_echo "no" >&6; }
64973fi
64974
64975
64976  test -n "$ICECC_WRAPPER" && break
64977done
64978
64979  else
64980    # The variable is set, but is it from the command line or the environment?
64981
64982    # Try to remove the string !ICECC_WRAPPER! from our list.
64983    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64984    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64985      # If it failed, the variable was not from the command line. Ignore it,
64986      # but warn the user (except for BASH, which is always set by the calling BASH).
64987      if test "xICECC_WRAPPER" != xBASH; then
64988        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64989$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64990      fi
64991      # Try to locate tool using the code snippet
64992      for ac_prog in compilerwrapper
64993do
64994  # Extract the first word of "$ac_prog", so it can be a program name with args.
64995set dummy $ac_prog; ac_word=$2
64996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64997$as_echo_n "checking for $ac_word... " >&6; }
64998if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64999  $as_echo_n "(cached) " >&6
65000else
65001  case $ICECC_WRAPPER in
65002  [\\/]* | ?:[\\/]*)
65003  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65004  ;;
65005  *)
65006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65007for as_dir in $PATH
65008do
65009  IFS=$as_save_IFS
65010  test -z "$as_dir" && as_dir=.
65011    for ac_exec_ext in '' $ac_executable_extensions; do
65012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65013    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65015    break 2
65016  fi
65017done
65018  done
65019IFS=$as_save_IFS
65020
65021  ;;
65022esac
65023fi
65024ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65025if test -n "$ICECC_WRAPPER"; then
65026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65027$as_echo "$ICECC_WRAPPER" >&6; }
65028else
65029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65030$as_echo "no" >&6; }
65031fi
65032
65033
65034  test -n "$ICECC_WRAPPER" && break
65035done
65036
65037    else
65038      # If it succeeded, then it was overridden by the user. We will use it
65039      # for the tool.
65040
65041      # First remove it from the list of overridden variables, so we can test
65042      # for unknown variables in the end.
65043      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65044
65045      # Check if we try to supply an empty value
65046      if test "x$ICECC_WRAPPER" = x; then
65047        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65048$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65049        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65050$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65051        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65052$as_echo "disabled" >&6; }
65053      else
65054        # Check if the provided tool contains a complete path.
65055        tool_specified="$ICECC_WRAPPER"
65056        tool_basename="${tool_specified##*/}"
65057        if test "x$tool_basename" = "x$tool_specified"; then
65058          # A command without a complete path is provided, search $PATH.
65059          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65060$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65061          # Extract the first word of "$tool_basename", so it can be a program name with args.
65062set dummy $tool_basename; ac_word=$2
65063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65064$as_echo_n "checking for $ac_word... " >&6; }
65065if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65066  $as_echo_n "(cached) " >&6
65067else
65068  case $ICECC_WRAPPER in
65069  [\\/]* | ?:[\\/]*)
65070  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65071  ;;
65072  *)
65073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65074for as_dir in $PATH
65075do
65076  IFS=$as_save_IFS
65077  test -z "$as_dir" && as_dir=.
65078    for ac_exec_ext in '' $ac_executable_extensions; do
65079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65080    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65082    break 2
65083  fi
65084done
65085  done
65086IFS=$as_save_IFS
65087
65088  ;;
65089esac
65090fi
65091ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65092if test -n "$ICECC_WRAPPER"; then
65093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65094$as_echo "$ICECC_WRAPPER" >&6; }
65095else
65096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65097$as_echo "no" >&6; }
65098fi
65099
65100
65101          if test "x$ICECC_WRAPPER" = x; then
65102            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65103          fi
65104        else
65105          # Otherwise we believe it is a complete path. Use it as it is.
65106          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65107$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65108          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65109$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65110          if test ! -x "$tool_specified"; then
65111            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65112$as_echo "not found" >&6; }
65113            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65114          fi
65115          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65116$as_echo "$tool_specified" >&6; }
65117        fi
65118      fi
65119    fi
65120
65121  fi
65122
65123
65124
65125  if test "x$ICECC_WRAPPER" = x; then
65126    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65127  fi
65128
65129
65130
65131  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65132      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65133  if test "$?" != "0"; then
65134    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65135$as_echo "$as_me: icecc-create-env output:" >&6;}
65136    cat ${icecc_create_env_log}
65137    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65138  fi
65139
65140    else
65141      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65142    fi
65143    PATH="$old_path"
65144    # The bundle with the compiler gets a name based on checksums. Parse log file
65145    # to find it.
65146    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65147    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65148    if test ! -f ${ICECC_ENV_BUNDLE}; then
65149      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65150    fi
65151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65152$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65153    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65154$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65155    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65156
65157    if test "x${COMPILE_TYPE}" = "xcross"; then
65158      # If cross compiling, create a separate env package for the build compiler
65159      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65160      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65161      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65162
65163  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65164      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65165            ${icecc_create_env_log_build} 2>&1 )
65166  if test "$?" != "0"; then
65167    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65168$as_echo "$as_me: icecc-create-env output:" >&6;}
65169    cat \
65170            ${icecc_create_env_log_build}
65171    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65172  fi
65173
65174      elif test "x${BUILD_CC##*/}" = "xclang"; then
65175
65176  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65177      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65178  if test "$?" != "0"; then
65179    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65180$as_echo "$as_me: icecc-create-env output:" >&6;}
65181    cat ${icecc_create_env_log_build}
65182    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65183  fi
65184
65185      else
65186        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65187      fi
65188      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65189      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65190      if test ! -f ${ICECC_ENV_BUNDLE}; then
65191        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65192      fi
65193      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65194$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65195      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65196$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65197      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65198          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65199    else
65200      BUILD_ICECC="${ICECC}"
65201    fi
65202
65203
65204  fi
65205
65206
65207# Can the C/C++ compiler use precompiled headers?
65208
65209
65210  ###############################################################################
65211  #
65212  # Can the C/C++ compiler use precompiled headers?
65213  #
65214  # Check whether --enable-precompiled-headers was given.
65215if test "${enable_precompiled_headers+set}" = set; then :
65216  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65217else
65218  ENABLE_PRECOMPH=yes
65219fi
65220
65221
65222  USE_PRECOMPILED_HEADER=1
65223  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65224$as_echo_n "checking If precompiled header is enabled... " >&6; }
65225  if test "x$ENABLE_PRECOMPH" = xno; then
65226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65227$as_echo "no, forced" >&6; }
65228    USE_PRECOMPILED_HEADER=0
65229  elif test "x$ICECC" != "x"; then
65230    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65231$as_echo "no, does not work effectively with icecc" >&6; }
65232    USE_PRECOMPILED_HEADER=0
65233  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65234    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65235$as_echo "no, does not work with Solaris Studio" >&6; }
65236    USE_PRECOMPILED_HEADER=0
65237  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65239$as_echo "no, does not work with xlc" >&6; }
65240    USE_PRECOMPILED_HEADER=0
65241  else
65242    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65243$as_echo "yes" >&6; }
65244  fi
65245
65246  if test "x$ENABLE_PRECOMPH" = xyes; then
65247    # Check that the compiler actually supports precomp headers.
65248    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65249      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65250$as_echo_n "checking that precompiled headers work... " >&6; }
65251      echo "int alfa();" > conftest.h
65252      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65253      if test ! -f conftest.hpp.gch; then
65254        USE_PRECOMPILED_HEADER=0
65255        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65256$as_echo "no" >&6; }
65257      else
65258        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65259$as_echo "yes" >&6; }
65260      fi
65261      $RM conftest.h conftest.hpp.gch
65262    fi
65263  fi
65264
65265
65266
65267
65268# Setup use of ccache, if available
65269
65270  # Check whether --enable-ccache was given.
65271if test "${enable_ccache+set}" = set; then :
65272  enableval=$enable_ccache;
65273fi
65274
65275
65276  CCACHE_STATUS=
65277  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65278$as_echo_n "checking is ccache enabled... " >&6; }
65279  if test "x$enable_ccache" = xyes; then
65280    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65281      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65282$as_echo "yes" >&6; }
65283      OLD_PATH="$PATH"
65284      if test "x$TOOLCHAIN_PATH" != x; then
65285        PATH=$TOOLCHAIN_PATH:$PATH
65286      fi
65287
65288
65289
65290  # Publish this variable in the help.
65291
65292
65293  if [ -z "${CCACHE+x}" ]; then
65294    # The variable is not set by user, try to locate tool using the code snippet
65295    for ac_prog in ccache
65296do
65297  # Extract the first word of "$ac_prog", so it can be a program name with args.
65298set dummy $ac_prog; ac_word=$2
65299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65300$as_echo_n "checking for $ac_word... " >&6; }
65301if ${ac_cv_path_CCACHE+:} false; then :
65302  $as_echo_n "(cached) " >&6
65303else
65304  case $CCACHE in
65305  [\\/]* | ?:[\\/]*)
65306  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65307  ;;
65308  *)
65309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65310for as_dir in $PATH
65311do
65312  IFS=$as_save_IFS
65313  test -z "$as_dir" && as_dir=.
65314    for ac_exec_ext in '' $ac_executable_extensions; do
65315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65316    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65318    break 2
65319  fi
65320done
65321  done
65322IFS=$as_save_IFS
65323
65324  ;;
65325esac
65326fi
65327CCACHE=$ac_cv_path_CCACHE
65328if test -n "$CCACHE"; then
65329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65330$as_echo "$CCACHE" >&6; }
65331else
65332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65333$as_echo "no" >&6; }
65334fi
65335
65336
65337  test -n "$CCACHE" && break
65338done
65339
65340  else
65341    # The variable is set, but is it from the command line or the environment?
65342
65343    # Try to remove the string !CCACHE! from our list.
65344    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65345    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65346      # If it failed, the variable was not from the command line. Ignore it,
65347      # but warn the user (except for BASH, which is always set by the calling BASH).
65348      if test "xCCACHE" != xBASH; then
65349        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65350$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65351      fi
65352      # Try to locate tool using the code snippet
65353      for ac_prog in ccache
65354do
65355  # Extract the first word of "$ac_prog", so it can be a program name with args.
65356set dummy $ac_prog; ac_word=$2
65357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65358$as_echo_n "checking for $ac_word... " >&6; }
65359if ${ac_cv_path_CCACHE+:} false; then :
65360  $as_echo_n "(cached) " >&6
65361else
65362  case $CCACHE in
65363  [\\/]* | ?:[\\/]*)
65364  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65365  ;;
65366  *)
65367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65368for as_dir in $PATH
65369do
65370  IFS=$as_save_IFS
65371  test -z "$as_dir" && as_dir=.
65372    for ac_exec_ext in '' $ac_executable_extensions; do
65373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65374    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65376    break 2
65377  fi
65378done
65379  done
65380IFS=$as_save_IFS
65381
65382  ;;
65383esac
65384fi
65385CCACHE=$ac_cv_path_CCACHE
65386if test -n "$CCACHE"; then
65387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65388$as_echo "$CCACHE" >&6; }
65389else
65390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65391$as_echo "no" >&6; }
65392fi
65393
65394
65395  test -n "$CCACHE" && break
65396done
65397
65398    else
65399      # If it succeeded, then it was overridden by the user. We will use it
65400      # for the tool.
65401
65402      # First remove it from the list of overridden variables, so we can test
65403      # for unknown variables in the end.
65404      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65405
65406      # Check if we try to supply an empty value
65407      if test "x$CCACHE" = x; then
65408        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65409$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65410        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65411$as_echo_n "checking for CCACHE... " >&6; }
65412        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65413$as_echo "disabled" >&6; }
65414      else
65415        # Check if the provided tool contains a complete path.
65416        tool_specified="$CCACHE"
65417        tool_basename="${tool_specified##*/}"
65418        if test "x$tool_basename" = "x$tool_specified"; then
65419          # A command without a complete path is provided, search $PATH.
65420          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65421$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65422          # Extract the first word of "$tool_basename", so it can be a program name with args.
65423set dummy $tool_basename; ac_word=$2
65424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65425$as_echo_n "checking for $ac_word... " >&6; }
65426if ${ac_cv_path_CCACHE+:} false; then :
65427  $as_echo_n "(cached) " >&6
65428else
65429  case $CCACHE in
65430  [\\/]* | ?:[\\/]*)
65431  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65432  ;;
65433  *)
65434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65435for as_dir in $PATH
65436do
65437  IFS=$as_save_IFS
65438  test -z "$as_dir" && as_dir=.
65439    for ac_exec_ext in '' $ac_executable_extensions; do
65440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65441    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65443    break 2
65444  fi
65445done
65446  done
65447IFS=$as_save_IFS
65448
65449  ;;
65450esac
65451fi
65452CCACHE=$ac_cv_path_CCACHE
65453if test -n "$CCACHE"; then
65454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65455$as_echo "$CCACHE" >&6; }
65456else
65457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65458$as_echo "no" >&6; }
65459fi
65460
65461
65462          if test "x$CCACHE" = x; then
65463            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65464          fi
65465        else
65466          # Otherwise we believe it is a complete path. Use it as it is.
65467          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65468$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65469          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65470$as_echo_n "checking for CCACHE... " >&6; }
65471          if test ! -x "$tool_specified"; then
65472            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65473$as_echo "not found" >&6; }
65474            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65475          fi
65476          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65477$as_echo "$tool_specified" >&6; }
65478        fi
65479      fi
65480    fi
65481
65482  fi
65483
65484
65485
65486  if test "x$CCACHE" = x; then
65487    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65488  fi
65489
65490
65491      PATH="$OLD_PATH"
65492      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65493      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65494    else
65495      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65496$as_echo "no" >&6; }
65497      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65498$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65499    fi
65500  elif test "x$enable_ccache" = xno; then
65501    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65502$as_echo "no, explicitly disabled" >&6; }
65503    CCACHE_STATUS="Disabled"
65504  elif test "x$enable_ccache" = x; then
65505    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65506$as_echo "no" >&6; }
65507  else
65508    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65509$as_echo "unknown" >&6; }
65510    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65511  fi
65512
65513
65514
65515# Check whether --with-ccache-dir was given.
65516if test "${with_ccache_dir+set}" = set; then :
65517  withval=$with_ccache_dir;
65518fi
65519
65520
65521  if test "x$with_ccache_dir" != x; then
65522    # When using a non home ccache directory, assume the use is to share ccache files
65523    # with other users. Thus change the umask.
65524    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65525    if test "x$CCACHE" = x; then
65526      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65527$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65528    fi
65529  fi
65530
65531  if test "x$CCACHE" != x; then
65532
65533  if test "x$CCACHE" != x; then
65534    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65535      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65536          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65537      if test "x$HAS_BAD_CCACHE" != "x"; then
65538        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65539      fi
65540      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65541$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65542      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65543      PUSHED_FLAGS="$CXXFLAGS"
65544      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65545      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65546/* end confdefs.h.  */
65547
65548int
65549main ()
65550{
65551
65552  ;
65553  return 0;
65554}
65555_ACEOF
65556if ac_fn_cxx_try_compile "$LINENO"; then :
65557  CC_KNOWS_CCACHE_TRICK=yes
65558else
65559  CC_KNOWS_CCACHE_TRICK=no
65560fi
65561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65562      CXXFLAGS="$PUSHED_FLAGS"
65563      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65564        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65565$as_echo "yes" >&6; }
65566        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65567
65568        CCACHE_SLOPPINESS=pch_defines,time_macros
65569      else
65570        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65571$as_echo "no" >&6; }
65572        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65573      fi
65574    fi
65575
65576    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65577        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65578
65579    if test "x$SET_CCACHE_DIR" != x; then
65580      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65581      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65582    fi
65583  fi
65584
65585  fi
65586
65587
65588###############################################################################
65589#
65590# And now the finish...
65591#
65592###############################################################################
65593
65594# Check for some common pitfalls
65595
65596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65597    file_to_test="$SRC_ROOT/LICENSE"
65598    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65599      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
65600    fi
65601  fi
65602
65603
65604  # Did user specify any unknown variables?
65605
65606  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65607    # Replace the separating ! with spaces before presenting for end user.
65608    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65609    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65610$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65611  fi
65612
65613
65614  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65615$as_echo_n "checking if build directory is on local disk... " >&6; }
65616
65617  # df -l lists only local disks; if the given directory is not found then
65618  # a non-zero exit code is given
65619  if test "x$DF" = x; then
65620    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65621      # msys does not have df; use Windows "net use" instead.
65622      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65623      if test "x$IS_NETWORK_DISK" = x; then
65624        OUTPUT_DIR_IS_LOCAL="yes"
65625      else
65626        OUTPUT_DIR_IS_LOCAL="no"
65627      fi
65628    else
65629      # No df here, say it's local
65630      OUTPUT_DIR_IS_LOCAL="yes"
65631    fi
65632  else
65633    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65634      OUTPUT_DIR_IS_LOCAL="yes"
65635    else
65636      OUTPUT_DIR_IS_LOCAL="no"
65637    fi
65638  fi
65639
65640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65641$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65642
65643
65644
65645  # Check if the user has any old-style ALT_ variables set.
65646  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65647
65648  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65649  # Since we can't properly handle the dependencies for this, warn the user about the situation
65650  if test -e $OUTPUT_ROOT/spec.gmk; then
65651    IS_RECONFIGURE=yes
65652  else
65653    IS_RECONFIGURE=no
65654  fi
65655
65656
65657# At the end, call the custom hook. (Dummy macro if no custom sources available)
65658
65659
65660# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65661
65662  # Keep feature lists sorted and free of duplicates
65663  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65664  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65665  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65666  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65667  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65668  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65669  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65670
65671  # Validate features
65672  for variant in $JVM_VARIANTS; do
65673    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65674$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65675    features_var_name=JVM_FEATURES_$variant
65676    JVM_FEATURES_TO_TEST=${!features_var_name}
65677    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65678$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65679    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
65680    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
65681    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
65682    if test "x$INVALID_FEATURES" != x; then
65683      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65684    fi
65685  done
65686
65687
65688# We're messing a bit with internal autoconf variables to put the config.status
65689# in the output directory instead of the current directory.
65690CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65691
65692# Create the actual output files. Now the main work of configure is done.
65693cat >confcache <<\_ACEOF
65694# This file is a shell script that caches the results of configure
65695# tests run on this system so they can be shared between configure
65696# scripts and configure runs, see configure's option --config-cache.
65697# It is not useful on other systems.  If it contains results you don't
65698# want to keep, you may remove or edit it.
65699#
65700# config.status only pays attention to the cache file if you give it
65701# the --recheck option to rerun configure.
65702#
65703# `ac_cv_env_foo' variables (set or unset) will be overridden when
65704# loading this file, other *unset* `ac_cv_foo' will be assigned the
65705# following values.
65706
65707_ACEOF
65708
65709# The following way of writing the cache mishandles newlines in values,
65710# but we know of no workaround that is simple, portable, and efficient.
65711# So, we kill variables containing newlines.
65712# Ultrix sh set writes to stderr and can't be redirected directly,
65713# and sets the high bit in the cache file unless we assign to the vars.
65714(
65715  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65716    eval ac_val=\$$ac_var
65717    case $ac_val in #(
65718    *${as_nl}*)
65719      case $ac_var in #(
65720      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65721$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65722      esac
65723      case $ac_var in #(
65724      _ | IFS | as_nl) ;; #(
65725      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65726      *) { eval $ac_var=; unset $ac_var;} ;;
65727      esac ;;
65728    esac
65729  done
65730
65731  (set) 2>&1 |
65732    case $as_nl`(ac_space=' '; set) 2>&1` in #(
65733    *${as_nl}ac_space=\ *)
65734      # `set' does not quote correctly, so add quotes: double-quote
65735      # substitution turns \\\\ into \\, and sed turns \\ into \.
65736      sed -n \
65737	"s/'/'\\\\''/g;
65738	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65739      ;; #(
65740    *)
65741      # `set' quotes correctly as required by POSIX, so do not add quotes.
65742      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65743      ;;
65744    esac |
65745    sort
65746) |
65747  sed '
65748     /^ac_cv_env_/b end
65749     t clear
65750     :clear
65751     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65752     t end
65753     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65754     :end' >>confcache
65755if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65756  if test -w "$cache_file"; then
65757    if test "x$cache_file" != "x/dev/null"; then
65758      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65759$as_echo "$as_me: updating cache $cache_file" >&6;}
65760      if test ! -f "$cache_file" || test -h "$cache_file"; then
65761	cat confcache >"$cache_file"
65762      else
65763        case $cache_file in #(
65764        */* | ?:*)
65765	  mv -f confcache "$cache_file"$$ &&
65766	  mv -f "$cache_file"$$ "$cache_file" ;; #(
65767        *)
65768	  mv -f confcache "$cache_file" ;;
65769	esac
65770      fi
65771    fi
65772  else
65773    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65774$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65775  fi
65776fi
65777rm -f confcache
65778
65779test "x$prefix" = xNONE && prefix=$ac_default_prefix
65780# Let make expand exec_prefix.
65781test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65782
65783# Transform confdefs.h into DEFS.
65784# Protect against shell expansion while executing Makefile rules.
65785# Protect against Makefile macro expansion.
65786#
65787# If the first sed substitution is executed (which looks for macros that
65788# take arguments), then branch to the quote section.  Otherwise,
65789# look for a macro that doesn't take arguments.
65790ac_script='
65791:mline
65792/\\$/{
65793 N
65794 s,\\\n,,
65795 b mline
65796}
65797t clear
65798:clear
65799s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
65800t quote
65801s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
65802t quote
65803b any
65804:quote
65805s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65806s/\[/\\&/g
65807s/\]/\\&/g
65808s/\$/$$/g
65809H
65810:any
65811${
65812	g
65813	s/^\n//
65814	s/\n/ /g
65815	p
65816}
65817'
65818DEFS=`sed -n "$ac_script" confdefs.h`
65819
65820
65821ac_libobjs=
65822ac_ltlibobjs=
65823U=
65824for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65825  # 1. Remove the extension, and $U if already installed.
65826  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65827  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65828  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65829  #    will be set to the directory where LIBOBJS objects are built.
65830  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65831  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65832done
65833LIBOBJS=$ac_libobjs
65834
65835LTLIBOBJS=$ac_ltlibobjs
65836
65837
65838
65839: "${CONFIG_STATUS=./config.status}"
65840ac_write_fail=0
65841ac_clean_files_save=$ac_clean_files
65842ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65843{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65844$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65845as_write_fail=0
65846cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65847#! $SHELL
65848# Generated by $as_me.
65849# Run this file to recreate the current configuration.
65850# Compiler output produced by configure, useful for debugging
65851# configure, is in config.log if it exists.
65852
65853debug=false
65854ac_cs_recheck=false
65855ac_cs_silent=false
65856
65857SHELL=\${CONFIG_SHELL-$SHELL}
65858export SHELL
65859_ASEOF
65860cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65861## -------------------- ##
65862## M4sh Initialization. ##
65863## -------------------- ##
65864
65865# Be more Bourne compatible
65866DUALCASE=1; export DUALCASE # for MKS sh
65867if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65868  emulate sh
65869  NULLCMD=:
65870  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65871  # is contrary to our usage.  Disable this feature.
65872  alias -g '${1+"$@"}'='"$@"'
65873  setopt NO_GLOB_SUBST
65874else
65875  case `(set -o) 2>/dev/null` in #(
65876  *posix*) :
65877    set -o posix ;; #(
65878  *) :
65879     ;;
65880esac
65881fi
65882
65883
65884as_nl='
65885'
65886export as_nl
65887# Printing a long string crashes Solaris 7 /usr/bin/printf.
65888as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65889as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65890as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65891# Prefer a ksh shell builtin over an external printf program on Solaris,
65892# but without wasting forks for bash or zsh.
65893if test -z "$BASH_VERSION$ZSH_VERSION" \
65894    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65895  as_echo='print -r --'
65896  as_echo_n='print -rn --'
65897elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65898  as_echo='printf %s\n'
65899  as_echo_n='printf %s'
65900else
65901  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65902    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65903    as_echo_n='/usr/ucb/echo -n'
65904  else
65905    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65906    as_echo_n_body='eval
65907      arg=$1;
65908      case $arg in #(
65909      *"$as_nl"*)
65910	expr "X$arg" : "X\\(.*\\)$as_nl";
65911	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65912      esac;
65913      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65914    '
65915    export as_echo_n_body
65916    as_echo_n='sh -c $as_echo_n_body as_echo'
65917  fi
65918  export as_echo_body
65919  as_echo='sh -c $as_echo_body as_echo'
65920fi
65921
65922# The user is always right.
65923if test "${PATH_SEPARATOR+set}" != set; then
65924  PATH_SEPARATOR=:
65925  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65926    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65927      PATH_SEPARATOR=';'
65928  }
65929fi
65930
65931
65932# IFS
65933# We need space, tab and new line, in precisely that order.  Quoting is
65934# there to prevent editors from complaining about space-tab.
65935# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65936# splitting by setting IFS to empty value.)
65937IFS=" ""	$as_nl"
65938
65939# Find who we are.  Look in the path if we contain no directory separator.
65940as_myself=
65941case $0 in #((
65942  *[\\/]* ) as_myself=$0 ;;
65943  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65944for as_dir in $PATH
65945do
65946  IFS=$as_save_IFS
65947  test -z "$as_dir" && as_dir=.
65948    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65949  done
65950IFS=$as_save_IFS
65951
65952     ;;
65953esac
65954# We did not find ourselves, most probably we were run as `sh COMMAND'
65955# in which case we are not to be found in the path.
65956if test "x$as_myself" = x; then
65957  as_myself=$0
65958fi
65959if test ! -f "$as_myself"; then
65960  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65961  exit 1
65962fi
65963
65964# Unset variables that we do not need and which cause bugs (e.g. in
65965# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65966# suppresses any "Segmentation fault" message there.  '((' could
65967# trigger a bug in pdksh 5.2.14.
65968for as_var in BASH_ENV ENV MAIL MAILPATH
65969do eval test x\${$as_var+set} = xset \
65970  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65971done
65972PS1='$ '
65973PS2='> '
65974PS4='+ '
65975
65976# NLS nuisances.
65977LC_ALL=C
65978export LC_ALL
65979LANGUAGE=C
65980export LANGUAGE
65981
65982# CDPATH.
65983(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65984
65985
65986# as_fn_error STATUS ERROR [LINENO LOG_FD]
65987# ----------------------------------------
65988# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65989# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65990# script with STATUS, using 1 if that was 0.
65991as_fn_error ()
65992{
65993  as_status=$1; test $as_status -eq 0 && as_status=1
65994  if test "$4"; then
65995    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65996    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65997  fi
65998  $as_echo "$as_me: error: $2" >&2
65999  as_fn_exit $as_status
66000} # as_fn_error
66001
66002
66003# as_fn_set_status STATUS
66004# -----------------------
66005# Set $? to STATUS, without forking.
66006as_fn_set_status ()
66007{
66008  return $1
66009} # as_fn_set_status
66010
66011# as_fn_exit STATUS
66012# -----------------
66013# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66014as_fn_exit ()
66015{
66016  set +e
66017  as_fn_set_status $1
66018  exit $1
66019} # as_fn_exit
66020
66021# as_fn_unset VAR
66022# ---------------
66023# Portably unset VAR.
66024as_fn_unset ()
66025{
66026  { eval $1=; unset $1;}
66027}
66028as_unset=as_fn_unset
66029# as_fn_append VAR VALUE
66030# ----------------------
66031# Append the text in VALUE to the end of the definition contained in VAR. Take
66032# advantage of any shell optimizations that allow amortized linear growth over
66033# repeated appends, instead of the typical quadratic growth present in naive
66034# implementations.
66035if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66036  eval 'as_fn_append ()
66037  {
66038    eval $1+=\$2
66039  }'
66040else
66041  as_fn_append ()
66042  {
66043    eval $1=\$$1\$2
66044  }
66045fi # as_fn_append
66046
66047# as_fn_arith ARG...
66048# ------------------
66049# Perform arithmetic evaluation on the ARGs, and store the result in the
66050# global $as_val. Take advantage of shells that can avoid forks. The arguments
66051# must be portable across $(()) and expr.
66052if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66053  eval 'as_fn_arith ()
66054  {
66055    as_val=$(( $* ))
66056  }'
66057else
66058  as_fn_arith ()
66059  {
66060    as_val=`expr "$@" || test $? -eq 1`
66061  }
66062fi # as_fn_arith
66063
66064
66065if expr a : '\(a\)' >/dev/null 2>&1 &&
66066   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66067  as_expr=expr
66068else
66069  as_expr=false
66070fi
66071
66072if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66073  as_basename=basename
66074else
66075  as_basename=false
66076fi
66077
66078if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66079  as_dirname=dirname
66080else
66081  as_dirname=false
66082fi
66083
66084as_me=`$as_basename -- "$0" ||
66085$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66086	 X"$0" : 'X\(//\)$' \| \
66087	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66088$as_echo X/"$0" |
66089    sed '/^.*\/\([^/][^/]*\)\/*$/{
66090	    s//\1/
66091	    q
66092	  }
66093	  /^X\/\(\/\/\)$/{
66094	    s//\1/
66095	    q
66096	  }
66097	  /^X\/\(\/\).*/{
66098	    s//\1/
66099	    q
66100	  }
66101	  s/.*/./; q'`
66102
66103# Avoid depending upon Character Ranges.
66104as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66105as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66106as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66107as_cr_digits='0123456789'
66108as_cr_alnum=$as_cr_Letters$as_cr_digits
66109
66110ECHO_C= ECHO_N= ECHO_T=
66111case `echo -n x` in #(((((
66112-n*)
66113  case `echo 'xy\c'` in
66114  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66115  xy)  ECHO_C='\c';;
66116  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66117       ECHO_T='	';;
66118  esac;;
66119*)
66120  ECHO_N='-n';;
66121esac
66122
66123rm -f conf$$ conf$$.exe conf$$.file
66124if test -d conf$$.dir; then
66125  rm -f conf$$.dir/conf$$.file
66126else
66127  rm -f conf$$.dir
66128  mkdir conf$$.dir 2>/dev/null
66129fi
66130if (echo >conf$$.file) 2>/dev/null; then
66131  if ln -s conf$$.file conf$$ 2>/dev/null; then
66132    as_ln_s='ln -s'
66133    # ... but there are two gotchas:
66134    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66135    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66136    # In both cases, we have to default to `cp -pR'.
66137    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66138      as_ln_s='cp -pR'
66139  elif ln conf$$.file conf$$ 2>/dev/null; then
66140    as_ln_s=ln
66141  else
66142    as_ln_s='cp -pR'
66143  fi
66144else
66145  as_ln_s='cp -pR'
66146fi
66147rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66148rmdir conf$$.dir 2>/dev/null
66149
66150
66151# as_fn_mkdir_p
66152# -------------
66153# Create "$as_dir" as a directory, including parents if necessary.
66154as_fn_mkdir_p ()
66155{
66156
66157  case $as_dir in #(
66158  -*) as_dir=./$as_dir;;
66159  esac
66160  test -d "$as_dir" || eval $as_mkdir_p || {
66161    as_dirs=
66162    while :; do
66163      case $as_dir in #(
66164      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66165      *) as_qdir=$as_dir;;
66166      esac
66167      as_dirs="'$as_qdir' $as_dirs"
66168      as_dir=`$as_dirname -- "$as_dir" ||
66169$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66170	 X"$as_dir" : 'X\(//\)[^/]' \| \
66171	 X"$as_dir" : 'X\(//\)$' \| \
66172	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66173$as_echo X"$as_dir" |
66174    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66175	    s//\1/
66176	    q
66177	  }
66178	  /^X\(\/\/\)[^/].*/{
66179	    s//\1/
66180	    q
66181	  }
66182	  /^X\(\/\/\)$/{
66183	    s//\1/
66184	    q
66185	  }
66186	  /^X\(\/\).*/{
66187	    s//\1/
66188	    q
66189	  }
66190	  s/.*/./; q'`
66191      test -d "$as_dir" && break
66192    done
66193    test -z "$as_dirs" || eval "mkdir $as_dirs"
66194  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66195
66196
66197} # as_fn_mkdir_p
66198if mkdir -p . 2>/dev/null; then
66199  as_mkdir_p='mkdir -p "$as_dir"'
66200else
66201  test -d ./-p && rmdir ./-p
66202  as_mkdir_p=false
66203fi
66204
66205
66206# as_fn_executable_p FILE
66207# -----------------------
66208# Test if FILE is an executable regular file.
66209as_fn_executable_p ()
66210{
66211  test -f "$1" && test -x "$1"
66212} # as_fn_executable_p
66213as_test_x='test -x'
66214as_executable_p=as_fn_executable_p
66215
66216# Sed expression to map a string onto a valid CPP name.
66217as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66218
66219# Sed expression to map a string onto a valid variable name.
66220as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66221
66222
66223exec 6>&1
66224## ----------------------------------- ##
66225## Main body of $CONFIG_STATUS script. ##
66226## ----------------------------------- ##
66227_ASEOF
66228test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66229
66230cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66231# Save the log message, to keep $0 and so on meaningful, and to
66232# report actual input values of CONFIG_FILES etc. instead of their
66233# values after options handling.
66234ac_log="
66235This file was extended by OpenJDK $as_me jdk9, which was
66236generated by GNU Autoconf 2.69.  Invocation command line was
66237
66238  CONFIG_FILES    = $CONFIG_FILES
66239  CONFIG_HEADERS  = $CONFIG_HEADERS
66240  CONFIG_LINKS    = $CONFIG_LINKS
66241  CONFIG_COMMANDS = $CONFIG_COMMANDS
66242  $ $0 $@
66243
66244on `(hostname || uname -n) 2>/dev/null | sed 1q`
66245"
66246
66247_ACEOF
66248
66249case $ac_config_files in *"
66250"*) set x $ac_config_files; shift; ac_config_files=$*;;
66251esac
66252
66253
66254
66255cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66256# Files that config.status was made for.
66257config_files="$ac_config_files"
66258
66259_ACEOF
66260
66261cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66262ac_cs_usage="\
66263\`$as_me' instantiates files and other configuration actions
66264from templates according to the current configuration.  Unless the files
66265and actions are specified as TAGs, all are instantiated by default.
66266
66267Usage: $0 [OPTION]... [TAG]...
66268
66269  -h, --help       print this help, then exit
66270  -V, --version    print version number and configuration settings, then exit
66271      --config     print configuration, then exit
66272  -q, --quiet, --silent
66273                   do not print progress messages
66274  -d, --debug      don't remove temporary files
66275      --recheck    update $as_me by reconfiguring in the same conditions
66276      --file=FILE[:TEMPLATE]
66277                   instantiate the configuration file FILE
66278
66279Configuration files:
66280$config_files
66281
66282Report bugs to <build-dev@openjdk.java.net>.
66283OpenJDK home page: <http://openjdk.java.net>."
66284
66285_ACEOF
66286cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66287ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66288ac_cs_version="\\
66289OpenJDK config.status jdk9
66290configured by $0, generated by GNU Autoconf 2.69,
66291  with options \\"\$ac_cs_config\\"
66292
66293Copyright (C) 2012 Free Software Foundation, Inc.
66294This config.status script is free software; the Free Software Foundation
66295gives unlimited permission to copy, distribute and modify it."
66296
66297ac_pwd='$ac_pwd'
66298srcdir='$srcdir'
66299AWK='$AWK'
66300test -n "\$AWK" || AWK=awk
66301_ACEOF
66302
66303cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66304# The default lists apply if the user does not specify any file.
66305ac_need_defaults=:
66306while test $# != 0
66307do
66308  case $1 in
66309  --*=?*)
66310    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66311    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66312    ac_shift=:
66313    ;;
66314  --*=)
66315    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66316    ac_optarg=
66317    ac_shift=:
66318    ;;
66319  *)
66320    ac_option=$1
66321    ac_optarg=$2
66322    ac_shift=shift
66323    ;;
66324  esac
66325
66326  case $ac_option in
66327  # Handling of the options.
66328  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66329    ac_cs_recheck=: ;;
66330  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66331    $as_echo "$ac_cs_version"; exit ;;
66332  --config | --confi | --conf | --con | --co | --c )
66333    $as_echo "$ac_cs_config"; exit ;;
66334  --debug | --debu | --deb | --de | --d | -d )
66335    debug=: ;;
66336  --file | --fil | --fi | --f )
66337    $ac_shift
66338    case $ac_optarg in
66339    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66340    '') as_fn_error $? "missing file argument" ;;
66341    esac
66342    as_fn_append CONFIG_FILES " '$ac_optarg'"
66343    ac_need_defaults=false;;
66344  --he | --h |  --help | --hel | -h )
66345    $as_echo "$ac_cs_usage"; exit ;;
66346  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66347  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66348    ac_cs_silent=: ;;
66349
66350  # This is an error.
66351  -*) as_fn_error $? "unrecognized option: \`$1'
66352Try \`$0 --help' for more information." ;;
66353
66354  *) as_fn_append ac_config_targets " $1"
66355     ac_need_defaults=false ;;
66356
66357  esac
66358  shift
66359done
66360
66361ac_configure_extra_args=
66362
66363if $ac_cs_silent; then
66364  exec 6>/dev/null
66365  ac_configure_extra_args="$ac_configure_extra_args --silent"
66366fi
66367
66368_ACEOF
66369cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66370if \$ac_cs_recheck; then
66371  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66372  shift
66373  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66374  CONFIG_SHELL='$SHELL'
66375  export CONFIG_SHELL
66376  exec "\$@"
66377fi
66378
66379_ACEOF
66380cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66381exec 5>>config.log
66382{
66383  echo
66384  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66385## Running $as_me. ##
66386_ASBOX
66387  $as_echo "$ac_log"
66388} >&5
66389
66390_ACEOF
66391cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66392_ACEOF
66393
66394cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66395
66396# Handling of arguments.
66397for ac_config_target in $ac_config_targets
66398do
66399  case $ac_config_target in
66400    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66401    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66402    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66403    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66404    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66405
66406  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66407  esac
66408done
66409
66410
66411# If the user did not use the arguments to specify the items to instantiate,
66412# then the envvar interface is used.  Set only those that are not.
66413# We use the long form for the default assignment because of an extremely
66414# bizarre bug on SunOS 4.1.3.
66415if $ac_need_defaults; then
66416  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66417fi
66418
66419# Have a temporary directory for convenience.  Make it in the build tree
66420# simply because there is no reason against having it here, and in addition,
66421# creating and moving files from /tmp can sometimes cause problems.
66422# Hook for its removal unless debugging.
66423# Note that there is a small window in which the directory will not be cleaned:
66424# after its creation but before its name has been assigned to `$tmp'.
66425$debug ||
66426{
66427  tmp= ac_tmp=
66428  trap 'exit_status=$?
66429  : "${ac_tmp:=$tmp}"
66430  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66431' 0
66432  trap 'as_fn_exit 1' 1 2 13 15
66433}
66434# Create a (secure) tmp directory for tmp files.
66435
66436{
66437  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66438  test -d "$tmp"
66439}  ||
66440{
66441  tmp=./conf$$-$RANDOM
66442  (umask 077 && mkdir "$tmp")
66443} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66444ac_tmp=$tmp
66445
66446# Set up the scripts for CONFIG_FILES section.
66447# No need to generate them if there are no CONFIG_FILES.
66448# This happens for instance with `./config.status config.h'.
66449if test -n "$CONFIG_FILES"; then
66450
66451
66452ac_cr=`echo X | tr X '\015'`
66453# On cygwin, bash can eat \r inside `` if the user requested igncr.
66454# But we know of no other shell where ac_cr would be empty at this
66455# point, so we can use a bashism as a fallback.
66456if test "x$ac_cr" = x; then
66457  eval ac_cr=\$\'\\r\'
66458fi
66459ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66460if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66461  ac_cs_awk_cr='\\r'
66462else
66463  ac_cs_awk_cr=$ac_cr
66464fi
66465
66466echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66467_ACEOF
66468
66469
66470{
66471  echo "cat >conf$$subs.awk <<_ACEOF" &&
66472  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66473  echo "_ACEOF"
66474} >conf$$subs.sh ||
66475  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66476ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66477ac_delim='%!_!# '
66478for ac_last_try in false false false false false :; do
66479  . ./conf$$subs.sh ||
66480    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66481
66482  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66483  if test $ac_delim_n = $ac_delim_num; then
66484    break
66485  elif $ac_last_try; then
66486    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66487  else
66488    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66489  fi
66490done
66491rm -f conf$$subs.sh
66492
66493cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66494cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66495_ACEOF
66496sed -n '
66497h
66498s/^/S["/; s/!.*/"]=/
66499p
66500g
66501s/^[^!]*!//
66502:repl
66503t repl
66504s/'"$ac_delim"'$//
66505t delim
66506:nl
66507h
66508s/\(.\{148\}\)..*/\1/
66509t more1
66510s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66511p
66512n
66513b repl
66514:more1
66515s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66516p
66517g
66518s/.\{148\}//
66519t nl
66520:delim
66521h
66522s/\(.\{148\}\)..*/\1/
66523t more2
66524s/["\\]/\\&/g; s/^/"/; s/$/"/
66525p
66526b
66527:more2
66528s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66529p
66530g
66531s/.\{148\}//
66532t delim
66533' <conf$$subs.awk | sed '
66534/^[^""]/{
66535  N
66536  s/\n//
66537}
66538' >>$CONFIG_STATUS || ac_write_fail=1
66539rm -f conf$$subs.awk
66540cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66541_ACAWK
66542cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66543  for (key in S) S_is_set[key] = 1
66544  FS = ""
66545
66546}
66547{
66548  line = $ 0
66549  nfields = split(line, field, "@")
66550  substed = 0
66551  len = length(field[1])
66552  for (i = 2; i < nfields; i++) {
66553    key = field[i]
66554    keylen = length(key)
66555    if (S_is_set[key]) {
66556      value = S[key]
66557      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66558      len += length(value) + length(field[++i])
66559      substed = 1
66560    } else
66561      len += 1 + keylen
66562  }
66563
66564  print line
66565}
66566
66567_ACAWK
66568_ACEOF
66569cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66570if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66571  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66572else
66573  cat
66574fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66575  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66576_ACEOF
66577
66578# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66579# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66580# trailing colons and then remove the whole line if VPATH becomes empty
66581# (actually we leave an empty line to preserve line numbers).
66582if test "x$srcdir" = x.; then
66583  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66584h
66585s///
66586s/^/:/
66587s/[	 ]*$/:/
66588s/:\$(srcdir):/:/g
66589s/:\${srcdir}:/:/g
66590s/:@srcdir@:/:/g
66591s/^:*//
66592s/:*$//
66593x
66594s/\(=[	 ]*\).*/\1/
66595G
66596s/\n//
66597s/^[^=]*=[	 ]*$//
66598}'
66599fi
66600
66601cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66602fi # test -n "$CONFIG_FILES"
66603
66604
66605eval set X "  :F $CONFIG_FILES      "
66606shift
66607for ac_tag
66608do
66609  case $ac_tag in
66610  :[FHLC]) ac_mode=$ac_tag; continue;;
66611  esac
66612  case $ac_mode$ac_tag in
66613  :[FHL]*:*);;
66614  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66615  :[FH]-) ac_tag=-:-;;
66616  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66617  esac
66618  ac_save_IFS=$IFS
66619  IFS=:
66620  set x $ac_tag
66621  IFS=$ac_save_IFS
66622  shift
66623  ac_file=$1
66624  shift
66625
66626  case $ac_mode in
66627  :L) ac_source=$1;;
66628  :[FH])
66629    ac_file_inputs=
66630    for ac_f
66631    do
66632      case $ac_f in
66633      -) ac_f="$ac_tmp/stdin";;
66634      *) # Look for the file first in the build tree, then in the source tree
66635	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66636	 # because $ac_f cannot contain `:'.
66637	 test -f "$ac_f" ||
66638	   case $ac_f in
66639	   [\\/$]*) false;;
66640	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66641	   esac ||
66642	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66643      esac
66644      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66645      as_fn_append ac_file_inputs " '$ac_f'"
66646    done
66647
66648    # Let's still pretend it is `configure' which instantiates (i.e., don't
66649    # use $as_me), people would be surprised to read:
66650    #    /* config.h.  Generated by config.status.  */
66651    configure_input='Generated from '`
66652	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66653	`' by configure.'
66654    if test x"$ac_file" != x-; then
66655      configure_input="$ac_file.  $configure_input"
66656      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66657$as_echo "$as_me: creating $ac_file" >&6;}
66658    fi
66659    # Neutralize special characters interpreted by sed in replacement strings.
66660    case $configure_input in #(
66661    *\&* | *\|* | *\\* )
66662       ac_sed_conf_input=`$as_echo "$configure_input" |
66663       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66664    *) ac_sed_conf_input=$configure_input;;
66665    esac
66666
66667    case $ac_tag in
66668    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66669      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66670    esac
66671    ;;
66672  esac
66673
66674  ac_dir=`$as_dirname -- "$ac_file" ||
66675$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66676	 X"$ac_file" : 'X\(//\)[^/]' \| \
66677	 X"$ac_file" : 'X\(//\)$' \| \
66678	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66679$as_echo X"$ac_file" |
66680    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66681	    s//\1/
66682	    q
66683	  }
66684	  /^X\(\/\/\)[^/].*/{
66685	    s//\1/
66686	    q
66687	  }
66688	  /^X\(\/\/\)$/{
66689	    s//\1/
66690	    q
66691	  }
66692	  /^X\(\/\).*/{
66693	    s//\1/
66694	    q
66695	  }
66696	  s/.*/./; q'`
66697  as_dir="$ac_dir"; as_fn_mkdir_p
66698  ac_builddir=.
66699
66700case "$ac_dir" in
66701.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66702*)
66703  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66704  # A ".." for each directory in $ac_dir_suffix.
66705  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66706  case $ac_top_builddir_sub in
66707  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66708  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66709  esac ;;
66710esac
66711ac_abs_top_builddir=$ac_pwd
66712ac_abs_builddir=$ac_pwd$ac_dir_suffix
66713# for backward compatibility:
66714ac_top_builddir=$ac_top_build_prefix
66715
66716case $srcdir in
66717  .)  # We are building in place.
66718    ac_srcdir=.
66719    ac_top_srcdir=$ac_top_builddir_sub
66720    ac_abs_top_srcdir=$ac_pwd ;;
66721  [\\/]* | ?:[\\/]* )  # Absolute name.
66722    ac_srcdir=$srcdir$ac_dir_suffix;
66723    ac_top_srcdir=$srcdir
66724    ac_abs_top_srcdir=$srcdir ;;
66725  *) # Relative name.
66726    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66727    ac_top_srcdir=$ac_top_build_prefix$srcdir
66728    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66729esac
66730ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66731
66732
66733  case $ac_mode in
66734  :F)
66735  #
66736  # CONFIG_FILE
66737  #
66738
66739_ACEOF
66740
66741cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66742# If the template does not know about datarootdir, expand it.
66743# FIXME: This hack should be removed a few years after 2.60.
66744ac_datarootdir_hack=; ac_datarootdir_seen=
66745ac_sed_dataroot='
66746/datarootdir/ {
66747  p
66748  q
66749}
66750/@datadir@/p
66751/@docdir@/p
66752/@infodir@/p
66753/@localedir@/p
66754/@mandir@/p'
66755case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66756*datarootdir*) ac_datarootdir_seen=yes;;
66757*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66758  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66759$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66760_ACEOF
66761cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66762  ac_datarootdir_hack='
66763  s&@datadir@&$datadir&g
66764  s&@docdir@&$docdir&g
66765  s&@infodir@&$infodir&g
66766  s&@localedir@&$localedir&g
66767  s&@mandir@&$mandir&g
66768  s&\\\${datarootdir}&$datarootdir&g' ;;
66769esac
66770_ACEOF
66771
66772# Neutralize VPATH when `$srcdir' = `.'.
66773# Shell code in configure.ac might set extrasub.
66774# FIXME: do we really want to maintain this feature?
66775cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66776ac_sed_extra="$ac_vpsub
66777$extrasub
66778_ACEOF
66779cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66780:t
66781/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66782s|@configure_input@|$ac_sed_conf_input|;t t
66783s&@top_builddir@&$ac_top_builddir_sub&;t t
66784s&@top_build_prefix@&$ac_top_build_prefix&;t t
66785s&@srcdir@&$ac_srcdir&;t t
66786s&@abs_srcdir@&$ac_abs_srcdir&;t t
66787s&@top_srcdir@&$ac_top_srcdir&;t t
66788s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66789s&@builddir@&$ac_builddir&;t t
66790s&@abs_builddir@&$ac_abs_builddir&;t t
66791s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66792$ac_datarootdir_hack
66793"
66794eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66795  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66796
66797test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66798  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66799  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
66800      "$ac_tmp/out"`; test -z "$ac_out"; } &&
66801  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66802which seems to be undefined.  Please make sure it is defined" >&5
66803$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66804which seems to be undefined.  Please make sure it is defined" >&2;}
66805
66806  rm -f "$ac_tmp/stdin"
66807  case $ac_file in
66808  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66809  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66810  esac \
66811  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66812 ;;
66813
66814
66815
66816  esac
66817
66818done # for ac_tag
66819
66820
66821as_fn_exit 0
66822_ACEOF
66823ac_clean_files=$ac_clean_files_save
66824
66825test $ac_write_fail = 0 ||
66826  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66827
66828
66829# configure is writing to config.log, and then calls config.status.
66830# config.status does its own redirection, appending to config.log.
66831# Unfortunately, on DOS this fails, as config.log is still kept open
66832# by configure, so config.status won't be able to write to it; its
66833# output is simply discarded.  So we exec the FD to /dev/null,
66834# effectively closing config.log, so it can be properly (re)opened and
66835# appended to by config.status.  When coming back to configure, we
66836# need to make the FD available again.
66837if test "$no_create" != yes; then
66838  ac_cs_success=:
66839  ac_config_status_args=
66840  test "$silent" = yes &&
66841    ac_config_status_args="$ac_config_status_args --quiet"
66842  exec 5>/dev/null
66843  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66844  exec 5>>config.log
66845  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66846  # would make configure fail if this is the last instruction.
66847  $ac_cs_success || as_fn_exit 1
66848fi
66849if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66850  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66851$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66852fi
66853
66854
66855# After AC_OUTPUT, we need to do final work
66856
66857
66858  # Try to move config.log (generated by autoconf) to the configure-support directory.
66859  if test -e ./config.log; then
66860    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66861  fi
66862
66863  # Rotate our log file (configure.log)
66864  if test -e "$OUTPUT_ROOT/configure.log.old"; then
66865    $RM -f "$OUTPUT_ROOT/configure.log.old"
66866  fi
66867  if test -e "$OUTPUT_ROOT/configure.log"; then
66868    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66869  fi
66870
66871  # Move configure.log from current directory to the build output root
66872  if test -e ./configure.log; then
66873    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66874  fi
66875
66876  # Make the compare script executable
66877  $CHMOD +x $OUTPUT_ROOT/compare.sh
66878
66879
66880# Finally output some useful information to the user
66881
66882  # Finally output some useful information to the user
66883
66884  printf "\n"
66885  printf "====================================================\n"
66886  if test "x$no_create" != "xyes"; then
66887    if test "x$IS_RECONFIGURE" != "xyes"; then
66888      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66889    else
66890      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66891    fi
66892  else
66893    if test "x$IS_RECONFIGURE" != "xyes"; then
66894      printf "A configuration has been successfully checked but not created\n"
66895    else
66896      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66897    fi
66898  fi
66899  if test "x$CONFIGURE_COMMAND_LINE" != x; then
66900    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66901  else
66902    printf "using default settings.\n"
66903  fi
66904
66905  printf "\n"
66906  printf "Configuration summary:\n"
66907  printf "* Debug level:    $DEBUG_LEVEL\n"
66908  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66909  printf "* JDK variant:    $JDK_VARIANT\n"
66910  printf "* JVM variants:   $JVM_VARIANTS\n"
66911  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66912  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66913
66914  printf "\n"
66915  printf "Tools summary:\n"
66916  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66917    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66918  fi
66919  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66920  if test "x$TOOLCHAIN_VERSION" != "x"; then
66921    print_version=" $TOOLCHAIN_VERSION"
66922  fi
66923  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66924  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66925  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66926
66927  printf "\n"
66928  printf "Build performance summary:\n"
66929  printf "* Cores to use:   $JOBS\n"
66930  printf "* Memory limit:   $MEMORY_SIZE MB\n"
66931  if test "x$CCACHE_STATUS" != "x"; then
66932    printf "* ccache status:  $CCACHE_STATUS\n"
66933  fi
66934  printf "\n"
66935
66936  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66937    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66938    printf "will result in longer build times.\n"
66939    printf "\n"
66940  fi
66941
66942  if test "x$FOUND_ALT_VARIABLES" != "x"; then
66943    printf "WARNING: You have old-style ALT_ environment variables set.\n"
66944    printf "These are not respected, and will be ignored. It is recommended\n"
66945    printf "that you clean your environment. The following variables are set:\n"
66946    printf "$FOUND_ALT_VARIABLES\n"
66947    printf "\n"
66948  fi
66949
66950  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66951    printf "WARNING: Your build output directory is not on a local disk.\n"
66952    printf "This will severely degrade build performance!\n"
66953    printf "It is recommended that you create an output directory on a local disk,\n"
66954    printf "and run the configure script again from that directory.\n"
66955    printf "\n"
66956  fi
66957
66958  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66959    printf "WARNING: The result of this configuration has overridden an older\n"
66960    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66961    printf "proper build. Failure to do so might result in strange build problems.\n"
66962    printf "\n"
66963  fi
66964
66965  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66966    printf "WARNING: The result of this configuration was not saved.\n"
66967    printf "You should run without '--no-create | -n' to create the configuration.\n"
66968    printf "\n"
66969  fi
66970
66971
66972
66973  # Locate config.log.
66974  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66975    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66976  elif test -e "./config.log"; then
66977    CONFIG_LOG_PATH="."
66978  fi
66979
66980  if test -e "$CONFIG_LOG_PATH/config.log"; then
66981    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66982    if test $? -eq 0; then
66983      printf "The following warnings were produced. Repeated here for convenience:\n"
66984      # We must quote sed expression (using []) to stop m4 from eating the [].
66985      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66986      printf "\n"
66987    fi
66988  fi
66989
66990