generated-configure.sh revision 2282:c7258f229740
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
948ZIP
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
1114runstatedir
1115localstatedir
1116sharedstatedir
1117sysconfdir
1118datadir
1119datarootdir
1120libexecdir
1121sbindir
1122bindir
1123program_transform_name
1124prefix
1125exec_prefix
1126PACKAGE_URL
1127PACKAGE_BUGREPORT
1128PACKAGE_STRING
1129PACKAGE_VERSION
1130PACKAGE_TARNAME
1131PACKAGE_NAME
1132PATH_SEPARATOR
1133SHELL'
1134ac_subst_files=''
1135ac_user_opts='
1136enable_option_checking
1137with_target_bits
1138enable_openjdk_only
1139with_custom_make_dir
1140with_jdk_variant
1141enable_debug
1142with_debug_level
1143with_jvm_variants
1144with_devkit
1145with_sys_root
1146with_sysroot
1147with_tools_dir
1148with_toolchain_path
1149with_extra_path
1150with_sdk_name
1151with_conf_name
1152with_output_sync
1153with_default_make_target
1154enable_headless_only
1155with_cacerts_file
1156enable_unlimited_crypto
1157with_copyright_year
1158enable_keep_packaged_modules
1159with_milestone
1160with_update_version
1161with_user_release_suffix
1162with_build_number
1163with_version_string
1164with_version_pre
1165with_version_opt
1166with_version_build
1167with_version_major
1168with_version_minor
1169with_version_security
1170with_version_patch
1171with_boot_jdk
1172with_build_jdk
1173with_add_source_root
1174with_override_source_root
1175with_adds_and_overrides
1176with_override_langtools
1177with_override_corba
1178with_override_jaxp
1179with_override_jaxws
1180with_override_hotspot
1181with_override_nashorn
1182with_override_jdk
1183with_import_hotspot
1184with_import_modules
1185enable_static_build
1186with_toolchain_type
1187with_extra_cflags
1188with_extra_cxxflags
1189with_extra_ldflags
1190with_toolchain_version
1191with_build_devkit
1192with_jtreg
1193enable_warnings_as_errors
1194with_native_debug_symbols
1195enable_debug_symbols
1196enable_zip_debug_info
1197enable_native_coverage
1198enable_dtrace
1199with_jvm_features
1200with_jvm_interpreter
1201enable_hotspot_gtest
1202with_stdc__lib
1203with_msvcr_dll
1204with_msvcp_dll
1205with_x
1206with_cups
1207with_cups_include
1208with_freetype
1209with_freetype_include
1210with_freetype_lib
1211with_freetype_src
1212enable_freetype_bundling
1213with_alsa
1214with_alsa_include
1215with_alsa_lib
1216with_libffi
1217with_libffi_include
1218with_libffi_lib
1219with_libjpeg
1220with_giflib
1221with_libpng
1222with_zlib
1223with_lcms
1224with_dxsdk
1225with_dxsdk_lib
1226with_dxsdk_include
1227enable_jtreg_failure_handler
1228enable_generate_classlist
1229with_num_cores
1230with_memory_size
1231with_jobs
1232with_test_jobs
1233with_boot_jdk_jvmargs
1234with_sjavac_server_java
1235enable_sjavac
1236enable_javac_server
1237enable_icecc
1238enable_precompiled_headers
1239enable_ccache
1240with_ccache_dir
1241'
1242      ac_precious_vars='build_alias
1243host_alias
1244target_alias
1245BASENAME
1246BASH
1247CAT
1248CHMOD
1249CMP
1250COMM
1251CP
1252CUT
1253DATE
1254DIFF
1255DIRNAME
1256ECHO
1257EXPR
1258FILE
1259FIND
1260HEAD
1261GUNZIP
1262GZIP
1263LN
1264LS
1265MKDIR
1266MKTEMP
1267MV
1268NAWK
1269PRINTF
1270RM
1271RMDIR
1272SH
1273SORT
1274TAIL
1275TAR
1276TEE
1277TOUCH
1278TR
1279UNAME
1280UNIQ
1281WC
1282WHICH
1283XARGS
1284AWK
1285GREP
1286EGREP
1287FGREP
1288SED
1289CYGPATH
1290READLINK
1291DF
1292CPIO
1293NICE
1294MAKE
1295UNZIP
1296ZIP
1297LDD
1298OTOOL
1299READELF
1300HG
1301STAT
1302TIME
1303DTRACE
1304PATCH
1305DSYMUTIL
1306XATTR
1307CODESIGN
1308SETFILE
1309PKG_CONFIG
1310JAVA
1311JAVAC
1312JAVAH
1313JAR
1314JARSIGNER
1315CC
1316CFLAGS
1317LDFLAGS
1318LIBS
1319CPPFLAGS
1320CXX
1321CXXFLAGS
1322CCC
1323CPP
1324CXXCPP
1325AS
1326AR
1327LIPO
1328STRIP
1329NM
1330GNM
1331OBJCOPY
1332OBJDUMP
1333BUILD_CC
1334BUILD_CXX
1335BUILD_NM
1336BUILD_AR
1337BUILD_OBJCOPY
1338BUILD_STRIP
1339JTREGEXE
1340XMKMF
1341FREETYPE_CFLAGS
1342FREETYPE_LIBS
1343ALSA_CFLAGS
1344ALSA_LIBS
1345LIBFFI_CFLAGS
1346LIBFFI_LIBS
1347PNG_CFLAGS
1348PNG_LIBS
1349LCMS_CFLAGS
1350LCMS_LIBS
1351ICECC_CMD
1352ICECC_CREATE_ENV
1353ICECC_WRAPPER
1354CCACHE'
1355
1356
1357# Initialize some variables set by options.
1358ac_init_help=
1359ac_init_version=false
1360ac_unrecognized_opts=
1361ac_unrecognized_sep=
1362# The variables have the same names as the options, with
1363# dashes changed to underlines.
1364cache_file=/dev/null
1365exec_prefix=NONE
1366no_create=
1367no_recursion=
1368prefix=NONE
1369program_prefix=NONE
1370program_suffix=NONE
1371program_transform_name=s,x,x,
1372silent=
1373site=
1374srcdir=
1375verbose=
1376x_includes=NONE
1377x_libraries=NONE
1378
1379# Installation directory options.
1380# These are left unexpanded so users can "make install exec_prefix=/foo"
1381# and all the variables that are supposed to be based on exec_prefix
1382# by default will actually change.
1383# Use braces instead of parens because sh, perl, etc. also accept them.
1384# (The list follows the same order as the GNU Coding Standards.)
1385bindir='${exec_prefix}/bin'
1386sbindir='${exec_prefix}/sbin'
1387libexecdir='${exec_prefix}/libexec'
1388datarootdir='${prefix}/share'
1389datadir='${datarootdir}'
1390sysconfdir='${prefix}/etc'
1391sharedstatedir='${prefix}/com'
1392localstatedir='${prefix}/var'
1393runstatedir='${localstatedir}/run'
1394includedir='${prefix}/include'
1395oldincludedir='/usr/include'
1396docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1397infodir='${datarootdir}/info'
1398htmldir='${docdir}'
1399dvidir='${docdir}'
1400pdfdir='${docdir}'
1401psdir='${docdir}'
1402libdir='${exec_prefix}/lib'
1403localedir='${datarootdir}/locale'
1404mandir='${datarootdir}/man'
1405
1406ac_prev=
1407ac_dashdash=
1408for ac_option
1409do
1410  # If the previous option needs an argument, assign it.
1411  if test -n "$ac_prev"; then
1412    eval $ac_prev=\$ac_option
1413    ac_prev=
1414    continue
1415  fi
1416
1417  case $ac_option in
1418  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1419  *=)   ac_optarg= ;;
1420  *)    ac_optarg=yes ;;
1421  esac
1422
1423  # Accept the important Cygnus configure options, so we can diagnose typos.
1424
1425  case $ac_dashdash$ac_option in
1426  --)
1427    ac_dashdash=yes ;;
1428
1429  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1430    ac_prev=bindir ;;
1431  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1432    bindir=$ac_optarg ;;
1433
1434  -build | --build | --buil | --bui | --bu)
1435    ac_prev=build_alias ;;
1436  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1437    build_alias=$ac_optarg ;;
1438
1439  -cache-file | --cache-file | --cache-fil | --cache-fi \
1440  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1441    ac_prev=cache_file ;;
1442  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1443  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1444    cache_file=$ac_optarg ;;
1445
1446  --config-cache | -C)
1447    cache_file=config.cache ;;
1448
1449  -datadir | --datadir | --datadi | --datad)
1450    ac_prev=datadir ;;
1451  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1452    datadir=$ac_optarg ;;
1453
1454  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1455  | --dataroo | --dataro | --datar)
1456    ac_prev=datarootdir ;;
1457  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1458  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1459    datarootdir=$ac_optarg ;;
1460
1461  -disable-* | --disable-*)
1462    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1463    # Reject names that are not valid shell variable names.
1464    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1465      as_fn_error $? "invalid feature name: $ac_useropt"
1466    ac_useropt_orig=$ac_useropt
1467    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1468    case $ac_user_opts in
1469      *"
1470"enable_$ac_useropt"
1471"*) ;;
1472      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1473	 ac_unrecognized_sep=', ';;
1474    esac
1475    eval enable_$ac_useropt=no ;;
1476
1477  -docdir | --docdir | --docdi | --doc | --do)
1478    ac_prev=docdir ;;
1479  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1480    docdir=$ac_optarg ;;
1481
1482  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1483    ac_prev=dvidir ;;
1484  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1485    dvidir=$ac_optarg ;;
1486
1487  -enable-* | --enable-*)
1488    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1489    # Reject names that are not valid shell variable names.
1490    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1491      as_fn_error $? "invalid feature name: $ac_useropt"
1492    ac_useropt_orig=$ac_useropt
1493    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1494    case $ac_user_opts in
1495      *"
1496"enable_$ac_useropt"
1497"*) ;;
1498      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1499	 ac_unrecognized_sep=', ';;
1500    esac
1501    eval enable_$ac_useropt=\$ac_optarg ;;
1502
1503  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1504  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1505  | --exec | --exe | --ex)
1506    ac_prev=exec_prefix ;;
1507  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1508  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1509  | --exec=* | --exe=* | --ex=*)
1510    exec_prefix=$ac_optarg ;;
1511
1512  -gas | --gas | --ga | --g)
1513    # Obsolete; use --with-gas.
1514    with_gas=yes ;;
1515
1516  -help | --help | --hel | --he | -h)
1517    ac_init_help=long ;;
1518  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1519    ac_init_help=recursive ;;
1520  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1521    ac_init_help=short ;;
1522
1523  -host | --host | --hos | --ho)
1524    ac_prev=host_alias ;;
1525  -host=* | --host=* | --hos=* | --ho=*)
1526    host_alias=$ac_optarg ;;
1527
1528  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1529    ac_prev=htmldir ;;
1530  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1531  | --ht=*)
1532    htmldir=$ac_optarg ;;
1533
1534  -includedir | --includedir | --includedi | --included | --include \
1535  | --includ | --inclu | --incl | --inc)
1536    ac_prev=includedir ;;
1537  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1538  | --includ=* | --inclu=* | --incl=* | --inc=*)
1539    includedir=$ac_optarg ;;
1540
1541  -infodir | --infodir | --infodi | --infod | --info | --inf)
1542    ac_prev=infodir ;;
1543  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1544    infodir=$ac_optarg ;;
1545
1546  -libdir | --libdir | --libdi | --libd)
1547    ac_prev=libdir ;;
1548  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1549    libdir=$ac_optarg ;;
1550
1551  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1552  | --libexe | --libex | --libe)
1553    ac_prev=libexecdir ;;
1554  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1555  | --libexe=* | --libex=* | --libe=*)
1556    libexecdir=$ac_optarg ;;
1557
1558  -localedir | --localedir | --localedi | --localed | --locale)
1559    ac_prev=localedir ;;
1560  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1561    localedir=$ac_optarg ;;
1562
1563  -localstatedir | --localstatedir | --localstatedi | --localstated \
1564  | --localstate | --localstat | --localsta | --localst | --locals)
1565    ac_prev=localstatedir ;;
1566  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1567  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1568    localstatedir=$ac_optarg ;;
1569
1570  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1571    ac_prev=mandir ;;
1572  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1573    mandir=$ac_optarg ;;
1574
1575  -nfp | --nfp | --nf)
1576    # Obsolete; use --without-fp.
1577    with_fp=no ;;
1578
1579  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1580  | --no-cr | --no-c | -n)
1581    no_create=yes ;;
1582
1583  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1584  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1585    no_recursion=yes ;;
1586
1587  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1588  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1589  | --oldin | --oldi | --old | --ol | --o)
1590    ac_prev=oldincludedir ;;
1591  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1592  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1593  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1594    oldincludedir=$ac_optarg ;;
1595
1596  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1597    ac_prev=prefix ;;
1598  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1599    prefix=$ac_optarg ;;
1600
1601  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1602  | --program-pre | --program-pr | --program-p)
1603    ac_prev=program_prefix ;;
1604  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1605  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1606    program_prefix=$ac_optarg ;;
1607
1608  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1609  | --program-suf | --program-su | --program-s)
1610    ac_prev=program_suffix ;;
1611  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1612  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1613    program_suffix=$ac_optarg ;;
1614
1615  -program-transform-name | --program-transform-name \
1616  | --program-transform-nam | --program-transform-na \
1617  | --program-transform-n | --program-transform- \
1618  | --program-transform | --program-transfor \
1619  | --program-transfo | --program-transf \
1620  | --program-trans | --program-tran \
1621  | --progr-tra | --program-tr | --program-t)
1622    ac_prev=program_transform_name ;;
1623  -program-transform-name=* | --program-transform-name=* \
1624  | --program-transform-nam=* | --program-transform-na=* \
1625  | --program-transform-n=* | --program-transform-=* \
1626  | --program-transform=* | --program-transfor=* \
1627  | --program-transfo=* | --program-transf=* \
1628  | --program-trans=* | --program-tran=* \
1629  | --progr-tra=* | --program-tr=* | --program-t=*)
1630    program_transform_name=$ac_optarg ;;
1631
1632  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1633    ac_prev=pdfdir ;;
1634  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1635    pdfdir=$ac_optarg ;;
1636
1637  -psdir | --psdir | --psdi | --psd | --ps)
1638    ac_prev=psdir ;;
1639  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1640    psdir=$ac_optarg ;;
1641
1642  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1643  | -silent | --silent | --silen | --sile | --sil)
1644    silent=yes ;;
1645
1646  -runstatedir | --runstatedir | --runstatedi | --runstated \
1647  | --runstate | --runstat | --runsta | --runst | --runs \
1648  | --run | --ru | --r)
1649    ac_prev=runstatedir ;;
1650  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1651  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1652  | --run=* | --ru=* | --r=*)
1653    runstatedir=$ac_optarg ;;
1654
1655  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1656    ac_prev=sbindir ;;
1657  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1658  | --sbi=* | --sb=*)
1659    sbindir=$ac_optarg ;;
1660
1661  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1662  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1663  | --sharedst | --shareds | --shared | --share | --shar \
1664  | --sha | --sh)
1665    ac_prev=sharedstatedir ;;
1666  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1667  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1668  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1669  | --sha=* | --sh=*)
1670    sharedstatedir=$ac_optarg ;;
1671
1672  -site | --site | --sit)
1673    ac_prev=site ;;
1674  -site=* | --site=* | --sit=*)
1675    site=$ac_optarg ;;
1676
1677  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1678    ac_prev=srcdir ;;
1679  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1680    srcdir=$ac_optarg ;;
1681
1682  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1683  | --syscon | --sysco | --sysc | --sys | --sy)
1684    ac_prev=sysconfdir ;;
1685  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1686  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1687    sysconfdir=$ac_optarg ;;
1688
1689  -target | --target | --targe | --targ | --tar | --ta | --t)
1690    ac_prev=target_alias ;;
1691  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1692    target_alias=$ac_optarg ;;
1693
1694  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1695    verbose=yes ;;
1696
1697  -version | --version | --versio | --versi | --vers | -V)
1698    ac_init_version=: ;;
1699
1700  -with-* | --with-*)
1701    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1702    # Reject names that are not valid shell variable names.
1703    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1704      as_fn_error $? "invalid package name: $ac_useropt"
1705    ac_useropt_orig=$ac_useropt
1706    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1707    case $ac_user_opts in
1708      *"
1709"with_$ac_useropt"
1710"*) ;;
1711      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1712	 ac_unrecognized_sep=', ';;
1713    esac
1714    eval with_$ac_useropt=\$ac_optarg ;;
1715
1716  -without-* | --without-*)
1717    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1718    # Reject names that are not valid shell variable names.
1719    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1720      as_fn_error $? "invalid package name: $ac_useropt"
1721    ac_useropt_orig=$ac_useropt
1722    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1723    case $ac_user_opts in
1724      *"
1725"with_$ac_useropt"
1726"*) ;;
1727      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1728	 ac_unrecognized_sep=', ';;
1729    esac
1730    eval with_$ac_useropt=no ;;
1731
1732  --x)
1733    # Obsolete; use --with-x.
1734    with_x=yes ;;
1735
1736  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1737  | --x-incl | --x-inc | --x-in | --x-i)
1738    ac_prev=x_includes ;;
1739  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1740  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1741    x_includes=$ac_optarg ;;
1742
1743  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1744  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1745    ac_prev=x_libraries ;;
1746  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1747  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1748    x_libraries=$ac_optarg ;;
1749
1750  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1751Try \`$0 --help' for more information"
1752    ;;
1753
1754  *=*)
1755    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1756    # Reject names that are not valid shell variable names.
1757    case $ac_envvar in #(
1758      '' | [0-9]* | *[!_$as_cr_alnum]* )
1759      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1760    esac
1761    eval $ac_envvar=\$ac_optarg
1762    export $ac_envvar ;;
1763
1764  *)
1765    # FIXME: should be removed in autoconf 3.0.
1766    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1767    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1768      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1769    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1770    ;;
1771
1772  esac
1773done
1774
1775if test -n "$ac_prev"; then
1776  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1777  as_fn_error $? "missing argument to $ac_option"
1778fi
1779
1780if test -n "$ac_unrecognized_opts"; then
1781  case $enable_option_checking in
1782    no) ;;
1783    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1784    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1785  esac
1786fi
1787
1788# Check all directory arguments for consistency.
1789for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1790		datadir sysconfdir sharedstatedir localstatedir includedir \
1791		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1792		libdir localedir mandir runstatedir
1793do
1794  eval ac_val=\$$ac_var
1795  # Remove trailing slashes.
1796  case $ac_val in
1797    */ )
1798      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1799      eval $ac_var=\$ac_val;;
1800  esac
1801  # Be sure to have absolute directory names.
1802  case $ac_val in
1803    [\\/$]* | ?:[\\/]* )  continue;;
1804    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1805  esac
1806  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1807done
1808
1809# There might be people who depend on the old broken behavior: `$host'
1810# used to hold the argument of --host etc.
1811# FIXME: To remove some day.
1812build=$build_alias
1813host=$host_alias
1814target=$target_alias
1815
1816# FIXME: To remove some day.
1817if test "x$host_alias" != x; then
1818  if test "x$build_alias" = x; then
1819    cross_compiling=maybe
1820  elif test "x$build_alias" != "x$host_alias"; then
1821    cross_compiling=yes
1822  fi
1823fi
1824
1825ac_tool_prefix=
1826test -n "$host_alias" && ac_tool_prefix=$host_alias-
1827
1828test "$silent" = yes && exec 6>/dev/null
1829
1830
1831ac_pwd=`pwd` && test -n "$ac_pwd" &&
1832ac_ls_di=`ls -di .` &&
1833ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1834  as_fn_error $? "working directory cannot be determined"
1835test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1836  as_fn_error $? "pwd does not report name of working directory"
1837
1838
1839# Find the source files, if location was not specified.
1840if test -z "$srcdir"; then
1841  ac_srcdir_defaulted=yes
1842  # Try the directory containing this script, then the parent directory.
1843  ac_confdir=`$as_dirname -- "$as_myself" ||
1844$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1845	 X"$as_myself" : 'X\(//\)[^/]' \| \
1846	 X"$as_myself" : 'X\(//\)$' \| \
1847	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1848$as_echo X"$as_myself" |
1849    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1850	    s//\1/
1851	    q
1852	  }
1853	  /^X\(\/\/\)[^/].*/{
1854	    s//\1/
1855	    q
1856	  }
1857	  /^X\(\/\/\)$/{
1858	    s//\1/
1859	    q
1860	  }
1861	  /^X\(\/\).*/{
1862	    s//\1/
1863	    q
1864	  }
1865	  s/.*/./; q'`
1866  srcdir=$ac_confdir
1867  if test ! -r "$srcdir/$ac_unique_file"; then
1868    srcdir=..
1869  fi
1870else
1871  ac_srcdir_defaulted=no
1872fi
1873if test ! -r "$srcdir/$ac_unique_file"; then
1874  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1875  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1876fi
1877ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1878ac_abs_confdir=`(
1879	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1880	pwd)`
1881# When building in place, set srcdir=.
1882if test "$ac_abs_confdir" = "$ac_pwd"; then
1883  srcdir=.
1884fi
1885# Remove unnecessary trailing slashes from srcdir.
1886# Double slashes in file names in object file debugging info
1887# mess up M-x gdb in Emacs.
1888case $srcdir in
1889*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1890esac
1891for ac_var in $ac_precious_vars; do
1892  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1893  eval ac_env_${ac_var}_value=\$${ac_var}
1894  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1895  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1896done
1897
1898#
1899# Report the --help message.
1900#
1901if test "$ac_init_help" = "long"; then
1902  # Omit some internal or obsolete options to make the list less imposing.
1903  # This message is too long to be a string in the A/UX 3.1 sh.
1904  cat <<_ACEOF
1905\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1906
1907Usage: $0 [OPTION]... [VAR=VALUE]...
1908
1909To assign environment variables (e.g., CC, CFLAGS...), specify them as
1910VAR=VALUE.  See below for descriptions of some of the useful variables.
1911
1912Defaults for the options are specified in brackets.
1913
1914Configuration:
1915  -h, --help              display this help and exit
1916      --help=short        display options specific to this package
1917      --help=recursive    display the short help of all the included packages
1918  -V, --version           display version information and exit
1919  -q, --quiet, --silent   do not print \`checking ...' messages
1920      --cache-file=FILE   cache test results in FILE [disabled]
1921  -C, --config-cache      alias for \`--cache-file=config.cache'
1922  -n, --no-create         do not create output files
1923      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1924
1925Installation directories:
1926  --prefix=PREFIX         install architecture-independent files in PREFIX
1927                          [$ac_default_prefix]
1928  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1929                          [PREFIX]
1930
1931By default, \`make install' will install all the files in
1932\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1933an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1934for instance \`--prefix=\$HOME'.
1935
1936For better control, use the options below.
1937
1938Fine tuning of the installation directories:
1939  --bindir=DIR            user executables [EPREFIX/bin]
1940  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1941  --libexecdir=DIR        program executables [EPREFIX/libexec]
1942  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1943  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1944  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1945  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1946  --libdir=DIR            object code libraries [EPREFIX/lib]
1947  --includedir=DIR        C header files [PREFIX/include]
1948  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1949  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1950  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1951  --infodir=DIR           info documentation [DATAROOTDIR/info]
1952  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1953  --mandir=DIR            man documentation [DATAROOTDIR/man]
1954  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1955  --htmldir=DIR           html documentation [DOCDIR]
1956  --dvidir=DIR            dvi documentation [DOCDIR]
1957  --pdfdir=DIR            pdf documentation [DOCDIR]
1958  --psdir=DIR             ps documentation [DOCDIR]
1959_ACEOF
1960
1961  cat <<\_ACEOF
1962
1963X features:
1964  --x-includes=DIR    X include files are in DIR
1965  --x-libraries=DIR   X library files are in DIR
1966
1967System types:
1968  --build=BUILD     configure for building on BUILD [guessed]
1969  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1970  --target=TARGET   configure for building compilers for TARGET [HOST]
1971_ACEOF
1972fi
1973
1974if test -n "$ac_init_help"; then
1975  case $ac_init_help in
1976     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1977   esac
1978  cat <<\_ACEOF
1979
1980Optional Features:
1981  --disable-option-checking  ignore unrecognized --enable/--with options
1982  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1983  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1984  --enable-openjdk-only   suppress building custom source even if present
1985                          [disabled]
1986  --enable-debug          set the debug level to fastdebug (shorthand for
1987                          --with-debug-level=fastdebug) [disabled]
1988  --enable-headless-only  only build headless (no GUI) support [disabled]
1989  --enable-unlimited-crypto
1990                          Enable unlimited crypto policy [disabled]
1991  --disable-keep-packaged-modules
1992                          Do not keep packaged modules in jdk image [enable]
1993  --enable-static-build   enable static library build [disabled]
1994  --disable-warnings-as-errors
1995                          do not consider native warnings to be an error
1996                          [enabled]
1997  --enable-debug-symbols  Deprecated. Option is kept for backwards
1998                          compatibility and is ignored
1999  --enable-zip-debug-info Deprecated. Option is kept for backwards
2000                          compatibility and is ignored
2001  --enable-native-coverage
2002                          enable native compilation with code coverage
2003                          data[disabled]
2004  --enable-dtrace[=yes/no/auto]
2005                          enable dtrace. Default is auto, where dtrace is
2006                          enabled if all dependencies are present.
2007  --disable-hotspot-gtest Disables building of the Hotspot unit tests
2008  --disable-freetype-bundling
2009                          disable bundling of the freetype library with the
2010                          build result [enabled on Windows or when using
2011                          --with-freetype, disabled otherwise]
2012  --enable-jtreg-failure-handler
2013                          forces build of the jtreg failure handler to be
2014                          enabled, missing dependencies become fatal errors.
2015                          Default is auto, where the failure handler is built
2016                          if all dependencies are present and otherwise just
2017                          disabled.
2018  --disable-generate-classlist
2019                          forces enabling or disabling of the generation of a
2020                          CDS classlist at build time. Default is to generate
2021                          it when either the server or client JVMs are built.
2022  --enable-sjavac         use sjavac to do fast incremental compiles
2023                          [disabled]
2024  --disable-javac-server  disable javac server [enabled]
2025  --enable-icecc          enable distribted compilation of native code using
2026                          icecc/icecream [disabled]
2027  --disable-precompiled-headers
2028                          disable using precompiled headers when compiling C++
2029                          [enabled]
2030  --enable-ccache         enable using ccache to speed up recompilations
2031                          [disabled]
2032
2033Optional Packages:
2034  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2035  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2036  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2037                          support it), e.g. --with-target-bits=32 [guessed]
2038  --with-custom-make-dir  Deprecated. Option is kept for backwards
2039                          compatibility and is ignored
2040  --with-jdk-variant      JDK variant to build (normal) [normal]
2041  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2042                          optimized) [release]
2043  --with-jvm-variants     JVM variants (separated by commas) to build
2044                          (server,client,minimal,core,zero,zeroshark,custom)
2045                          [server]
2046  --with-devkit           use this devkit for compilers, tools and resources
2047  --with-sys-root         alias for --with-sysroot for backwards compatability
2048  --with-sysroot          use this directory as sysroot
2049  --with-tools-dir        alias for --with-toolchain-path for backwards
2050                          compatibility
2051  --with-toolchain-path   prepend these directories when searching for
2052                          toolchain binaries (compilers etc)
2053  --with-extra-path       prepend these directories to the default path
2054  --with-sdk-name         use the platform SDK of the given name. [macosx]
2055  --with-conf-name        use this as the name of the configuration [generated
2056                          from important configuration options]
2057  --with-output-sync      set make output sync type if supported by make.
2058                          [recurse]
2059  --with-default-make-target
2060                          set the default make target [exploded-image]
2061  --with-cacerts-file     specify alternative cacerts file
2062  --with-copyright-year   Set copyright year value for build [current year]
2063  --with-milestone        Deprecated. Option is kept for backwards
2064                          compatibility and is ignored
2065  --with-update-version   Deprecated. Option is kept for backwards
2066                          compatibility and is ignored
2067  --with-user-release-suffix
2068                          Deprecated. Option is kept for backwards
2069                          compatibility and is ignored
2070  --with-build-number     Deprecated. Option is kept for backwards
2071                          compatibility and is ignored
2072  --with-version-string   Set version string [calculated]
2073  --with-version-pre      Set the base part of the version 'PRE' field
2074                          (pre-release identifier) ['internal']
2075  --with-version-opt      Set version 'OPT' field (build metadata)
2076                          [<timestamp>.<user>.<dirname>]
2077  --with-version-build    Set version 'BUILD' field (build number) [not
2078                          specified]
2079  --with-version-major    Set version 'MAJOR' field (first number) [current
2080                          source value]
2081  --with-version-minor    Set version 'MINOR' field (second number) [current
2082                          source value]
2083  --with-version-security Set version 'SECURITY' field (third number) [current
2084                          source value]
2085  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2086                          specified]
2087  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2088  --with-build-jdk        path to JDK of same version as is being built[the
2089                          newly built JDK]
2090  --with-add-source-root  Deprecated. Option is kept for backwards
2091                          compatibility and is ignored
2092  --with-override-source-root
2093                          Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-adds-and-overrides
2096                          Deprecated. Option is kept for backwards
2097                          compatibility and is ignored
2098  --with-override-langtools
2099                          Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-override-corba   Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-override-jaxp    Deprecated. Option is kept for backwards
2104                          compatibility and is ignored
2105  --with-override-jaxws   Deprecated. Option is kept for backwards
2106                          compatibility and is ignored
2107  --with-override-hotspot Deprecated. Option is kept for backwards
2108                          compatibility and is ignored
2109  --with-override-nashorn Deprecated. Option is kept for backwards
2110                          compatibility and is ignored
2111  --with-override-jdk     Deprecated. Option is kept for backwards
2112                          compatibility and is ignored
2113  --with-import-hotspot   import hotspot binaries from this jdk image or
2114                          hotspot build dist dir instead of building from
2115                          source
2116  --with-import-modules   import a set of prebuilt modules either as a zip
2117                          file or an exploded directory
2118  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2119                          to show possible values [platform dependent]
2120  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2121  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2122  --with-extra-ldflags    extra flags to be used when linking jdk
2123  --with-toolchain-version
2124                          the version of the toolchain to look for, use
2125                          '--help' to show possible values [platform
2126                          dependent]
2127  --with-build-devkit     Devkit to use for the build platform toolchain
2128  --with-jtreg            Regression Test Harness [probed]
2129  --with-native-debug-symbols
2130                          set the native debug symbol configuration (none,
2131                          internal, external, zipped) [varying]
2132  --with-jvm-features     additional JVM features to enable (separated by
2133                          comma), use '--help' to show possible values [none]
2134  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2135                          compatibility and is ignored
2136  --with-stdc++lib=<static>,<dynamic>,<default>
2137                          force linking of the C++ runtime on Linux to either
2138                          static or dynamic, default is static with dynamic as
2139                          fallback
2140  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2141                          (Windows only) [probed]
2142  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2143                          (Windows only) [probed]
2144  --with-x                use the X Window System
2145  --with-cups             specify prefix directory for the cups package
2146                          (expecting the headers under PATH/include)
2147  --with-cups-include     specify directory for the cups include files
2148  --with-freetype         specify prefix directory for the freetype package
2149                          (expecting the libraries under PATH/lib and the
2150                          headers under PATH/include)
2151  --with-freetype-include specify directory for the freetype include files
2152  --with-freetype-lib     specify directory for the freetype library
2153  --with-freetype-src     specify directory with freetype sources to
2154                          automatically build the library (experimental,
2155                          Windows-only)
2156  --with-alsa             specify prefix directory for the alsa package
2157                          (expecting the libraries under PATH/lib and the
2158                          headers under PATH/include)
2159  --with-alsa-include     specify directory for the alsa include files
2160  --with-alsa-lib         specify directory for the alsa library
2161  --with-libffi           specify prefix directory for the libffi package
2162                          (expecting the libraries under PATH/lib and the
2163                          headers under PATH/include)
2164  --with-libffi-include   specify directory for the libffi include files
2165  --with-libffi-lib       specify directory for the libffi library
2166  --with-libjpeg          use libjpeg from build system or OpenJDK source
2167                          (system, bundled) [bundled]
2168  --with-giflib           use giflib from build system or OpenJDK source
2169                          (system, bundled) [bundled]
2170  --with-libpng           use libpng from build system or OpenJDK source
2171                          (system, bundled) [bundled]
2172  --with-zlib             use zlib from build system or OpenJDK source
2173                          (system, bundled) [bundled]
2174  --with-lcms             use lcms2 from build system or OpenJDK source
2175                          (system, bundled) [bundled]
2176  --with-dxsdk            Deprecated. Option is kept for backwards
2177                          compatibility and is ignored
2178  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2179                          compatibility and is ignored
2180  --with-dxsdk-include    Deprecated. Option is kept for backwards
2181                          compatibility and is ignored
2182  --with-num-cores        number of cores in the build system, e.g.
2183                          --with-num-cores=8 [probed]
2184  --with-memory-size      memory (in MB) available in the build system, e.g.
2185                          --with-memory-size=1024 [probed]
2186  --with-jobs             number of parallel jobs to let make run [calculated
2187                          based on cores and memory]
2188  --with-test-jobs        number of parallel tests jobs to run [based on build
2189                          jobs]
2190  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2191                          invocations of boot JDK, overriding the default
2192                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2193                          -enableassertions"
2194  --with-sjavac-server-java
2195                          use this java binary for running the sjavac
2196                          background server [Boot JDK java]
2197  --with-ccache-dir       where to store ccache files [~/.ccache]
2198
2199Some influential environment variables:
2200  BASENAME    Override default value for BASENAME
2201  BASH        Override default value for BASH
2202  CAT         Override default value for CAT
2203  CHMOD       Override default value for CHMOD
2204  CMP         Override default value for CMP
2205  COMM        Override default value for COMM
2206  CP          Override default value for CP
2207  CUT         Override default value for CUT
2208  DATE        Override default value for DATE
2209  DIFF        Override default value for DIFF
2210  DIRNAME     Override default value for DIRNAME
2211  ECHO        Override default value for ECHO
2212  EXPR        Override default value for EXPR
2213  FILE        Override default value for FILE
2214  FIND        Override default value for FIND
2215  HEAD        Override default value for HEAD
2216  GUNZIP      Override default value for GUNZIP
2217  GZIP        Override default value for GZIP
2218  LN          Override default value for LN
2219  LS          Override default value for LS
2220  MKDIR       Override default value for MKDIR
2221  MKTEMP      Override default value for MKTEMP
2222  MV          Override default value for MV
2223  NAWK        Override default value for NAWK
2224  PRINTF      Override default value for PRINTF
2225  RM          Override default value for RM
2226  RMDIR       Override default value for RMDIR
2227  SH          Override default value for SH
2228  SORT        Override default value for SORT
2229  TAIL        Override default value for TAIL
2230  TAR         Override default value for TAR
2231  TEE         Override default value for TEE
2232  TOUCH       Override default value for TOUCH
2233  TR          Override default value for TR
2234  UNAME       Override default value for UNAME
2235  UNIQ        Override default value for UNIQ
2236  WC          Override default value for WC
2237  WHICH       Override default value for WHICH
2238  XARGS       Override default value for XARGS
2239  AWK         Override default value for AWK
2240  GREP        Override default value for GREP
2241  EGREP       Override default value for EGREP
2242  FGREP       Override default value for FGREP
2243  SED         Override default value for SED
2244  CYGPATH     Override default value for CYGPATH
2245  READLINK    Override default value for READLINK
2246  DF          Override default value for DF
2247  CPIO        Override default value for CPIO
2248  NICE        Override default value for NICE
2249  MAKE        Override default value for MAKE
2250  UNZIP       Override default value for UNZIP
2251  ZIP         Override default value for ZIP
2252  LDD         Override default value for LDD
2253  OTOOL       Override default value for OTOOL
2254  READELF     Override default value for READELF
2255  HG          Override default value for HG
2256  STAT        Override default value for STAT
2257  TIME        Override default value for TIME
2258  DTRACE      Override default value for DTRACE
2259  PATCH       Override default value for PATCH
2260  DSYMUTIL    Override default value for DSYMUTIL
2261  XATTR       Override default value for XATTR
2262  CODESIGN    Override default value for CODESIGN
2263  SETFILE     Override default value for SETFILE
2264  PKG_CONFIG  path to pkg-config utility
2265  JAVA        Override default value for JAVA
2266  JAVAC       Override default value for JAVAC
2267  JAVAH       Override default value for JAVAH
2268  JAR         Override default value for JAR
2269  JARSIGNER   Override default value for JARSIGNER
2270  CC          C compiler command
2271  CFLAGS      C compiler flags
2272  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2273              nonstandard directory <lib dir>
2274  LIBS        libraries to pass to the linker, e.g. -l<library>
2275  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2276              you have headers in a nonstandard directory <include dir>
2277  CXX         C++ compiler command
2278  CXXFLAGS    C++ compiler flags
2279  CPP         C preprocessor
2280  CXXCPP      C++ preprocessor
2281  AS          Override default value for AS
2282  AR          Override default value for AR
2283  LIPO        Override default value for LIPO
2284  STRIP       Override default value for STRIP
2285  NM          Override default value for NM
2286  GNM         Override default value for GNM
2287  OBJCOPY     Override default value for OBJCOPY
2288  OBJDUMP     Override default value for OBJDUMP
2289  BUILD_CC    Override default value for BUILD_CC
2290  BUILD_CXX   Override default value for BUILD_CXX
2291  BUILD_NM    Override default value for BUILD_NM
2292  BUILD_AR    Override default value for BUILD_AR
2293  BUILD_OBJCOPY
2294              Override default value for BUILD_OBJCOPY
2295  BUILD_STRIP Override default value for BUILD_STRIP
2296  JTREGEXE    Override default value for JTREGEXE
2297  XMKMF       Path to xmkmf, Makefile generator for X Window System
2298  FREETYPE_CFLAGS
2299              C compiler flags for FREETYPE, overriding pkg-config
2300  FREETYPE_LIBS
2301              linker flags for FREETYPE, overriding pkg-config
2302  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2303  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2304  LIBFFI_CFLAGS
2305              C compiler flags for LIBFFI, overriding pkg-config
2306  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2307  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2308  PNG_LIBS    linker flags for PNG, overriding pkg-config
2309  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2310  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2311  ICECC_CMD   Override default value for ICECC_CMD
2312  ICECC_CREATE_ENV
2313              Override default value for ICECC_CREATE_ENV
2314  ICECC_WRAPPER
2315              Override default value for ICECC_WRAPPER
2316  CCACHE      Override default value for CCACHE
2317
2318Use these variables to override the choices made by `configure' or to help
2319it to find libraries and programs with nonstandard names/locations.
2320
2321Report bugs to <build-dev@openjdk.java.net>.
2322OpenJDK home page: <http://openjdk.java.net>.
2323_ACEOF
2324ac_status=$?
2325fi
2326
2327if test "$ac_init_help" = "recursive"; then
2328  # If there are subdirs, report their specific --help.
2329  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2330    test -d "$ac_dir" ||
2331      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2332      continue
2333    ac_builddir=.
2334
2335case "$ac_dir" in
2336.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2337*)
2338  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2339  # A ".." for each directory in $ac_dir_suffix.
2340  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2341  case $ac_top_builddir_sub in
2342  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2343  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2344  esac ;;
2345esac
2346ac_abs_top_builddir=$ac_pwd
2347ac_abs_builddir=$ac_pwd$ac_dir_suffix
2348# for backward compatibility:
2349ac_top_builddir=$ac_top_build_prefix
2350
2351case $srcdir in
2352  .)  # We are building in place.
2353    ac_srcdir=.
2354    ac_top_srcdir=$ac_top_builddir_sub
2355    ac_abs_top_srcdir=$ac_pwd ;;
2356  [\\/]* | ?:[\\/]* )  # Absolute name.
2357    ac_srcdir=$srcdir$ac_dir_suffix;
2358    ac_top_srcdir=$srcdir
2359    ac_abs_top_srcdir=$srcdir ;;
2360  *) # Relative name.
2361    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2362    ac_top_srcdir=$ac_top_build_prefix$srcdir
2363    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2364esac
2365ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2366
2367    cd "$ac_dir" || { ac_status=$?; continue; }
2368    # Check for guested configure.
2369    if test -f "$ac_srcdir/configure.gnu"; then
2370      echo &&
2371      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2372    elif test -f "$ac_srcdir/configure"; then
2373      echo &&
2374      $SHELL "$ac_srcdir/configure" --help=recursive
2375    else
2376      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2377    fi || ac_status=$?
2378    cd "$ac_pwd" || { ac_status=$?; break; }
2379  done
2380fi
2381
2382test -n "$ac_init_help" && exit $ac_status
2383if $ac_init_version; then
2384  cat <<\_ACEOF
2385OpenJDK configure jdk9
2386generated by GNU Autoconf 2.69
2387
2388Copyright (C) 2012 Free Software Foundation, Inc.
2389This configure script is free software; the Free Software Foundation
2390gives unlimited permission to copy, distribute and modify it.
2391_ACEOF
2392  exit
2393fi
2394
2395## ------------------------ ##
2396## Autoconf initialization. ##
2397## ------------------------ ##
2398
2399# ac_fn_c_try_compile LINENO
2400# --------------------------
2401# Try to compile conftest.$ac_ext, and return whether this succeeded.
2402ac_fn_c_try_compile ()
2403{
2404  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2405  rm -f conftest.$ac_objext
2406  if { { ac_try="$ac_compile"
2407case "(($ac_try" in
2408  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2409  *) ac_try_echo=$ac_try;;
2410esac
2411eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2412$as_echo "$ac_try_echo"; } >&5
2413  (eval "$ac_compile") 2>conftest.err
2414  ac_status=$?
2415  if test -s conftest.err; then
2416    grep -v '^ *+' conftest.err >conftest.er1
2417    cat conftest.er1 >&5
2418    mv -f conftest.er1 conftest.err
2419  fi
2420  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2421  test $ac_status = 0; } && {
2422	 test -z "$ac_c_werror_flag" ||
2423	 test ! -s conftest.err
2424       } && test -s conftest.$ac_objext; then :
2425  ac_retval=0
2426else
2427  $as_echo "$as_me: failed program was:" >&5
2428sed 's/^/| /' conftest.$ac_ext >&5
2429
2430	ac_retval=1
2431fi
2432  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2433  as_fn_set_status $ac_retval
2434
2435} # ac_fn_c_try_compile
2436
2437# ac_fn_cxx_try_compile LINENO
2438# ----------------------------
2439# Try to compile conftest.$ac_ext, and return whether this succeeded.
2440ac_fn_cxx_try_compile ()
2441{
2442  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2443  rm -f conftest.$ac_objext
2444  if { { ac_try="$ac_compile"
2445case "(($ac_try" in
2446  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2447  *) ac_try_echo=$ac_try;;
2448esac
2449eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2450$as_echo "$ac_try_echo"; } >&5
2451  (eval "$ac_compile") 2>conftest.err
2452  ac_status=$?
2453  if test -s conftest.err; then
2454    grep -v '^ *+' conftest.err >conftest.er1
2455    cat conftest.er1 >&5
2456    mv -f conftest.er1 conftest.err
2457  fi
2458  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2459  test $ac_status = 0; } && {
2460	 test -z "$ac_cxx_werror_flag" ||
2461	 test ! -s conftest.err
2462       } && test -s conftest.$ac_objext; then :
2463  ac_retval=0
2464else
2465  $as_echo "$as_me: failed program was:" >&5
2466sed 's/^/| /' conftest.$ac_ext >&5
2467
2468	ac_retval=1
2469fi
2470  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2471  as_fn_set_status $ac_retval
2472
2473} # ac_fn_cxx_try_compile
2474
2475# ac_fn_c_try_cpp LINENO
2476# ----------------------
2477# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2478ac_fn_c_try_cpp ()
2479{
2480  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2481  if { { ac_try="$ac_cpp conftest.$ac_ext"
2482case "(($ac_try" in
2483  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2484  *) ac_try_echo=$ac_try;;
2485esac
2486eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2487$as_echo "$ac_try_echo"; } >&5
2488  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2489  ac_status=$?
2490  if test -s conftest.err; then
2491    grep -v '^ *+' conftest.err >conftest.er1
2492    cat conftest.er1 >&5
2493    mv -f conftest.er1 conftest.err
2494  fi
2495  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2496  test $ac_status = 0; } > conftest.i && {
2497	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2498	 test ! -s conftest.err
2499       }; then :
2500  ac_retval=0
2501else
2502  $as_echo "$as_me: failed program was:" >&5
2503sed 's/^/| /' conftest.$ac_ext >&5
2504
2505    ac_retval=1
2506fi
2507  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2508  as_fn_set_status $ac_retval
2509
2510} # ac_fn_c_try_cpp
2511
2512# ac_fn_cxx_try_cpp LINENO
2513# ------------------------
2514# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2515ac_fn_cxx_try_cpp ()
2516{
2517  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2518  if { { ac_try="$ac_cpp conftest.$ac_ext"
2519case "(($ac_try" in
2520  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2521  *) ac_try_echo=$ac_try;;
2522esac
2523eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2524$as_echo "$ac_try_echo"; } >&5
2525  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2526  ac_status=$?
2527  if test -s conftest.err; then
2528    grep -v '^ *+' conftest.err >conftest.er1
2529    cat conftest.er1 >&5
2530    mv -f conftest.er1 conftest.err
2531  fi
2532  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2533  test $ac_status = 0; } > conftest.i && {
2534	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2535	 test ! -s conftest.err
2536       }; then :
2537  ac_retval=0
2538else
2539  $as_echo "$as_me: failed program was:" >&5
2540sed 's/^/| /' conftest.$ac_ext >&5
2541
2542    ac_retval=1
2543fi
2544  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2545  as_fn_set_status $ac_retval
2546
2547} # ac_fn_cxx_try_cpp
2548
2549# ac_fn_c_try_link LINENO
2550# -----------------------
2551# Try to link conftest.$ac_ext, and return whether this succeeded.
2552ac_fn_c_try_link ()
2553{
2554  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2555  rm -f conftest.$ac_objext conftest$ac_exeext
2556  if { { ac_try="$ac_link"
2557case "(($ac_try" in
2558  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2559  *) ac_try_echo=$ac_try;;
2560esac
2561eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2562$as_echo "$ac_try_echo"; } >&5
2563  (eval "$ac_link") 2>conftest.err
2564  ac_status=$?
2565  if test -s conftest.err; then
2566    grep -v '^ *+' conftest.err >conftest.er1
2567    cat conftest.er1 >&5
2568    mv -f conftest.er1 conftest.err
2569  fi
2570  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2571  test $ac_status = 0; } && {
2572	 test -z "$ac_c_werror_flag" ||
2573	 test ! -s conftest.err
2574       } && test -s conftest$ac_exeext && {
2575	 test "$cross_compiling" = yes ||
2576	 test -x conftest$ac_exeext
2577       }; then :
2578  ac_retval=0
2579else
2580  $as_echo "$as_me: failed program was:" >&5
2581sed 's/^/| /' conftest.$ac_ext >&5
2582
2583	ac_retval=1
2584fi
2585  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2586  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2587  # interfere with the next link command; also delete a directory that is
2588  # left behind by Apple's compiler.  We do this before executing the actions.
2589  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2590  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2591  as_fn_set_status $ac_retval
2592
2593} # ac_fn_c_try_link
2594
2595# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2596# ---------------------------------------------------------
2597# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2598# the include files in INCLUDES and setting the cache variable VAR
2599# accordingly.
2600ac_fn_cxx_check_header_mongrel ()
2601{
2602  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2603  if eval \${$3+:} false; then :
2604  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2605$as_echo_n "checking for $2... " >&6; }
2606if eval \${$3+:} false; then :
2607  $as_echo_n "(cached) " >&6
2608fi
2609eval ac_res=\$$3
2610	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2611$as_echo "$ac_res" >&6; }
2612else
2613  # Is the header compilable?
2614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2615$as_echo_n "checking $2 usability... " >&6; }
2616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2617/* end confdefs.h.  */
2618$4
2619#include <$2>
2620_ACEOF
2621if ac_fn_cxx_try_compile "$LINENO"; then :
2622  ac_header_compiler=yes
2623else
2624  ac_header_compiler=no
2625fi
2626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2628$as_echo "$ac_header_compiler" >&6; }
2629
2630# Is the header present?
2631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2632$as_echo_n "checking $2 presence... " >&6; }
2633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2634/* end confdefs.h.  */
2635#include <$2>
2636_ACEOF
2637if ac_fn_cxx_try_cpp "$LINENO"; then :
2638  ac_header_preproc=yes
2639else
2640  ac_header_preproc=no
2641fi
2642rm -f conftest.err conftest.i conftest.$ac_ext
2643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2644$as_echo "$ac_header_preproc" >&6; }
2645
2646# So?  What about this header?
2647case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2648  yes:no: )
2649    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2650$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&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    ;;
2654  no:yes:* )
2655    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2656$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2657    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2658$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2659    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2660$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2661    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2662$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2663    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2664$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2665( $as_echo "## ----------------------------------------- ##
2666## Report this to build-dev@openjdk.java.net ##
2667## ----------------------------------------- ##"
2668     ) | sed "s/^/$as_me: WARNING:     /" >&2
2669    ;;
2670esac
2671  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2672$as_echo_n "checking for $2... " >&6; }
2673if eval \${$3+:} false; then :
2674  $as_echo_n "(cached) " >&6
2675else
2676  eval "$3=\$ac_header_compiler"
2677fi
2678eval ac_res=\$$3
2679	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2680$as_echo "$ac_res" >&6; }
2681fi
2682  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2683
2684} # ac_fn_cxx_check_header_mongrel
2685
2686# ac_fn_cxx_try_run LINENO
2687# ------------------------
2688# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2689# that executables *can* be run.
2690ac_fn_cxx_try_run ()
2691{
2692  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2693  if { { ac_try="$ac_link"
2694case "(($ac_try" in
2695  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2696  *) ac_try_echo=$ac_try;;
2697esac
2698eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2699$as_echo "$ac_try_echo"; } >&5
2700  (eval "$ac_link") 2>&5
2701  ac_status=$?
2702  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2703  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2704  { { case "(($ac_try" in
2705  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2706  *) ac_try_echo=$ac_try;;
2707esac
2708eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2709$as_echo "$ac_try_echo"; } >&5
2710  (eval "$ac_try") 2>&5
2711  ac_status=$?
2712  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2713  test $ac_status = 0; }; }; then :
2714  ac_retval=0
2715else
2716  $as_echo "$as_me: program exited with status $ac_status" >&5
2717       $as_echo "$as_me: failed program was:" >&5
2718sed 's/^/| /' conftest.$ac_ext >&5
2719
2720       ac_retval=$ac_status
2721fi
2722  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2723  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2724  as_fn_set_status $ac_retval
2725
2726} # ac_fn_cxx_try_run
2727
2728# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2729# ---------------------------------------------------------
2730# Tests whether HEADER exists and can be compiled using the include files in
2731# INCLUDES, setting the cache variable VAR accordingly.
2732ac_fn_cxx_check_header_compile ()
2733{
2734  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2735  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2736$as_echo_n "checking for $2... " >&6; }
2737if eval \${$3+:} false; then :
2738  $as_echo_n "(cached) " >&6
2739else
2740  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2741/* end confdefs.h.  */
2742$4
2743#include <$2>
2744_ACEOF
2745if ac_fn_cxx_try_compile "$LINENO"; then :
2746  eval "$3=yes"
2747else
2748  eval "$3=no"
2749fi
2750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2751fi
2752eval ac_res=\$$3
2753	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2754$as_echo "$ac_res" >&6; }
2755  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2756
2757} # ac_fn_cxx_check_header_compile
2758
2759# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2760# ----------------------------------------------
2761# Tries to find the compile-time value of EXPR in a program that includes
2762# INCLUDES, setting VAR accordingly. Returns whether the value could be
2763# computed
2764ac_fn_cxx_compute_int ()
2765{
2766  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2767  if test "$cross_compiling" = yes; then
2768    # Depending upon the size, compute the lo and hi bounds.
2769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2770/* end confdefs.h.  */
2771$4
2772int
2773main ()
2774{
2775static int test_array [1 - 2 * !(($2) >= 0)];
2776test_array [0] = 0;
2777return test_array [0];
2778
2779  ;
2780  return 0;
2781}
2782_ACEOF
2783if ac_fn_cxx_try_compile "$LINENO"; then :
2784  ac_lo=0 ac_mid=0
2785  while :; do
2786    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2787/* end confdefs.h.  */
2788$4
2789int
2790main ()
2791{
2792static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2793test_array [0] = 0;
2794return test_array [0];
2795
2796  ;
2797  return 0;
2798}
2799_ACEOF
2800if ac_fn_cxx_try_compile "$LINENO"; then :
2801  ac_hi=$ac_mid; break
2802else
2803  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2804			if test $ac_lo -le $ac_mid; then
2805			  ac_lo= ac_hi=
2806			  break
2807			fi
2808			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2809fi
2810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2811  done
2812else
2813  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2814/* end confdefs.h.  */
2815$4
2816int
2817main ()
2818{
2819static int test_array [1 - 2 * !(($2) < 0)];
2820test_array [0] = 0;
2821return test_array [0];
2822
2823  ;
2824  return 0;
2825}
2826_ACEOF
2827if ac_fn_cxx_try_compile "$LINENO"; then :
2828  ac_hi=-1 ac_mid=-1
2829  while :; do
2830    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2831/* end confdefs.h.  */
2832$4
2833int
2834main ()
2835{
2836static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2837test_array [0] = 0;
2838return test_array [0];
2839
2840  ;
2841  return 0;
2842}
2843_ACEOF
2844if ac_fn_cxx_try_compile "$LINENO"; then :
2845  ac_lo=$ac_mid; break
2846else
2847  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2848			if test $ac_mid -le $ac_hi; then
2849			  ac_lo= ac_hi=
2850			  break
2851			fi
2852			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2853fi
2854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2855  done
2856else
2857  ac_lo= ac_hi=
2858fi
2859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2860fi
2861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2862# Binary search between lo and hi bounds.
2863while test "x$ac_lo" != "x$ac_hi"; do
2864  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2865  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2866/* end confdefs.h.  */
2867$4
2868int
2869main ()
2870{
2871static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2872test_array [0] = 0;
2873return test_array [0];
2874
2875  ;
2876  return 0;
2877}
2878_ACEOF
2879if ac_fn_cxx_try_compile "$LINENO"; then :
2880  ac_hi=$ac_mid
2881else
2882  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2883fi
2884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2885done
2886case $ac_lo in #((
2887?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2888'') ac_retval=1 ;;
2889esac
2890  else
2891    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2892/* end confdefs.h.  */
2893$4
2894static long int longval () { return $2; }
2895static unsigned long int ulongval () { return $2; }
2896#include <stdio.h>
2897#include <stdlib.h>
2898int
2899main ()
2900{
2901
2902  FILE *f = fopen ("conftest.val", "w");
2903  if (! f)
2904    return 1;
2905  if (($2) < 0)
2906    {
2907      long int i = longval ();
2908      if (i != ($2))
2909	return 1;
2910      fprintf (f, "%ld", i);
2911    }
2912  else
2913    {
2914      unsigned long int i = ulongval ();
2915      if (i != ($2))
2916	return 1;
2917      fprintf (f, "%lu", i);
2918    }
2919  /* Do not output a trailing newline, as this causes \r\n confusion
2920     on some platforms.  */
2921  return ferror (f) || fclose (f) != 0;
2922
2923  ;
2924  return 0;
2925}
2926_ACEOF
2927if ac_fn_cxx_try_run "$LINENO"; then :
2928  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2929else
2930  ac_retval=1
2931fi
2932rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2933  conftest.$ac_objext conftest.beam conftest.$ac_ext
2934rm -f conftest.val
2935
2936  fi
2937  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2938  as_fn_set_status $ac_retval
2939
2940} # ac_fn_cxx_compute_int
2941
2942# ac_fn_cxx_try_link LINENO
2943# -------------------------
2944# Try to link conftest.$ac_ext, and return whether this succeeded.
2945ac_fn_cxx_try_link ()
2946{
2947  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2948  rm -f conftest.$ac_objext conftest$ac_exeext
2949  if { { ac_try="$ac_link"
2950case "(($ac_try" in
2951  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2952  *) ac_try_echo=$ac_try;;
2953esac
2954eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2955$as_echo "$ac_try_echo"; } >&5
2956  (eval "$ac_link") 2>conftest.err
2957  ac_status=$?
2958  if test -s conftest.err; then
2959    grep -v '^ *+' conftest.err >conftest.er1
2960    cat conftest.er1 >&5
2961    mv -f conftest.er1 conftest.err
2962  fi
2963  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2964  test $ac_status = 0; } && {
2965	 test -z "$ac_cxx_werror_flag" ||
2966	 test ! -s conftest.err
2967       } && test -s conftest$ac_exeext && {
2968	 test "$cross_compiling" = yes ||
2969	 test -x conftest$ac_exeext
2970       }; then :
2971  ac_retval=0
2972else
2973  $as_echo "$as_me: failed program was:" >&5
2974sed 's/^/| /' conftest.$ac_ext >&5
2975
2976	ac_retval=1
2977fi
2978  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2979  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2980  # interfere with the next link command; also delete a directory that is
2981  # left behind by Apple's compiler.  We do this before executing the actions.
2982  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2983  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2984  as_fn_set_status $ac_retval
2985
2986} # ac_fn_cxx_try_link
2987
2988# ac_fn_cxx_check_func LINENO FUNC VAR
2989# ------------------------------------
2990# Tests whether FUNC exists, setting the cache variable VAR accordingly
2991ac_fn_cxx_check_func ()
2992{
2993  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2994  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2995$as_echo_n "checking for $2... " >&6; }
2996if eval \${$3+:} false; then :
2997  $as_echo_n "(cached) " >&6
2998else
2999  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3000/* end confdefs.h.  */
3001/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3002   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3003#define $2 innocuous_$2
3004
3005/* System header to define __stub macros and hopefully few prototypes,
3006    which can conflict with char $2 (); below.
3007    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3008    <limits.h> exists even on freestanding compilers.  */
3009
3010#ifdef __STDC__
3011# include <limits.h>
3012#else
3013# include <assert.h>
3014#endif
3015
3016#undef $2
3017
3018/* Override any GCC internal prototype to avoid an error.
3019   Use char because int might match the return type of a GCC
3020   builtin and then its argument prototype would still apply.  */
3021#ifdef __cplusplus
3022extern "C"
3023#endif
3024char $2 ();
3025/* The GNU C library defines this for functions which it implements
3026    to always fail with ENOSYS.  Some functions are actually named
3027    something starting with __ and the normal name is an alias.  */
3028#if defined __stub_$2 || defined __stub___$2
3029choke me
3030#endif
3031
3032int
3033main ()
3034{
3035return $2 ();
3036  ;
3037  return 0;
3038}
3039_ACEOF
3040if ac_fn_cxx_try_link "$LINENO"; then :
3041  eval "$3=yes"
3042else
3043  eval "$3=no"
3044fi
3045rm -f core conftest.err conftest.$ac_objext \
3046    conftest$ac_exeext conftest.$ac_ext
3047fi
3048eval ac_res=\$$3
3049	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3050$as_echo "$ac_res" >&6; }
3051  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3052
3053} # ac_fn_cxx_check_func
3054
3055# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3056# -------------------------------------------------------
3057# Tests whether HEADER exists and can be compiled using the include files in
3058# INCLUDES, setting the cache variable VAR accordingly.
3059ac_fn_c_check_header_compile ()
3060{
3061  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3062  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3063$as_echo_n "checking for $2... " >&6; }
3064if eval \${$3+:} false; then :
3065  $as_echo_n "(cached) " >&6
3066else
3067  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3068/* end confdefs.h.  */
3069$4
3070#include <$2>
3071_ACEOF
3072if ac_fn_c_try_compile "$LINENO"; then :
3073  eval "$3=yes"
3074else
3075  eval "$3=no"
3076fi
3077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3078fi
3079eval ac_res=\$$3
3080	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3081$as_echo "$ac_res" >&6; }
3082  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3083
3084} # ac_fn_c_check_header_compile
3085cat >config.log <<_ACEOF
3086This file contains any messages produced by compilers while
3087running configure, to aid debugging if configure makes a mistake.
3088
3089It was created by OpenJDK $as_me jdk9, which was
3090generated by GNU Autoconf 2.69.  Invocation command line was
3091
3092  $ $0 $@
3093
3094_ACEOF
3095exec 5>>config.log
3096{
3097cat <<_ASUNAME
3098## --------- ##
3099## Platform. ##
3100## --------- ##
3101
3102hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3103uname -m = `(uname -m) 2>/dev/null || echo unknown`
3104uname -r = `(uname -r) 2>/dev/null || echo unknown`
3105uname -s = `(uname -s) 2>/dev/null || echo unknown`
3106uname -v = `(uname -v) 2>/dev/null || echo unknown`
3107
3108/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3109/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3110
3111/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3112/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3113/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3114/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3115/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3116/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3117/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3118
3119_ASUNAME
3120
3121as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3122for as_dir in $PATH
3123do
3124  IFS=$as_save_IFS
3125  test -z "$as_dir" && as_dir=.
3126    $as_echo "PATH: $as_dir"
3127  done
3128IFS=$as_save_IFS
3129
3130} >&5
3131
3132cat >&5 <<_ACEOF
3133
3134
3135## ----------- ##
3136## Core tests. ##
3137## ----------- ##
3138
3139_ACEOF
3140
3141
3142# Keep a trace of the command line.
3143# Strip out --no-create and --no-recursion so they do not pile up.
3144# Strip out --silent because we don't want to record it for future runs.
3145# Also quote any args containing shell meta-characters.
3146# Make two passes to allow for proper duplicate-argument suppression.
3147ac_configure_args=
3148ac_configure_args0=
3149ac_configure_args1=
3150ac_must_keep_next=false
3151for ac_pass in 1 2
3152do
3153  for ac_arg
3154  do
3155    case $ac_arg in
3156    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3157    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3158    | -silent | --silent | --silen | --sile | --sil)
3159      continue ;;
3160    *\'*)
3161      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3162    esac
3163    case $ac_pass in
3164    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3165    2)
3166      as_fn_append ac_configure_args1 " '$ac_arg'"
3167      if test $ac_must_keep_next = true; then
3168	ac_must_keep_next=false # Got value, back to normal.
3169      else
3170	case $ac_arg in
3171	  *=* | --config-cache | -C | -disable-* | --disable-* \
3172	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3173	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3174	  | -with-* | --with-* | -without-* | --without-* | --x)
3175	    case "$ac_configure_args0 " in
3176	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3177	    esac
3178	    ;;
3179	  -* ) ac_must_keep_next=true ;;
3180	esac
3181      fi
3182      as_fn_append ac_configure_args " '$ac_arg'"
3183      ;;
3184    esac
3185  done
3186done
3187{ ac_configure_args0=; unset ac_configure_args0;}
3188{ ac_configure_args1=; unset ac_configure_args1;}
3189
3190# When interrupted or exit'd, cleanup temporary files, and complete
3191# config.log.  We remove comments because anyway the quotes in there
3192# would cause problems or look ugly.
3193# WARNING: Use '\'' to represent an apostrophe within the trap.
3194# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3195trap 'exit_status=$?
3196  # Save into config.log some information that might help in debugging.
3197  {
3198    echo
3199
3200    $as_echo "## ---------------- ##
3201## Cache variables. ##
3202## ---------------- ##"
3203    echo
3204    # The following way of writing the cache mishandles newlines in values,
3205(
3206  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3207    eval ac_val=\$$ac_var
3208    case $ac_val in #(
3209    *${as_nl}*)
3210      case $ac_var in #(
3211      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3212$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3213      esac
3214      case $ac_var in #(
3215      _ | IFS | as_nl) ;; #(
3216      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3217      *) { eval $ac_var=; unset $ac_var;} ;;
3218      esac ;;
3219    esac
3220  done
3221  (set) 2>&1 |
3222    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3223    *${as_nl}ac_space=\ *)
3224      sed -n \
3225	"s/'\''/'\''\\\\'\'''\''/g;
3226	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3227      ;; #(
3228    *)
3229      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3230      ;;
3231    esac |
3232    sort
3233)
3234    echo
3235
3236    $as_echo "## ----------------- ##
3237## Output variables. ##
3238## ----------------- ##"
3239    echo
3240    for ac_var in $ac_subst_vars
3241    do
3242      eval ac_val=\$$ac_var
3243      case $ac_val in
3244      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3245      esac
3246      $as_echo "$ac_var='\''$ac_val'\''"
3247    done | sort
3248    echo
3249
3250    if test -n "$ac_subst_files"; then
3251      $as_echo "## ------------------- ##
3252## File substitutions. ##
3253## ------------------- ##"
3254      echo
3255      for ac_var in $ac_subst_files
3256      do
3257	eval ac_val=\$$ac_var
3258	case $ac_val in
3259	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3260	esac
3261	$as_echo "$ac_var='\''$ac_val'\''"
3262      done | sort
3263      echo
3264    fi
3265
3266    if test -s confdefs.h; then
3267      $as_echo "## ----------- ##
3268## confdefs.h. ##
3269## ----------- ##"
3270      echo
3271      cat confdefs.h
3272      echo
3273    fi
3274    test "$ac_signal" != 0 &&
3275      $as_echo "$as_me: caught signal $ac_signal"
3276    $as_echo "$as_me: exit $exit_status"
3277  } >&5
3278  rm -f core *.core core.conftest.* &&
3279    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3280    exit $exit_status
3281' 0
3282for ac_signal in 1 2 13 15; do
3283  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3284done
3285ac_signal=0
3286
3287# confdefs.h avoids OS command line length limits that DEFS can exceed.
3288rm -f -r conftest* confdefs.h
3289
3290$as_echo "/* confdefs.h */" > confdefs.h
3291
3292# Predefined preprocessor variables.
3293
3294cat >>confdefs.h <<_ACEOF
3295#define PACKAGE_NAME "$PACKAGE_NAME"
3296_ACEOF
3297
3298cat >>confdefs.h <<_ACEOF
3299#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3300_ACEOF
3301
3302cat >>confdefs.h <<_ACEOF
3303#define PACKAGE_VERSION "$PACKAGE_VERSION"
3304_ACEOF
3305
3306cat >>confdefs.h <<_ACEOF
3307#define PACKAGE_STRING "$PACKAGE_STRING"
3308_ACEOF
3309
3310cat >>confdefs.h <<_ACEOF
3311#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3312_ACEOF
3313
3314cat >>confdefs.h <<_ACEOF
3315#define PACKAGE_URL "$PACKAGE_URL"
3316_ACEOF
3317
3318
3319# Let the site file select an alternate cache file if it wants to.
3320# Prefer an explicitly selected file to automatically selected ones.
3321ac_site_file1=NONE
3322ac_site_file2=NONE
3323if test -n "$CONFIG_SITE"; then
3324  # We do not want a PATH search for config.site.
3325  case $CONFIG_SITE in #((
3326    -*)  ac_site_file1=./$CONFIG_SITE;;
3327    */*) ac_site_file1=$CONFIG_SITE;;
3328    *)   ac_site_file1=./$CONFIG_SITE;;
3329  esac
3330elif test "x$prefix" != xNONE; then
3331  ac_site_file1=$prefix/share/config.site
3332  ac_site_file2=$prefix/etc/config.site
3333else
3334  ac_site_file1=$ac_default_prefix/share/config.site
3335  ac_site_file2=$ac_default_prefix/etc/config.site
3336fi
3337for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3338do
3339  test "x$ac_site_file" = xNONE && continue
3340  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3341    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3342$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3343    sed 's/^/| /' "$ac_site_file" >&5
3344    . "$ac_site_file" \
3345      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3346$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3347as_fn_error $? "failed to load site script $ac_site_file
3348See \`config.log' for more details" "$LINENO" 5; }
3349  fi
3350done
3351
3352if test -r "$cache_file"; then
3353  # Some versions of bash will fail to source /dev/null (special files
3354  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3355  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3356    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3357$as_echo "$as_me: loading cache $cache_file" >&6;}
3358    case $cache_file in
3359      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3360      *)                      . "./$cache_file";;
3361    esac
3362  fi
3363else
3364  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3365$as_echo "$as_me: creating cache $cache_file" >&6;}
3366  >$cache_file
3367fi
3368
3369# Check that the precious variables saved in the cache have kept the same
3370# value.
3371ac_cache_corrupted=false
3372for ac_var in $ac_precious_vars; do
3373  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3374  eval ac_new_set=\$ac_env_${ac_var}_set
3375  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3376  eval ac_new_val=\$ac_env_${ac_var}_value
3377  case $ac_old_set,$ac_new_set in
3378    set,)
3379      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3380$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3381      ac_cache_corrupted=: ;;
3382    ,set)
3383      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3384$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3385      ac_cache_corrupted=: ;;
3386    ,);;
3387    *)
3388      if test "x$ac_old_val" != "x$ac_new_val"; then
3389	# differences in whitespace do not lead to failure.
3390	ac_old_val_w=`echo x $ac_old_val`
3391	ac_new_val_w=`echo x $ac_new_val`
3392	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3393	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3394$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3395	  ac_cache_corrupted=:
3396	else
3397	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3398$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3399	  eval $ac_var=\$ac_old_val
3400	fi
3401	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3402$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3403	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3404$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3405      fi;;
3406  esac
3407  # Pass precious variables to config.status.
3408  if test "$ac_new_set" = set; then
3409    case $ac_new_val in
3410    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3411    *) ac_arg=$ac_var=$ac_new_val ;;
3412    esac
3413    case " $ac_configure_args " in
3414      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3415      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3416    esac
3417  fi
3418done
3419if $ac_cache_corrupted; then
3420  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3421$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3422  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3423$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3424  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3425fi
3426## -------------------- ##
3427## Main body of script. ##
3428## -------------------- ##
3429
3430ac_ext=c
3431ac_cpp='$CPP $CPPFLAGS'
3432ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3433ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3434ac_compiler_gnu=$ac_cv_c_compiler_gnu
3435
3436
3437
3438ac_aux_dir=
3439for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3440  if test -f "$ac_dir/install-sh"; then
3441    ac_aux_dir=$ac_dir
3442    ac_install_sh="$ac_aux_dir/install-sh -c"
3443    break
3444  elif test -f "$ac_dir/install.sh"; then
3445    ac_aux_dir=$ac_dir
3446    ac_install_sh="$ac_aux_dir/install.sh -c"
3447    break
3448  elif test -f "$ac_dir/shtool"; then
3449    ac_aux_dir=$ac_dir
3450    ac_install_sh="$ac_aux_dir/shtool install -c"
3451    break
3452  fi
3453done
3454if test -z "$ac_aux_dir"; then
3455  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
3456fi
3457
3458# These three variables are undocumented and unsupported,
3459# and are intended to be withdrawn in a future Autoconf release.
3460# They can cause serious problems if a builder's source tree is in a directory
3461# whose full name contains unusual characters.
3462ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3463ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3464ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3465
3466
3467# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3468
3469#
3470# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3471# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3472#
3473# This code is free software; you can redistribute it and/or modify it
3474# under the terms of the GNU General Public License version 2 only, as
3475# published by the Free Software Foundation.  Oracle designates this
3476# particular file as subject to the "Classpath" exception as provided
3477# by Oracle in the LICENSE file that accompanied this code.
3478#
3479# This code is distributed in the hope that it will be useful, but WITHOUT
3480# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3481# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3482# version 2 for more details (a copy is included in the LICENSE file that
3483# accompanied this code).
3484#
3485# You should have received a copy of the GNU General Public License version
3486# 2 along with this work; if not, write to the Free Software Foundation,
3487# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3488#
3489# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3490# or visit www.oracle.com if you need additional information or have any
3491# questions.
3492#
3493
3494#
3495# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3496#
3497# This program is free software; you can redistribute it and/or modify
3498# it under the terms of the GNU General Public License as published by
3499# the Free Software Foundation; either version 2 of the License, or
3500# (at your option) any later version.
3501#
3502# This program is distributed in the hope that it will be useful, but
3503# WITHOUT ANY WARRANTY; without even the implied warranty of
3504# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3505# General Public License for more details.
3506#
3507# You should have received a copy of the GNU General Public License
3508# along with this program; if not, write to the Free Software
3509# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3510#
3511# As a special exception to the GNU General Public License, if you
3512# distribute this file as part of a program that contains a
3513# configuration script generated by Autoconf, you may include it under
3514# the same distribution terms that you use for the rest of that program.
3515
3516# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3517# ----------------------------------
3518# PKG_PROG_PKG_CONFIG
3519
3520# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3521#
3522# Check to see whether a particular set of modules exists.  Similar
3523# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3524#
3525#
3526# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3527# this or PKG_CHECK_MODULES is called, or make sure to call
3528# PKG_CHECK_EXISTS manually
3529# --------------------------------------------------------------
3530
3531
3532
3533# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3534# ---------------------------------------------
3535# _PKG_CONFIG
3536
3537# _PKG_SHORT_ERRORS_SUPPORTED
3538# -----------------------------
3539# _PKG_SHORT_ERRORS_SUPPORTED
3540
3541
3542# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3543# [ACTION-IF-NOT-FOUND])
3544#
3545#
3546# Note that if there is a possibility the first call to
3547# PKG_CHECK_MODULES might not happen, you should be sure to include an
3548# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3549#
3550#
3551# --------------------------------------------------------------
3552# PKG_CHECK_MODULES
3553
3554
3555# Include these first...
3556#
3557# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3558# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3559#
3560# This code is free software; you can redistribute it and/or modify it
3561# under the terms of the GNU General Public License version 2 only, as
3562# published by the Free Software Foundation.  Oracle designates this
3563# particular file as subject to the "Classpath" exception as provided
3564# by Oracle in the LICENSE file that accompanied this code.
3565#
3566# This code is distributed in the hope that it will be useful, but WITHOUT
3567# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3568# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3569# version 2 for more details (a copy is included in the LICENSE file that
3570# accompanied this code).
3571#
3572# You should have received a copy of the GNU General Public License version
3573# 2 along with this work; if not, write to the Free Software Foundation,
3574# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3575#
3576# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3577# or visit www.oracle.com if you need additional information or have any
3578# questions.
3579#
3580
3581# Create a function/macro that takes a series of named arguments. The call is
3582# similar to AC_DEFUN, but the setup of the function looks like this:
3583# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3584# ... do something
3585#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3586# ])
3587# A star (*) in front of a named argument means that it is required and it's
3588# presence will be verified. To pass e.g. the first value as a normal indexed
3589# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3590# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3591# "ARG_FOO".
3592#
3593# The generated function can be called like this:
3594# MYFUNC(FOO: [foo-val],
3595#     BAR: [
3596#         $ECHO hello world
3597#     ])
3598# Note that the argument value must start on the same line as the argument name.
3599#
3600# Argument 1: Name of the function to define
3601# Argument 2: List of legal named arguments, with a * prefix for required arguments
3602# Argument 3: Argument array to treat as named, typically $@
3603# Argument 4: The main function body
3604
3605
3606# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3607# If so, then append $1 to $2 \
3608# Also set JVM_ARG_OK to true/false depending on outcome.
3609
3610
3611# Appends a string to a path variable, only adding the : when needed.
3612
3613
3614# Prepends a string to a path variable, only adding the : when needed.
3615
3616
3617# This will make sure the given variable points to a full and proper
3618# path. This means:
3619# 1) There will be no spaces in the path. On unix platforms,
3620#    spaces in the path will result in an error. On Windows,
3621#    the path will be rewritten using short-style to be space-free.
3622# 2) The path will be absolute, and it will be in unix-style (on
3623#     cygwin).
3624# $1: The name of the variable to fix
3625
3626
3627# This will make sure the given variable points to a executable
3628# with a full and proper path. This means:
3629# 1) There will be no spaces in the path. On unix platforms,
3630#    spaces in the path will result in an error. On Windows,
3631#    the path will be rewritten using short-style to be space-free.
3632# 2) The path will be absolute, and it will be in unix-style (on
3633#     cygwin).
3634# Any arguments given to the executable is preserved.
3635# If the input variable does not have a directory specification, then
3636# it need to be in the PATH.
3637# $1: The name of the variable to fix
3638
3639
3640
3641
3642# Register a --with argument but mark it as deprecated
3643# $1: The name of the with argument to deprecate, not including --with-
3644
3645
3646# Register a --enable argument but mark it as deprecated
3647# $1: The name of the with argument to deprecate, not including --enable-
3648# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3649# $3: Messages to user.
3650
3651
3652
3653
3654# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3655# $1: variable to check
3656
3657
3658# Check that there are no unprocessed overridden variables left.
3659# If so, they are an incorrect argument and we will exit with an error.
3660
3661
3662# Setup a tool for the given variable. If correctly specified by the user,
3663# use that value, otherwise search for the tool using the supplied code snippet.
3664# $1: variable to set
3665# $2: code snippet to call to look for the tool
3666# $3: code snippet to call if variable was used to find tool
3667
3668
3669# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3670# $1: variable to set
3671# $2: executable name (or list of names) to look for
3672
3673
3674# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3675# $1: variable to set
3676# $2: executable name (or list of names) to look for
3677
3678
3679# Like BASIC_PATH_PROGS but fails if no tool was found.
3680# $1: variable to set
3681# $2: executable name (or list of names) to look for
3682
3683
3684# Like BASIC_SETUP_TOOL but fails if no tool was found.
3685# $1: variable to set
3686# $2: autoconf macro to call to look for the special tool
3687
3688
3689# Setup the most fundamental tools that relies on not much else to set up,
3690# but is used by much of the early bootstrap code.
3691
3692
3693# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3694
3695
3696# Evaluates platform specific overrides for devkit variables.
3697# $1: Name of variable
3698
3699
3700
3701
3702
3703
3704#%%% Simple tools %%%
3705
3706# Check if we have found a usable version of make
3707# $1: the path to a potential make binary (or empty)
3708# $2: the description on how we found this
3709
3710
3711
3712
3713# Goes looking for a usable version of GNU make.
3714
3715
3716
3717
3718
3719
3720
3721
3722# Check if build directory is on local disk. If not possible to determine,
3723# we prefer to claim it's local.
3724# Argument 1: directory to test
3725# Argument 2: what to do if it is on local disk
3726# Argument 3: what to do otherwise (remote disk or failure)
3727
3728
3729# Check that source files have basic read permissions set. This might
3730# not be the case in cygwin in certain conditions.
3731
3732
3733
3734
3735# Check for support for specific options in bash
3736
3737
3738################################################################################
3739#
3740# Default make target
3741#
3742
3743
3744# Code to run after AC_OUTPUT
3745
3746
3747#
3748# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3749# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3750#
3751# This code is free software; you can redistribute it and/or modify it
3752# under the terms of the GNU General Public License version 2 only, as
3753# published by the Free Software Foundation.  Oracle designates this
3754# particular file as subject to the "Classpath" exception as provided
3755# by Oracle in the LICENSE file that accompanied this code.
3756#
3757# This code is distributed in the hope that it will be useful, but WITHOUT
3758# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3759# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3760# version 2 for more details (a copy is included in the LICENSE file that
3761# accompanied this code).
3762#
3763# You should have received a copy of the GNU General Public License version
3764# 2 along with this work; if not, write to the Free Software Foundation,
3765# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3766#
3767# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3768# or visit www.oracle.com if you need additional information or have any
3769# questions.
3770#
3771
3772
3773
3774
3775
3776# Helper function which possibly converts a path using DOS-style short mode.
3777# If so, the updated path is stored in $new_path.
3778# $1: The path to check
3779
3780
3781# Helper function which possibly converts a path using DOS-style short mode.
3782# If so, the updated path is stored in $new_path.
3783# $1: The path to check
3784
3785
3786# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3787# and could probably be heavily simplified. However, all changes in this
3788# area tend to need lot of testing in different scenarios, and in lack of
3789# proper unit testing, cleaning this up has not been deemed worth the effort
3790# at the moment.
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3801
3802
3803
3804
3805# ... then the rest
3806#
3807# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3808# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3809#
3810# This code is free software; you can redistribute it and/or modify it
3811# under the terms of the GNU General Public License version 2 only, as
3812# published by the Free Software Foundation.  Oracle designates this
3813# particular file as subject to the "Classpath" exception as provided
3814# by Oracle in the LICENSE file that accompanied this code.
3815#
3816# This code is distributed in the hope that it will be useful, but WITHOUT
3817# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3818# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3819# version 2 for more details (a copy is included in the LICENSE file that
3820# accompanied this code).
3821#
3822# You should have received a copy of the GNU General Public License version
3823# 2 along with this work; if not, write to the Free Software Foundation,
3824# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3825#
3826# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3827# or visit www.oracle.com if you need additional information or have any
3828# questions.
3829#
3830
3831########################################################################
3832# This file handles detection of the Boot JDK. The Boot JDK detection
3833# process has been developed as a response to solve a complex real-world
3834# problem. Initially, it was simple, but it has grown as platform after
3835# platform, idiosyncracy after idiosyncracy has been supported.
3836#
3837# The basic idea is this:
3838# 1) You need an acceptable *) JDK to use as a Boot JDK
3839# 2) There are several ways to locate a JDK, that are mostly platform
3840#    dependent **)
3841# 3) You can have multiple JDKs installed
3842# 4) If possible, configure should try to dig out an acceptable JDK
3843#    automatically, without having to resort to command-line options
3844#
3845# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3846#     javac) and not a JRE, etc.
3847#
3848# **) On Windows we typically use a well-known path.
3849#     On MacOSX we typically use the tool java_home.
3850#     On Linux we typically find javac in the $PATH, and then follow a
3851#     chain of symlinks that often ends up in a real JDK.
3852#
3853# This leads to the code where we check in different ways to locate a
3854# JDK, and if one is found, check if it is acceptable. If not, we print
3855# our reasons for rejecting it (useful when debugging non-working
3856# configure situations) and continue checking the next one.
3857########################################################################
3858
3859# Execute the check given as argument, and verify the result
3860# If the Boot JDK was previously found, do nothing
3861# $1 A command line (typically autoconf macro) to execute
3862
3863
3864# Test: Is bootjdk explicitely set by command line arguments?
3865
3866
3867# Test: Is $JAVA_HOME set?
3868
3869
3870# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3871
3872
3873# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3874# $1: Argument to the java_home binary (optional)
3875
3876
3877# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3878
3879
3880# Look for a jdk in the given path. If there are multiple, try to select the newest.
3881# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3882# $1 = Path to directory containing jdk installations.
3883# $2 = String to append to the found JDK directory to get the proper JDK home
3884
3885
3886# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3887# environmental variable as base for where to look.
3888# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3889
3890
3891# Test: Is there a JDK installed in default, well-known locations?
3892
3893
3894# Check that a command-line tool in the Boot JDK is correct
3895# $1 = name of variable to assign
3896# $2 = name of binary
3897
3898
3899###############################################################################
3900#
3901# We need a Boot JDK to bootstrap the build.
3902#
3903
3904
3905
3906
3907
3908# BUILD_JDK: the location of the latest JDK that can run
3909#   on the host system and supports the target class file version
3910#   generated in this JDK build.  This variable should only be
3911#   used after the launchers are built.
3912#
3913
3914# Execute the check given as argument, and verify the result.
3915# If the JDK was previously found, do nothing.
3916# $1 A command line (typically autoconf macro) to execute
3917
3918
3919# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3920# is different than the host system doing the build (e.g. cross-compilation),
3921# a special BUILD_JDK is built as part of the build process.  An external
3922# prebuilt BUILD_JDK can also be supplied.
3923
3924
3925#
3926# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3927# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3928#
3929# This code is free software; you can redistribute it and/or modify it
3930# under the terms of the GNU General Public License version 2 only, as
3931# published by the Free Software Foundation.  Oracle designates this
3932# particular file as subject to the "Classpath" exception as provided
3933# by Oracle in the LICENSE file that accompanied this code.
3934#
3935# This code is distributed in the hope that it will be useful, but WITHOUT
3936# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3937# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3938# version 2 for more details (a copy is included in the LICENSE file that
3939# accompanied this code).
3940#
3941# You should have received a copy of the GNU General Public License version
3942# 2 along with this work; if not, write to the Free Software Foundation,
3943# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3944#
3945# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3946# or visit www.oracle.com if you need additional information or have any
3947# questions.
3948#
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966################################################################################
3967#
3968# Runs icecc-create-env once and prints the error if it fails
3969#
3970# $1: arguments to icecc-create-env
3971# $2: log file
3972#
3973
3974
3975################################################################################
3976#
3977# Optionally enable distributed compilation of native code using icecc/icecream
3978#
3979
3980
3981
3982
3983
3984
3985
3986#
3987# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3988# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3989#
3990# This code is free software; you can redistribute it and/or modify it
3991# under the terms of the GNU General Public License version 2 only, as
3992# published by the Free Software Foundation.  Oracle designates this
3993# particular file as subject to the "Classpath" exception as provided
3994# by Oracle in the LICENSE file that accompanied this code.
3995#
3996# This code is distributed in the hope that it will be useful, but WITHOUT
3997# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3998# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3999# version 2 for more details (a copy is included in the LICENSE file that
4000# accompanied this code).
4001#
4002# You should have received a copy of the GNU General Public License version
4003# 2 along with this work; if not, write to the Free Software Foundation,
4004# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4005#
4006# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4007# or visit www.oracle.com if you need additional information or have any
4008# questions.
4009#
4010
4011# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4012# corresponding configure arguments instead
4013
4014
4015# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4016# that configure can use them while detecting compilers.
4017# TOOLCHAIN_TYPE is available here.
4018# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4019
4020
4021
4022
4023
4024
4025# Documentation on common flags used for solstudio in HIGHEST.
4026#
4027# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4028#          done with care, there are some assumptions below that need to
4029#          be understood about the use of pointers, and IEEE behavior.
4030#
4031# -fns: Use non-standard floating point mode (not IEEE 754)
4032# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4033# -fsingle: Use single precision floating point with 'float'
4034# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4035#   (Source with excessing pointer casting and data access with mixed
4036#    pointer types are not recommended)
4037# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4038#   (If you expect perfect errno behavior, do not use this)
4039# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4040# -xrestrict: Pointer parameters to functions do not overlap
4041#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4042#    If you pass in multiple pointers to the same data, do not use this)
4043# -xlibmil: Inline some library routines
4044#   (If you expect perfect errno behavior, do not use this)
4045# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4046#   (If you expect perfect errno behavior, do not use this)
4047#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4048
4049    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4050    # Bug?
4051    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4052    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4053    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4054    #fi
4055
4056
4057
4058
4059
4060
4061################################################################################
4062# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4063#      conditionals against.
4064# $2 - Optional prefix for each variable defined.
4065
4066
4067# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4068#                                  IF_FALSE: [RUN-IF-FALSE])
4069# ------------------------------------------------------------
4070# Check that the C compiler supports an argument
4071
4072
4073
4074
4075# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4076#                                    IF_FALSE: [RUN-IF-FALSE])
4077# ------------------------------------------------------------
4078# Check that the C++ compiler supports an argument
4079
4080
4081
4082
4083# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4084#                                IF_FALSE: [RUN-IF-FALSE])
4085# ------------------------------------------------------------
4086# Check that the C and C++ compilers support an argument
4087
4088
4089
4090
4091# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4092#                                   IF_FALSE: [RUN-IF-FALSE])
4093# ------------------------------------------------------------
4094# Check that the linker support an argument
4095
4096
4097
4098
4099
4100
4101# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4102# Arguments:
4103# $1 - Optional prefix for each variable defined.
4104
4105
4106#
4107# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4108# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4109#
4110# This code is free software; you can redistribute it and/or modify it
4111# under the terms of the GNU General Public License version 2 only, as
4112# published by the Free Software Foundation.  Oracle designates this
4113# particular file as subject to the "Classpath" exception as provided
4114# by Oracle in the LICENSE file that accompanied this code.
4115#
4116# This code is distributed in the hope that it will be useful, but WITHOUT
4117# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4118# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4119# version 2 for more details (a copy is included in the LICENSE file that
4120# accompanied this code).
4121#
4122# You should have received a copy of the GNU General Public License version
4123# 2 along with this work; if not, write to the Free Software Foundation,
4124# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4125#
4126# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4127# or visit www.oracle.com if you need additional information or have any
4128# questions.
4129#
4130
4131
4132
4133
4134
4135cygwin_help() {
4136  case $1 in
4137    unzip)
4138      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4139      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4140      ;;
4141    zip)
4142      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4143      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4144      ;;
4145    make)
4146      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4147      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4148      ;;
4149    freetype)
4150      HELP_MSG="
4151The freetype library can now be build during the configure process.
4152Download the freetype sources and unpack them into an arbitrary directory:
4153
4154wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4155tar -xzf freetype-2.5.3.tar.gz
4156
4157Then run configure with '--with-freetype-src=<freetype_src>'. This will
4158automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4159builds or into '<freetype_src>/lib32' for 32-bit builds.
4160Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4161and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4162
4163Alternatively you can unpack the sources like this to use the default directory:
4164
4165tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4166      ;;
4167  esac
4168}
4169
4170msys_help() {
4171  PKGHANDLER_COMMAND=""
4172}
4173
4174apt_help() {
4175  case $1 in
4176    reduced)
4177      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4178    devkit)
4179      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4180    openjdk)
4181      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4182    alsa)
4183      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4184    cups)
4185      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4186    freetype)
4187      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4188    ffi)
4189      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4190    x11)
4191      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4192    ccache)
4193      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4194    dtrace)
4195      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4196  esac
4197}
4198
4199yum_help() {
4200  case $1 in
4201    devkit)
4202      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4203    openjdk)
4204      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4205    alsa)
4206      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4207    cups)
4208      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4209    freetype)
4210      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4211    x11)
4212      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4213    ccache)
4214      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4215  esac
4216}
4217
4218port_help() {
4219  PKGHANDLER_COMMAND=""
4220}
4221
4222pkgutil_help() {
4223  PKGHANDLER_COMMAND=""
4224}
4225
4226pkgadd_help() {
4227  PKGHANDLER_COMMAND=""
4228}
4229
4230# This function will check if we're called from the "configure" wrapper while
4231# printing --help. If so, we will print out additional information that can
4232# only be extracted within the autoconf script, and then exit. This must be
4233# called at the very beginning in configure.ac.
4234
4235
4236
4237
4238
4239
4240#
4241# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4242# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4243#
4244# This code is free software; you can redistribute it and/or modify it
4245# under the terms of the GNU General Public License version 2 only, as
4246# published by the Free Software Foundation.  Oracle designates this
4247# particular file as subject to the "Classpath" exception as provided
4248# by Oracle in the LICENSE file that accompanied this code.
4249#
4250# This code is distributed in the hope that it will be useful, but WITHOUT
4251# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4252# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4253# version 2 for more details (a copy is included in the LICENSE file that
4254# accompanied this code).
4255#
4256# You should have received a copy of the GNU General Public License version
4257# 2 along with this work; if not, write to the Free Software Foundation,
4258# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4259#
4260# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4261# or visit www.oracle.com if you need additional information or have any
4262# questions.
4263#
4264
4265# All valid JVM features, regardless of platform
4266VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4267    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4268
4269# All valid JVM variants
4270VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4271
4272###############################################################################
4273# Check if the specified JVM variant should be built. To be used in shell if
4274# constructs, like this:
4275# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4276#
4277# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4278
4279# Definition kept in one line to allow inlining in if statements.
4280# Additional [] needed to keep m4 from mangling shell constructs.
4281
4282
4283###############################################################################
4284# Check if the specified JVM features are explicitly enabled. To be used in
4285# shell if constructs, like this:
4286# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4287#
4288# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4289
4290# Definition kept in one line to allow inlining in if statements.
4291# Additional [] needed to keep m4 from mangling shell constructs.
4292
4293
4294###############################################################################
4295# Check which variants of the JVM that we want to build. Available variants are:
4296#   server: normal interpreter, and a tiered C1/C2 compiler
4297#   client: normal interpreter, and C1 (no C2 compiler)
4298#   minimal: reduced form of client with optional features stripped out
4299#   core: normal interpreter only, no compiler
4300#   zero: C++ based interpreter only, no compiler
4301#   zeroshark: C++ based interpreter, and a llvm-based compiler
4302#   custom: baseline JVM with no default features
4303#
4304
4305
4306###############################################################################
4307# Check if dtrace should be enabled and has all prerequisites present.
4308#
4309
4310
4311###############################################################################
4312# Set up all JVM features for each JVM variant.
4313#
4314
4315
4316###############################################################################
4317# Validate JVM features once all setup is complete, including custom setup.
4318#
4319
4320
4321################################################################################
4322# Check if gtest should be built
4323#
4324
4325
4326#
4327# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4328# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4329#
4330# This code is free software; you can redistribute it and/or modify it
4331# under the terms of the GNU General Public License version 2 only, as
4332# published by the Free Software Foundation.  Oracle designates this
4333# particular file as subject to the "Classpath" exception as provided
4334# by Oracle in the LICENSE file that accompanied this code.
4335#
4336# This code is distributed in the hope that it will be useful, but WITHOUT
4337# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4338# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4339# version 2 for more details (a copy is included in the LICENSE file that
4340# accompanied this code).
4341#
4342# You should have received a copy of the GNU General Public License version
4343# 2 along with this work; if not, write to the Free Software Foundation,
4344# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4345#
4346# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4347# or visit www.oracle.com if you need additional information or have any
4348# questions.
4349#
4350
4351###############################################################################
4352# Check which variant of the JDK that we want to build.
4353# Currently we have:
4354#    normal:   standard edition
4355# but the custom make system may add other variants
4356#
4357# Effectively the JDK variant gives a name to a specific set of
4358# modules to compile into the JDK.
4359
4360
4361###############################################################################
4362# Set the debug level
4363#    release: no debug information, all optimizations, no asserts.
4364#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4365#    fastdebug: debug information (-g), all optimizations, all asserts
4366#    slowdebug: debug information (-g), no optimizations, all asserts
4367
4368
4369###############################################################################
4370#
4371# Should we build only OpenJDK even if closed sources are present?
4372#
4373
4374
4375
4376
4377###############################################################################
4378#
4379# Enable or disable the elliptic curve crypto implementation
4380#
4381
4382
4383
4384
4385################################################################################
4386#
4387# Gcov coverage data for hotspot
4388#
4389
4390
4391################################################################################
4392#
4393# Static build support.  When enabled will generate static
4394# libraries instead of shared libraries for all JDK libs.
4395#
4396
4397
4398################################################################################
4399#
4400# jlink options.
4401# We always keep packaged modules in JDK image.
4402#
4403
4404
4405################################################################################
4406#
4407# Check if building of the jtreg failure handler should be enabled.
4408#
4409
4410
4411################################################################################
4412#
4413# Enable or disable generation of the classlist at build time
4414#
4415
4416
4417#
4418# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4419# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4420#
4421# This code is free software; you can redistribute it and/or modify it
4422# under the terms of the GNU General Public License version 2 only, as
4423# published by the Free Software Foundation.  Oracle designates this
4424# particular file as subject to the "Classpath" exception as provided
4425# by Oracle in the LICENSE file that accompanied this code.
4426#
4427# This code is distributed in the hope that it will be useful, but WITHOUT
4428# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4429# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4430# version 2 for more details (a copy is included in the LICENSE file that
4431# accompanied this code).
4432#
4433# You should have received a copy of the GNU General Public License version
4434# 2 along with this work; if not, write to the Free Software Foundation,
4435# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4436#
4437# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4438# or visit www.oracle.com if you need additional information or have any
4439# questions.
4440#
4441
4442###############################################################################
4443#
4444# Setup version numbers
4445#
4446
4447# Verify that a given string represents a valid version number, and assign it
4448# to a variable.
4449
4450# Argument 1: the variable to assign to
4451# Argument 2: the value given by the user
4452
4453
4454
4455
4456#
4457# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4458# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4459#
4460# This code is free software; you can redistribute it and/or modify it
4461# under the terms of the GNU General Public License version 2 only, as
4462# published by the Free Software Foundation.  Oracle designates this
4463# particular file as subject to the "Classpath" exception as provided
4464# by Oracle in the LICENSE file that accompanied this code.
4465#
4466# This code is distributed in the hope that it will be useful, but WITHOUT
4467# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4468# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4469# version 2 for more details (a copy is included in the LICENSE file that
4470# accompanied this code).
4471#
4472# You should have received a copy of the GNU General Public License version
4473# 2 along with this work; if not, write to the Free Software Foundation,
4474# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4475#
4476# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4477# or visit www.oracle.com if you need additional information or have any
4478# questions.
4479#
4480
4481# Major library component reside in separate files.
4482#
4483# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4484# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4485#
4486# This code is free software; you can redistribute it and/or modify it
4487# under the terms of the GNU General Public License version 2 only, as
4488# published by the Free Software Foundation.  Oracle designates this
4489# particular file as subject to the "Classpath" exception as provided
4490# by Oracle in the LICENSE file that accompanied this code.
4491#
4492# This code is distributed in the hope that it will be useful, but WITHOUT
4493# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4494# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4495# version 2 for more details (a copy is included in the LICENSE file that
4496# accompanied this code).
4497#
4498# You should have received a copy of the GNU General Public License version
4499# 2 along with this work; if not, write to the Free Software Foundation,
4500# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4501#
4502# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4503# or visit www.oracle.com if you need additional information or have any
4504# questions.
4505#
4506
4507################################################################################
4508# Setup alsa (Advanced Linux Sound Architecture)
4509################################################################################
4510
4511
4512#
4513# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4514# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4515#
4516# This code is free software; you can redistribute it and/or modify it
4517# under the terms of the GNU General Public License version 2 only, as
4518# published by the Free Software Foundation.  Oracle designates this
4519# particular file as subject to the "Classpath" exception as provided
4520# by Oracle in the LICENSE file that accompanied this code.
4521#
4522# This code is distributed in the hope that it will be useful, but WITHOUT
4523# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4524# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4525# version 2 for more details (a copy is included in the LICENSE file that
4526# accompanied this code).
4527#
4528# You should have received a copy of the GNU General Public License version
4529# 2 along with this work; if not, write to the Free Software Foundation,
4530# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4531#
4532# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4533# or visit www.oracle.com if you need additional information or have any
4534# questions.
4535#
4536
4537################################################################################
4538# Setup bundled libraries.
4539#
4540# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4541# OpenJDK repository. Default is to use these libraries as bundled, but they
4542# might be replaced by en external version by the user.
4543################################################################################
4544
4545
4546################################################################################
4547# Setup libjpeg
4548################################################################################
4549
4550
4551################################################################################
4552# Setup giflib
4553################################################################################
4554
4555
4556################################################################################
4557# Setup libpng
4558################################################################################
4559
4560
4561################################################################################
4562# Setup zlib
4563################################################################################
4564
4565
4566################################################################################
4567# Setup lcms (Little CMS)
4568################################################################################
4569
4570
4571#
4572# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4573# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4574#
4575# This code is free software; you can redistribute it and/or modify it
4576# under the terms of the GNU General Public License version 2 only, as
4577# published by the Free Software Foundation.  Oracle designates this
4578# particular file as subject to the "Classpath" exception as provided
4579# by Oracle in the LICENSE file that accompanied this code.
4580#
4581# This code is distributed in the hope that it will be useful, but WITHOUT
4582# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4583# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4584# version 2 for more details (a copy is included in the LICENSE file that
4585# accompanied this code).
4586#
4587# You should have received a copy of the GNU General Public License version
4588# 2 along with this work; if not, write to the Free Software Foundation,
4589# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4590#
4591# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4592# or visit www.oracle.com if you need additional information or have any
4593# questions.
4594#
4595
4596################################################################################
4597# Setup cups (Common Unix Printing System)
4598################################################################################
4599
4600
4601#
4602# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4603# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4604#
4605# This code is free software; you can redistribute it and/or modify it
4606# under the terms of the GNU General Public License version 2 only, as
4607# published by the Free Software Foundation.  Oracle designates this
4608# particular file as subject to the "Classpath" exception as provided
4609# by Oracle in the LICENSE file that accompanied this code.
4610#
4611# This code is distributed in the hope that it will be useful, but WITHOUT
4612# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4613# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4614# version 2 for more details (a copy is included in the LICENSE file that
4615# accompanied this code).
4616#
4617# You should have received a copy of the GNU General Public License version
4618# 2 along with this work; if not, write to the Free Software Foundation,
4619# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4620#
4621# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4622# or visit www.oracle.com if you need additional information or have any
4623# questions.
4624#
4625
4626################################################################################
4627# Setup libffi (Foreign Function Interface)
4628################################################################################
4629
4630
4631#
4632# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4633# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4634#
4635# This code is free software; you can redistribute it and/or modify it
4636# under the terms of the GNU General Public License version 2 only, as
4637# published by the Free Software Foundation.  Oracle designates this
4638# particular file as subject to the "Classpath" exception as provided
4639# by Oracle in the LICENSE file that accompanied this code.
4640#
4641# This code is distributed in the hope that it will be useful, but WITHOUT
4642# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4643# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4644# version 2 for more details (a copy is included in the LICENSE file that
4645# accompanied this code).
4646#
4647# You should have received a copy of the GNU General Public License version
4648# 2 along with this work; if not, write to the Free Software Foundation,
4649# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4650#
4651# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4652# or visit www.oracle.com if you need additional information or have any
4653# questions.
4654#
4655
4656################################################################################
4657# Build the freetype lib from source
4658################################################################################
4659
4660
4661################################################################################
4662# Check if a potential freeype library match is correct and usable
4663################################################################################
4664
4665
4666################################################################################
4667# Setup freetype (The FreeType2 font rendering library)
4668################################################################################
4669
4670
4671#
4672# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4673# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4674#
4675# This code is free software; you can redistribute it and/or modify it
4676# under the terms of the GNU General Public License version 2 only, as
4677# published by the Free Software Foundation.  Oracle designates this
4678# particular file as subject to the "Classpath" exception as provided
4679# by Oracle in the LICENSE file that accompanied this code.
4680#
4681# This code is distributed in the hope that it will be useful, but WITHOUT
4682# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4683# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4684# version 2 for more details (a copy is included in the LICENSE file that
4685# accompanied this code).
4686#
4687# You should have received a copy of the GNU General Public License version
4688# 2 along with this work; if not, write to the Free Software Foundation,
4689# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4690#
4691# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4692# or visit www.oracle.com if you need additional information or have any
4693# questions.
4694#
4695
4696################################################################################
4697# Setup the standard C/C++ runtime libraries.
4698#
4699# Most importantly, determine if stdc++ should be linked statically or
4700# dynamically.
4701################################################################################
4702
4703
4704#
4705# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4706# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4707#
4708# This code is free software; you can redistribute it and/or modify it
4709# under the terms of the GNU General Public License version 2 only, as
4710# published by the Free Software Foundation.  Oracle designates this
4711# particular file as subject to the "Classpath" exception as provided
4712# by Oracle in the LICENSE file that accompanied this code.
4713#
4714# This code is distributed in the hope that it will be useful, but WITHOUT
4715# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4716# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4717# version 2 for more details (a copy is included in the LICENSE file that
4718# accompanied this code).
4719#
4720# You should have received a copy of the GNU General Public License version
4721# 2 along with this work; if not, write to the Free Software Foundation,
4722# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4723#
4724# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4725# or visit www.oracle.com if you need additional information or have any
4726# questions.
4727#
4728
4729################################################################################
4730# Setup X11 Windows system
4731################################################################################
4732
4733
4734
4735################################################################################
4736# Determine which libraries are needed for this configuration
4737################################################################################
4738
4739
4740################################################################################
4741# Parse library options, and setup needed libraries
4742################################################################################
4743
4744
4745################################################################################
4746# Setup llvm (Low-Level VM)
4747################################################################################
4748
4749
4750################################################################################
4751# Setup various libraries, typically small system libraries
4752################################################################################
4753
4754
4755################################################################################
4756# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4757# redistribute it in the test image.
4758################################################################################
4759
4760
4761
4762#
4763# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4764# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4765#
4766# This code is free software; you can redistribute it and/or modify it
4767# under the terms of the GNU General Public License version 2 only, as
4768# published by the Free Software Foundation.  Oracle designates this
4769# particular file as subject to the "Classpath" exception as provided
4770# by Oracle in the LICENSE file that accompanied this code.
4771#
4772# This code is distributed in the hope that it will be useful, but WITHOUT
4773# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4774# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4775# version 2 for more details (a copy is included in the LICENSE file that
4776# accompanied this code).
4777#
4778# You should have received a copy of the GNU General Public License version
4779# 2 along with this work; if not, write to the Free Software Foundation,
4780# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4781#
4782# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4783# or visit www.oracle.com if you need additional information or have any
4784# questions.
4785#
4786
4787# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4788# Converts autoconf style CPU name to OpenJDK style, into
4789# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4790
4791
4792# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4793# Converts autoconf style OS name to OpenJDK style, into
4794# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4795
4796
4797# Expects $host_os $host_cpu $build_os and $build_cpu
4798# and $with_target_bits to have been setup!
4799#
4800# Translate the standard triplet(quadruplet) definition
4801# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4802# OPENJDK_BUILD_OS, etc.
4803
4804
4805# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4806# accordingly. Must be done after setting up build and target system, but before
4807# doing anything else with these values.
4808
4809
4810# Setup the legacy variables, for controlling the old makefiles.
4811#
4812
4813
4814# $1 - Either TARGET or BUILD to setup the variables for.
4815
4816
4817
4818
4819#%%% Build and target systems %%%
4820
4821
4822
4823
4824# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4825# Add -mX to various FLAGS variables.
4826
4827
4828
4829
4830
4831
4832#
4833# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4834# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4835#
4836# This code is free software; you can redistribute it and/or modify it
4837# under the terms of the GNU General Public License version 2 only, as
4838# published by the Free Software Foundation.  Oracle designates this
4839# particular file as subject to the "Classpath" exception as provided
4840# by Oracle in the LICENSE file that accompanied this code.
4841#
4842# This code is distributed in the hope that it will be useful, but WITHOUT
4843# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4844# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4845# version 2 for more details (a copy is included in the LICENSE file that
4846# accompanied this code).
4847#
4848# You should have received a copy of the GNU General Public License version
4849# 2 along with this work; if not, write to the Free Software Foundation,
4850# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4851#
4852# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4853# or visit www.oracle.com if you need additional information or have any
4854# questions.
4855#
4856
4857
4858
4859
4860
4861
4862
4863################################################################################
4864# Define a mechanism for importing extra prebuilt modules
4865#
4866
4867
4868
4869#
4870# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4871# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4872#
4873# This code is free software; you can redistribute it and/or modify it
4874# under the terms of the GNU General Public License version 2 only, as
4875# published by the Free Software Foundation.  Oracle designates this
4876# particular file as subject to the "Classpath" exception as provided
4877# by Oracle in the LICENSE file that accompanied this code.
4878#
4879# This code is distributed in the hope that it will be useful, but WITHOUT
4880# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4881# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4882# version 2 for more details (a copy is included in the LICENSE file that
4883# accompanied this code).
4884#
4885# You should have received a copy of the GNU General Public License version
4886# 2 along with this work; if not, write to the Free Software Foundation,
4887# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4888#
4889# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4890# or visit www.oracle.com if you need additional information or have any
4891# questions.
4892#
4893
4894########################################################################
4895# This file is responsible for detecting, verifying and setting up the
4896# toolchain, i.e. the compiler, linker and related utilities. It will setup
4897# proper paths to the binaries, but it will not setup any flags.
4898#
4899# The binaries used is determined by the toolchain type, which is the family of
4900# compilers and related tools that are used.
4901########################################################################
4902
4903
4904# All valid toolchains, regardless of platform (used by help.m4)
4905VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4906
4907# These toolchains are valid on different platforms
4908VALID_TOOLCHAINS_linux="gcc clang"
4909VALID_TOOLCHAINS_solaris="solstudio"
4910VALID_TOOLCHAINS_macosx="gcc clang"
4911VALID_TOOLCHAINS_aix="xlc"
4912VALID_TOOLCHAINS_windows="microsoft"
4913
4914# Toolchain descriptions
4915TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4916TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4917TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4918TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4919TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4920
4921# Minimum supported versions, empty means unspecified
4922TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4923TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4924TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4925TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4926TOOLCHAIN_MINIMUM_VERSION_xlc=""
4927
4928# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4929# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4930# $1 - optional variable prefix for compiler and version variables (BUILD_)
4931# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4932
4933
4934# Check if the configured compiler (C and C++) is of a specific version or
4935# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4936#
4937# Arguments:
4938#   VERSION:   The version string to check against the found version
4939#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4940#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4941#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4942
4943
4944
4945
4946# Setup a number of variables describing how native output files are
4947# named on this platform/toolchain.
4948
4949
4950# Determine which toolchain type to use, and make sure it is valid for this
4951# platform. Setup various information about the selected toolchain.
4952
4953
4954# Before we start detecting the toolchain executables, we might need some
4955# special setup, e.g. additional paths etc.
4956
4957
4958# Restore path, etc
4959
4960
4961# Check if a compiler is of the toolchain type we expect, and save the version
4962# information from it. If the compiler does not match the expected type,
4963# this function will abort using AC_MSG_ERROR. If it matches, the version will
4964# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4965# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4966#
4967# $1 = compiler to test (CC or CXX)
4968# $2 = human readable name of compiler (C or C++)
4969
4970
4971# Try to locate the given C or C++ compiler in the path, or otherwise.
4972#
4973# $1 = compiler to test (CC or CXX)
4974# $2 = human readable name of compiler (C or C++)
4975# $3 = list of compiler names to search for
4976
4977
4978# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4979# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4980# archiver (AR). Verify that the compilers are correct according to the
4981# toolchain type.
4982
4983
4984# Setup additional tools that is considered a part of the toolchain, but not the
4985# core part. Many of these are highly platform-specific and do not exist,
4986# and/or are not needed on all platforms.
4987
4988
4989# Setup the build tools (i.e, the compiler and linker used to build programs
4990# that should be run on the build platform, not the target platform, as a build
4991# helper). Since the non-cross-compile case uses the normal, target compilers
4992# for this, we can only do this after these have been setup.
4993
4994
4995# Setup legacy variables that are still needed as alternative ways to refer to
4996# parts of the toolchain.
4997
4998
4999# Do some additional checks on the detected tools.
5000
5001
5002# Setup the JTReg Regression Test Harness.
5003
5004
5005#
5006# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5007# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5008#
5009# This code is free software; you can redistribute it and/or modify it
5010# under the terms of the GNU General Public License version 2 only, as
5011# published by the Free Software Foundation.  Oracle designates this
5012# particular file as subject to the "Classpath" exception as provided
5013# by Oracle in the LICENSE file that accompanied this code.
5014#
5015# This code is distributed in the hope that it will be useful, but WITHOUT
5016# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5017# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5018# version 2 for more details (a copy is included in the LICENSE file that
5019# accompanied this code).
5020#
5021# You should have received a copy of the GNU General Public License version
5022# 2 along with this work; if not, write to the Free Software Foundation,
5023# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5024#
5025# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5026# or visit www.oracle.com if you need additional information or have any
5027# questions.
5028#
5029
5030################################################################################
5031# The order of these defines the priority by which we try to find them.
5032VALID_VS_VERSIONS="2013 2012 2010"
5033
5034VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5035VS_VERSION_INTERNAL_2010=100
5036VS_MSVCR_2010=msvcr100.dll
5037# We don't use msvcp on Visual Studio 2010
5038#VS_MSVCP_2010=msvcp100.dll
5039VS_ENVVAR_2010="VS100COMNTOOLS"
5040VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5041VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5042VS_VS_PLATFORM_NAME_2010="v100"
5043VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5044
5045VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5046VS_VERSION_INTERNAL_2012=110
5047VS_MSVCR_2012=msvcr110.dll
5048VS_MSVCP_2012=msvcp110.dll
5049VS_ENVVAR_2012="VS110COMNTOOLS"
5050VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5051VS_SDK_INSTALLDIR_2012=
5052VS_VS_PLATFORM_NAME_2012="v110"
5053VS_SDK_PLATFORM_NAME_2012=
5054
5055VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5056VS_VERSION_INTERNAL_2013=120
5057VS_MSVCR_2013=msvcr120.dll
5058VS_MSVCP_2013=msvcp120.dll
5059VS_ENVVAR_2013="VS120COMNTOOLS"
5060VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5061VS_SDK_INSTALLDIR_2013=
5062VS_VS_PLATFORM_NAME_2013="v120"
5063VS_SDK_PLATFORM_NAME_2013=
5064
5065################################################################################
5066
5067
5068
5069################################################################################
5070
5071
5072
5073################################################################################
5074# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5075# build environment and assigns it to VS_ENV_CMD
5076
5077
5078################################################################################
5079
5080
5081
5082################################################################################
5083# Check if the VS env variables were setup prior to running configure.
5084# If not, then find vcvarsall.bat and run it automatically, and integrate
5085# the set env variables into the spec file.
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100# This line needs to be here, verbatim, after all includes and the dummy hook
5101# definitions. It is replaced with custom functionality when building
5102# custom sources.
5103#CUSTOM_AUTOCONF_INCLUDE
5104
5105# Do not change or remove the following line, it is needed for consistency checks:
5106DATE_WHEN_GENERATED=1476265696
5107
5108###############################################################################
5109#
5110# Initialization / Boot-strapping
5111#
5112# The bootstrapping process needs to solve the "chicken or the egg" problem,
5113# thus it jumps back and forth, each time gaining something needed later on.
5114#
5115###############################################################################
5116
5117# If we are requested to print additional help, do that and then exit.
5118# This must be the very first call.
5119
5120  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5121
5122    # Print available toolchains
5123    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5124    $PRINTF "Which are valid to use depends on the build platform.\n"
5125    for toolchain in $VALID_TOOLCHAINS_all; do
5126      # Use indirect variable referencing
5127      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5128      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5129      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5130    done
5131    $PRINTF "\n"
5132
5133    # Print available jvm features
5134    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5135    $PRINTF "Which are valid to use depends on the target platform.\n  "
5136    $PRINTF "%s " $VALID_JVM_FEATURES
5137    $PRINTF "\n"
5138
5139    # And now exit directly
5140    exit 0
5141  fi
5142
5143
5144# Basic initialization that must happen first of all in the normal process.
5145
5146  # Save the original command line. This is passed to us by the wrapper configure script.
5147
5148  # Save the path variable before it gets changed
5149  ORIGINAL_PATH="$PATH"
5150
5151  DATE_WHEN_CONFIGURED=`LANG=C date`
5152
5153  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5154$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5155  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5156$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5157
5158
5159  # Start with tools that do not need have cross compilation support
5160  # and can be expected to be found in the default PATH. These tools are
5161  # used by configure.
5162
5163  # First are all the simple required tools.
5164
5165
5166
5167  # Publish this variable in the help.
5168
5169
5170  if [ -z "${BASENAME+x}" ]; then
5171    # The variable is not set by user, try to locate tool using the code snippet
5172    for ac_prog in basename
5173do
5174  # Extract the first word of "$ac_prog", so it can be a program name with args.
5175set dummy $ac_prog; ac_word=$2
5176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5177$as_echo_n "checking for $ac_word... " >&6; }
5178if ${ac_cv_path_BASENAME+:} false; then :
5179  $as_echo_n "(cached) " >&6
5180else
5181  case $BASENAME in
5182  [\\/]* | ?:[\\/]*)
5183  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5184  ;;
5185  *)
5186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5187for as_dir in $PATH
5188do
5189  IFS=$as_save_IFS
5190  test -z "$as_dir" && as_dir=.
5191    for ac_exec_ext in '' $ac_executable_extensions; do
5192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5193    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5195    break 2
5196  fi
5197done
5198  done
5199IFS=$as_save_IFS
5200
5201  ;;
5202esac
5203fi
5204BASENAME=$ac_cv_path_BASENAME
5205if test -n "$BASENAME"; then
5206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5207$as_echo "$BASENAME" >&6; }
5208else
5209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5210$as_echo "no" >&6; }
5211fi
5212
5213
5214  test -n "$BASENAME" && break
5215done
5216
5217  else
5218    # The variable is set, but is it from the command line or the environment?
5219
5220    # Try to remove the string !BASENAME! from our list.
5221    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5222    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5223      # If it failed, the variable was not from the command line. Ignore it,
5224      # but warn the user (except for BASH, which is always set by the calling BASH).
5225      if test "xBASENAME" != xBASH; then
5226        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5227$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5228      fi
5229      # Try to locate tool using the code snippet
5230      for ac_prog in basename
5231do
5232  # Extract the first word of "$ac_prog", so it can be a program name with args.
5233set dummy $ac_prog; ac_word=$2
5234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5235$as_echo_n "checking for $ac_word... " >&6; }
5236if ${ac_cv_path_BASENAME+:} false; then :
5237  $as_echo_n "(cached) " >&6
5238else
5239  case $BASENAME in
5240  [\\/]* | ?:[\\/]*)
5241  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5242  ;;
5243  *)
5244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5245for as_dir in $PATH
5246do
5247  IFS=$as_save_IFS
5248  test -z "$as_dir" && as_dir=.
5249    for ac_exec_ext in '' $ac_executable_extensions; do
5250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5251    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5253    break 2
5254  fi
5255done
5256  done
5257IFS=$as_save_IFS
5258
5259  ;;
5260esac
5261fi
5262BASENAME=$ac_cv_path_BASENAME
5263if test -n "$BASENAME"; then
5264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5265$as_echo "$BASENAME" >&6; }
5266else
5267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5268$as_echo "no" >&6; }
5269fi
5270
5271
5272  test -n "$BASENAME" && break
5273done
5274
5275    else
5276      # If it succeeded, then it was overridden by the user. We will use it
5277      # for the tool.
5278
5279      # First remove it from the list of overridden variables, so we can test
5280      # for unknown variables in the end.
5281      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5282
5283      # Check if we try to supply an empty value
5284      if test "x$BASENAME" = x; then
5285        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5286$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5287        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5288$as_echo_n "checking for BASENAME... " >&6; }
5289        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5290$as_echo "disabled" >&6; }
5291      else
5292        # Check if the provided tool contains a complete path.
5293        tool_specified="$BASENAME"
5294        tool_basename="${tool_specified##*/}"
5295        if test "x$tool_basename" = "x$tool_specified"; then
5296          # A command without a complete path is provided, search $PATH.
5297          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5298$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5299          # Extract the first word of "$tool_basename", so it can be a program name with args.
5300set dummy $tool_basename; ac_word=$2
5301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5302$as_echo_n "checking for $ac_word... " >&6; }
5303if ${ac_cv_path_BASENAME+:} false; then :
5304  $as_echo_n "(cached) " >&6
5305else
5306  case $BASENAME in
5307  [\\/]* | ?:[\\/]*)
5308  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5309  ;;
5310  *)
5311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5312for as_dir in $PATH
5313do
5314  IFS=$as_save_IFS
5315  test -z "$as_dir" && as_dir=.
5316    for ac_exec_ext in '' $ac_executable_extensions; do
5317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5318    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5320    break 2
5321  fi
5322done
5323  done
5324IFS=$as_save_IFS
5325
5326  ;;
5327esac
5328fi
5329BASENAME=$ac_cv_path_BASENAME
5330if test -n "$BASENAME"; then
5331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5332$as_echo "$BASENAME" >&6; }
5333else
5334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5335$as_echo "no" >&6; }
5336fi
5337
5338
5339          if test "x$BASENAME" = x; then
5340            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5341          fi
5342        else
5343          # Otherwise we believe it is a complete path. Use it as it is.
5344          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5345$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5346          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5347$as_echo_n "checking for BASENAME... " >&6; }
5348          if test ! -x "$tool_specified"; then
5349            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5350$as_echo "not found" >&6; }
5351            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5352          fi
5353          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5354$as_echo "$tool_specified" >&6; }
5355        fi
5356      fi
5357    fi
5358
5359  fi
5360
5361
5362
5363  if test "x$BASENAME" = x; then
5364    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5365  fi
5366
5367
5368
5369
5370
5371  # Publish this variable in the help.
5372
5373
5374  if [ -z "${BASH+x}" ]; then
5375    # The variable is not set by user, try to locate tool using the code snippet
5376    for ac_prog in bash
5377do
5378  # Extract the first word of "$ac_prog", so it can be a program name with args.
5379set dummy $ac_prog; ac_word=$2
5380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5381$as_echo_n "checking for $ac_word... " >&6; }
5382if ${ac_cv_path_BASH+:} false; then :
5383  $as_echo_n "(cached) " >&6
5384else
5385  case $BASH in
5386  [\\/]* | ?:[\\/]*)
5387  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5388  ;;
5389  *)
5390  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5391for as_dir in $PATH
5392do
5393  IFS=$as_save_IFS
5394  test -z "$as_dir" && as_dir=.
5395    for ac_exec_ext in '' $ac_executable_extensions; do
5396  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5397    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5399    break 2
5400  fi
5401done
5402  done
5403IFS=$as_save_IFS
5404
5405  ;;
5406esac
5407fi
5408BASH=$ac_cv_path_BASH
5409if test -n "$BASH"; then
5410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5411$as_echo "$BASH" >&6; }
5412else
5413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5414$as_echo "no" >&6; }
5415fi
5416
5417
5418  test -n "$BASH" && break
5419done
5420
5421  else
5422    # The variable is set, but is it from the command line or the environment?
5423
5424    # Try to remove the string !BASH! from our list.
5425    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5426    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5427      # If it failed, the variable was not from the command line. Ignore it,
5428      # but warn the user (except for BASH, which is always set by the calling BASH).
5429      if test "xBASH" != xBASH; then
5430        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5431$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5432      fi
5433      # Try to locate tool using the code snippet
5434      for ac_prog in bash
5435do
5436  # Extract the first word of "$ac_prog", so it can be a program name with args.
5437set dummy $ac_prog; ac_word=$2
5438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5439$as_echo_n "checking for $ac_word... " >&6; }
5440if ${ac_cv_path_BASH+:} false; then :
5441  $as_echo_n "(cached) " >&6
5442else
5443  case $BASH in
5444  [\\/]* | ?:[\\/]*)
5445  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5446  ;;
5447  *)
5448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5449for as_dir in $PATH
5450do
5451  IFS=$as_save_IFS
5452  test -z "$as_dir" && as_dir=.
5453    for ac_exec_ext in '' $ac_executable_extensions; do
5454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5455    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5457    break 2
5458  fi
5459done
5460  done
5461IFS=$as_save_IFS
5462
5463  ;;
5464esac
5465fi
5466BASH=$ac_cv_path_BASH
5467if test -n "$BASH"; then
5468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5469$as_echo "$BASH" >&6; }
5470else
5471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5472$as_echo "no" >&6; }
5473fi
5474
5475
5476  test -n "$BASH" && break
5477done
5478
5479    else
5480      # If it succeeded, then it was overridden by the user. We will use it
5481      # for the tool.
5482
5483      # First remove it from the list of overridden variables, so we can test
5484      # for unknown variables in the end.
5485      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5486
5487      # Check if we try to supply an empty value
5488      if test "x$BASH" = x; then
5489        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5490$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5491        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5492$as_echo_n "checking for BASH... " >&6; }
5493        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5494$as_echo "disabled" >&6; }
5495      else
5496        # Check if the provided tool contains a complete path.
5497        tool_specified="$BASH"
5498        tool_basename="${tool_specified##*/}"
5499        if test "x$tool_basename" = "x$tool_specified"; then
5500          # A command without a complete path is provided, search $PATH.
5501          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5502$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5503          # Extract the first word of "$tool_basename", so it can be a program name with args.
5504set dummy $tool_basename; ac_word=$2
5505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5506$as_echo_n "checking for $ac_word... " >&6; }
5507if ${ac_cv_path_BASH+:} false; then :
5508  $as_echo_n "(cached) " >&6
5509else
5510  case $BASH in
5511  [\\/]* | ?:[\\/]*)
5512  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5513  ;;
5514  *)
5515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5516for as_dir in $PATH
5517do
5518  IFS=$as_save_IFS
5519  test -z "$as_dir" && as_dir=.
5520    for ac_exec_ext in '' $ac_executable_extensions; do
5521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5522    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5524    break 2
5525  fi
5526done
5527  done
5528IFS=$as_save_IFS
5529
5530  ;;
5531esac
5532fi
5533BASH=$ac_cv_path_BASH
5534if test -n "$BASH"; then
5535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5536$as_echo "$BASH" >&6; }
5537else
5538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5539$as_echo "no" >&6; }
5540fi
5541
5542
5543          if test "x$BASH" = x; then
5544            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5545          fi
5546        else
5547          # Otherwise we believe it is a complete path. Use it as it is.
5548          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5549$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5550          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5551$as_echo_n "checking for BASH... " >&6; }
5552          if test ! -x "$tool_specified"; then
5553            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5554$as_echo "not found" >&6; }
5555            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5556          fi
5557          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5558$as_echo "$tool_specified" >&6; }
5559        fi
5560      fi
5561    fi
5562
5563  fi
5564
5565
5566
5567  if test "x$BASH" = x; then
5568    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5569  fi
5570
5571
5572
5573
5574
5575  # Publish this variable in the help.
5576
5577
5578  if [ -z "${CAT+x}" ]; then
5579    # The variable is not set by user, try to locate tool using the code snippet
5580    for ac_prog in cat
5581do
5582  # Extract the first word of "$ac_prog", so it can be a program name with args.
5583set dummy $ac_prog; ac_word=$2
5584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5585$as_echo_n "checking for $ac_word... " >&6; }
5586if ${ac_cv_path_CAT+:} false; then :
5587  $as_echo_n "(cached) " >&6
5588else
5589  case $CAT in
5590  [\\/]* | ?:[\\/]*)
5591  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5592  ;;
5593  *)
5594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5595for as_dir in $PATH
5596do
5597  IFS=$as_save_IFS
5598  test -z "$as_dir" && as_dir=.
5599    for ac_exec_ext in '' $ac_executable_extensions; do
5600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5601    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5603    break 2
5604  fi
5605done
5606  done
5607IFS=$as_save_IFS
5608
5609  ;;
5610esac
5611fi
5612CAT=$ac_cv_path_CAT
5613if test -n "$CAT"; then
5614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5615$as_echo "$CAT" >&6; }
5616else
5617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5618$as_echo "no" >&6; }
5619fi
5620
5621
5622  test -n "$CAT" && break
5623done
5624
5625  else
5626    # The variable is set, but is it from the command line or the environment?
5627
5628    # Try to remove the string !CAT! from our list.
5629    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5630    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5631      # If it failed, the variable was not from the command line. Ignore it,
5632      # but warn the user (except for BASH, which is always set by the calling BASH).
5633      if test "xCAT" != xBASH; then
5634        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5635$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5636      fi
5637      # Try to locate tool using the code snippet
5638      for ac_prog in cat
5639do
5640  # Extract the first word of "$ac_prog", so it can be a program name with args.
5641set dummy $ac_prog; ac_word=$2
5642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5643$as_echo_n "checking for $ac_word... " >&6; }
5644if ${ac_cv_path_CAT+:} false; then :
5645  $as_echo_n "(cached) " >&6
5646else
5647  case $CAT in
5648  [\\/]* | ?:[\\/]*)
5649  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5650  ;;
5651  *)
5652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5653for as_dir in $PATH
5654do
5655  IFS=$as_save_IFS
5656  test -z "$as_dir" && as_dir=.
5657    for ac_exec_ext in '' $ac_executable_extensions; do
5658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5659    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5661    break 2
5662  fi
5663done
5664  done
5665IFS=$as_save_IFS
5666
5667  ;;
5668esac
5669fi
5670CAT=$ac_cv_path_CAT
5671if test -n "$CAT"; then
5672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5673$as_echo "$CAT" >&6; }
5674else
5675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5676$as_echo "no" >&6; }
5677fi
5678
5679
5680  test -n "$CAT" && break
5681done
5682
5683    else
5684      # If it succeeded, then it was overridden by the user. We will use it
5685      # for the tool.
5686
5687      # First remove it from the list of overridden variables, so we can test
5688      # for unknown variables in the end.
5689      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5690
5691      # Check if we try to supply an empty value
5692      if test "x$CAT" = x; then
5693        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5694$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5695        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5696$as_echo_n "checking for CAT... " >&6; }
5697        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5698$as_echo "disabled" >&6; }
5699      else
5700        # Check if the provided tool contains a complete path.
5701        tool_specified="$CAT"
5702        tool_basename="${tool_specified##*/}"
5703        if test "x$tool_basename" = "x$tool_specified"; then
5704          # A command without a complete path is provided, search $PATH.
5705          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5706$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5707          # Extract the first word of "$tool_basename", so it can be a program name with args.
5708set dummy $tool_basename; ac_word=$2
5709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5710$as_echo_n "checking for $ac_word... " >&6; }
5711if ${ac_cv_path_CAT+:} false; then :
5712  $as_echo_n "(cached) " >&6
5713else
5714  case $CAT in
5715  [\\/]* | ?:[\\/]*)
5716  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5717  ;;
5718  *)
5719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5720for as_dir in $PATH
5721do
5722  IFS=$as_save_IFS
5723  test -z "$as_dir" && as_dir=.
5724    for ac_exec_ext in '' $ac_executable_extensions; do
5725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5726    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5728    break 2
5729  fi
5730done
5731  done
5732IFS=$as_save_IFS
5733
5734  ;;
5735esac
5736fi
5737CAT=$ac_cv_path_CAT
5738if test -n "$CAT"; then
5739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5740$as_echo "$CAT" >&6; }
5741else
5742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5743$as_echo "no" >&6; }
5744fi
5745
5746
5747          if test "x$CAT" = x; then
5748            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5749          fi
5750        else
5751          # Otherwise we believe it is a complete path. Use it as it is.
5752          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5753$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5754          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5755$as_echo_n "checking for CAT... " >&6; }
5756          if test ! -x "$tool_specified"; then
5757            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5758$as_echo "not found" >&6; }
5759            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5760          fi
5761          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5762$as_echo "$tool_specified" >&6; }
5763        fi
5764      fi
5765    fi
5766
5767  fi
5768
5769
5770
5771  if test "x$CAT" = x; then
5772    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5773  fi
5774
5775
5776
5777
5778
5779  # Publish this variable in the help.
5780
5781
5782  if [ -z "${CHMOD+x}" ]; then
5783    # The variable is not set by user, try to locate tool using the code snippet
5784    for ac_prog in chmod
5785do
5786  # Extract the first word of "$ac_prog", so it can be a program name with args.
5787set dummy $ac_prog; ac_word=$2
5788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5789$as_echo_n "checking for $ac_word... " >&6; }
5790if ${ac_cv_path_CHMOD+:} false; then :
5791  $as_echo_n "(cached) " >&6
5792else
5793  case $CHMOD in
5794  [\\/]* | ?:[\\/]*)
5795  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5796  ;;
5797  *)
5798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5799for as_dir in $PATH
5800do
5801  IFS=$as_save_IFS
5802  test -z "$as_dir" && as_dir=.
5803    for ac_exec_ext in '' $ac_executable_extensions; do
5804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5805    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5807    break 2
5808  fi
5809done
5810  done
5811IFS=$as_save_IFS
5812
5813  ;;
5814esac
5815fi
5816CHMOD=$ac_cv_path_CHMOD
5817if test -n "$CHMOD"; then
5818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5819$as_echo "$CHMOD" >&6; }
5820else
5821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5822$as_echo "no" >&6; }
5823fi
5824
5825
5826  test -n "$CHMOD" && break
5827done
5828
5829  else
5830    # The variable is set, but is it from the command line or the environment?
5831
5832    # Try to remove the string !CHMOD! from our list.
5833    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5834    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5835      # If it failed, the variable was not from the command line. Ignore it,
5836      # but warn the user (except for BASH, which is always set by the calling BASH).
5837      if test "xCHMOD" != xBASH; then
5838        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5839$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5840      fi
5841      # Try to locate tool using the code snippet
5842      for ac_prog in chmod
5843do
5844  # Extract the first word of "$ac_prog", so it can be a program name with args.
5845set dummy $ac_prog; ac_word=$2
5846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5847$as_echo_n "checking for $ac_word... " >&6; }
5848if ${ac_cv_path_CHMOD+:} false; then :
5849  $as_echo_n "(cached) " >&6
5850else
5851  case $CHMOD in
5852  [\\/]* | ?:[\\/]*)
5853  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5854  ;;
5855  *)
5856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5857for as_dir in $PATH
5858do
5859  IFS=$as_save_IFS
5860  test -z "$as_dir" && as_dir=.
5861    for ac_exec_ext in '' $ac_executable_extensions; do
5862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5863    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5865    break 2
5866  fi
5867done
5868  done
5869IFS=$as_save_IFS
5870
5871  ;;
5872esac
5873fi
5874CHMOD=$ac_cv_path_CHMOD
5875if test -n "$CHMOD"; then
5876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5877$as_echo "$CHMOD" >&6; }
5878else
5879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5880$as_echo "no" >&6; }
5881fi
5882
5883
5884  test -n "$CHMOD" && break
5885done
5886
5887    else
5888      # If it succeeded, then it was overridden by the user. We will use it
5889      # for the tool.
5890
5891      # First remove it from the list of overridden variables, so we can test
5892      # for unknown variables in the end.
5893      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5894
5895      # Check if we try to supply an empty value
5896      if test "x$CHMOD" = x; then
5897        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5898$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5899        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5900$as_echo_n "checking for CHMOD... " >&6; }
5901        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5902$as_echo "disabled" >&6; }
5903      else
5904        # Check if the provided tool contains a complete path.
5905        tool_specified="$CHMOD"
5906        tool_basename="${tool_specified##*/}"
5907        if test "x$tool_basename" = "x$tool_specified"; then
5908          # A command without a complete path is provided, search $PATH.
5909          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5910$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5911          # Extract the first word of "$tool_basename", so it can be a program name with args.
5912set dummy $tool_basename; ac_word=$2
5913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5914$as_echo_n "checking for $ac_word... " >&6; }
5915if ${ac_cv_path_CHMOD+:} false; then :
5916  $as_echo_n "(cached) " >&6
5917else
5918  case $CHMOD in
5919  [\\/]* | ?:[\\/]*)
5920  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5921  ;;
5922  *)
5923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5924for as_dir in $PATH
5925do
5926  IFS=$as_save_IFS
5927  test -z "$as_dir" && as_dir=.
5928    for ac_exec_ext in '' $ac_executable_extensions; do
5929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5930    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5932    break 2
5933  fi
5934done
5935  done
5936IFS=$as_save_IFS
5937
5938  ;;
5939esac
5940fi
5941CHMOD=$ac_cv_path_CHMOD
5942if test -n "$CHMOD"; then
5943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5944$as_echo "$CHMOD" >&6; }
5945else
5946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5947$as_echo "no" >&6; }
5948fi
5949
5950
5951          if test "x$CHMOD" = x; then
5952            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5953          fi
5954        else
5955          # Otherwise we believe it is a complete path. Use it as it is.
5956          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5957$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5958          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5959$as_echo_n "checking for CHMOD... " >&6; }
5960          if test ! -x "$tool_specified"; then
5961            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5962$as_echo "not found" >&6; }
5963            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5964          fi
5965          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5966$as_echo "$tool_specified" >&6; }
5967        fi
5968      fi
5969    fi
5970
5971  fi
5972
5973
5974
5975  if test "x$CHMOD" = x; then
5976    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5977  fi
5978
5979
5980
5981
5982
5983  # Publish this variable in the help.
5984
5985
5986  if [ -z "${CMP+x}" ]; then
5987    # The variable is not set by user, try to locate tool using the code snippet
5988    for ac_prog in cmp
5989do
5990  # Extract the first word of "$ac_prog", so it can be a program name with args.
5991set dummy $ac_prog; ac_word=$2
5992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5993$as_echo_n "checking for $ac_word... " >&6; }
5994if ${ac_cv_path_CMP+:} false; then :
5995  $as_echo_n "(cached) " >&6
5996else
5997  case $CMP in
5998  [\\/]* | ?:[\\/]*)
5999  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6000  ;;
6001  *)
6002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6003for as_dir in $PATH
6004do
6005  IFS=$as_save_IFS
6006  test -z "$as_dir" && as_dir=.
6007    for ac_exec_ext in '' $ac_executable_extensions; do
6008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6009    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6011    break 2
6012  fi
6013done
6014  done
6015IFS=$as_save_IFS
6016
6017  ;;
6018esac
6019fi
6020CMP=$ac_cv_path_CMP
6021if test -n "$CMP"; then
6022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6023$as_echo "$CMP" >&6; }
6024else
6025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6026$as_echo "no" >&6; }
6027fi
6028
6029
6030  test -n "$CMP" && break
6031done
6032
6033  else
6034    # The variable is set, but is it from the command line or the environment?
6035
6036    # Try to remove the string !CMP! from our list.
6037    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6038    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6039      # If it failed, the variable was not from the command line. Ignore it,
6040      # but warn the user (except for BASH, which is always set by the calling BASH).
6041      if test "xCMP" != xBASH; then
6042        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6043$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6044      fi
6045      # Try to locate tool using the code snippet
6046      for ac_prog in cmp
6047do
6048  # Extract the first word of "$ac_prog", so it can be a program name with args.
6049set dummy $ac_prog; ac_word=$2
6050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6051$as_echo_n "checking for $ac_word... " >&6; }
6052if ${ac_cv_path_CMP+:} false; then :
6053  $as_echo_n "(cached) " >&6
6054else
6055  case $CMP in
6056  [\\/]* | ?:[\\/]*)
6057  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6058  ;;
6059  *)
6060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6061for as_dir in $PATH
6062do
6063  IFS=$as_save_IFS
6064  test -z "$as_dir" && as_dir=.
6065    for ac_exec_ext in '' $ac_executable_extensions; do
6066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6067    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6069    break 2
6070  fi
6071done
6072  done
6073IFS=$as_save_IFS
6074
6075  ;;
6076esac
6077fi
6078CMP=$ac_cv_path_CMP
6079if test -n "$CMP"; then
6080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6081$as_echo "$CMP" >&6; }
6082else
6083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6084$as_echo "no" >&6; }
6085fi
6086
6087
6088  test -n "$CMP" && break
6089done
6090
6091    else
6092      # If it succeeded, then it was overridden by the user. We will use it
6093      # for the tool.
6094
6095      # First remove it from the list of overridden variables, so we can test
6096      # for unknown variables in the end.
6097      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6098
6099      # Check if we try to supply an empty value
6100      if test "x$CMP" = x; then
6101        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6102$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6103        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6104$as_echo_n "checking for CMP... " >&6; }
6105        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6106$as_echo "disabled" >&6; }
6107      else
6108        # Check if the provided tool contains a complete path.
6109        tool_specified="$CMP"
6110        tool_basename="${tool_specified##*/}"
6111        if test "x$tool_basename" = "x$tool_specified"; then
6112          # A command without a complete path is provided, search $PATH.
6113          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6114$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6115          # Extract the first word of "$tool_basename", so it can be a program name with args.
6116set dummy $tool_basename; ac_word=$2
6117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6118$as_echo_n "checking for $ac_word... " >&6; }
6119if ${ac_cv_path_CMP+:} false; then :
6120  $as_echo_n "(cached) " >&6
6121else
6122  case $CMP in
6123  [\\/]* | ?:[\\/]*)
6124  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6125  ;;
6126  *)
6127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6128for as_dir in $PATH
6129do
6130  IFS=$as_save_IFS
6131  test -z "$as_dir" && as_dir=.
6132    for ac_exec_ext in '' $ac_executable_extensions; do
6133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6134    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6136    break 2
6137  fi
6138done
6139  done
6140IFS=$as_save_IFS
6141
6142  ;;
6143esac
6144fi
6145CMP=$ac_cv_path_CMP
6146if test -n "$CMP"; then
6147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6148$as_echo "$CMP" >&6; }
6149else
6150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6151$as_echo "no" >&6; }
6152fi
6153
6154
6155          if test "x$CMP" = x; then
6156            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6157          fi
6158        else
6159          # Otherwise we believe it is a complete path. Use it as it is.
6160          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6161$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6162          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6163$as_echo_n "checking for CMP... " >&6; }
6164          if test ! -x "$tool_specified"; then
6165            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6166$as_echo "not found" >&6; }
6167            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6168          fi
6169          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6170$as_echo "$tool_specified" >&6; }
6171        fi
6172      fi
6173    fi
6174
6175  fi
6176
6177
6178
6179  if test "x$CMP" = x; then
6180    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6181  fi
6182
6183
6184
6185
6186
6187  # Publish this variable in the help.
6188
6189
6190  if [ -z "${COMM+x}" ]; then
6191    # The variable is not set by user, try to locate tool using the code snippet
6192    for ac_prog in comm
6193do
6194  # Extract the first word of "$ac_prog", so it can be a program name with args.
6195set dummy $ac_prog; ac_word=$2
6196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6197$as_echo_n "checking for $ac_word... " >&6; }
6198if ${ac_cv_path_COMM+:} false; then :
6199  $as_echo_n "(cached) " >&6
6200else
6201  case $COMM in
6202  [\\/]* | ?:[\\/]*)
6203  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6204  ;;
6205  *)
6206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6207for as_dir in $PATH
6208do
6209  IFS=$as_save_IFS
6210  test -z "$as_dir" && as_dir=.
6211    for ac_exec_ext in '' $ac_executable_extensions; do
6212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6213    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6215    break 2
6216  fi
6217done
6218  done
6219IFS=$as_save_IFS
6220
6221  ;;
6222esac
6223fi
6224COMM=$ac_cv_path_COMM
6225if test -n "$COMM"; then
6226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6227$as_echo "$COMM" >&6; }
6228else
6229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6230$as_echo "no" >&6; }
6231fi
6232
6233
6234  test -n "$COMM" && break
6235done
6236
6237  else
6238    # The variable is set, but is it from the command line or the environment?
6239
6240    # Try to remove the string !COMM! from our list.
6241    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6242    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6243      # If it failed, the variable was not from the command line. Ignore it,
6244      # but warn the user (except for BASH, which is always set by the calling BASH).
6245      if test "xCOMM" != xBASH; then
6246        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6247$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6248      fi
6249      # Try to locate tool using the code snippet
6250      for ac_prog in comm
6251do
6252  # Extract the first word of "$ac_prog", so it can be a program name with args.
6253set dummy $ac_prog; ac_word=$2
6254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6255$as_echo_n "checking for $ac_word... " >&6; }
6256if ${ac_cv_path_COMM+:} false; then :
6257  $as_echo_n "(cached) " >&6
6258else
6259  case $COMM in
6260  [\\/]* | ?:[\\/]*)
6261  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6262  ;;
6263  *)
6264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6265for as_dir in $PATH
6266do
6267  IFS=$as_save_IFS
6268  test -z "$as_dir" && as_dir=.
6269    for ac_exec_ext in '' $ac_executable_extensions; do
6270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6271    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6273    break 2
6274  fi
6275done
6276  done
6277IFS=$as_save_IFS
6278
6279  ;;
6280esac
6281fi
6282COMM=$ac_cv_path_COMM
6283if test -n "$COMM"; then
6284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6285$as_echo "$COMM" >&6; }
6286else
6287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6288$as_echo "no" >&6; }
6289fi
6290
6291
6292  test -n "$COMM" && break
6293done
6294
6295    else
6296      # If it succeeded, then it was overridden by the user. We will use it
6297      # for the tool.
6298
6299      # First remove it from the list of overridden variables, so we can test
6300      # for unknown variables in the end.
6301      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6302
6303      # Check if we try to supply an empty value
6304      if test "x$COMM" = x; then
6305        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6306$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6307        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6308$as_echo_n "checking for COMM... " >&6; }
6309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6310$as_echo "disabled" >&6; }
6311      else
6312        # Check if the provided tool contains a complete path.
6313        tool_specified="$COMM"
6314        tool_basename="${tool_specified##*/}"
6315        if test "x$tool_basename" = "x$tool_specified"; then
6316          # A command without a complete path is provided, search $PATH.
6317          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6318$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6319          # Extract the first word of "$tool_basename", so it can be a program name with args.
6320set dummy $tool_basename; ac_word=$2
6321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6322$as_echo_n "checking for $ac_word... " >&6; }
6323if ${ac_cv_path_COMM+:} false; then :
6324  $as_echo_n "(cached) " >&6
6325else
6326  case $COMM in
6327  [\\/]* | ?:[\\/]*)
6328  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6329  ;;
6330  *)
6331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6332for as_dir in $PATH
6333do
6334  IFS=$as_save_IFS
6335  test -z "$as_dir" && as_dir=.
6336    for ac_exec_ext in '' $ac_executable_extensions; do
6337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6338    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6340    break 2
6341  fi
6342done
6343  done
6344IFS=$as_save_IFS
6345
6346  ;;
6347esac
6348fi
6349COMM=$ac_cv_path_COMM
6350if test -n "$COMM"; then
6351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6352$as_echo "$COMM" >&6; }
6353else
6354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6355$as_echo "no" >&6; }
6356fi
6357
6358
6359          if test "x$COMM" = x; then
6360            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6361          fi
6362        else
6363          # Otherwise we believe it is a complete path. Use it as it is.
6364          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6365$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6366          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6367$as_echo_n "checking for COMM... " >&6; }
6368          if test ! -x "$tool_specified"; then
6369            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6370$as_echo "not found" >&6; }
6371            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6372          fi
6373          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6374$as_echo "$tool_specified" >&6; }
6375        fi
6376      fi
6377    fi
6378
6379  fi
6380
6381
6382
6383  if test "x$COMM" = x; then
6384    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6385  fi
6386
6387
6388
6389
6390
6391  # Publish this variable in the help.
6392
6393
6394  if [ -z "${CP+x}" ]; then
6395    # The variable is not set by user, try to locate tool using the code snippet
6396    for ac_prog in cp
6397do
6398  # Extract the first word of "$ac_prog", so it can be a program name with args.
6399set dummy $ac_prog; ac_word=$2
6400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6401$as_echo_n "checking for $ac_word... " >&6; }
6402if ${ac_cv_path_CP+:} false; then :
6403  $as_echo_n "(cached) " >&6
6404else
6405  case $CP in
6406  [\\/]* | ?:[\\/]*)
6407  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6408  ;;
6409  *)
6410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6411for as_dir in $PATH
6412do
6413  IFS=$as_save_IFS
6414  test -z "$as_dir" && as_dir=.
6415    for ac_exec_ext in '' $ac_executable_extensions; do
6416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6417    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6419    break 2
6420  fi
6421done
6422  done
6423IFS=$as_save_IFS
6424
6425  ;;
6426esac
6427fi
6428CP=$ac_cv_path_CP
6429if test -n "$CP"; then
6430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6431$as_echo "$CP" >&6; }
6432else
6433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6434$as_echo "no" >&6; }
6435fi
6436
6437
6438  test -n "$CP" && break
6439done
6440
6441  else
6442    # The variable is set, but is it from the command line or the environment?
6443
6444    # Try to remove the string !CP! from our list.
6445    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6446    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6447      # If it failed, the variable was not from the command line. Ignore it,
6448      # but warn the user (except for BASH, which is always set by the calling BASH).
6449      if test "xCP" != xBASH; then
6450        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6451$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6452      fi
6453      # Try to locate tool using the code snippet
6454      for ac_prog in cp
6455do
6456  # Extract the first word of "$ac_prog", so it can be a program name with args.
6457set dummy $ac_prog; ac_word=$2
6458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6459$as_echo_n "checking for $ac_word... " >&6; }
6460if ${ac_cv_path_CP+:} false; then :
6461  $as_echo_n "(cached) " >&6
6462else
6463  case $CP in
6464  [\\/]* | ?:[\\/]*)
6465  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6466  ;;
6467  *)
6468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6469for as_dir in $PATH
6470do
6471  IFS=$as_save_IFS
6472  test -z "$as_dir" && as_dir=.
6473    for ac_exec_ext in '' $ac_executable_extensions; do
6474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6475    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6477    break 2
6478  fi
6479done
6480  done
6481IFS=$as_save_IFS
6482
6483  ;;
6484esac
6485fi
6486CP=$ac_cv_path_CP
6487if test -n "$CP"; then
6488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6489$as_echo "$CP" >&6; }
6490else
6491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6492$as_echo "no" >&6; }
6493fi
6494
6495
6496  test -n "$CP" && break
6497done
6498
6499    else
6500      # If it succeeded, then it was overridden by the user. We will use it
6501      # for the tool.
6502
6503      # First remove it from the list of overridden variables, so we can test
6504      # for unknown variables in the end.
6505      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6506
6507      # Check if we try to supply an empty value
6508      if test "x$CP" = x; then
6509        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6510$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6511        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6512$as_echo_n "checking for CP... " >&6; }
6513        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6514$as_echo "disabled" >&6; }
6515      else
6516        # Check if the provided tool contains a complete path.
6517        tool_specified="$CP"
6518        tool_basename="${tool_specified##*/}"
6519        if test "x$tool_basename" = "x$tool_specified"; then
6520          # A command without a complete path is provided, search $PATH.
6521          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6522$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6523          # Extract the first word of "$tool_basename", so it can be a program name with args.
6524set dummy $tool_basename; ac_word=$2
6525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6526$as_echo_n "checking for $ac_word... " >&6; }
6527if ${ac_cv_path_CP+:} false; then :
6528  $as_echo_n "(cached) " >&6
6529else
6530  case $CP in
6531  [\\/]* | ?:[\\/]*)
6532  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6533  ;;
6534  *)
6535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6536for as_dir in $PATH
6537do
6538  IFS=$as_save_IFS
6539  test -z "$as_dir" && as_dir=.
6540    for ac_exec_ext in '' $ac_executable_extensions; do
6541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6542    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6544    break 2
6545  fi
6546done
6547  done
6548IFS=$as_save_IFS
6549
6550  ;;
6551esac
6552fi
6553CP=$ac_cv_path_CP
6554if test -n "$CP"; then
6555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6556$as_echo "$CP" >&6; }
6557else
6558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6559$as_echo "no" >&6; }
6560fi
6561
6562
6563          if test "x$CP" = x; then
6564            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6565          fi
6566        else
6567          # Otherwise we believe it is a complete path. Use it as it is.
6568          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6569$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6570          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6571$as_echo_n "checking for CP... " >&6; }
6572          if test ! -x "$tool_specified"; then
6573            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6574$as_echo "not found" >&6; }
6575            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6576          fi
6577          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6578$as_echo "$tool_specified" >&6; }
6579        fi
6580      fi
6581    fi
6582
6583  fi
6584
6585
6586
6587  if test "x$CP" = x; then
6588    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6589  fi
6590
6591
6592
6593
6594
6595  # Publish this variable in the help.
6596
6597
6598  if [ -z "${CUT+x}" ]; then
6599    # The variable is not set by user, try to locate tool using the code snippet
6600    for ac_prog in cut
6601do
6602  # Extract the first word of "$ac_prog", so it can be a program name with args.
6603set dummy $ac_prog; ac_word=$2
6604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6605$as_echo_n "checking for $ac_word... " >&6; }
6606if ${ac_cv_path_CUT+:} false; then :
6607  $as_echo_n "(cached) " >&6
6608else
6609  case $CUT in
6610  [\\/]* | ?:[\\/]*)
6611  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6612  ;;
6613  *)
6614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6615for as_dir in $PATH
6616do
6617  IFS=$as_save_IFS
6618  test -z "$as_dir" && as_dir=.
6619    for ac_exec_ext in '' $ac_executable_extensions; do
6620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6621    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6623    break 2
6624  fi
6625done
6626  done
6627IFS=$as_save_IFS
6628
6629  ;;
6630esac
6631fi
6632CUT=$ac_cv_path_CUT
6633if test -n "$CUT"; then
6634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6635$as_echo "$CUT" >&6; }
6636else
6637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6638$as_echo "no" >&6; }
6639fi
6640
6641
6642  test -n "$CUT" && break
6643done
6644
6645  else
6646    # The variable is set, but is it from the command line or the environment?
6647
6648    # Try to remove the string !CUT! from our list.
6649    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6650    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6651      # If it failed, the variable was not from the command line. Ignore it,
6652      # but warn the user (except for BASH, which is always set by the calling BASH).
6653      if test "xCUT" != xBASH; then
6654        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6655$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6656      fi
6657      # Try to locate tool using the code snippet
6658      for ac_prog in cut
6659do
6660  # Extract the first word of "$ac_prog", so it can be a program name with args.
6661set dummy $ac_prog; ac_word=$2
6662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6663$as_echo_n "checking for $ac_word... " >&6; }
6664if ${ac_cv_path_CUT+:} false; then :
6665  $as_echo_n "(cached) " >&6
6666else
6667  case $CUT in
6668  [\\/]* | ?:[\\/]*)
6669  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6670  ;;
6671  *)
6672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6673for as_dir in $PATH
6674do
6675  IFS=$as_save_IFS
6676  test -z "$as_dir" && as_dir=.
6677    for ac_exec_ext in '' $ac_executable_extensions; do
6678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6679    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6681    break 2
6682  fi
6683done
6684  done
6685IFS=$as_save_IFS
6686
6687  ;;
6688esac
6689fi
6690CUT=$ac_cv_path_CUT
6691if test -n "$CUT"; then
6692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6693$as_echo "$CUT" >&6; }
6694else
6695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6696$as_echo "no" >&6; }
6697fi
6698
6699
6700  test -n "$CUT" && break
6701done
6702
6703    else
6704      # If it succeeded, then it was overridden by the user. We will use it
6705      # for the tool.
6706
6707      # First remove it from the list of overridden variables, so we can test
6708      # for unknown variables in the end.
6709      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6710
6711      # Check if we try to supply an empty value
6712      if test "x$CUT" = x; then
6713        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6714$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6715        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6716$as_echo_n "checking for CUT... " >&6; }
6717        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6718$as_echo "disabled" >&6; }
6719      else
6720        # Check if the provided tool contains a complete path.
6721        tool_specified="$CUT"
6722        tool_basename="${tool_specified##*/}"
6723        if test "x$tool_basename" = "x$tool_specified"; then
6724          # A command without a complete path is provided, search $PATH.
6725          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6726$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6727          # Extract the first word of "$tool_basename", so it can be a program name with args.
6728set dummy $tool_basename; ac_word=$2
6729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6730$as_echo_n "checking for $ac_word... " >&6; }
6731if ${ac_cv_path_CUT+:} false; then :
6732  $as_echo_n "(cached) " >&6
6733else
6734  case $CUT in
6735  [\\/]* | ?:[\\/]*)
6736  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6737  ;;
6738  *)
6739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6740for as_dir in $PATH
6741do
6742  IFS=$as_save_IFS
6743  test -z "$as_dir" && as_dir=.
6744    for ac_exec_ext in '' $ac_executable_extensions; do
6745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6746    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6748    break 2
6749  fi
6750done
6751  done
6752IFS=$as_save_IFS
6753
6754  ;;
6755esac
6756fi
6757CUT=$ac_cv_path_CUT
6758if test -n "$CUT"; then
6759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6760$as_echo "$CUT" >&6; }
6761else
6762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6763$as_echo "no" >&6; }
6764fi
6765
6766
6767          if test "x$CUT" = x; then
6768            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6769          fi
6770        else
6771          # Otherwise we believe it is a complete path. Use it as it is.
6772          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6773$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6774          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6775$as_echo_n "checking for CUT... " >&6; }
6776          if test ! -x "$tool_specified"; then
6777            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6778$as_echo "not found" >&6; }
6779            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6780          fi
6781          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6782$as_echo "$tool_specified" >&6; }
6783        fi
6784      fi
6785    fi
6786
6787  fi
6788
6789
6790
6791  if test "x$CUT" = x; then
6792    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6793  fi
6794
6795
6796
6797
6798
6799  # Publish this variable in the help.
6800
6801
6802  if [ -z "${DATE+x}" ]; then
6803    # The variable is not set by user, try to locate tool using the code snippet
6804    for ac_prog in date
6805do
6806  # Extract the first word of "$ac_prog", so it can be a program name with args.
6807set dummy $ac_prog; ac_word=$2
6808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6809$as_echo_n "checking for $ac_word... " >&6; }
6810if ${ac_cv_path_DATE+:} false; then :
6811  $as_echo_n "(cached) " >&6
6812else
6813  case $DATE in
6814  [\\/]* | ?:[\\/]*)
6815  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6816  ;;
6817  *)
6818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6819for as_dir in $PATH
6820do
6821  IFS=$as_save_IFS
6822  test -z "$as_dir" && as_dir=.
6823    for ac_exec_ext in '' $ac_executable_extensions; do
6824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6825    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6827    break 2
6828  fi
6829done
6830  done
6831IFS=$as_save_IFS
6832
6833  ;;
6834esac
6835fi
6836DATE=$ac_cv_path_DATE
6837if test -n "$DATE"; then
6838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6839$as_echo "$DATE" >&6; }
6840else
6841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6842$as_echo "no" >&6; }
6843fi
6844
6845
6846  test -n "$DATE" && break
6847done
6848
6849  else
6850    # The variable is set, but is it from the command line or the environment?
6851
6852    # Try to remove the string !DATE! from our list.
6853    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6854    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6855      # If it failed, the variable was not from the command line. Ignore it,
6856      # but warn the user (except for BASH, which is always set by the calling BASH).
6857      if test "xDATE" != xBASH; then
6858        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6859$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6860      fi
6861      # Try to locate tool using the code snippet
6862      for ac_prog in date
6863do
6864  # Extract the first word of "$ac_prog", so it can be a program name with args.
6865set dummy $ac_prog; ac_word=$2
6866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6867$as_echo_n "checking for $ac_word... " >&6; }
6868if ${ac_cv_path_DATE+:} false; then :
6869  $as_echo_n "(cached) " >&6
6870else
6871  case $DATE in
6872  [\\/]* | ?:[\\/]*)
6873  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6874  ;;
6875  *)
6876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6877for as_dir in $PATH
6878do
6879  IFS=$as_save_IFS
6880  test -z "$as_dir" && as_dir=.
6881    for ac_exec_ext in '' $ac_executable_extensions; do
6882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6883    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6885    break 2
6886  fi
6887done
6888  done
6889IFS=$as_save_IFS
6890
6891  ;;
6892esac
6893fi
6894DATE=$ac_cv_path_DATE
6895if test -n "$DATE"; then
6896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6897$as_echo "$DATE" >&6; }
6898else
6899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6900$as_echo "no" >&6; }
6901fi
6902
6903
6904  test -n "$DATE" && break
6905done
6906
6907    else
6908      # If it succeeded, then it was overridden by the user. We will use it
6909      # for the tool.
6910
6911      # First remove it from the list of overridden variables, so we can test
6912      # for unknown variables in the end.
6913      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6914
6915      # Check if we try to supply an empty value
6916      if test "x$DATE" = x; then
6917        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6918$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6919        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6920$as_echo_n "checking for DATE... " >&6; }
6921        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6922$as_echo "disabled" >&6; }
6923      else
6924        # Check if the provided tool contains a complete path.
6925        tool_specified="$DATE"
6926        tool_basename="${tool_specified##*/}"
6927        if test "x$tool_basename" = "x$tool_specified"; then
6928          # A command without a complete path is provided, search $PATH.
6929          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6930$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6931          # Extract the first word of "$tool_basename", so it can be a program name with args.
6932set dummy $tool_basename; ac_word=$2
6933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6934$as_echo_n "checking for $ac_word... " >&6; }
6935if ${ac_cv_path_DATE+:} false; then :
6936  $as_echo_n "(cached) " >&6
6937else
6938  case $DATE in
6939  [\\/]* | ?:[\\/]*)
6940  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6941  ;;
6942  *)
6943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6944for as_dir in $PATH
6945do
6946  IFS=$as_save_IFS
6947  test -z "$as_dir" && as_dir=.
6948    for ac_exec_ext in '' $ac_executable_extensions; do
6949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6950    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6952    break 2
6953  fi
6954done
6955  done
6956IFS=$as_save_IFS
6957
6958  ;;
6959esac
6960fi
6961DATE=$ac_cv_path_DATE
6962if test -n "$DATE"; then
6963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6964$as_echo "$DATE" >&6; }
6965else
6966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6967$as_echo "no" >&6; }
6968fi
6969
6970
6971          if test "x$DATE" = x; then
6972            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6973          fi
6974        else
6975          # Otherwise we believe it is a complete path. Use it as it is.
6976          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6977$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6978          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6979$as_echo_n "checking for DATE... " >&6; }
6980          if test ! -x "$tool_specified"; then
6981            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6982$as_echo "not found" >&6; }
6983            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6984          fi
6985          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6986$as_echo "$tool_specified" >&6; }
6987        fi
6988      fi
6989    fi
6990
6991  fi
6992
6993
6994
6995  if test "x$DATE" = x; then
6996    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6997  fi
6998
6999
7000
7001
7002
7003  # Publish this variable in the help.
7004
7005
7006  if [ -z "${DIFF+x}" ]; then
7007    # The variable is not set by user, try to locate tool using the code snippet
7008    for ac_prog in gdiff diff
7009do
7010  # Extract the first word of "$ac_prog", so it can be a program name with args.
7011set dummy $ac_prog; ac_word=$2
7012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7013$as_echo_n "checking for $ac_word... " >&6; }
7014if ${ac_cv_path_DIFF+:} false; then :
7015  $as_echo_n "(cached) " >&6
7016else
7017  case $DIFF in
7018  [\\/]* | ?:[\\/]*)
7019  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7020  ;;
7021  *)
7022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7023for as_dir in $PATH
7024do
7025  IFS=$as_save_IFS
7026  test -z "$as_dir" && as_dir=.
7027    for ac_exec_ext in '' $ac_executable_extensions; do
7028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7029    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7031    break 2
7032  fi
7033done
7034  done
7035IFS=$as_save_IFS
7036
7037  ;;
7038esac
7039fi
7040DIFF=$ac_cv_path_DIFF
7041if test -n "$DIFF"; then
7042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7043$as_echo "$DIFF" >&6; }
7044else
7045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7046$as_echo "no" >&6; }
7047fi
7048
7049
7050  test -n "$DIFF" && break
7051done
7052
7053  else
7054    # The variable is set, but is it from the command line or the environment?
7055
7056    # Try to remove the string !DIFF! from our list.
7057    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7058    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7059      # If it failed, the variable was not from the command line. Ignore it,
7060      # but warn the user (except for BASH, which is always set by the calling BASH).
7061      if test "xDIFF" != xBASH; then
7062        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7063$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7064      fi
7065      # Try to locate tool using the code snippet
7066      for ac_prog in gdiff diff
7067do
7068  # Extract the first word of "$ac_prog", so it can be a program name with args.
7069set dummy $ac_prog; ac_word=$2
7070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7071$as_echo_n "checking for $ac_word... " >&6; }
7072if ${ac_cv_path_DIFF+:} false; then :
7073  $as_echo_n "(cached) " >&6
7074else
7075  case $DIFF in
7076  [\\/]* | ?:[\\/]*)
7077  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7078  ;;
7079  *)
7080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7081for as_dir in $PATH
7082do
7083  IFS=$as_save_IFS
7084  test -z "$as_dir" && as_dir=.
7085    for ac_exec_ext in '' $ac_executable_extensions; do
7086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7087    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7089    break 2
7090  fi
7091done
7092  done
7093IFS=$as_save_IFS
7094
7095  ;;
7096esac
7097fi
7098DIFF=$ac_cv_path_DIFF
7099if test -n "$DIFF"; then
7100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7101$as_echo "$DIFF" >&6; }
7102else
7103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7104$as_echo "no" >&6; }
7105fi
7106
7107
7108  test -n "$DIFF" && break
7109done
7110
7111    else
7112      # If it succeeded, then it was overridden by the user. We will use it
7113      # for the tool.
7114
7115      # First remove it from the list of overridden variables, so we can test
7116      # for unknown variables in the end.
7117      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7118
7119      # Check if we try to supply an empty value
7120      if test "x$DIFF" = x; then
7121        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7122$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7123        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7124$as_echo_n "checking for DIFF... " >&6; }
7125        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7126$as_echo "disabled" >&6; }
7127      else
7128        # Check if the provided tool contains a complete path.
7129        tool_specified="$DIFF"
7130        tool_basename="${tool_specified##*/}"
7131        if test "x$tool_basename" = "x$tool_specified"; then
7132          # A command without a complete path is provided, search $PATH.
7133          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7134$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7135          # Extract the first word of "$tool_basename", so it can be a program name with args.
7136set dummy $tool_basename; ac_word=$2
7137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7138$as_echo_n "checking for $ac_word... " >&6; }
7139if ${ac_cv_path_DIFF+:} false; then :
7140  $as_echo_n "(cached) " >&6
7141else
7142  case $DIFF in
7143  [\\/]* | ?:[\\/]*)
7144  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7145  ;;
7146  *)
7147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7148for as_dir in $PATH
7149do
7150  IFS=$as_save_IFS
7151  test -z "$as_dir" && as_dir=.
7152    for ac_exec_ext in '' $ac_executable_extensions; do
7153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7154    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7156    break 2
7157  fi
7158done
7159  done
7160IFS=$as_save_IFS
7161
7162  ;;
7163esac
7164fi
7165DIFF=$ac_cv_path_DIFF
7166if test -n "$DIFF"; then
7167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7168$as_echo "$DIFF" >&6; }
7169else
7170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7171$as_echo "no" >&6; }
7172fi
7173
7174
7175          if test "x$DIFF" = x; then
7176            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7177          fi
7178        else
7179          # Otherwise we believe it is a complete path. Use it as it is.
7180          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7181$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7182          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7183$as_echo_n "checking for DIFF... " >&6; }
7184          if test ! -x "$tool_specified"; then
7185            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7186$as_echo "not found" >&6; }
7187            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7188          fi
7189          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7190$as_echo "$tool_specified" >&6; }
7191        fi
7192      fi
7193    fi
7194
7195  fi
7196
7197
7198
7199  if test "x$DIFF" = x; then
7200    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7201  fi
7202
7203
7204
7205
7206
7207  # Publish this variable in the help.
7208
7209
7210  if [ -z "${DIRNAME+x}" ]; then
7211    # The variable is not set by user, try to locate tool using the code snippet
7212    for ac_prog in dirname
7213do
7214  # Extract the first word of "$ac_prog", so it can be a program name with args.
7215set dummy $ac_prog; ac_word=$2
7216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7217$as_echo_n "checking for $ac_word... " >&6; }
7218if ${ac_cv_path_DIRNAME+:} false; then :
7219  $as_echo_n "(cached) " >&6
7220else
7221  case $DIRNAME in
7222  [\\/]* | ?:[\\/]*)
7223  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7224  ;;
7225  *)
7226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7227for as_dir in $PATH
7228do
7229  IFS=$as_save_IFS
7230  test -z "$as_dir" && as_dir=.
7231    for ac_exec_ext in '' $ac_executable_extensions; do
7232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7233    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7235    break 2
7236  fi
7237done
7238  done
7239IFS=$as_save_IFS
7240
7241  ;;
7242esac
7243fi
7244DIRNAME=$ac_cv_path_DIRNAME
7245if test -n "$DIRNAME"; then
7246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7247$as_echo "$DIRNAME" >&6; }
7248else
7249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7250$as_echo "no" >&6; }
7251fi
7252
7253
7254  test -n "$DIRNAME" && break
7255done
7256
7257  else
7258    # The variable is set, but is it from the command line or the environment?
7259
7260    # Try to remove the string !DIRNAME! from our list.
7261    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7262    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7263      # If it failed, the variable was not from the command line. Ignore it,
7264      # but warn the user (except for BASH, which is always set by the calling BASH).
7265      if test "xDIRNAME" != xBASH; then
7266        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7267$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7268      fi
7269      # Try to locate tool using the code snippet
7270      for ac_prog in dirname
7271do
7272  # Extract the first word of "$ac_prog", so it can be a program name with args.
7273set dummy $ac_prog; ac_word=$2
7274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7275$as_echo_n "checking for $ac_word... " >&6; }
7276if ${ac_cv_path_DIRNAME+:} false; then :
7277  $as_echo_n "(cached) " >&6
7278else
7279  case $DIRNAME in
7280  [\\/]* | ?:[\\/]*)
7281  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7282  ;;
7283  *)
7284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7285for as_dir in $PATH
7286do
7287  IFS=$as_save_IFS
7288  test -z "$as_dir" && as_dir=.
7289    for ac_exec_ext in '' $ac_executable_extensions; do
7290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7291    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7293    break 2
7294  fi
7295done
7296  done
7297IFS=$as_save_IFS
7298
7299  ;;
7300esac
7301fi
7302DIRNAME=$ac_cv_path_DIRNAME
7303if test -n "$DIRNAME"; then
7304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7305$as_echo "$DIRNAME" >&6; }
7306else
7307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7308$as_echo "no" >&6; }
7309fi
7310
7311
7312  test -n "$DIRNAME" && break
7313done
7314
7315    else
7316      # If it succeeded, then it was overridden by the user. We will use it
7317      # for the tool.
7318
7319      # First remove it from the list of overridden variables, so we can test
7320      # for unknown variables in the end.
7321      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7322
7323      # Check if we try to supply an empty value
7324      if test "x$DIRNAME" = x; then
7325        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7326$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7327        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7328$as_echo_n "checking for DIRNAME... " >&6; }
7329        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7330$as_echo "disabled" >&6; }
7331      else
7332        # Check if the provided tool contains a complete path.
7333        tool_specified="$DIRNAME"
7334        tool_basename="${tool_specified##*/}"
7335        if test "x$tool_basename" = "x$tool_specified"; then
7336          # A command without a complete path is provided, search $PATH.
7337          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7338$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7339          # Extract the first word of "$tool_basename", so it can be a program name with args.
7340set dummy $tool_basename; ac_word=$2
7341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7342$as_echo_n "checking for $ac_word... " >&6; }
7343if ${ac_cv_path_DIRNAME+:} false; then :
7344  $as_echo_n "(cached) " >&6
7345else
7346  case $DIRNAME in
7347  [\\/]* | ?:[\\/]*)
7348  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7349  ;;
7350  *)
7351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7352for as_dir in $PATH
7353do
7354  IFS=$as_save_IFS
7355  test -z "$as_dir" && as_dir=.
7356    for ac_exec_ext in '' $ac_executable_extensions; do
7357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7358    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7360    break 2
7361  fi
7362done
7363  done
7364IFS=$as_save_IFS
7365
7366  ;;
7367esac
7368fi
7369DIRNAME=$ac_cv_path_DIRNAME
7370if test -n "$DIRNAME"; then
7371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7372$as_echo "$DIRNAME" >&6; }
7373else
7374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7375$as_echo "no" >&6; }
7376fi
7377
7378
7379          if test "x$DIRNAME" = x; then
7380            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7381          fi
7382        else
7383          # Otherwise we believe it is a complete path. Use it as it is.
7384          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7385$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7386          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7387$as_echo_n "checking for DIRNAME... " >&6; }
7388          if test ! -x "$tool_specified"; then
7389            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7390$as_echo "not found" >&6; }
7391            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7392          fi
7393          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7394$as_echo "$tool_specified" >&6; }
7395        fi
7396      fi
7397    fi
7398
7399  fi
7400
7401
7402
7403  if test "x$DIRNAME" = x; then
7404    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7405  fi
7406
7407
7408
7409
7410
7411  # Publish this variable in the help.
7412
7413
7414  if [ -z "${ECHO+x}" ]; then
7415    # The variable is not set by user, try to locate tool using the code snippet
7416    for ac_prog in echo
7417do
7418  # Extract the first word of "$ac_prog", so it can be a program name with args.
7419set dummy $ac_prog; ac_word=$2
7420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7421$as_echo_n "checking for $ac_word... " >&6; }
7422if ${ac_cv_path_ECHO+:} false; then :
7423  $as_echo_n "(cached) " >&6
7424else
7425  case $ECHO in
7426  [\\/]* | ?:[\\/]*)
7427  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7428  ;;
7429  *)
7430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7431for as_dir in $PATH
7432do
7433  IFS=$as_save_IFS
7434  test -z "$as_dir" && as_dir=.
7435    for ac_exec_ext in '' $ac_executable_extensions; do
7436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7437    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7439    break 2
7440  fi
7441done
7442  done
7443IFS=$as_save_IFS
7444
7445  ;;
7446esac
7447fi
7448ECHO=$ac_cv_path_ECHO
7449if test -n "$ECHO"; then
7450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7451$as_echo "$ECHO" >&6; }
7452else
7453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7454$as_echo "no" >&6; }
7455fi
7456
7457
7458  test -n "$ECHO" && break
7459done
7460
7461  else
7462    # The variable is set, but is it from the command line or the environment?
7463
7464    # Try to remove the string !ECHO! from our list.
7465    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7466    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7467      # If it failed, the variable was not from the command line. Ignore it,
7468      # but warn the user (except for BASH, which is always set by the calling BASH).
7469      if test "xECHO" != xBASH; then
7470        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7471$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7472      fi
7473      # Try to locate tool using the code snippet
7474      for ac_prog in echo
7475do
7476  # Extract the first word of "$ac_prog", so it can be a program name with args.
7477set dummy $ac_prog; ac_word=$2
7478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7479$as_echo_n "checking for $ac_word... " >&6; }
7480if ${ac_cv_path_ECHO+:} false; then :
7481  $as_echo_n "(cached) " >&6
7482else
7483  case $ECHO in
7484  [\\/]* | ?:[\\/]*)
7485  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7486  ;;
7487  *)
7488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7489for as_dir in $PATH
7490do
7491  IFS=$as_save_IFS
7492  test -z "$as_dir" && as_dir=.
7493    for ac_exec_ext in '' $ac_executable_extensions; do
7494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7495    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7497    break 2
7498  fi
7499done
7500  done
7501IFS=$as_save_IFS
7502
7503  ;;
7504esac
7505fi
7506ECHO=$ac_cv_path_ECHO
7507if test -n "$ECHO"; then
7508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7509$as_echo "$ECHO" >&6; }
7510else
7511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7512$as_echo "no" >&6; }
7513fi
7514
7515
7516  test -n "$ECHO" && break
7517done
7518
7519    else
7520      # If it succeeded, then it was overridden by the user. We will use it
7521      # for the tool.
7522
7523      # First remove it from the list of overridden variables, so we can test
7524      # for unknown variables in the end.
7525      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7526
7527      # Check if we try to supply an empty value
7528      if test "x$ECHO" = x; then
7529        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7530$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7531        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7532$as_echo_n "checking for ECHO... " >&6; }
7533        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7534$as_echo "disabled" >&6; }
7535      else
7536        # Check if the provided tool contains a complete path.
7537        tool_specified="$ECHO"
7538        tool_basename="${tool_specified##*/}"
7539        if test "x$tool_basename" = "x$tool_specified"; then
7540          # A command without a complete path is provided, search $PATH.
7541          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7542$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7543          # Extract the first word of "$tool_basename", so it can be a program name with args.
7544set dummy $tool_basename; ac_word=$2
7545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7546$as_echo_n "checking for $ac_word... " >&6; }
7547if ${ac_cv_path_ECHO+:} false; then :
7548  $as_echo_n "(cached) " >&6
7549else
7550  case $ECHO in
7551  [\\/]* | ?:[\\/]*)
7552  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7553  ;;
7554  *)
7555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7556for as_dir in $PATH
7557do
7558  IFS=$as_save_IFS
7559  test -z "$as_dir" && as_dir=.
7560    for ac_exec_ext in '' $ac_executable_extensions; do
7561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7562    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7564    break 2
7565  fi
7566done
7567  done
7568IFS=$as_save_IFS
7569
7570  ;;
7571esac
7572fi
7573ECHO=$ac_cv_path_ECHO
7574if test -n "$ECHO"; then
7575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7576$as_echo "$ECHO" >&6; }
7577else
7578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7579$as_echo "no" >&6; }
7580fi
7581
7582
7583          if test "x$ECHO" = x; then
7584            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7585          fi
7586        else
7587          # Otherwise we believe it is a complete path. Use it as it is.
7588          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7589$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7590          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7591$as_echo_n "checking for ECHO... " >&6; }
7592          if test ! -x "$tool_specified"; then
7593            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7594$as_echo "not found" >&6; }
7595            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7596          fi
7597          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7598$as_echo "$tool_specified" >&6; }
7599        fi
7600      fi
7601    fi
7602
7603  fi
7604
7605
7606
7607  if test "x$ECHO" = x; then
7608    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7609  fi
7610
7611
7612
7613
7614
7615  # Publish this variable in the help.
7616
7617
7618  if [ -z "${EXPR+x}" ]; then
7619    # The variable is not set by user, try to locate tool using the code snippet
7620    for ac_prog in expr
7621do
7622  # Extract the first word of "$ac_prog", so it can be a program name with args.
7623set dummy $ac_prog; ac_word=$2
7624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7625$as_echo_n "checking for $ac_word... " >&6; }
7626if ${ac_cv_path_EXPR+:} false; then :
7627  $as_echo_n "(cached) " >&6
7628else
7629  case $EXPR in
7630  [\\/]* | ?:[\\/]*)
7631  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7632  ;;
7633  *)
7634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7635for as_dir in $PATH
7636do
7637  IFS=$as_save_IFS
7638  test -z "$as_dir" && as_dir=.
7639    for ac_exec_ext in '' $ac_executable_extensions; do
7640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7641    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7643    break 2
7644  fi
7645done
7646  done
7647IFS=$as_save_IFS
7648
7649  ;;
7650esac
7651fi
7652EXPR=$ac_cv_path_EXPR
7653if test -n "$EXPR"; then
7654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7655$as_echo "$EXPR" >&6; }
7656else
7657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7658$as_echo "no" >&6; }
7659fi
7660
7661
7662  test -n "$EXPR" && break
7663done
7664
7665  else
7666    # The variable is set, but is it from the command line or the environment?
7667
7668    # Try to remove the string !EXPR! from our list.
7669    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7670    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7671      # If it failed, the variable was not from the command line. Ignore it,
7672      # but warn the user (except for BASH, which is always set by the calling BASH).
7673      if test "xEXPR" != xBASH; then
7674        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7675$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7676      fi
7677      # Try to locate tool using the code snippet
7678      for ac_prog in expr
7679do
7680  # Extract the first word of "$ac_prog", so it can be a program name with args.
7681set dummy $ac_prog; ac_word=$2
7682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7683$as_echo_n "checking for $ac_word... " >&6; }
7684if ${ac_cv_path_EXPR+:} false; then :
7685  $as_echo_n "(cached) " >&6
7686else
7687  case $EXPR in
7688  [\\/]* | ?:[\\/]*)
7689  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7690  ;;
7691  *)
7692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7693for as_dir in $PATH
7694do
7695  IFS=$as_save_IFS
7696  test -z "$as_dir" && as_dir=.
7697    for ac_exec_ext in '' $ac_executable_extensions; do
7698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7699    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7701    break 2
7702  fi
7703done
7704  done
7705IFS=$as_save_IFS
7706
7707  ;;
7708esac
7709fi
7710EXPR=$ac_cv_path_EXPR
7711if test -n "$EXPR"; then
7712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7713$as_echo "$EXPR" >&6; }
7714else
7715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7716$as_echo "no" >&6; }
7717fi
7718
7719
7720  test -n "$EXPR" && break
7721done
7722
7723    else
7724      # If it succeeded, then it was overridden by the user. We will use it
7725      # for the tool.
7726
7727      # First remove it from the list of overridden variables, so we can test
7728      # for unknown variables in the end.
7729      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7730
7731      # Check if we try to supply an empty value
7732      if test "x$EXPR" = x; then
7733        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7734$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7735        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7736$as_echo_n "checking for EXPR... " >&6; }
7737        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7738$as_echo "disabled" >&6; }
7739      else
7740        # Check if the provided tool contains a complete path.
7741        tool_specified="$EXPR"
7742        tool_basename="${tool_specified##*/}"
7743        if test "x$tool_basename" = "x$tool_specified"; then
7744          # A command without a complete path is provided, search $PATH.
7745          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7746$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7747          # Extract the first word of "$tool_basename", so it can be a program name with args.
7748set dummy $tool_basename; ac_word=$2
7749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7750$as_echo_n "checking for $ac_word... " >&6; }
7751if ${ac_cv_path_EXPR+:} false; then :
7752  $as_echo_n "(cached) " >&6
7753else
7754  case $EXPR in
7755  [\\/]* | ?:[\\/]*)
7756  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7757  ;;
7758  *)
7759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7760for as_dir in $PATH
7761do
7762  IFS=$as_save_IFS
7763  test -z "$as_dir" && as_dir=.
7764    for ac_exec_ext in '' $ac_executable_extensions; do
7765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7766    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7768    break 2
7769  fi
7770done
7771  done
7772IFS=$as_save_IFS
7773
7774  ;;
7775esac
7776fi
7777EXPR=$ac_cv_path_EXPR
7778if test -n "$EXPR"; then
7779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7780$as_echo "$EXPR" >&6; }
7781else
7782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7783$as_echo "no" >&6; }
7784fi
7785
7786
7787          if test "x$EXPR" = x; then
7788            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7789          fi
7790        else
7791          # Otherwise we believe it is a complete path. Use it as it is.
7792          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7793$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7794          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7795$as_echo_n "checking for EXPR... " >&6; }
7796          if test ! -x "$tool_specified"; then
7797            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7798$as_echo "not found" >&6; }
7799            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7800          fi
7801          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7802$as_echo "$tool_specified" >&6; }
7803        fi
7804      fi
7805    fi
7806
7807  fi
7808
7809
7810
7811  if test "x$EXPR" = x; then
7812    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7813  fi
7814
7815
7816
7817
7818
7819  # Publish this variable in the help.
7820
7821
7822  if [ -z "${FILE+x}" ]; then
7823    # The variable is not set by user, try to locate tool using the code snippet
7824    for ac_prog in file
7825do
7826  # Extract the first word of "$ac_prog", so it can be a program name with args.
7827set dummy $ac_prog; ac_word=$2
7828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7829$as_echo_n "checking for $ac_word... " >&6; }
7830if ${ac_cv_path_FILE+:} false; then :
7831  $as_echo_n "(cached) " >&6
7832else
7833  case $FILE in
7834  [\\/]* | ?:[\\/]*)
7835  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7836  ;;
7837  *)
7838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7839for as_dir in $PATH
7840do
7841  IFS=$as_save_IFS
7842  test -z "$as_dir" && as_dir=.
7843    for ac_exec_ext in '' $ac_executable_extensions; do
7844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7845    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7847    break 2
7848  fi
7849done
7850  done
7851IFS=$as_save_IFS
7852
7853  ;;
7854esac
7855fi
7856FILE=$ac_cv_path_FILE
7857if test -n "$FILE"; then
7858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7859$as_echo "$FILE" >&6; }
7860else
7861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7862$as_echo "no" >&6; }
7863fi
7864
7865
7866  test -n "$FILE" && break
7867done
7868
7869  else
7870    # The variable is set, but is it from the command line or the environment?
7871
7872    # Try to remove the string !FILE! from our list.
7873    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7874    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7875      # If it failed, the variable was not from the command line. Ignore it,
7876      # but warn the user (except for BASH, which is always set by the calling BASH).
7877      if test "xFILE" != xBASH; then
7878        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7879$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7880      fi
7881      # Try to locate tool using the code snippet
7882      for ac_prog in file
7883do
7884  # Extract the first word of "$ac_prog", so it can be a program name with args.
7885set dummy $ac_prog; ac_word=$2
7886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7887$as_echo_n "checking for $ac_word... " >&6; }
7888if ${ac_cv_path_FILE+:} false; then :
7889  $as_echo_n "(cached) " >&6
7890else
7891  case $FILE in
7892  [\\/]* | ?:[\\/]*)
7893  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7894  ;;
7895  *)
7896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7897for as_dir in $PATH
7898do
7899  IFS=$as_save_IFS
7900  test -z "$as_dir" && as_dir=.
7901    for ac_exec_ext in '' $ac_executable_extensions; do
7902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7903    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7905    break 2
7906  fi
7907done
7908  done
7909IFS=$as_save_IFS
7910
7911  ;;
7912esac
7913fi
7914FILE=$ac_cv_path_FILE
7915if test -n "$FILE"; then
7916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7917$as_echo "$FILE" >&6; }
7918else
7919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7920$as_echo "no" >&6; }
7921fi
7922
7923
7924  test -n "$FILE" && break
7925done
7926
7927    else
7928      # If it succeeded, then it was overridden by the user. We will use it
7929      # for the tool.
7930
7931      # First remove it from the list of overridden variables, so we can test
7932      # for unknown variables in the end.
7933      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7934
7935      # Check if we try to supply an empty value
7936      if test "x$FILE" = x; then
7937        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7938$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7939        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7940$as_echo_n "checking for FILE... " >&6; }
7941        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7942$as_echo "disabled" >&6; }
7943      else
7944        # Check if the provided tool contains a complete path.
7945        tool_specified="$FILE"
7946        tool_basename="${tool_specified##*/}"
7947        if test "x$tool_basename" = "x$tool_specified"; then
7948          # A command without a complete path is provided, search $PATH.
7949          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7950$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7951          # Extract the first word of "$tool_basename", so it can be a program name with args.
7952set dummy $tool_basename; ac_word=$2
7953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7954$as_echo_n "checking for $ac_word... " >&6; }
7955if ${ac_cv_path_FILE+:} false; then :
7956  $as_echo_n "(cached) " >&6
7957else
7958  case $FILE in
7959  [\\/]* | ?:[\\/]*)
7960  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7961  ;;
7962  *)
7963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7964for as_dir in $PATH
7965do
7966  IFS=$as_save_IFS
7967  test -z "$as_dir" && as_dir=.
7968    for ac_exec_ext in '' $ac_executable_extensions; do
7969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7970    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7972    break 2
7973  fi
7974done
7975  done
7976IFS=$as_save_IFS
7977
7978  ;;
7979esac
7980fi
7981FILE=$ac_cv_path_FILE
7982if test -n "$FILE"; then
7983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7984$as_echo "$FILE" >&6; }
7985else
7986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7987$as_echo "no" >&6; }
7988fi
7989
7990
7991          if test "x$FILE" = x; then
7992            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7993          fi
7994        else
7995          # Otherwise we believe it is a complete path. Use it as it is.
7996          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7997$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7998          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7999$as_echo_n "checking for FILE... " >&6; }
8000          if test ! -x "$tool_specified"; then
8001            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8002$as_echo "not found" >&6; }
8003            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8004          fi
8005          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8006$as_echo "$tool_specified" >&6; }
8007        fi
8008      fi
8009    fi
8010
8011  fi
8012
8013
8014
8015  if test "x$FILE" = x; then
8016    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8017  fi
8018
8019
8020
8021
8022
8023  # Publish this variable in the help.
8024
8025
8026  if [ -z "${FIND+x}" ]; then
8027    # The variable is not set by user, try to locate tool using the code snippet
8028    for ac_prog in find
8029do
8030  # Extract the first word of "$ac_prog", so it can be a program name with args.
8031set dummy $ac_prog; ac_word=$2
8032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8033$as_echo_n "checking for $ac_word... " >&6; }
8034if ${ac_cv_path_FIND+:} false; then :
8035  $as_echo_n "(cached) " >&6
8036else
8037  case $FIND in
8038  [\\/]* | ?:[\\/]*)
8039  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8040  ;;
8041  *)
8042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8043for as_dir in $PATH
8044do
8045  IFS=$as_save_IFS
8046  test -z "$as_dir" && as_dir=.
8047    for ac_exec_ext in '' $ac_executable_extensions; do
8048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8049    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8051    break 2
8052  fi
8053done
8054  done
8055IFS=$as_save_IFS
8056
8057  ;;
8058esac
8059fi
8060FIND=$ac_cv_path_FIND
8061if test -n "$FIND"; then
8062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8063$as_echo "$FIND" >&6; }
8064else
8065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8066$as_echo "no" >&6; }
8067fi
8068
8069
8070  test -n "$FIND" && break
8071done
8072
8073  else
8074    # The variable is set, but is it from the command line or the environment?
8075
8076    # Try to remove the string !FIND! from our list.
8077    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8078    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8079      # If it failed, the variable was not from the command line. Ignore it,
8080      # but warn the user (except for BASH, which is always set by the calling BASH).
8081      if test "xFIND" != xBASH; then
8082        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8083$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8084      fi
8085      # Try to locate tool using the code snippet
8086      for ac_prog in find
8087do
8088  # Extract the first word of "$ac_prog", so it can be a program name with args.
8089set dummy $ac_prog; ac_word=$2
8090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8091$as_echo_n "checking for $ac_word... " >&6; }
8092if ${ac_cv_path_FIND+:} false; then :
8093  $as_echo_n "(cached) " >&6
8094else
8095  case $FIND in
8096  [\\/]* | ?:[\\/]*)
8097  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8098  ;;
8099  *)
8100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8101for as_dir in $PATH
8102do
8103  IFS=$as_save_IFS
8104  test -z "$as_dir" && as_dir=.
8105    for ac_exec_ext in '' $ac_executable_extensions; do
8106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8107    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8109    break 2
8110  fi
8111done
8112  done
8113IFS=$as_save_IFS
8114
8115  ;;
8116esac
8117fi
8118FIND=$ac_cv_path_FIND
8119if test -n "$FIND"; then
8120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8121$as_echo "$FIND" >&6; }
8122else
8123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8124$as_echo "no" >&6; }
8125fi
8126
8127
8128  test -n "$FIND" && break
8129done
8130
8131    else
8132      # If it succeeded, then it was overridden by the user. We will use it
8133      # for the tool.
8134
8135      # First remove it from the list of overridden variables, so we can test
8136      # for unknown variables in the end.
8137      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8138
8139      # Check if we try to supply an empty value
8140      if test "x$FIND" = x; then
8141        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8142$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8143        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8144$as_echo_n "checking for FIND... " >&6; }
8145        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8146$as_echo "disabled" >&6; }
8147      else
8148        # Check if the provided tool contains a complete path.
8149        tool_specified="$FIND"
8150        tool_basename="${tool_specified##*/}"
8151        if test "x$tool_basename" = "x$tool_specified"; then
8152          # A command without a complete path is provided, search $PATH.
8153          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8154$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8155          # Extract the first word of "$tool_basename", so it can be a program name with args.
8156set dummy $tool_basename; ac_word=$2
8157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8158$as_echo_n "checking for $ac_word... " >&6; }
8159if ${ac_cv_path_FIND+:} false; then :
8160  $as_echo_n "(cached) " >&6
8161else
8162  case $FIND in
8163  [\\/]* | ?:[\\/]*)
8164  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8165  ;;
8166  *)
8167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8168for as_dir in $PATH
8169do
8170  IFS=$as_save_IFS
8171  test -z "$as_dir" && as_dir=.
8172    for ac_exec_ext in '' $ac_executable_extensions; do
8173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8174    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8176    break 2
8177  fi
8178done
8179  done
8180IFS=$as_save_IFS
8181
8182  ;;
8183esac
8184fi
8185FIND=$ac_cv_path_FIND
8186if test -n "$FIND"; then
8187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8188$as_echo "$FIND" >&6; }
8189else
8190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8191$as_echo "no" >&6; }
8192fi
8193
8194
8195          if test "x$FIND" = x; then
8196            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8197          fi
8198        else
8199          # Otherwise we believe it is a complete path. Use it as it is.
8200          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8201$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8202          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8203$as_echo_n "checking for FIND... " >&6; }
8204          if test ! -x "$tool_specified"; then
8205            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8206$as_echo "not found" >&6; }
8207            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8208          fi
8209          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8210$as_echo "$tool_specified" >&6; }
8211        fi
8212      fi
8213    fi
8214
8215  fi
8216
8217
8218
8219  if test "x$FIND" = x; then
8220    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8221  fi
8222
8223
8224
8225
8226
8227  # Publish this variable in the help.
8228
8229
8230  if [ -z "${HEAD+x}" ]; then
8231    # The variable is not set by user, try to locate tool using the code snippet
8232    for ac_prog in head
8233do
8234  # Extract the first word of "$ac_prog", so it can be a program name with args.
8235set dummy $ac_prog; ac_word=$2
8236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8237$as_echo_n "checking for $ac_word... " >&6; }
8238if ${ac_cv_path_HEAD+:} false; then :
8239  $as_echo_n "(cached) " >&6
8240else
8241  case $HEAD in
8242  [\\/]* | ?:[\\/]*)
8243  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8244  ;;
8245  *)
8246  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8247for as_dir in $PATH
8248do
8249  IFS=$as_save_IFS
8250  test -z "$as_dir" && as_dir=.
8251    for ac_exec_ext in '' $ac_executable_extensions; do
8252  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8253    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8255    break 2
8256  fi
8257done
8258  done
8259IFS=$as_save_IFS
8260
8261  ;;
8262esac
8263fi
8264HEAD=$ac_cv_path_HEAD
8265if test -n "$HEAD"; then
8266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8267$as_echo "$HEAD" >&6; }
8268else
8269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8270$as_echo "no" >&6; }
8271fi
8272
8273
8274  test -n "$HEAD" && break
8275done
8276
8277  else
8278    # The variable is set, but is it from the command line or the environment?
8279
8280    # Try to remove the string !HEAD! from our list.
8281    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8282    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8283      # If it failed, the variable was not from the command line. Ignore it,
8284      # but warn the user (except for BASH, which is always set by the calling BASH).
8285      if test "xHEAD" != xBASH; then
8286        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8287$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8288      fi
8289      # Try to locate tool using the code snippet
8290      for ac_prog in head
8291do
8292  # Extract the first word of "$ac_prog", so it can be a program name with args.
8293set dummy $ac_prog; ac_word=$2
8294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8295$as_echo_n "checking for $ac_word... " >&6; }
8296if ${ac_cv_path_HEAD+:} false; then :
8297  $as_echo_n "(cached) " >&6
8298else
8299  case $HEAD in
8300  [\\/]* | ?:[\\/]*)
8301  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8302  ;;
8303  *)
8304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8305for as_dir in $PATH
8306do
8307  IFS=$as_save_IFS
8308  test -z "$as_dir" && as_dir=.
8309    for ac_exec_ext in '' $ac_executable_extensions; do
8310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8311    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8313    break 2
8314  fi
8315done
8316  done
8317IFS=$as_save_IFS
8318
8319  ;;
8320esac
8321fi
8322HEAD=$ac_cv_path_HEAD
8323if test -n "$HEAD"; then
8324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8325$as_echo "$HEAD" >&6; }
8326else
8327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8328$as_echo "no" >&6; }
8329fi
8330
8331
8332  test -n "$HEAD" && break
8333done
8334
8335    else
8336      # If it succeeded, then it was overridden by the user. We will use it
8337      # for the tool.
8338
8339      # First remove it from the list of overridden variables, so we can test
8340      # for unknown variables in the end.
8341      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8342
8343      # Check if we try to supply an empty value
8344      if test "x$HEAD" = x; then
8345        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8346$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8347        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8348$as_echo_n "checking for HEAD... " >&6; }
8349        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8350$as_echo "disabled" >&6; }
8351      else
8352        # Check if the provided tool contains a complete path.
8353        tool_specified="$HEAD"
8354        tool_basename="${tool_specified##*/}"
8355        if test "x$tool_basename" = "x$tool_specified"; then
8356          # A command without a complete path is provided, search $PATH.
8357          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8358$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8359          # Extract the first word of "$tool_basename", so it can be a program name with args.
8360set dummy $tool_basename; ac_word=$2
8361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8362$as_echo_n "checking for $ac_word... " >&6; }
8363if ${ac_cv_path_HEAD+:} false; then :
8364  $as_echo_n "(cached) " >&6
8365else
8366  case $HEAD in
8367  [\\/]* | ?:[\\/]*)
8368  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8369  ;;
8370  *)
8371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8372for as_dir in $PATH
8373do
8374  IFS=$as_save_IFS
8375  test -z "$as_dir" && as_dir=.
8376    for ac_exec_ext in '' $ac_executable_extensions; do
8377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8378    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8380    break 2
8381  fi
8382done
8383  done
8384IFS=$as_save_IFS
8385
8386  ;;
8387esac
8388fi
8389HEAD=$ac_cv_path_HEAD
8390if test -n "$HEAD"; then
8391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8392$as_echo "$HEAD" >&6; }
8393else
8394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8395$as_echo "no" >&6; }
8396fi
8397
8398
8399          if test "x$HEAD" = x; then
8400            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8401          fi
8402        else
8403          # Otherwise we believe it is a complete path. Use it as it is.
8404          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8405$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8406          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8407$as_echo_n "checking for HEAD... " >&6; }
8408          if test ! -x "$tool_specified"; then
8409            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8410$as_echo "not found" >&6; }
8411            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8412          fi
8413          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8414$as_echo "$tool_specified" >&6; }
8415        fi
8416      fi
8417    fi
8418
8419  fi
8420
8421
8422
8423  if test "x$HEAD" = x; then
8424    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8425  fi
8426
8427
8428
8429
8430
8431  # Publish this variable in the help.
8432
8433
8434  if [ -z "${GUNZIP+x}" ]; then
8435    # The variable is not set by user, try to locate tool using the code snippet
8436    for ac_prog in gunzip
8437do
8438  # Extract the first word of "$ac_prog", so it can be a program name with args.
8439set dummy $ac_prog; ac_word=$2
8440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8441$as_echo_n "checking for $ac_word... " >&6; }
8442if ${ac_cv_path_GUNZIP+:} false; then :
8443  $as_echo_n "(cached) " >&6
8444else
8445  case $GUNZIP in
8446  [\\/]* | ?:[\\/]*)
8447  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8448  ;;
8449  *)
8450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8451for as_dir in $PATH
8452do
8453  IFS=$as_save_IFS
8454  test -z "$as_dir" && as_dir=.
8455    for ac_exec_ext in '' $ac_executable_extensions; do
8456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8457    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8459    break 2
8460  fi
8461done
8462  done
8463IFS=$as_save_IFS
8464
8465  ;;
8466esac
8467fi
8468GUNZIP=$ac_cv_path_GUNZIP
8469if test -n "$GUNZIP"; then
8470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8471$as_echo "$GUNZIP" >&6; }
8472else
8473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8474$as_echo "no" >&6; }
8475fi
8476
8477
8478  test -n "$GUNZIP" && break
8479done
8480
8481  else
8482    # The variable is set, but is it from the command line or the environment?
8483
8484    # Try to remove the string !GUNZIP! from our list.
8485    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8486    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8487      # If it failed, the variable was not from the command line. Ignore it,
8488      # but warn the user (except for BASH, which is always set by the calling BASH).
8489      if test "xGUNZIP" != xBASH; then
8490        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8491$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8492      fi
8493      # Try to locate tool using the code snippet
8494      for ac_prog in gunzip
8495do
8496  # Extract the first word of "$ac_prog", so it can be a program name with args.
8497set dummy $ac_prog; ac_word=$2
8498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8499$as_echo_n "checking for $ac_word... " >&6; }
8500if ${ac_cv_path_GUNZIP+:} false; then :
8501  $as_echo_n "(cached) " >&6
8502else
8503  case $GUNZIP in
8504  [\\/]* | ?:[\\/]*)
8505  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8506  ;;
8507  *)
8508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8509for as_dir in $PATH
8510do
8511  IFS=$as_save_IFS
8512  test -z "$as_dir" && as_dir=.
8513    for ac_exec_ext in '' $ac_executable_extensions; do
8514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8515    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8517    break 2
8518  fi
8519done
8520  done
8521IFS=$as_save_IFS
8522
8523  ;;
8524esac
8525fi
8526GUNZIP=$ac_cv_path_GUNZIP
8527if test -n "$GUNZIP"; then
8528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8529$as_echo "$GUNZIP" >&6; }
8530else
8531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8532$as_echo "no" >&6; }
8533fi
8534
8535
8536  test -n "$GUNZIP" && break
8537done
8538
8539    else
8540      # If it succeeded, then it was overridden by the user. We will use it
8541      # for the tool.
8542
8543      # First remove it from the list of overridden variables, so we can test
8544      # for unknown variables in the end.
8545      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8546
8547      # Check if we try to supply an empty value
8548      if test "x$GUNZIP" = x; then
8549        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8550$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8551        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8552$as_echo_n "checking for GUNZIP... " >&6; }
8553        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8554$as_echo "disabled" >&6; }
8555      else
8556        # Check if the provided tool contains a complete path.
8557        tool_specified="$GUNZIP"
8558        tool_basename="${tool_specified##*/}"
8559        if test "x$tool_basename" = "x$tool_specified"; then
8560          # A command without a complete path is provided, search $PATH.
8561          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8562$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8563          # Extract the first word of "$tool_basename", so it can be a program name with args.
8564set dummy $tool_basename; ac_word=$2
8565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8566$as_echo_n "checking for $ac_word... " >&6; }
8567if ${ac_cv_path_GUNZIP+:} false; then :
8568  $as_echo_n "(cached) " >&6
8569else
8570  case $GUNZIP in
8571  [\\/]* | ?:[\\/]*)
8572  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8573  ;;
8574  *)
8575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8576for as_dir in $PATH
8577do
8578  IFS=$as_save_IFS
8579  test -z "$as_dir" && as_dir=.
8580    for ac_exec_ext in '' $ac_executable_extensions; do
8581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8582    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8584    break 2
8585  fi
8586done
8587  done
8588IFS=$as_save_IFS
8589
8590  ;;
8591esac
8592fi
8593GUNZIP=$ac_cv_path_GUNZIP
8594if test -n "$GUNZIP"; then
8595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8596$as_echo "$GUNZIP" >&6; }
8597else
8598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8599$as_echo "no" >&6; }
8600fi
8601
8602
8603          if test "x$GUNZIP" = x; then
8604            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8605          fi
8606        else
8607          # Otherwise we believe it is a complete path. Use it as it is.
8608          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8609$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8610          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8611$as_echo_n "checking for GUNZIP... " >&6; }
8612          if test ! -x "$tool_specified"; then
8613            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8614$as_echo "not found" >&6; }
8615            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8616          fi
8617          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8618$as_echo "$tool_specified" >&6; }
8619        fi
8620      fi
8621    fi
8622
8623  fi
8624
8625
8626
8627  if test "x$GUNZIP" = x; then
8628    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8629  fi
8630
8631
8632
8633
8634
8635  # Publish this variable in the help.
8636
8637
8638  if [ -z "${GZIP+x}" ]; then
8639    # The variable is not set by user, try to locate tool using the code snippet
8640    for ac_prog in pigz gzip
8641do
8642  # Extract the first word of "$ac_prog", so it can be a program name with args.
8643set dummy $ac_prog; ac_word=$2
8644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8645$as_echo_n "checking for $ac_word... " >&6; }
8646if ${ac_cv_path_GZIP+:} false; then :
8647  $as_echo_n "(cached) " >&6
8648else
8649  case $GZIP in
8650  [\\/]* | ?:[\\/]*)
8651  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8652  ;;
8653  *)
8654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8655for as_dir in $PATH
8656do
8657  IFS=$as_save_IFS
8658  test -z "$as_dir" && as_dir=.
8659    for ac_exec_ext in '' $ac_executable_extensions; do
8660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8661    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8663    break 2
8664  fi
8665done
8666  done
8667IFS=$as_save_IFS
8668
8669  ;;
8670esac
8671fi
8672GZIP=$ac_cv_path_GZIP
8673if test -n "$GZIP"; then
8674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8675$as_echo "$GZIP" >&6; }
8676else
8677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8678$as_echo "no" >&6; }
8679fi
8680
8681
8682  test -n "$GZIP" && break
8683done
8684
8685  else
8686    # The variable is set, but is it from the command line or the environment?
8687
8688    # Try to remove the string !GZIP! from our list.
8689    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8690    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8691      # If it failed, the variable was not from the command line. Ignore it,
8692      # but warn the user (except for BASH, which is always set by the calling BASH).
8693      if test "xGZIP" != xBASH; then
8694        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8695$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8696      fi
8697      # Try to locate tool using the code snippet
8698      for ac_prog in pigz gzip
8699do
8700  # Extract the first word of "$ac_prog", so it can be a program name with args.
8701set dummy $ac_prog; ac_word=$2
8702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8703$as_echo_n "checking for $ac_word... " >&6; }
8704if ${ac_cv_path_GZIP+:} false; then :
8705  $as_echo_n "(cached) " >&6
8706else
8707  case $GZIP in
8708  [\\/]* | ?:[\\/]*)
8709  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8710  ;;
8711  *)
8712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8713for as_dir in $PATH
8714do
8715  IFS=$as_save_IFS
8716  test -z "$as_dir" && as_dir=.
8717    for ac_exec_ext in '' $ac_executable_extensions; do
8718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8719    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8721    break 2
8722  fi
8723done
8724  done
8725IFS=$as_save_IFS
8726
8727  ;;
8728esac
8729fi
8730GZIP=$ac_cv_path_GZIP
8731if test -n "$GZIP"; then
8732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8733$as_echo "$GZIP" >&6; }
8734else
8735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8736$as_echo "no" >&6; }
8737fi
8738
8739
8740  test -n "$GZIP" && break
8741done
8742
8743    else
8744      # If it succeeded, then it was overridden by the user. We will use it
8745      # for the tool.
8746
8747      # First remove it from the list of overridden variables, so we can test
8748      # for unknown variables in the end.
8749      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8750
8751      # Check if we try to supply an empty value
8752      if test "x$GZIP" = x; then
8753        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8754$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8755        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8756$as_echo_n "checking for GZIP... " >&6; }
8757        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8758$as_echo "disabled" >&6; }
8759      else
8760        # Check if the provided tool contains a complete path.
8761        tool_specified="$GZIP"
8762        tool_basename="${tool_specified##*/}"
8763        if test "x$tool_basename" = "x$tool_specified"; then
8764          # A command without a complete path is provided, search $PATH.
8765          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8766$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8767          # Extract the first word of "$tool_basename", so it can be a program name with args.
8768set dummy $tool_basename; ac_word=$2
8769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8770$as_echo_n "checking for $ac_word... " >&6; }
8771if ${ac_cv_path_GZIP+:} false; then :
8772  $as_echo_n "(cached) " >&6
8773else
8774  case $GZIP in
8775  [\\/]* | ?:[\\/]*)
8776  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8777  ;;
8778  *)
8779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8780for as_dir in $PATH
8781do
8782  IFS=$as_save_IFS
8783  test -z "$as_dir" && as_dir=.
8784    for ac_exec_ext in '' $ac_executable_extensions; do
8785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8786    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8788    break 2
8789  fi
8790done
8791  done
8792IFS=$as_save_IFS
8793
8794  ;;
8795esac
8796fi
8797GZIP=$ac_cv_path_GZIP
8798if test -n "$GZIP"; then
8799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8800$as_echo "$GZIP" >&6; }
8801else
8802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8803$as_echo "no" >&6; }
8804fi
8805
8806
8807          if test "x$GZIP" = x; then
8808            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8809          fi
8810        else
8811          # Otherwise we believe it is a complete path. Use it as it is.
8812          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8813$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8814          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8815$as_echo_n "checking for GZIP... " >&6; }
8816          if test ! -x "$tool_specified"; then
8817            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8818$as_echo "not found" >&6; }
8819            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8820          fi
8821          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8822$as_echo "$tool_specified" >&6; }
8823        fi
8824      fi
8825    fi
8826
8827  fi
8828
8829
8830
8831  if test "x$GZIP" = x; then
8832    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8833  fi
8834
8835
8836
8837
8838
8839  # Publish this variable in the help.
8840
8841
8842  if [ -z "${LN+x}" ]; then
8843    # The variable is not set by user, try to locate tool using the code snippet
8844    for ac_prog in ln
8845do
8846  # Extract the first word of "$ac_prog", so it can be a program name with args.
8847set dummy $ac_prog; ac_word=$2
8848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8849$as_echo_n "checking for $ac_word... " >&6; }
8850if ${ac_cv_path_LN+:} false; then :
8851  $as_echo_n "(cached) " >&6
8852else
8853  case $LN in
8854  [\\/]* | ?:[\\/]*)
8855  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8856  ;;
8857  *)
8858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8859for as_dir in $PATH
8860do
8861  IFS=$as_save_IFS
8862  test -z "$as_dir" && as_dir=.
8863    for ac_exec_ext in '' $ac_executable_extensions; do
8864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8865    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8867    break 2
8868  fi
8869done
8870  done
8871IFS=$as_save_IFS
8872
8873  ;;
8874esac
8875fi
8876LN=$ac_cv_path_LN
8877if test -n "$LN"; then
8878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8879$as_echo "$LN" >&6; }
8880else
8881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8882$as_echo "no" >&6; }
8883fi
8884
8885
8886  test -n "$LN" && break
8887done
8888
8889  else
8890    # The variable is set, but is it from the command line or the environment?
8891
8892    # Try to remove the string !LN! from our list.
8893    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8894    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8895      # If it failed, the variable was not from the command line. Ignore it,
8896      # but warn the user (except for BASH, which is always set by the calling BASH).
8897      if test "xLN" != xBASH; then
8898        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8899$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8900      fi
8901      # Try to locate tool using the code snippet
8902      for ac_prog in ln
8903do
8904  # Extract the first word of "$ac_prog", so it can be a program name with args.
8905set dummy $ac_prog; ac_word=$2
8906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8907$as_echo_n "checking for $ac_word... " >&6; }
8908if ${ac_cv_path_LN+:} false; then :
8909  $as_echo_n "(cached) " >&6
8910else
8911  case $LN in
8912  [\\/]* | ?:[\\/]*)
8913  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8914  ;;
8915  *)
8916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8917for as_dir in $PATH
8918do
8919  IFS=$as_save_IFS
8920  test -z "$as_dir" && as_dir=.
8921    for ac_exec_ext in '' $ac_executable_extensions; do
8922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8923    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8925    break 2
8926  fi
8927done
8928  done
8929IFS=$as_save_IFS
8930
8931  ;;
8932esac
8933fi
8934LN=$ac_cv_path_LN
8935if test -n "$LN"; then
8936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8937$as_echo "$LN" >&6; }
8938else
8939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8940$as_echo "no" >&6; }
8941fi
8942
8943
8944  test -n "$LN" && break
8945done
8946
8947    else
8948      # If it succeeded, then it was overridden by the user. We will use it
8949      # for the tool.
8950
8951      # First remove it from the list of overridden variables, so we can test
8952      # for unknown variables in the end.
8953      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8954
8955      # Check if we try to supply an empty value
8956      if test "x$LN" = x; then
8957        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8958$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8959        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8960$as_echo_n "checking for LN... " >&6; }
8961        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8962$as_echo "disabled" >&6; }
8963      else
8964        # Check if the provided tool contains a complete path.
8965        tool_specified="$LN"
8966        tool_basename="${tool_specified##*/}"
8967        if test "x$tool_basename" = "x$tool_specified"; then
8968          # A command without a complete path is provided, search $PATH.
8969          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8970$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8971          # Extract the first word of "$tool_basename", so it can be a program name with args.
8972set dummy $tool_basename; ac_word=$2
8973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8974$as_echo_n "checking for $ac_word... " >&6; }
8975if ${ac_cv_path_LN+:} false; then :
8976  $as_echo_n "(cached) " >&6
8977else
8978  case $LN in
8979  [\\/]* | ?:[\\/]*)
8980  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8981  ;;
8982  *)
8983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8984for as_dir in $PATH
8985do
8986  IFS=$as_save_IFS
8987  test -z "$as_dir" && as_dir=.
8988    for ac_exec_ext in '' $ac_executable_extensions; do
8989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8990    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8992    break 2
8993  fi
8994done
8995  done
8996IFS=$as_save_IFS
8997
8998  ;;
8999esac
9000fi
9001LN=$ac_cv_path_LN
9002if test -n "$LN"; then
9003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9004$as_echo "$LN" >&6; }
9005else
9006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9007$as_echo "no" >&6; }
9008fi
9009
9010
9011          if test "x$LN" = x; then
9012            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9013          fi
9014        else
9015          # Otherwise we believe it is a complete path. Use it as it is.
9016          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9017$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9018          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9019$as_echo_n "checking for LN... " >&6; }
9020          if test ! -x "$tool_specified"; then
9021            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9022$as_echo "not found" >&6; }
9023            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9024          fi
9025          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9026$as_echo "$tool_specified" >&6; }
9027        fi
9028      fi
9029    fi
9030
9031  fi
9032
9033
9034
9035  if test "x$LN" = x; then
9036    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9037  fi
9038
9039
9040
9041
9042
9043  # Publish this variable in the help.
9044
9045
9046  if [ -z "${LS+x}" ]; then
9047    # The variable is not set by user, try to locate tool using the code snippet
9048    for ac_prog in ls
9049do
9050  # Extract the first word of "$ac_prog", so it can be a program name with args.
9051set dummy $ac_prog; ac_word=$2
9052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9053$as_echo_n "checking for $ac_word... " >&6; }
9054if ${ac_cv_path_LS+:} false; then :
9055  $as_echo_n "(cached) " >&6
9056else
9057  case $LS in
9058  [\\/]* | ?:[\\/]*)
9059  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9060  ;;
9061  *)
9062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9063for as_dir in $PATH
9064do
9065  IFS=$as_save_IFS
9066  test -z "$as_dir" && as_dir=.
9067    for ac_exec_ext in '' $ac_executable_extensions; do
9068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9069    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9071    break 2
9072  fi
9073done
9074  done
9075IFS=$as_save_IFS
9076
9077  ;;
9078esac
9079fi
9080LS=$ac_cv_path_LS
9081if test -n "$LS"; then
9082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9083$as_echo "$LS" >&6; }
9084else
9085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9086$as_echo "no" >&6; }
9087fi
9088
9089
9090  test -n "$LS" && break
9091done
9092
9093  else
9094    # The variable is set, but is it from the command line or the environment?
9095
9096    # Try to remove the string !LS! from our list.
9097    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9098    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9099      # If it failed, the variable was not from the command line. Ignore it,
9100      # but warn the user (except for BASH, which is always set by the calling BASH).
9101      if test "xLS" != xBASH; then
9102        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9103$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9104      fi
9105      # Try to locate tool using the code snippet
9106      for ac_prog in ls
9107do
9108  # Extract the first word of "$ac_prog", so it can be a program name with args.
9109set dummy $ac_prog; ac_word=$2
9110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9111$as_echo_n "checking for $ac_word... " >&6; }
9112if ${ac_cv_path_LS+:} false; then :
9113  $as_echo_n "(cached) " >&6
9114else
9115  case $LS in
9116  [\\/]* | ?:[\\/]*)
9117  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9118  ;;
9119  *)
9120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9121for as_dir in $PATH
9122do
9123  IFS=$as_save_IFS
9124  test -z "$as_dir" && as_dir=.
9125    for ac_exec_ext in '' $ac_executable_extensions; do
9126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9127    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9129    break 2
9130  fi
9131done
9132  done
9133IFS=$as_save_IFS
9134
9135  ;;
9136esac
9137fi
9138LS=$ac_cv_path_LS
9139if test -n "$LS"; then
9140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9141$as_echo "$LS" >&6; }
9142else
9143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9144$as_echo "no" >&6; }
9145fi
9146
9147
9148  test -n "$LS" && break
9149done
9150
9151    else
9152      # If it succeeded, then it was overridden by the user. We will use it
9153      # for the tool.
9154
9155      # First remove it from the list of overridden variables, so we can test
9156      # for unknown variables in the end.
9157      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9158
9159      # Check if we try to supply an empty value
9160      if test "x$LS" = x; then
9161        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9162$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9163        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9164$as_echo_n "checking for LS... " >&6; }
9165        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9166$as_echo "disabled" >&6; }
9167      else
9168        # Check if the provided tool contains a complete path.
9169        tool_specified="$LS"
9170        tool_basename="${tool_specified##*/}"
9171        if test "x$tool_basename" = "x$tool_specified"; then
9172          # A command without a complete path is provided, search $PATH.
9173          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9174$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9175          # Extract the first word of "$tool_basename", so it can be a program name with args.
9176set dummy $tool_basename; ac_word=$2
9177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9178$as_echo_n "checking for $ac_word... " >&6; }
9179if ${ac_cv_path_LS+:} false; then :
9180  $as_echo_n "(cached) " >&6
9181else
9182  case $LS in
9183  [\\/]* | ?:[\\/]*)
9184  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9185  ;;
9186  *)
9187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9188for as_dir in $PATH
9189do
9190  IFS=$as_save_IFS
9191  test -z "$as_dir" && as_dir=.
9192    for ac_exec_ext in '' $ac_executable_extensions; do
9193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9194    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9196    break 2
9197  fi
9198done
9199  done
9200IFS=$as_save_IFS
9201
9202  ;;
9203esac
9204fi
9205LS=$ac_cv_path_LS
9206if test -n "$LS"; then
9207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9208$as_echo "$LS" >&6; }
9209else
9210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9211$as_echo "no" >&6; }
9212fi
9213
9214
9215          if test "x$LS" = x; then
9216            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9217          fi
9218        else
9219          # Otherwise we believe it is a complete path. Use it as it is.
9220          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9221$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9222          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9223$as_echo_n "checking for LS... " >&6; }
9224          if test ! -x "$tool_specified"; then
9225            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9226$as_echo "not found" >&6; }
9227            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9228          fi
9229          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9230$as_echo "$tool_specified" >&6; }
9231        fi
9232      fi
9233    fi
9234
9235  fi
9236
9237
9238
9239  if test "x$LS" = x; then
9240    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9241  fi
9242
9243
9244
9245
9246
9247  # Publish this variable in the help.
9248
9249
9250  if [ -z "${MKDIR+x}" ]; then
9251    # The variable is not set by user, try to locate tool using the code snippet
9252    for ac_prog in mkdir
9253do
9254  # Extract the first word of "$ac_prog", so it can be a program name with args.
9255set dummy $ac_prog; ac_word=$2
9256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9257$as_echo_n "checking for $ac_word... " >&6; }
9258if ${ac_cv_path_MKDIR+:} false; then :
9259  $as_echo_n "(cached) " >&6
9260else
9261  case $MKDIR in
9262  [\\/]* | ?:[\\/]*)
9263  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9264  ;;
9265  *)
9266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9267for as_dir in $PATH
9268do
9269  IFS=$as_save_IFS
9270  test -z "$as_dir" && as_dir=.
9271    for ac_exec_ext in '' $ac_executable_extensions; do
9272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9273    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9275    break 2
9276  fi
9277done
9278  done
9279IFS=$as_save_IFS
9280
9281  ;;
9282esac
9283fi
9284MKDIR=$ac_cv_path_MKDIR
9285if test -n "$MKDIR"; then
9286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9287$as_echo "$MKDIR" >&6; }
9288else
9289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9290$as_echo "no" >&6; }
9291fi
9292
9293
9294  test -n "$MKDIR" && break
9295done
9296
9297  else
9298    # The variable is set, but is it from the command line or the environment?
9299
9300    # Try to remove the string !MKDIR! from our list.
9301    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9302    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9303      # If it failed, the variable was not from the command line. Ignore it,
9304      # but warn the user (except for BASH, which is always set by the calling BASH).
9305      if test "xMKDIR" != xBASH; then
9306        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9307$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9308      fi
9309      # Try to locate tool using the code snippet
9310      for ac_prog in mkdir
9311do
9312  # Extract the first word of "$ac_prog", so it can be a program name with args.
9313set dummy $ac_prog; ac_word=$2
9314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9315$as_echo_n "checking for $ac_word... " >&6; }
9316if ${ac_cv_path_MKDIR+:} false; then :
9317  $as_echo_n "(cached) " >&6
9318else
9319  case $MKDIR in
9320  [\\/]* | ?:[\\/]*)
9321  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9322  ;;
9323  *)
9324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9325for as_dir in $PATH
9326do
9327  IFS=$as_save_IFS
9328  test -z "$as_dir" && as_dir=.
9329    for ac_exec_ext in '' $ac_executable_extensions; do
9330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9331    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9333    break 2
9334  fi
9335done
9336  done
9337IFS=$as_save_IFS
9338
9339  ;;
9340esac
9341fi
9342MKDIR=$ac_cv_path_MKDIR
9343if test -n "$MKDIR"; then
9344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9345$as_echo "$MKDIR" >&6; }
9346else
9347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9348$as_echo "no" >&6; }
9349fi
9350
9351
9352  test -n "$MKDIR" && break
9353done
9354
9355    else
9356      # If it succeeded, then it was overridden by the user. We will use it
9357      # for the tool.
9358
9359      # First remove it from the list of overridden variables, so we can test
9360      # for unknown variables in the end.
9361      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9362
9363      # Check if we try to supply an empty value
9364      if test "x$MKDIR" = x; then
9365        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9366$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9367        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9368$as_echo_n "checking for MKDIR... " >&6; }
9369        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9370$as_echo "disabled" >&6; }
9371      else
9372        # Check if the provided tool contains a complete path.
9373        tool_specified="$MKDIR"
9374        tool_basename="${tool_specified##*/}"
9375        if test "x$tool_basename" = "x$tool_specified"; then
9376          # A command without a complete path is provided, search $PATH.
9377          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9378$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9379          # Extract the first word of "$tool_basename", so it can be a program name with args.
9380set dummy $tool_basename; ac_word=$2
9381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9382$as_echo_n "checking for $ac_word... " >&6; }
9383if ${ac_cv_path_MKDIR+:} false; then :
9384  $as_echo_n "(cached) " >&6
9385else
9386  case $MKDIR in
9387  [\\/]* | ?:[\\/]*)
9388  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9389  ;;
9390  *)
9391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9392for as_dir in $PATH
9393do
9394  IFS=$as_save_IFS
9395  test -z "$as_dir" && as_dir=.
9396    for ac_exec_ext in '' $ac_executable_extensions; do
9397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9398    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9400    break 2
9401  fi
9402done
9403  done
9404IFS=$as_save_IFS
9405
9406  ;;
9407esac
9408fi
9409MKDIR=$ac_cv_path_MKDIR
9410if test -n "$MKDIR"; then
9411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9412$as_echo "$MKDIR" >&6; }
9413else
9414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9415$as_echo "no" >&6; }
9416fi
9417
9418
9419          if test "x$MKDIR" = x; then
9420            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9421          fi
9422        else
9423          # Otherwise we believe it is a complete path. Use it as it is.
9424          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9425$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9426          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9427$as_echo_n "checking for MKDIR... " >&6; }
9428          if test ! -x "$tool_specified"; then
9429            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9430$as_echo "not found" >&6; }
9431            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9432          fi
9433          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9434$as_echo "$tool_specified" >&6; }
9435        fi
9436      fi
9437    fi
9438
9439  fi
9440
9441
9442
9443  if test "x$MKDIR" = x; then
9444    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9445  fi
9446
9447
9448
9449
9450
9451  # Publish this variable in the help.
9452
9453
9454  if [ -z "${MKTEMP+x}" ]; then
9455    # The variable is not set by user, try to locate tool using the code snippet
9456    for ac_prog in mktemp
9457do
9458  # Extract the first word of "$ac_prog", so it can be a program name with args.
9459set dummy $ac_prog; ac_word=$2
9460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9461$as_echo_n "checking for $ac_word... " >&6; }
9462if ${ac_cv_path_MKTEMP+:} false; then :
9463  $as_echo_n "(cached) " >&6
9464else
9465  case $MKTEMP in
9466  [\\/]* | ?:[\\/]*)
9467  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9468  ;;
9469  *)
9470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9471for as_dir in $PATH
9472do
9473  IFS=$as_save_IFS
9474  test -z "$as_dir" && as_dir=.
9475    for ac_exec_ext in '' $ac_executable_extensions; do
9476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9477    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9479    break 2
9480  fi
9481done
9482  done
9483IFS=$as_save_IFS
9484
9485  ;;
9486esac
9487fi
9488MKTEMP=$ac_cv_path_MKTEMP
9489if test -n "$MKTEMP"; then
9490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9491$as_echo "$MKTEMP" >&6; }
9492else
9493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9494$as_echo "no" >&6; }
9495fi
9496
9497
9498  test -n "$MKTEMP" && break
9499done
9500
9501  else
9502    # The variable is set, but is it from the command line or the environment?
9503
9504    # Try to remove the string !MKTEMP! from our list.
9505    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9506    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9507      # If it failed, the variable was not from the command line. Ignore it,
9508      # but warn the user (except for BASH, which is always set by the calling BASH).
9509      if test "xMKTEMP" != xBASH; then
9510        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9511$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9512      fi
9513      # Try to locate tool using the code snippet
9514      for ac_prog in mktemp
9515do
9516  # Extract the first word of "$ac_prog", so it can be a program name with args.
9517set dummy $ac_prog; ac_word=$2
9518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9519$as_echo_n "checking for $ac_word... " >&6; }
9520if ${ac_cv_path_MKTEMP+:} false; then :
9521  $as_echo_n "(cached) " >&6
9522else
9523  case $MKTEMP in
9524  [\\/]* | ?:[\\/]*)
9525  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9526  ;;
9527  *)
9528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9529for as_dir in $PATH
9530do
9531  IFS=$as_save_IFS
9532  test -z "$as_dir" && as_dir=.
9533    for ac_exec_ext in '' $ac_executable_extensions; do
9534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9535    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9537    break 2
9538  fi
9539done
9540  done
9541IFS=$as_save_IFS
9542
9543  ;;
9544esac
9545fi
9546MKTEMP=$ac_cv_path_MKTEMP
9547if test -n "$MKTEMP"; then
9548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9549$as_echo "$MKTEMP" >&6; }
9550else
9551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9552$as_echo "no" >&6; }
9553fi
9554
9555
9556  test -n "$MKTEMP" && break
9557done
9558
9559    else
9560      # If it succeeded, then it was overridden by the user. We will use it
9561      # for the tool.
9562
9563      # First remove it from the list of overridden variables, so we can test
9564      # for unknown variables in the end.
9565      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9566
9567      # Check if we try to supply an empty value
9568      if test "x$MKTEMP" = x; then
9569        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9570$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9571        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9572$as_echo_n "checking for MKTEMP... " >&6; }
9573        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9574$as_echo "disabled" >&6; }
9575      else
9576        # Check if the provided tool contains a complete path.
9577        tool_specified="$MKTEMP"
9578        tool_basename="${tool_specified##*/}"
9579        if test "x$tool_basename" = "x$tool_specified"; then
9580          # A command without a complete path is provided, search $PATH.
9581          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9582$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9583          # Extract the first word of "$tool_basename", so it can be a program name with args.
9584set dummy $tool_basename; ac_word=$2
9585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9586$as_echo_n "checking for $ac_word... " >&6; }
9587if ${ac_cv_path_MKTEMP+:} false; then :
9588  $as_echo_n "(cached) " >&6
9589else
9590  case $MKTEMP in
9591  [\\/]* | ?:[\\/]*)
9592  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9593  ;;
9594  *)
9595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9596for as_dir in $PATH
9597do
9598  IFS=$as_save_IFS
9599  test -z "$as_dir" && as_dir=.
9600    for ac_exec_ext in '' $ac_executable_extensions; do
9601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9602    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9604    break 2
9605  fi
9606done
9607  done
9608IFS=$as_save_IFS
9609
9610  ;;
9611esac
9612fi
9613MKTEMP=$ac_cv_path_MKTEMP
9614if test -n "$MKTEMP"; then
9615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9616$as_echo "$MKTEMP" >&6; }
9617else
9618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9619$as_echo "no" >&6; }
9620fi
9621
9622
9623          if test "x$MKTEMP" = x; then
9624            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9625          fi
9626        else
9627          # Otherwise we believe it is a complete path. Use it as it is.
9628          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9629$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9630          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9631$as_echo_n "checking for MKTEMP... " >&6; }
9632          if test ! -x "$tool_specified"; then
9633            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9634$as_echo "not found" >&6; }
9635            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9636          fi
9637          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9638$as_echo "$tool_specified" >&6; }
9639        fi
9640      fi
9641    fi
9642
9643  fi
9644
9645
9646
9647  if test "x$MKTEMP" = x; then
9648    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9649  fi
9650
9651
9652
9653
9654
9655  # Publish this variable in the help.
9656
9657
9658  if [ -z "${MV+x}" ]; then
9659    # The variable is not set by user, try to locate tool using the code snippet
9660    for ac_prog in mv
9661do
9662  # Extract the first word of "$ac_prog", so it can be a program name with args.
9663set dummy $ac_prog; ac_word=$2
9664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9665$as_echo_n "checking for $ac_word... " >&6; }
9666if ${ac_cv_path_MV+:} false; then :
9667  $as_echo_n "(cached) " >&6
9668else
9669  case $MV in
9670  [\\/]* | ?:[\\/]*)
9671  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9672  ;;
9673  *)
9674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9675for as_dir in $PATH
9676do
9677  IFS=$as_save_IFS
9678  test -z "$as_dir" && as_dir=.
9679    for ac_exec_ext in '' $ac_executable_extensions; do
9680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9681    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9683    break 2
9684  fi
9685done
9686  done
9687IFS=$as_save_IFS
9688
9689  ;;
9690esac
9691fi
9692MV=$ac_cv_path_MV
9693if test -n "$MV"; then
9694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9695$as_echo "$MV" >&6; }
9696else
9697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9698$as_echo "no" >&6; }
9699fi
9700
9701
9702  test -n "$MV" && break
9703done
9704
9705  else
9706    # The variable is set, but is it from the command line or the environment?
9707
9708    # Try to remove the string !MV! from our list.
9709    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9710    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9711      # If it failed, the variable was not from the command line. Ignore it,
9712      # but warn the user (except for BASH, which is always set by the calling BASH).
9713      if test "xMV" != xBASH; then
9714        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9715$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9716      fi
9717      # Try to locate tool using the code snippet
9718      for ac_prog in mv
9719do
9720  # Extract the first word of "$ac_prog", so it can be a program name with args.
9721set dummy $ac_prog; ac_word=$2
9722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9723$as_echo_n "checking for $ac_word... " >&6; }
9724if ${ac_cv_path_MV+:} false; then :
9725  $as_echo_n "(cached) " >&6
9726else
9727  case $MV in
9728  [\\/]* | ?:[\\/]*)
9729  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9730  ;;
9731  *)
9732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9733for as_dir in $PATH
9734do
9735  IFS=$as_save_IFS
9736  test -z "$as_dir" && as_dir=.
9737    for ac_exec_ext in '' $ac_executable_extensions; do
9738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9739    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9741    break 2
9742  fi
9743done
9744  done
9745IFS=$as_save_IFS
9746
9747  ;;
9748esac
9749fi
9750MV=$ac_cv_path_MV
9751if test -n "$MV"; then
9752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9753$as_echo "$MV" >&6; }
9754else
9755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9756$as_echo "no" >&6; }
9757fi
9758
9759
9760  test -n "$MV" && break
9761done
9762
9763    else
9764      # If it succeeded, then it was overridden by the user. We will use it
9765      # for the tool.
9766
9767      # First remove it from the list of overridden variables, so we can test
9768      # for unknown variables in the end.
9769      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9770
9771      # Check if we try to supply an empty value
9772      if test "x$MV" = x; then
9773        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9774$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9775        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9776$as_echo_n "checking for MV... " >&6; }
9777        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9778$as_echo "disabled" >&6; }
9779      else
9780        # Check if the provided tool contains a complete path.
9781        tool_specified="$MV"
9782        tool_basename="${tool_specified##*/}"
9783        if test "x$tool_basename" = "x$tool_specified"; then
9784          # A command without a complete path is provided, search $PATH.
9785          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9786$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9787          # Extract the first word of "$tool_basename", so it can be a program name with args.
9788set dummy $tool_basename; ac_word=$2
9789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9790$as_echo_n "checking for $ac_word... " >&6; }
9791if ${ac_cv_path_MV+:} false; then :
9792  $as_echo_n "(cached) " >&6
9793else
9794  case $MV in
9795  [\\/]* | ?:[\\/]*)
9796  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9797  ;;
9798  *)
9799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9800for as_dir in $PATH
9801do
9802  IFS=$as_save_IFS
9803  test -z "$as_dir" && as_dir=.
9804    for ac_exec_ext in '' $ac_executable_extensions; do
9805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9806    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9808    break 2
9809  fi
9810done
9811  done
9812IFS=$as_save_IFS
9813
9814  ;;
9815esac
9816fi
9817MV=$ac_cv_path_MV
9818if test -n "$MV"; then
9819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9820$as_echo "$MV" >&6; }
9821else
9822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9823$as_echo "no" >&6; }
9824fi
9825
9826
9827          if test "x$MV" = x; then
9828            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9829          fi
9830        else
9831          # Otherwise we believe it is a complete path. Use it as it is.
9832          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9833$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9834          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9835$as_echo_n "checking for MV... " >&6; }
9836          if test ! -x "$tool_specified"; then
9837            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9838$as_echo "not found" >&6; }
9839            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9840          fi
9841          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9842$as_echo "$tool_specified" >&6; }
9843        fi
9844      fi
9845    fi
9846
9847  fi
9848
9849
9850
9851  if test "x$MV" = x; then
9852    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9853  fi
9854
9855
9856
9857
9858
9859  # Publish this variable in the help.
9860
9861
9862  if [ -z "${NAWK+x}" ]; then
9863    # The variable is not set by user, try to locate tool using the code snippet
9864    for ac_prog in nawk gawk awk
9865do
9866  # Extract the first word of "$ac_prog", so it can be a program name with args.
9867set dummy $ac_prog; ac_word=$2
9868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9869$as_echo_n "checking for $ac_word... " >&6; }
9870if ${ac_cv_path_NAWK+:} false; then :
9871  $as_echo_n "(cached) " >&6
9872else
9873  case $NAWK in
9874  [\\/]* | ?:[\\/]*)
9875  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9876  ;;
9877  *)
9878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9879for as_dir in $PATH
9880do
9881  IFS=$as_save_IFS
9882  test -z "$as_dir" && as_dir=.
9883    for ac_exec_ext in '' $ac_executable_extensions; do
9884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9885    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9887    break 2
9888  fi
9889done
9890  done
9891IFS=$as_save_IFS
9892
9893  ;;
9894esac
9895fi
9896NAWK=$ac_cv_path_NAWK
9897if test -n "$NAWK"; then
9898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9899$as_echo "$NAWK" >&6; }
9900else
9901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9902$as_echo "no" >&6; }
9903fi
9904
9905
9906  test -n "$NAWK" && break
9907done
9908
9909  else
9910    # The variable is set, but is it from the command line or the environment?
9911
9912    # Try to remove the string !NAWK! from our list.
9913    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9914    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9915      # If it failed, the variable was not from the command line. Ignore it,
9916      # but warn the user (except for BASH, which is always set by the calling BASH).
9917      if test "xNAWK" != xBASH; then
9918        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9919$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9920      fi
9921      # Try to locate tool using the code snippet
9922      for ac_prog in nawk gawk awk
9923do
9924  # Extract the first word of "$ac_prog", so it can be a program name with args.
9925set dummy $ac_prog; ac_word=$2
9926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9927$as_echo_n "checking for $ac_word... " >&6; }
9928if ${ac_cv_path_NAWK+:} false; then :
9929  $as_echo_n "(cached) " >&6
9930else
9931  case $NAWK in
9932  [\\/]* | ?:[\\/]*)
9933  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9934  ;;
9935  *)
9936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9937for as_dir in $PATH
9938do
9939  IFS=$as_save_IFS
9940  test -z "$as_dir" && as_dir=.
9941    for ac_exec_ext in '' $ac_executable_extensions; do
9942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9943    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9945    break 2
9946  fi
9947done
9948  done
9949IFS=$as_save_IFS
9950
9951  ;;
9952esac
9953fi
9954NAWK=$ac_cv_path_NAWK
9955if test -n "$NAWK"; then
9956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9957$as_echo "$NAWK" >&6; }
9958else
9959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9960$as_echo "no" >&6; }
9961fi
9962
9963
9964  test -n "$NAWK" && break
9965done
9966
9967    else
9968      # If it succeeded, then it was overridden by the user. We will use it
9969      # for the tool.
9970
9971      # First remove it from the list of overridden variables, so we can test
9972      # for unknown variables in the end.
9973      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9974
9975      # Check if we try to supply an empty value
9976      if test "x$NAWK" = x; then
9977        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9978$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9979        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9980$as_echo_n "checking for NAWK... " >&6; }
9981        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9982$as_echo "disabled" >&6; }
9983      else
9984        # Check if the provided tool contains a complete path.
9985        tool_specified="$NAWK"
9986        tool_basename="${tool_specified##*/}"
9987        if test "x$tool_basename" = "x$tool_specified"; then
9988          # A command without a complete path is provided, search $PATH.
9989          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9990$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9991          # Extract the first word of "$tool_basename", so it can be a program name with args.
9992set dummy $tool_basename; ac_word=$2
9993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9994$as_echo_n "checking for $ac_word... " >&6; }
9995if ${ac_cv_path_NAWK+:} false; then :
9996  $as_echo_n "(cached) " >&6
9997else
9998  case $NAWK in
9999  [\\/]* | ?:[\\/]*)
10000  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10001  ;;
10002  *)
10003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10004for as_dir in $PATH
10005do
10006  IFS=$as_save_IFS
10007  test -z "$as_dir" && as_dir=.
10008    for ac_exec_ext in '' $ac_executable_extensions; do
10009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10010    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10012    break 2
10013  fi
10014done
10015  done
10016IFS=$as_save_IFS
10017
10018  ;;
10019esac
10020fi
10021NAWK=$ac_cv_path_NAWK
10022if test -n "$NAWK"; then
10023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10024$as_echo "$NAWK" >&6; }
10025else
10026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10027$as_echo "no" >&6; }
10028fi
10029
10030
10031          if test "x$NAWK" = x; then
10032            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10033          fi
10034        else
10035          # Otherwise we believe it is a complete path. Use it as it is.
10036          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10037$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10038          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10039$as_echo_n "checking for NAWK... " >&6; }
10040          if test ! -x "$tool_specified"; then
10041            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10042$as_echo "not found" >&6; }
10043            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10044          fi
10045          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10046$as_echo "$tool_specified" >&6; }
10047        fi
10048      fi
10049    fi
10050
10051  fi
10052
10053
10054
10055  if test "x$NAWK" = x; then
10056    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10057  fi
10058
10059
10060
10061
10062
10063  # Publish this variable in the help.
10064
10065
10066  if [ -z "${PRINTF+x}" ]; then
10067    # The variable is not set by user, try to locate tool using the code snippet
10068    for ac_prog in printf
10069do
10070  # Extract the first word of "$ac_prog", so it can be a program name with args.
10071set dummy $ac_prog; ac_word=$2
10072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10073$as_echo_n "checking for $ac_word... " >&6; }
10074if ${ac_cv_path_PRINTF+:} false; then :
10075  $as_echo_n "(cached) " >&6
10076else
10077  case $PRINTF in
10078  [\\/]* | ?:[\\/]*)
10079  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10080  ;;
10081  *)
10082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10083for as_dir in $PATH
10084do
10085  IFS=$as_save_IFS
10086  test -z "$as_dir" && as_dir=.
10087    for ac_exec_ext in '' $ac_executable_extensions; do
10088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10089    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10091    break 2
10092  fi
10093done
10094  done
10095IFS=$as_save_IFS
10096
10097  ;;
10098esac
10099fi
10100PRINTF=$ac_cv_path_PRINTF
10101if test -n "$PRINTF"; then
10102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10103$as_echo "$PRINTF" >&6; }
10104else
10105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10106$as_echo "no" >&6; }
10107fi
10108
10109
10110  test -n "$PRINTF" && break
10111done
10112
10113  else
10114    # The variable is set, but is it from the command line or the environment?
10115
10116    # Try to remove the string !PRINTF! from our list.
10117    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10118    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10119      # If it failed, the variable was not from the command line. Ignore it,
10120      # but warn the user (except for BASH, which is always set by the calling BASH).
10121      if test "xPRINTF" != xBASH; then
10122        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10123$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10124      fi
10125      # Try to locate tool using the code snippet
10126      for ac_prog in printf
10127do
10128  # Extract the first word of "$ac_prog", so it can be a program name with args.
10129set dummy $ac_prog; ac_word=$2
10130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10131$as_echo_n "checking for $ac_word... " >&6; }
10132if ${ac_cv_path_PRINTF+:} false; then :
10133  $as_echo_n "(cached) " >&6
10134else
10135  case $PRINTF in
10136  [\\/]* | ?:[\\/]*)
10137  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10138  ;;
10139  *)
10140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10141for as_dir in $PATH
10142do
10143  IFS=$as_save_IFS
10144  test -z "$as_dir" && as_dir=.
10145    for ac_exec_ext in '' $ac_executable_extensions; do
10146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10147    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10149    break 2
10150  fi
10151done
10152  done
10153IFS=$as_save_IFS
10154
10155  ;;
10156esac
10157fi
10158PRINTF=$ac_cv_path_PRINTF
10159if test -n "$PRINTF"; then
10160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10161$as_echo "$PRINTF" >&6; }
10162else
10163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10164$as_echo "no" >&6; }
10165fi
10166
10167
10168  test -n "$PRINTF" && break
10169done
10170
10171    else
10172      # If it succeeded, then it was overridden by the user. We will use it
10173      # for the tool.
10174
10175      # First remove it from the list of overridden variables, so we can test
10176      # for unknown variables in the end.
10177      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10178
10179      # Check if we try to supply an empty value
10180      if test "x$PRINTF" = x; then
10181        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10182$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10183        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10184$as_echo_n "checking for PRINTF... " >&6; }
10185        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10186$as_echo "disabled" >&6; }
10187      else
10188        # Check if the provided tool contains a complete path.
10189        tool_specified="$PRINTF"
10190        tool_basename="${tool_specified##*/}"
10191        if test "x$tool_basename" = "x$tool_specified"; then
10192          # A command without a complete path is provided, search $PATH.
10193          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10194$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10195          # Extract the first word of "$tool_basename", so it can be a program name with args.
10196set dummy $tool_basename; ac_word=$2
10197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10198$as_echo_n "checking for $ac_word... " >&6; }
10199if ${ac_cv_path_PRINTF+:} false; then :
10200  $as_echo_n "(cached) " >&6
10201else
10202  case $PRINTF in
10203  [\\/]* | ?:[\\/]*)
10204  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10205  ;;
10206  *)
10207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10208for as_dir in $PATH
10209do
10210  IFS=$as_save_IFS
10211  test -z "$as_dir" && as_dir=.
10212    for ac_exec_ext in '' $ac_executable_extensions; do
10213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10214    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10216    break 2
10217  fi
10218done
10219  done
10220IFS=$as_save_IFS
10221
10222  ;;
10223esac
10224fi
10225PRINTF=$ac_cv_path_PRINTF
10226if test -n "$PRINTF"; then
10227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10228$as_echo "$PRINTF" >&6; }
10229else
10230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10231$as_echo "no" >&6; }
10232fi
10233
10234
10235          if test "x$PRINTF" = x; then
10236            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10237          fi
10238        else
10239          # Otherwise we believe it is a complete path. Use it as it is.
10240          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10241$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10242          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10243$as_echo_n "checking for PRINTF... " >&6; }
10244          if test ! -x "$tool_specified"; then
10245            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10246$as_echo "not found" >&6; }
10247            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10248          fi
10249          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10250$as_echo "$tool_specified" >&6; }
10251        fi
10252      fi
10253    fi
10254
10255  fi
10256
10257
10258
10259  if test "x$PRINTF" = x; then
10260    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10261  fi
10262
10263
10264
10265
10266
10267  # Publish this variable in the help.
10268
10269
10270  if [ -z "${RM+x}" ]; then
10271    # The variable is not set by user, try to locate tool using the code snippet
10272    for ac_prog in rm
10273do
10274  # Extract the first word of "$ac_prog", so it can be a program name with args.
10275set dummy $ac_prog; ac_word=$2
10276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10277$as_echo_n "checking for $ac_word... " >&6; }
10278if ${ac_cv_path_RM+:} false; then :
10279  $as_echo_n "(cached) " >&6
10280else
10281  case $RM in
10282  [\\/]* | ?:[\\/]*)
10283  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10284  ;;
10285  *)
10286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10287for as_dir in $PATH
10288do
10289  IFS=$as_save_IFS
10290  test -z "$as_dir" && as_dir=.
10291    for ac_exec_ext in '' $ac_executable_extensions; do
10292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10293    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10295    break 2
10296  fi
10297done
10298  done
10299IFS=$as_save_IFS
10300
10301  ;;
10302esac
10303fi
10304RM=$ac_cv_path_RM
10305if test -n "$RM"; then
10306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10307$as_echo "$RM" >&6; }
10308else
10309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10310$as_echo "no" >&6; }
10311fi
10312
10313
10314  test -n "$RM" && break
10315done
10316
10317  else
10318    # The variable is set, but is it from the command line or the environment?
10319
10320    # Try to remove the string !RM! from our list.
10321    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10322    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10323      # If it failed, the variable was not from the command line. Ignore it,
10324      # but warn the user (except for BASH, which is always set by the calling BASH).
10325      if test "xRM" != xBASH; then
10326        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10327$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10328      fi
10329      # Try to locate tool using the code snippet
10330      for ac_prog in rm
10331do
10332  # Extract the first word of "$ac_prog", so it can be a program name with args.
10333set dummy $ac_prog; ac_word=$2
10334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10335$as_echo_n "checking for $ac_word... " >&6; }
10336if ${ac_cv_path_RM+:} false; then :
10337  $as_echo_n "(cached) " >&6
10338else
10339  case $RM in
10340  [\\/]* | ?:[\\/]*)
10341  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10342  ;;
10343  *)
10344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10345for as_dir in $PATH
10346do
10347  IFS=$as_save_IFS
10348  test -z "$as_dir" && as_dir=.
10349    for ac_exec_ext in '' $ac_executable_extensions; do
10350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10351    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10353    break 2
10354  fi
10355done
10356  done
10357IFS=$as_save_IFS
10358
10359  ;;
10360esac
10361fi
10362RM=$ac_cv_path_RM
10363if test -n "$RM"; then
10364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10365$as_echo "$RM" >&6; }
10366else
10367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10368$as_echo "no" >&6; }
10369fi
10370
10371
10372  test -n "$RM" && break
10373done
10374
10375    else
10376      # If it succeeded, then it was overridden by the user. We will use it
10377      # for the tool.
10378
10379      # First remove it from the list of overridden variables, so we can test
10380      # for unknown variables in the end.
10381      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10382
10383      # Check if we try to supply an empty value
10384      if test "x$RM" = x; then
10385        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10386$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10387        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10388$as_echo_n "checking for RM... " >&6; }
10389        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10390$as_echo "disabled" >&6; }
10391      else
10392        # Check if the provided tool contains a complete path.
10393        tool_specified="$RM"
10394        tool_basename="${tool_specified##*/}"
10395        if test "x$tool_basename" = "x$tool_specified"; then
10396          # A command without a complete path is provided, search $PATH.
10397          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10398$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10399          # Extract the first word of "$tool_basename", so it can be a program name with args.
10400set dummy $tool_basename; ac_word=$2
10401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10402$as_echo_n "checking for $ac_word... " >&6; }
10403if ${ac_cv_path_RM+:} false; then :
10404  $as_echo_n "(cached) " >&6
10405else
10406  case $RM in
10407  [\\/]* | ?:[\\/]*)
10408  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10409  ;;
10410  *)
10411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10412for as_dir in $PATH
10413do
10414  IFS=$as_save_IFS
10415  test -z "$as_dir" && as_dir=.
10416    for ac_exec_ext in '' $ac_executable_extensions; do
10417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10418    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10420    break 2
10421  fi
10422done
10423  done
10424IFS=$as_save_IFS
10425
10426  ;;
10427esac
10428fi
10429RM=$ac_cv_path_RM
10430if test -n "$RM"; then
10431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10432$as_echo "$RM" >&6; }
10433else
10434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10435$as_echo "no" >&6; }
10436fi
10437
10438
10439          if test "x$RM" = x; then
10440            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10441          fi
10442        else
10443          # Otherwise we believe it is a complete path. Use it as it is.
10444          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10445$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10446          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10447$as_echo_n "checking for RM... " >&6; }
10448          if test ! -x "$tool_specified"; then
10449            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10450$as_echo "not found" >&6; }
10451            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10452          fi
10453          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10454$as_echo "$tool_specified" >&6; }
10455        fi
10456      fi
10457    fi
10458
10459  fi
10460
10461
10462
10463  if test "x$RM" = x; then
10464    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10465  fi
10466
10467
10468
10469
10470
10471  # Publish this variable in the help.
10472
10473
10474  if [ -z "${RMDIR+x}" ]; then
10475    # The variable is not set by user, try to locate tool using the code snippet
10476    for ac_prog in rmdir
10477do
10478  # Extract the first word of "$ac_prog", so it can be a program name with args.
10479set dummy $ac_prog; ac_word=$2
10480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10481$as_echo_n "checking for $ac_word... " >&6; }
10482if ${ac_cv_path_RMDIR+:} false; then :
10483  $as_echo_n "(cached) " >&6
10484else
10485  case $RMDIR in
10486  [\\/]* | ?:[\\/]*)
10487  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10488  ;;
10489  *)
10490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10491for as_dir in $PATH
10492do
10493  IFS=$as_save_IFS
10494  test -z "$as_dir" && as_dir=.
10495    for ac_exec_ext in '' $ac_executable_extensions; do
10496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10497    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10499    break 2
10500  fi
10501done
10502  done
10503IFS=$as_save_IFS
10504
10505  ;;
10506esac
10507fi
10508RMDIR=$ac_cv_path_RMDIR
10509if test -n "$RMDIR"; then
10510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10511$as_echo "$RMDIR" >&6; }
10512else
10513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10514$as_echo "no" >&6; }
10515fi
10516
10517
10518  test -n "$RMDIR" && break
10519done
10520
10521  else
10522    # The variable is set, but is it from the command line or the environment?
10523
10524    # Try to remove the string !RMDIR! from our list.
10525    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10526    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10527      # If it failed, the variable was not from the command line. Ignore it,
10528      # but warn the user (except for BASH, which is always set by the calling BASH).
10529      if test "xRMDIR" != xBASH; then
10530        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10531$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10532      fi
10533      # Try to locate tool using the code snippet
10534      for ac_prog in rmdir
10535do
10536  # Extract the first word of "$ac_prog", so it can be a program name with args.
10537set dummy $ac_prog; ac_word=$2
10538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10539$as_echo_n "checking for $ac_word... " >&6; }
10540if ${ac_cv_path_RMDIR+:} false; then :
10541  $as_echo_n "(cached) " >&6
10542else
10543  case $RMDIR in
10544  [\\/]* | ?:[\\/]*)
10545  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10546  ;;
10547  *)
10548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10549for as_dir in $PATH
10550do
10551  IFS=$as_save_IFS
10552  test -z "$as_dir" && as_dir=.
10553    for ac_exec_ext in '' $ac_executable_extensions; do
10554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10555    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10557    break 2
10558  fi
10559done
10560  done
10561IFS=$as_save_IFS
10562
10563  ;;
10564esac
10565fi
10566RMDIR=$ac_cv_path_RMDIR
10567if test -n "$RMDIR"; then
10568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10569$as_echo "$RMDIR" >&6; }
10570else
10571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10572$as_echo "no" >&6; }
10573fi
10574
10575
10576  test -n "$RMDIR" && break
10577done
10578
10579    else
10580      # If it succeeded, then it was overridden by the user. We will use it
10581      # for the tool.
10582
10583      # First remove it from the list of overridden variables, so we can test
10584      # for unknown variables in the end.
10585      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10586
10587      # Check if we try to supply an empty value
10588      if test "x$RMDIR" = x; then
10589        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10590$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10591        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10592$as_echo_n "checking for RMDIR... " >&6; }
10593        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10594$as_echo "disabled" >&6; }
10595      else
10596        # Check if the provided tool contains a complete path.
10597        tool_specified="$RMDIR"
10598        tool_basename="${tool_specified##*/}"
10599        if test "x$tool_basename" = "x$tool_specified"; then
10600          # A command without a complete path is provided, search $PATH.
10601          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10602$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10603          # Extract the first word of "$tool_basename", so it can be a program name with args.
10604set dummy $tool_basename; ac_word=$2
10605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10606$as_echo_n "checking for $ac_word... " >&6; }
10607if ${ac_cv_path_RMDIR+:} false; then :
10608  $as_echo_n "(cached) " >&6
10609else
10610  case $RMDIR in
10611  [\\/]* | ?:[\\/]*)
10612  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10613  ;;
10614  *)
10615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10616for as_dir in $PATH
10617do
10618  IFS=$as_save_IFS
10619  test -z "$as_dir" && as_dir=.
10620    for ac_exec_ext in '' $ac_executable_extensions; do
10621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10622    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10624    break 2
10625  fi
10626done
10627  done
10628IFS=$as_save_IFS
10629
10630  ;;
10631esac
10632fi
10633RMDIR=$ac_cv_path_RMDIR
10634if test -n "$RMDIR"; then
10635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10636$as_echo "$RMDIR" >&6; }
10637else
10638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10639$as_echo "no" >&6; }
10640fi
10641
10642
10643          if test "x$RMDIR" = x; then
10644            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10645          fi
10646        else
10647          # Otherwise we believe it is a complete path. Use it as it is.
10648          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10649$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10650          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10651$as_echo_n "checking for RMDIR... " >&6; }
10652          if test ! -x "$tool_specified"; then
10653            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10654$as_echo "not found" >&6; }
10655            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10656          fi
10657          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10658$as_echo "$tool_specified" >&6; }
10659        fi
10660      fi
10661    fi
10662
10663  fi
10664
10665
10666
10667  if test "x$RMDIR" = x; then
10668    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10669  fi
10670
10671
10672
10673
10674
10675  # Publish this variable in the help.
10676
10677
10678  if [ -z "${SH+x}" ]; then
10679    # The variable is not set by user, try to locate tool using the code snippet
10680    for ac_prog in sh
10681do
10682  # Extract the first word of "$ac_prog", so it can be a program name with args.
10683set dummy $ac_prog; ac_word=$2
10684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10685$as_echo_n "checking for $ac_word... " >&6; }
10686if ${ac_cv_path_SH+:} false; then :
10687  $as_echo_n "(cached) " >&6
10688else
10689  case $SH in
10690  [\\/]* | ?:[\\/]*)
10691  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10692  ;;
10693  *)
10694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10695for as_dir in $PATH
10696do
10697  IFS=$as_save_IFS
10698  test -z "$as_dir" && as_dir=.
10699    for ac_exec_ext in '' $ac_executable_extensions; do
10700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10701    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10703    break 2
10704  fi
10705done
10706  done
10707IFS=$as_save_IFS
10708
10709  ;;
10710esac
10711fi
10712SH=$ac_cv_path_SH
10713if test -n "$SH"; then
10714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10715$as_echo "$SH" >&6; }
10716else
10717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10718$as_echo "no" >&6; }
10719fi
10720
10721
10722  test -n "$SH" && break
10723done
10724
10725  else
10726    # The variable is set, but is it from the command line or the environment?
10727
10728    # Try to remove the string !SH! from our list.
10729    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10730    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10731      # If it failed, the variable was not from the command line. Ignore it,
10732      # but warn the user (except for BASH, which is always set by the calling BASH).
10733      if test "xSH" != xBASH; then
10734        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10735$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10736      fi
10737      # Try to locate tool using the code snippet
10738      for ac_prog in sh
10739do
10740  # Extract the first word of "$ac_prog", so it can be a program name with args.
10741set dummy $ac_prog; ac_word=$2
10742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10743$as_echo_n "checking for $ac_word... " >&6; }
10744if ${ac_cv_path_SH+:} false; then :
10745  $as_echo_n "(cached) " >&6
10746else
10747  case $SH in
10748  [\\/]* | ?:[\\/]*)
10749  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10750  ;;
10751  *)
10752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10753for as_dir in $PATH
10754do
10755  IFS=$as_save_IFS
10756  test -z "$as_dir" && as_dir=.
10757    for ac_exec_ext in '' $ac_executable_extensions; do
10758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10759    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10761    break 2
10762  fi
10763done
10764  done
10765IFS=$as_save_IFS
10766
10767  ;;
10768esac
10769fi
10770SH=$ac_cv_path_SH
10771if test -n "$SH"; then
10772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10773$as_echo "$SH" >&6; }
10774else
10775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10776$as_echo "no" >&6; }
10777fi
10778
10779
10780  test -n "$SH" && break
10781done
10782
10783    else
10784      # If it succeeded, then it was overridden by the user. We will use it
10785      # for the tool.
10786
10787      # First remove it from the list of overridden variables, so we can test
10788      # for unknown variables in the end.
10789      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10790
10791      # Check if we try to supply an empty value
10792      if test "x$SH" = x; then
10793        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10794$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10795        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10796$as_echo_n "checking for SH... " >&6; }
10797        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10798$as_echo "disabled" >&6; }
10799      else
10800        # Check if the provided tool contains a complete path.
10801        tool_specified="$SH"
10802        tool_basename="${tool_specified##*/}"
10803        if test "x$tool_basename" = "x$tool_specified"; then
10804          # A command without a complete path is provided, search $PATH.
10805          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10806$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10807          # Extract the first word of "$tool_basename", so it can be a program name with args.
10808set dummy $tool_basename; ac_word=$2
10809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10810$as_echo_n "checking for $ac_word... " >&6; }
10811if ${ac_cv_path_SH+:} false; then :
10812  $as_echo_n "(cached) " >&6
10813else
10814  case $SH in
10815  [\\/]* | ?:[\\/]*)
10816  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10817  ;;
10818  *)
10819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10820for as_dir in $PATH
10821do
10822  IFS=$as_save_IFS
10823  test -z "$as_dir" && as_dir=.
10824    for ac_exec_ext in '' $ac_executable_extensions; do
10825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10826    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10828    break 2
10829  fi
10830done
10831  done
10832IFS=$as_save_IFS
10833
10834  ;;
10835esac
10836fi
10837SH=$ac_cv_path_SH
10838if test -n "$SH"; then
10839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10840$as_echo "$SH" >&6; }
10841else
10842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10843$as_echo "no" >&6; }
10844fi
10845
10846
10847          if test "x$SH" = x; then
10848            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10849          fi
10850        else
10851          # Otherwise we believe it is a complete path. Use it as it is.
10852          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10853$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10854          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10855$as_echo_n "checking for SH... " >&6; }
10856          if test ! -x "$tool_specified"; then
10857            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10858$as_echo "not found" >&6; }
10859            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10860          fi
10861          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10862$as_echo "$tool_specified" >&6; }
10863        fi
10864      fi
10865    fi
10866
10867  fi
10868
10869
10870
10871  if test "x$SH" = x; then
10872    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10873  fi
10874
10875
10876
10877
10878
10879  # Publish this variable in the help.
10880
10881
10882  if [ -z "${SORT+x}" ]; then
10883    # The variable is not set by user, try to locate tool using the code snippet
10884    for ac_prog in sort
10885do
10886  # Extract the first word of "$ac_prog", so it can be a program name with args.
10887set dummy $ac_prog; ac_word=$2
10888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10889$as_echo_n "checking for $ac_word... " >&6; }
10890if ${ac_cv_path_SORT+:} false; then :
10891  $as_echo_n "(cached) " >&6
10892else
10893  case $SORT in
10894  [\\/]* | ?:[\\/]*)
10895  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10896  ;;
10897  *)
10898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10899for as_dir in $PATH
10900do
10901  IFS=$as_save_IFS
10902  test -z "$as_dir" && as_dir=.
10903    for ac_exec_ext in '' $ac_executable_extensions; do
10904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10905    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10907    break 2
10908  fi
10909done
10910  done
10911IFS=$as_save_IFS
10912
10913  ;;
10914esac
10915fi
10916SORT=$ac_cv_path_SORT
10917if test -n "$SORT"; then
10918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10919$as_echo "$SORT" >&6; }
10920else
10921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10922$as_echo "no" >&6; }
10923fi
10924
10925
10926  test -n "$SORT" && break
10927done
10928
10929  else
10930    # The variable is set, but is it from the command line or the environment?
10931
10932    # Try to remove the string !SORT! from our list.
10933    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10934    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10935      # If it failed, the variable was not from the command line. Ignore it,
10936      # but warn the user (except for BASH, which is always set by the calling BASH).
10937      if test "xSORT" != xBASH; then
10938        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10939$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10940      fi
10941      # Try to locate tool using the code snippet
10942      for ac_prog in sort
10943do
10944  # Extract the first word of "$ac_prog", so it can be a program name with args.
10945set dummy $ac_prog; ac_word=$2
10946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10947$as_echo_n "checking for $ac_word... " >&6; }
10948if ${ac_cv_path_SORT+:} false; then :
10949  $as_echo_n "(cached) " >&6
10950else
10951  case $SORT in
10952  [\\/]* | ?:[\\/]*)
10953  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10954  ;;
10955  *)
10956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10957for as_dir in $PATH
10958do
10959  IFS=$as_save_IFS
10960  test -z "$as_dir" && as_dir=.
10961    for ac_exec_ext in '' $ac_executable_extensions; do
10962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10963    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10965    break 2
10966  fi
10967done
10968  done
10969IFS=$as_save_IFS
10970
10971  ;;
10972esac
10973fi
10974SORT=$ac_cv_path_SORT
10975if test -n "$SORT"; then
10976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10977$as_echo "$SORT" >&6; }
10978else
10979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10980$as_echo "no" >&6; }
10981fi
10982
10983
10984  test -n "$SORT" && break
10985done
10986
10987    else
10988      # If it succeeded, then it was overridden by the user. We will use it
10989      # for the tool.
10990
10991      # First remove it from the list of overridden variables, so we can test
10992      # for unknown variables in the end.
10993      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10994
10995      # Check if we try to supply an empty value
10996      if test "x$SORT" = x; then
10997        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10998$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10999        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11000$as_echo_n "checking for SORT... " >&6; }
11001        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11002$as_echo "disabled" >&6; }
11003      else
11004        # Check if the provided tool contains a complete path.
11005        tool_specified="$SORT"
11006        tool_basename="${tool_specified##*/}"
11007        if test "x$tool_basename" = "x$tool_specified"; then
11008          # A command without a complete path is provided, search $PATH.
11009          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11010$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11011          # Extract the first word of "$tool_basename", so it can be a program name with args.
11012set dummy $tool_basename; ac_word=$2
11013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11014$as_echo_n "checking for $ac_word... " >&6; }
11015if ${ac_cv_path_SORT+:} false; then :
11016  $as_echo_n "(cached) " >&6
11017else
11018  case $SORT in
11019  [\\/]* | ?:[\\/]*)
11020  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11021  ;;
11022  *)
11023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11024for as_dir in $PATH
11025do
11026  IFS=$as_save_IFS
11027  test -z "$as_dir" && as_dir=.
11028    for ac_exec_ext in '' $ac_executable_extensions; do
11029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11030    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11032    break 2
11033  fi
11034done
11035  done
11036IFS=$as_save_IFS
11037
11038  ;;
11039esac
11040fi
11041SORT=$ac_cv_path_SORT
11042if test -n "$SORT"; then
11043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11044$as_echo "$SORT" >&6; }
11045else
11046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11047$as_echo "no" >&6; }
11048fi
11049
11050
11051          if test "x$SORT" = x; then
11052            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11053          fi
11054        else
11055          # Otherwise we believe it is a complete path. Use it as it is.
11056          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11057$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11058          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11059$as_echo_n "checking for SORT... " >&6; }
11060          if test ! -x "$tool_specified"; then
11061            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11062$as_echo "not found" >&6; }
11063            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11064          fi
11065          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11066$as_echo "$tool_specified" >&6; }
11067        fi
11068      fi
11069    fi
11070
11071  fi
11072
11073
11074
11075  if test "x$SORT" = x; then
11076    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11077  fi
11078
11079
11080
11081
11082
11083  # Publish this variable in the help.
11084
11085
11086  if [ -z "${TAIL+x}" ]; then
11087    # The variable is not set by user, try to locate tool using the code snippet
11088    for ac_prog in tail
11089do
11090  # Extract the first word of "$ac_prog", so it can be a program name with args.
11091set dummy $ac_prog; ac_word=$2
11092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11093$as_echo_n "checking for $ac_word... " >&6; }
11094if ${ac_cv_path_TAIL+:} false; then :
11095  $as_echo_n "(cached) " >&6
11096else
11097  case $TAIL in
11098  [\\/]* | ?:[\\/]*)
11099  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11100  ;;
11101  *)
11102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11103for as_dir in $PATH
11104do
11105  IFS=$as_save_IFS
11106  test -z "$as_dir" && as_dir=.
11107    for ac_exec_ext in '' $ac_executable_extensions; do
11108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11109    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11111    break 2
11112  fi
11113done
11114  done
11115IFS=$as_save_IFS
11116
11117  ;;
11118esac
11119fi
11120TAIL=$ac_cv_path_TAIL
11121if test -n "$TAIL"; then
11122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11123$as_echo "$TAIL" >&6; }
11124else
11125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11126$as_echo "no" >&6; }
11127fi
11128
11129
11130  test -n "$TAIL" && break
11131done
11132
11133  else
11134    # The variable is set, but is it from the command line or the environment?
11135
11136    # Try to remove the string !TAIL! from our list.
11137    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11138    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11139      # If it failed, the variable was not from the command line. Ignore it,
11140      # but warn the user (except for BASH, which is always set by the calling BASH).
11141      if test "xTAIL" != xBASH; then
11142        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11143$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11144      fi
11145      # Try to locate tool using the code snippet
11146      for ac_prog in tail
11147do
11148  # Extract the first word of "$ac_prog", so it can be a program name with args.
11149set dummy $ac_prog; ac_word=$2
11150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11151$as_echo_n "checking for $ac_word... " >&6; }
11152if ${ac_cv_path_TAIL+:} false; then :
11153  $as_echo_n "(cached) " >&6
11154else
11155  case $TAIL in
11156  [\\/]* | ?:[\\/]*)
11157  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11158  ;;
11159  *)
11160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11161for as_dir in $PATH
11162do
11163  IFS=$as_save_IFS
11164  test -z "$as_dir" && as_dir=.
11165    for ac_exec_ext in '' $ac_executable_extensions; do
11166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11167    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11169    break 2
11170  fi
11171done
11172  done
11173IFS=$as_save_IFS
11174
11175  ;;
11176esac
11177fi
11178TAIL=$ac_cv_path_TAIL
11179if test -n "$TAIL"; then
11180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11181$as_echo "$TAIL" >&6; }
11182else
11183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11184$as_echo "no" >&6; }
11185fi
11186
11187
11188  test -n "$TAIL" && break
11189done
11190
11191    else
11192      # If it succeeded, then it was overridden by the user. We will use it
11193      # for the tool.
11194
11195      # First remove it from the list of overridden variables, so we can test
11196      # for unknown variables in the end.
11197      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11198
11199      # Check if we try to supply an empty value
11200      if test "x$TAIL" = x; then
11201        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11202$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11203        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11204$as_echo_n "checking for TAIL... " >&6; }
11205        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11206$as_echo "disabled" >&6; }
11207      else
11208        # Check if the provided tool contains a complete path.
11209        tool_specified="$TAIL"
11210        tool_basename="${tool_specified##*/}"
11211        if test "x$tool_basename" = "x$tool_specified"; then
11212          # A command without a complete path is provided, search $PATH.
11213          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11214$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11215          # Extract the first word of "$tool_basename", so it can be a program name with args.
11216set dummy $tool_basename; ac_word=$2
11217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11218$as_echo_n "checking for $ac_word... " >&6; }
11219if ${ac_cv_path_TAIL+:} false; then :
11220  $as_echo_n "(cached) " >&6
11221else
11222  case $TAIL in
11223  [\\/]* | ?:[\\/]*)
11224  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11225  ;;
11226  *)
11227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11228for as_dir in $PATH
11229do
11230  IFS=$as_save_IFS
11231  test -z "$as_dir" && as_dir=.
11232    for ac_exec_ext in '' $ac_executable_extensions; do
11233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11234    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11236    break 2
11237  fi
11238done
11239  done
11240IFS=$as_save_IFS
11241
11242  ;;
11243esac
11244fi
11245TAIL=$ac_cv_path_TAIL
11246if test -n "$TAIL"; then
11247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11248$as_echo "$TAIL" >&6; }
11249else
11250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11251$as_echo "no" >&6; }
11252fi
11253
11254
11255          if test "x$TAIL" = x; then
11256            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11257          fi
11258        else
11259          # Otherwise we believe it is a complete path. Use it as it is.
11260          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11261$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11262          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11263$as_echo_n "checking for TAIL... " >&6; }
11264          if test ! -x "$tool_specified"; then
11265            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11266$as_echo "not found" >&6; }
11267            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11268          fi
11269          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11270$as_echo "$tool_specified" >&6; }
11271        fi
11272      fi
11273    fi
11274
11275  fi
11276
11277
11278
11279  if test "x$TAIL" = x; then
11280    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11281  fi
11282
11283
11284
11285
11286
11287  # Publish this variable in the help.
11288
11289
11290  if [ -z "${TAR+x}" ]; then
11291    # The variable is not set by user, try to locate tool using the code snippet
11292    for ac_prog in gtar tar
11293do
11294  # Extract the first word of "$ac_prog", so it can be a program name with args.
11295set dummy $ac_prog; ac_word=$2
11296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11297$as_echo_n "checking for $ac_word... " >&6; }
11298if ${ac_cv_path_TAR+:} false; then :
11299  $as_echo_n "(cached) " >&6
11300else
11301  case $TAR in
11302  [\\/]* | ?:[\\/]*)
11303  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11304  ;;
11305  *)
11306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11307for as_dir in $PATH
11308do
11309  IFS=$as_save_IFS
11310  test -z "$as_dir" && as_dir=.
11311    for ac_exec_ext in '' $ac_executable_extensions; do
11312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11313    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11315    break 2
11316  fi
11317done
11318  done
11319IFS=$as_save_IFS
11320
11321  ;;
11322esac
11323fi
11324TAR=$ac_cv_path_TAR
11325if test -n "$TAR"; then
11326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11327$as_echo "$TAR" >&6; }
11328else
11329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11330$as_echo "no" >&6; }
11331fi
11332
11333
11334  test -n "$TAR" && break
11335done
11336
11337  else
11338    # The variable is set, but is it from the command line or the environment?
11339
11340    # Try to remove the string !TAR! from our list.
11341    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11342    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11343      # If it failed, the variable was not from the command line. Ignore it,
11344      # but warn the user (except for BASH, which is always set by the calling BASH).
11345      if test "xTAR" != xBASH; then
11346        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11347$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11348      fi
11349      # Try to locate tool using the code snippet
11350      for ac_prog in gtar tar
11351do
11352  # Extract the first word of "$ac_prog", so it can be a program name with args.
11353set dummy $ac_prog; ac_word=$2
11354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11355$as_echo_n "checking for $ac_word... " >&6; }
11356if ${ac_cv_path_TAR+:} false; then :
11357  $as_echo_n "(cached) " >&6
11358else
11359  case $TAR in
11360  [\\/]* | ?:[\\/]*)
11361  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11362  ;;
11363  *)
11364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11365for as_dir in $PATH
11366do
11367  IFS=$as_save_IFS
11368  test -z "$as_dir" && as_dir=.
11369    for ac_exec_ext in '' $ac_executable_extensions; do
11370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11371    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11373    break 2
11374  fi
11375done
11376  done
11377IFS=$as_save_IFS
11378
11379  ;;
11380esac
11381fi
11382TAR=$ac_cv_path_TAR
11383if test -n "$TAR"; then
11384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11385$as_echo "$TAR" >&6; }
11386else
11387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11388$as_echo "no" >&6; }
11389fi
11390
11391
11392  test -n "$TAR" && break
11393done
11394
11395    else
11396      # If it succeeded, then it was overridden by the user. We will use it
11397      # for the tool.
11398
11399      # First remove it from the list of overridden variables, so we can test
11400      # for unknown variables in the end.
11401      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11402
11403      # Check if we try to supply an empty value
11404      if test "x$TAR" = x; then
11405        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11406$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11407        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11408$as_echo_n "checking for TAR... " >&6; }
11409        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11410$as_echo "disabled" >&6; }
11411      else
11412        # Check if the provided tool contains a complete path.
11413        tool_specified="$TAR"
11414        tool_basename="${tool_specified##*/}"
11415        if test "x$tool_basename" = "x$tool_specified"; then
11416          # A command without a complete path is provided, search $PATH.
11417          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11418$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11419          # Extract the first word of "$tool_basename", so it can be a program name with args.
11420set dummy $tool_basename; ac_word=$2
11421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11422$as_echo_n "checking for $ac_word... " >&6; }
11423if ${ac_cv_path_TAR+:} false; then :
11424  $as_echo_n "(cached) " >&6
11425else
11426  case $TAR in
11427  [\\/]* | ?:[\\/]*)
11428  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11429  ;;
11430  *)
11431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11432for as_dir in $PATH
11433do
11434  IFS=$as_save_IFS
11435  test -z "$as_dir" && as_dir=.
11436    for ac_exec_ext in '' $ac_executable_extensions; do
11437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11438    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11440    break 2
11441  fi
11442done
11443  done
11444IFS=$as_save_IFS
11445
11446  ;;
11447esac
11448fi
11449TAR=$ac_cv_path_TAR
11450if test -n "$TAR"; then
11451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11452$as_echo "$TAR" >&6; }
11453else
11454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11455$as_echo "no" >&6; }
11456fi
11457
11458
11459          if test "x$TAR" = x; then
11460            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11461          fi
11462        else
11463          # Otherwise we believe it is a complete path. Use it as it is.
11464          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11465$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11466          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11467$as_echo_n "checking for TAR... " >&6; }
11468          if test ! -x "$tool_specified"; then
11469            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11470$as_echo "not found" >&6; }
11471            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11472          fi
11473          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11474$as_echo "$tool_specified" >&6; }
11475        fi
11476      fi
11477    fi
11478
11479  fi
11480
11481
11482
11483  if test "x$TAR" = x; then
11484    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11485  fi
11486
11487
11488
11489
11490
11491  # Publish this variable in the help.
11492
11493
11494  if [ -z "${TEE+x}" ]; then
11495    # The variable is not set by user, try to locate tool using the code snippet
11496    for ac_prog in tee
11497do
11498  # Extract the first word of "$ac_prog", so it can be a program name with args.
11499set dummy $ac_prog; ac_word=$2
11500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11501$as_echo_n "checking for $ac_word... " >&6; }
11502if ${ac_cv_path_TEE+:} false; then :
11503  $as_echo_n "(cached) " >&6
11504else
11505  case $TEE in
11506  [\\/]* | ?:[\\/]*)
11507  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11508  ;;
11509  *)
11510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11511for as_dir in $PATH
11512do
11513  IFS=$as_save_IFS
11514  test -z "$as_dir" && as_dir=.
11515    for ac_exec_ext in '' $ac_executable_extensions; do
11516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11517    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11519    break 2
11520  fi
11521done
11522  done
11523IFS=$as_save_IFS
11524
11525  ;;
11526esac
11527fi
11528TEE=$ac_cv_path_TEE
11529if test -n "$TEE"; then
11530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11531$as_echo "$TEE" >&6; }
11532else
11533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11534$as_echo "no" >&6; }
11535fi
11536
11537
11538  test -n "$TEE" && break
11539done
11540
11541  else
11542    # The variable is set, but is it from the command line or the environment?
11543
11544    # Try to remove the string !TEE! from our list.
11545    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11546    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11547      # If it failed, the variable was not from the command line. Ignore it,
11548      # but warn the user (except for BASH, which is always set by the calling BASH).
11549      if test "xTEE" != xBASH; then
11550        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11551$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11552      fi
11553      # Try to locate tool using the code snippet
11554      for ac_prog in tee
11555do
11556  # Extract the first word of "$ac_prog", so it can be a program name with args.
11557set dummy $ac_prog; ac_word=$2
11558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11559$as_echo_n "checking for $ac_word... " >&6; }
11560if ${ac_cv_path_TEE+:} false; then :
11561  $as_echo_n "(cached) " >&6
11562else
11563  case $TEE in
11564  [\\/]* | ?:[\\/]*)
11565  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11566  ;;
11567  *)
11568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11569for as_dir in $PATH
11570do
11571  IFS=$as_save_IFS
11572  test -z "$as_dir" && as_dir=.
11573    for ac_exec_ext in '' $ac_executable_extensions; do
11574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11575    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11577    break 2
11578  fi
11579done
11580  done
11581IFS=$as_save_IFS
11582
11583  ;;
11584esac
11585fi
11586TEE=$ac_cv_path_TEE
11587if test -n "$TEE"; then
11588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11589$as_echo "$TEE" >&6; }
11590else
11591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11592$as_echo "no" >&6; }
11593fi
11594
11595
11596  test -n "$TEE" && break
11597done
11598
11599    else
11600      # If it succeeded, then it was overridden by the user. We will use it
11601      # for the tool.
11602
11603      # First remove it from the list of overridden variables, so we can test
11604      # for unknown variables in the end.
11605      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11606
11607      # Check if we try to supply an empty value
11608      if test "x$TEE" = x; then
11609        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11610$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11611        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11612$as_echo_n "checking for TEE... " >&6; }
11613        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11614$as_echo "disabled" >&6; }
11615      else
11616        # Check if the provided tool contains a complete path.
11617        tool_specified="$TEE"
11618        tool_basename="${tool_specified##*/}"
11619        if test "x$tool_basename" = "x$tool_specified"; then
11620          # A command without a complete path is provided, search $PATH.
11621          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11622$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11623          # Extract the first word of "$tool_basename", so it can be a program name with args.
11624set dummy $tool_basename; ac_word=$2
11625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11626$as_echo_n "checking for $ac_word... " >&6; }
11627if ${ac_cv_path_TEE+:} false; then :
11628  $as_echo_n "(cached) " >&6
11629else
11630  case $TEE in
11631  [\\/]* | ?:[\\/]*)
11632  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11633  ;;
11634  *)
11635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11636for as_dir in $PATH
11637do
11638  IFS=$as_save_IFS
11639  test -z "$as_dir" && as_dir=.
11640    for ac_exec_ext in '' $ac_executable_extensions; do
11641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11642    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11644    break 2
11645  fi
11646done
11647  done
11648IFS=$as_save_IFS
11649
11650  ;;
11651esac
11652fi
11653TEE=$ac_cv_path_TEE
11654if test -n "$TEE"; then
11655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11656$as_echo "$TEE" >&6; }
11657else
11658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11659$as_echo "no" >&6; }
11660fi
11661
11662
11663          if test "x$TEE" = x; then
11664            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11665          fi
11666        else
11667          # Otherwise we believe it is a complete path. Use it as it is.
11668          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11669$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11670          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11671$as_echo_n "checking for TEE... " >&6; }
11672          if test ! -x "$tool_specified"; then
11673            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11674$as_echo "not found" >&6; }
11675            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11676          fi
11677          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11678$as_echo "$tool_specified" >&6; }
11679        fi
11680      fi
11681    fi
11682
11683  fi
11684
11685
11686
11687  if test "x$TEE" = x; then
11688    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11689  fi
11690
11691
11692
11693
11694
11695  # Publish this variable in the help.
11696
11697
11698  if [ -z "${TOUCH+x}" ]; then
11699    # The variable is not set by user, try to locate tool using the code snippet
11700    for ac_prog in touch
11701do
11702  # Extract the first word of "$ac_prog", so it can be a program name with args.
11703set dummy $ac_prog; ac_word=$2
11704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11705$as_echo_n "checking for $ac_word... " >&6; }
11706if ${ac_cv_path_TOUCH+:} false; then :
11707  $as_echo_n "(cached) " >&6
11708else
11709  case $TOUCH in
11710  [\\/]* | ?:[\\/]*)
11711  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11712  ;;
11713  *)
11714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11715for as_dir in $PATH
11716do
11717  IFS=$as_save_IFS
11718  test -z "$as_dir" && as_dir=.
11719    for ac_exec_ext in '' $ac_executable_extensions; do
11720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11721    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11723    break 2
11724  fi
11725done
11726  done
11727IFS=$as_save_IFS
11728
11729  ;;
11730esac
11731fi
11732TOUCH=$ac_cv_path_TOUCH
11733if test -n "$TOUCH"; then
11734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11735$as_echo "$TOUCH" >&6; }
11736else
11737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11738$as_echo "no" >&6; }
11739fi
11740
11741
11742  test -n "$TOUCH" && break
11743done
11744
11745  else
11746    # The variable is set, but is it from the command line or the environment?
11747
11748    # Try to remove the string !TOUCH! from our list.
11749    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11750    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11751      # If it failed, the variable was not from the command line. Ignore it,
11752      # but warn the user (except for BASH, which is always set by the calling BASH).
11753      if test "xTOUCH" != xBASH; then
11754        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11755$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11756      fi
11757      # Try to locate tool using the code snippet
11758      for ac_prog in touch
11759do
11760  # Extract the first word of "$ac_prog", so it can be a program name with args.
11761set dummy $ac_prog; ac_word=$2
11762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11763$as_echo_n "checking for $ac_word... " >&6; }
11764if ${ac_cv_path_TOUCH+:} false; then :
11765  $as_echo_n "(cached) " >&6
11766else
11767  case $TOUCH in
11768  [\\/]* | ?:[\\/]*)
11769  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11770  ;;
11771  *)
11772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11773for as_dir in $PATH
11774do
11775  IFS=$as_save_IFS
11776  test -z "$as_dir" && as_dir=.
11777    for ac_exec_ext in '' $ac_executable_extensions; do
11778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11779    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11781    break 2
11782  fi
11783done
11784  done
11785IFS=$as_save_IFS
11786
11787  ;;
11788esac
11789fi
11790TOUCH=$ac_cv_path_TOUCH
11791if test -n "$TOUCH"; then
11792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11793$as_echo "$TOUCH" >&6; }
11794else
11795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11796$as_echo "no" >&6; }
11797fi
11798
11799
11800  test -n "$TOUCH" && break
11801done
11802
11803    else
11804      # If it succeeded, then it was overridden by the user. We will use it
11805      # for the tool.
11806
11807      # First remove it from the list of overridden variables, so we can test
11808      # for unknown variables in the end.
11809      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11810
11811      # Check if we try to supply an empty value
11812      if test "x$TOUCH" = x; then
11813        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11814$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11815        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11816$as_echo_n "checking for TOUCH... " >&6; }
11817        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11818$as_echo "disabled" >&6; }
11819      else
11820        # Check if the provided tool contains a complete path.
11821        tool_specified="$TOUCH"
11822        tool_basename="${tool_specified##*/}"
11823        if test "x$tool_basename" = "x$tool_specified"; then
11824          # A command without a complete path is provided, search $PATH.
11825          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11826$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11827          # Extract the first word of "$tool_basename", so it can be a program name with args.
11828set dummy $tool_basename; ac_word=$2
11829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11830$as_echo_n "checking for $ac_word... " >&6; }
11831if ${ac_cv_path_TOUCH+:} false; then :
11832  $as_echo_n "(cached) " >&6
11833else
11834  case $TOUCH in
11835  [\\/]* | ?:[\\/]*)
11836  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11837  ;;
11838  *)
11839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11840for as_dir in $PATH
11841do
11842  IFS=$as_save_IFS
11843  test -z "$as_dir" && as_dir=.
11844    for ac_exec_ext in '' $ac_executable_extensions; do
11845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11846    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11848    break 2
11849  fi
11850done
11851  done
11852IFS=$as_save_IFS
11853
11854  ;;
11855esac
11856fi
11857TOUCH=$ac_cv_path_TOUCH
11858if test -n "$TOUCH"; then
11859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11860$as_echo "$TOUCH" >&6; }
11861else
11862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11863$as_echo "no" >&6; }
11864fi
11865
11866
11867          if test "x$TOUCH" = x; then
11868            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11869          fi
11870        else
11871          # Otherwise we believe it is a complete path. Use it as it is.
11872          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11873$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11874          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11875$as_echo_n "checking for TOUCH... " >&6; }
11876          if test ! -x "$tool_specified"; then
11877            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11878$as_echo "not found" >&6; }
11879            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11880          fi
11881          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11882$as_echo "$tool_specified" >&6; }
11883        fi
11884      fi
11885    fi
11886
11887  fi
11888
11889
11890
11891  if test "x$TOUCH" = x; then
11892    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11893  fi
11894
11895
11896
11897
11898
11899  # Publish this variable in the help.
11900
11901
11902  if [ -z "${TR+x}" ]; then
11903    # The variable is not set by user, try to locate tool using the code snippet
11904    for ac_prog in tr
11905do
11906  # Extract the first word of "$ac_prog", so it can be a program name with args.
11907set dummy $ac_prog; ac_word=$2
11908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11909$as_echo_n "checking for $ac_word... " >&6; }
11910if ${ac_cv_path_TR+:} false; then :
11911  $as_echo_n "(cached) " >&6
11912else
11913  case $TR in
11914  [\\/]* | ?:[\\/]*)
11915  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11916  ;;
11917  *)
11918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11919for as_dir in $PATH
11920do
11921  IFS=$as_save_IFS
11922  test -z "$as_dir" && as_dir=.
11923    for ac_exec_ext in '' $ac_executable_extensions; do
11924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11925    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11927    break 2
11928  fi
11929done
11930  done
11931IFS=$as_save_IFS
11932
11933  ;;
11934esac
11935fi
11936TR=$ac_cv_path_TR
11937if test -n "$TR"; then
11938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11939$as_echo "$TR" >&6; }
11940else
11941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11942$as_echo "no" >&6; }
11943fi
11944
11945
11946  test -n "$TR" && break
11947done
11948
11949  else
11950    # The variable is set, but is it from the command line or the environment?
11951
11952    # Try to remove the string !TR! from our list.
11953    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11954    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11955      # If it failed, the variable was not from the command line. Ignore it,
11956      # but warn the user (except for BASH, which is always set by the calling BASH).
11957      if test "xTR" != xBASH; then
11958        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11959$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11960      fi
11961      # Try to locate tool using the code snippet
11962      for ac_prog in tr
11963do
11964  # Extract the first word of "$ac_prog", so it can be a program name with args.
11965set dummy $ac_prog; ac_word=$2
11966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11967$as_echo_n "checking for $ac_word... " >&6; }
11968if ${ac_cv_path_TR+:} false; then :
11969  $as_echo_n "(cached) " >&6
11970else
11971  case $TR in
11972  [\\/]* | ?:[\\/]*)
11973  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11974  ;;
11975  *)
11976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11977for as_dir in $PATH
11978do
11979  IFS=$as_save_IFS
11980  test -z "$as_dir" && as_dir=.
11981    for ac_exec_ext in '' $ac_executable_extensions; do
11982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11983    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11985    break 2
11986  fi
11987done
11988  done
11989IFS=$as_save_IFS
11990
11991  ;;
11992esac
11993fi
11994TR=$ac_cv_path_TR
11995if test -n "$TR"; then
11996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11997$as_echo "$TR" >&6; }
11998else
11999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12000$as_echo "no" >&6; }
12001fi
12002
12003
12004  test -n "$TR" && break
12005done
12006
12007    else
12008      # If it succeeded, then it was overridden by the user. We will use it
12009      # for the tool.
12010
12011      # First remove it from the list of overridden variables, so we can test
12012      # for unknown variables in the end.
12013      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12014
12015      # Check if we try to supply an empty value
12016      if test "x$TR" = x; then
12017        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12018$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12019        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12020$as_echo_n "checking for TR... " >&6; }
12021        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12022$as_echo "disabled" >&6; }
12023      else
12024        # Check if the provided tool contains a complete path.
12025        tool_specified="$TR"
12026        tool_basename="${tool_specified##*/}"
12027        if test "x$tool_basename" = "x$tool_specified"; then
12028          # A command without a complete path is provided, search $PATH.
12029          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12030$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12031          # Extract the first word of "$tool_basename", so it can be a program name with args.
12032set dummy $tool_basename; ac_word=$2
12033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12034$as_echo_n "checking for $ac_word... " >&6; }
12035if ${ac_cv_path_TR+:} false; then :
12036  $as_echo_n "(cached) " >&6
12037else
12038  case $TR in
12039  [\\/]* | ?:[\\/]*)
12040  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12041  ;;
12042  *)
12043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12044for as_dir in $PATH
12045do
12046  IFS=$as_save_IFS
12047  test -z "$as_dir" && as_dir=.
12048    for ac_exec_ext in '' $ac_executable_extensions; do
12049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12050    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12052    break 2
12053  fi
12054done
12055  done
12056IFS=$as_save_IFS
12057
12058  ;;
12059esac
12060fi
12061TR=$ac_cv_path_TR
12062if test -n "$TR"; then
12063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12064$as_echo "$TR" >&6; }
12065else
12066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12067$as_echo "no" >&6; }
12068fi
12069
12070
12071          if test "x$TR" = x; then
12072            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12073          fi
12074        else
12075          # Otherwise we believe it is a complete path. Use it as it is.
12076          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12077$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12078          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12079$as_echo_n "checking for TR... " >&6; }
12080          if test ! -x "$tool_specified"; then
12081            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12082$as_echo "not found" >&6; }
12083            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12084          fi
12085          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12086$as_echo "$tool_specified" >&6; }
12087        fi
12088      fi
12089    fi
12090
12091  fi
12092
12093
12094
12095  if test "x$TR" = x; then
12096    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12097  fi
12098
12099
12100
12101
12102
12103  # Publish this variable in the help.
12104
12105
12106  if [ -z "${UNAME+x}" ]; then
12107    # The variable is not set by user, try to locate tool using the code snippet
12108    for ac_prog in uname
12109do
12110  # Extract the first word of "$ac_prog", so it can be a program name with args.
12111set dummy $ac_prog; ac_word=$2
12112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12113$as_echo_n "checking for $ac_word... " >&6; }
12114if ${ac_cv_path_UNAME+:} false; then :
12115  $as_echo_n "(cached) " >&6
12116else
12117  case $UNAME in
12118  [\\/]* | ?:[\\/]*)
12119  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12120  ;;
12121  *)
12122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12123for as_dir in $PATH
12124do
12125  IFS=$as_save_IFS
12126  test -z "$as_dir" && as_dir=.
12127    for ac_exec_ext in '' $ac_executable_extensions; do
12128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12129    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12131    break 2
12132  fi
12133done
12134  done
12135IFS=$as_save_IFS
12136
12137  ;;
12138esac
12139fi
12140UNAME=$ac_cv_path_UNAME
12141if test -n "$UNAME"; then
12142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12143$as_echo "$UNAME" >&6; }
12144else
12145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12146$as_echo "no" >&6; }
12147fi
12148
12149
12150  test -n "$UNAME" && break
12151done
12152
12153  else
12154    # The variable is set, but is it from the command line or the environment?
12155
12156    # Try to remove the string !UNAME! from our list.
12157    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12158    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12159      # If it failed, the variable was not from the command line. Ignore it,
12160      # but warn the user (except for BASH, which is always set by the calling BASH).
12161      if test "xUNAME" != xBASH; then
12162        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12163$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12164      fi
12165      # Try to locate tool using the code snippet
12166      for ac_prog in uname
12167do
12168  # Extract the first word of "$ac_prog", so it can be a program name with args.
12169set dummy $ac_prog; ac_word=$2
12170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12171$as_echo_n "checking for $ac_word... " >&6; }
12172if ${ac_cv_path_UNAME+:} false; then :
12173  $as_echo_n "(cached) " >&6
12174else
12175  case $UNAME in
12176  [\\/]* | ?:[\\/]*)
12177  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12178  ;;
12179  *)
12180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12181for as_dir in $PATH
12182do
12183  IFS=$as_save_IFS
12184  test -z "$as_dir" && as_dir=.
12185    for ac_exec_ext in '' $ac_executable_extensions; do
12186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12187    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12189    break 2
12190  fi
12191done
12192  done
12193IFS=$as_save_IFS
12194
12195  ;;
12196esac
12197fi
12198UNAME=$ac_cv_path_UNAME
12199if test -n "$UNAME"; then
12200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12201$as_echo "$UNAME" >&6; }
12202else
12203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12204$as_echo "no" >&6; }
12205fi
12206
12207
12208  test -n "$UNAME" && break
12209done
12210
12211    else
12212      # If it succeeded, then it was overridden by the user. We will use it
12213      # for the tool.
12214
12215      # First remove it from the list of overridden variables, so we can test
12216      # for unknown variables in the end.
12217      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12218
12219      # Check if we try to supply an empty value
12220      if test "x$UNAME" = x; then
12221        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12222$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12223        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12224$as_echo_n "checking for UNAME... " >&6; }
12225        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12226$as_echo "disabled" >&6; }
12227      else
12228        # Check if the provided tool contains a complete path.
12229        tool_specified="$UNAME"
12230        tool_basename="${tool_specified##*/}"
12231        if test "x$tool_basename" = "x$tool_specified"; then
12232          # A command without a complete path is provided, search $PATH.
12233          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12234$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12235          # Extract the first word of "$tool_basename", so it can be a program name with args.
12236set dummy $tool_basename; ac_word=$2
12237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12238$as_echo_n "checking for $ac_word... " >&6; }
12239if ${ac_cv_path_UNAME+:} false; then :
12240  $as_echo_n "(cached) " >&6
12241else
12242  case $UNAME in
12243  [\\/]* | ?:[\\/]*)
12244  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12245  ;;
12246  *)
12247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12248for as_dir in $PATH
12249do
12250  IFS=$as_save_IFS
12251  test -z "$as_dir" && as_dir=.
12252    for ac_exec_ext in '' $ac_executable_extensions; do
12253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12254    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12256    break 2
12257  fi
12258done
12259  done
12260IFS=$as_save_IFS
12261
12262  ;;
12263esac
12264fi
12265UNAME=$ac_cv_path_UNAME
12266if test -n "$UNAME"; then
12267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12268$as_echo "$UNAME" >&6; }
12269else
12270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12271$as_echo "no" >&6; }
12272fi
12273
12274
12275          if test "x$UNAME" = x; then
12276            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12277          fi
12278        else
12279          # Otherwise we believe it is a complete path. Use it as it is.
12280          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12281$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12282          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12283$as_echo_n "checking for UNAME... " >&6; }
12284          if test ! -x "$tool_specified"; then
12285            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12286$as_echo "not found" >&6; }
12287            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12288          fi
12289          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12290$as_echo "$tool_specified" >&6; }
12291        fi
12292      fi
12293    fi
12294
12295  fi
12296
12297
12298
12299  if test "x$UNAME" = x; then
12300    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12301  fi
12302
12303
12304
12305
12306
12307  # Publish this variable in the help.
12308
12309
12310  if [ -z "${UNIQ+x}" ]; then
12311    # The variable is not set by user, try to locate tool using the code snippet
12312    for ac_prog in uniq
12313do
12314  # Extract the first word of "$ac_prog", so it can be a program name with args.
12315set dummy $ac_prog; ac_word=$2
12316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12317$as_echo_n "checking for $ac_word... " >&6; }
12318if ${ac_cv_path_UNIQ+:} false; then :
12319  $as_echo_n "(cached) " >&6
12320else
12321  case $UNIQ in
12322  [\\/]* | ?:[\\/]*)
12323  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12324  ;;
12325  *)
12326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12327for as_dir in $PATH
12328do
12329  IFS=$as_save_IFS
12330  test -z "$as_dir" && as_dir=.
12331    for ac_exec_ext in '' $ac_executable_extensions; do
12332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12333    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12335    break 2
12336  fi
12337done
12338  done
12339IFS=$as_save_IFS
12340
12341  ;;
12342esac
12343fi
12344UNIQ=$ac_cv_path_UNIQ
12345if test -n "$UNIQ"; then
12346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12347$as_echo "$UNIQ" >&6; }
12348else
12349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12350$as_echo "no" >&6; }
12351fi
12352
12353
12354  test -n "$UNIQ" && break
12355done
12356
12357  else
12358    # The variable is set, but is it from the command line or the environment?
12359
12360    # Try to remove the string !UNIQ! from our list.
12361    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12362    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12363      # If it failed, the variable was not from the command line. Ignore it,
12364      # but warn the user (except for BASH, which is always set by the calling BASH).
12365      if test "xUNIQ" != xBASH; then
12366        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12367$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12368      fi
12369      # Try to locate tool using the code snippet
12370      for ac_prog in uniq
12371do
12372  # Extract the first word of "$ac_prog", so it can be a program name with args.
12373set dummy $ac_prog; ac_word=$2
12374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12375$as_echo_n "checking for $ac_word... " >&6; }
12376if ${ac_cv_path_UNIQ+:} false; then :
12377  $as_echo_n "(cached) " >&6
12378else
12379  case $UNIQ in
12380  [\\/]* | ?:[\\/]*)
12381  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12382  ;;
12383  *)
12384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12385for as_dir in $PATH
12386do
12387  IFS=$as_save_IFS
12388  test -z "$as_dir" && as_dir=.
12389    for ac_exec_ext in '' $ac_executable_extensions; do
12390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12391    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12393    break 2
12394  fi
12395done
12396  done
12397IFS=$as_save_IFS
12398
12399  ;;
12400esac
12401fi
12402UNIQ=$ac_cv_path_UNIQ
12403if test -n "$UNIQ"; then
12404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12405$as_echo "$UNIQ" >&6; }
12406else
12407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12408$as_echo "no" >&6; }
12409fi
12410
12411
12412  test -n "$UNIQ" && break
12413done
12414
12415    else
12416      # If it succeeded, then it was overridden by the user. We will use it
12417      # for the tool.
12418
12419      # First remove it from the list of overridden variables, so we can test
12420      # for unknown variables in the end.
12421      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12422
12423      # Check if we try to supply an empty value
12424      if test "x$UNIQ" = x; then
12425        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12426$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12427        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12428$as_echo_n "checking for UNIQ... " >&6; }
12429        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12430$as_echo "disabled" >&6; }
12431      else
12432        # Check if the provided tool contains a complete path.
12433        tool_specified="$UNIQ"
12434        tool_basename="${tool_specified##*/}"
12435        if test "x$tool_basename" = "x$tool_specified"; then
12436          # A command without a complete path is provided, search $PATH.
12437          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12438$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12439          # Extract the first word of "$tool_basename", so it can be a program name with args.
12440set dummy $tool_basename; ac_word=$2
12441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12442$as_echo_n "checking for $ac_word... " >&6; }
12443if ${ac_cv_path_UNIQ+:} false; then :
12444  $as_echo_n "(cached) " >&6
12445else
12446  case $UNIQ in
12447  [\\/]* | ?:[\\/]*)
12448  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12449  ;;
12450  *)
12451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12452for as_dir in $PATH
12453do
12454  IFS=$as_save_IFS
12455  test -z "$as_dir" && as_dir=.
12456    for ac_exec_ext in '' $ac_executable_extensions; do
12457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12458    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12460    break 2
12461  fi
12462done
12463  done
12464IFS=$as_save_IFS
12465
12466  ;;
12467esac
12468fi
12469UNIQ=$ac_cv_path_UNIQ
12470if test -n "$UNIQ"; then
12471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12472$as_echo "$UNIQ" >&6; }
12473else
12474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12475$as_echo "no" >&6; }
12476fi
12477
12478
12479          if test "x$UNIQ" = x; then
12480            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12481          fi
12482        else
12483          # Otherwise we believe it is a complete path. Use it as it is.
12484          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12485$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12486          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12487$as_echo_n "checking for UNIQ... " >&6; }
12488          if test ! -x "$tool_specified"; then
12489            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12490$as_echo "not found" >&6; }
12491            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12492          fi
12493          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12494$as_echo "$tool_specified" >&6; }
12495        fi
12496      fi
12497    fi
12498
12499  fi
12500
12501
12502
12503  if test "x$UNIQ" = x; then
12504    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12505  fi
12506
12507
12508
12509
12510
12511  # Publish this variable in the help.
12512
12513
12514  if [ -z "${WC+x}" ]; then
12515    # The variable is not set by user, try to locate tool using the code snippet
12516    for ac_prog in wc
12517do
12518  # Extract the first word of "$ac_prog", so it can be a program name with args.
12519set dummy $ac_prog; ac_word=$2
12520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12521$as_echo_n "checking for $ac_word... " >&6; }
12522if ${ac_cv_path_WC+:} false; then :
12523  $as_echo_n "(cached) " >&6
12524else
12525  case $WC in
12526  [\\/]* | ?:[\\/]*)
12527  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12528  ;;
12529  *)
12530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12531for as_dir in $PATH
12532do
12533  IFS=$as_save_IFS
12534  test -z "$as_dir" && as_dir=.
12535    for ac_exec_ext in '' $ac_executable_extensions; do
12536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12537    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12539    break 2
12540  fi
12541done
12542  done
12543IFS=$as_save_IFS
12544
12545  ;;
12546esac
12547fi
12548WC=$ac_cv_path_WC
12549if test -n "$WC"; then
12550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12551$as_echo "$WC" >&6; }
12552else
12553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12554$as_echo "no" >&6; }
12555fi
12556
12557
12558  test -n "$WC" && break
12559done
12560
12561  else
12562    # The variable is set, but is it from the command line or the environment?
12563
12564    # Try to remove the string !WC! from our list.
12565    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12566    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12567      # If it failed, the variable was not from the command line. Ignore it,
12568      # but warn the user (except for BASH, which is always set by the calling BASH).
12569      if test "xWC" != xBASH; then
12570        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12571$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12572      fi
12573      # Try to locate tool using the code snippet
12574      for ac_prog in wc
12575do
12576  # Extract the first word of "$ac_prog", so it can be a program name with args.
12577set dummy $ac_prog; ac_word=$2
12578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12579$as_echo_n "checking for $ac_word... " >&6; }
12580if ${ac_cv_path_WC+:} false; then :
12581  $as_echo_n "(cached) " >&6
12582else
12583  case $WC in
12584  [\\/]* | ?:[\\/]*)
12585  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12586  ;;
12587  *)
12588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12589for as_dir in $PATH
12590do
12591  IFS=$as_save_IFS
12592  test -z "$as_dir" && as_dir=.
12593    for ac_exec_ext in '' $ac_executable_extensions; do
12594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12595    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12597    break 2
12598  fi
12599done
12600  done
12601IFS=$as_save_IFS
12602
12603  ;;
12604esac
12605fi
12606WC=$ac_cv_path_WC
12607if test -n "$WC"; then
12608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12609$as_echo "$WC" >&6; }
12610else
12611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12612$as_echo "no" >&6; }
12613fi
12614
12615
12616  test -n "$WC" && break
12617done
12618
12619    else
12620      # If it succeeded, then it was overridden by the user. We will use it
12621      # for the tool.
12622
12623      # First remove it from the list of overridden variables, so we can test
12624      # for unknown variables in the end.
12625      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12626
12627      # Check if we try to supply an empty value
12628      if test "x$WC" = x; then
12629        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12630$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12631        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12632$as_echo_n "checking for WC... " >&6; }
12633        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12634$as_echo "disabled" >&6; }
12635      else
12636        # Check if the provided tool contains a complete path.
12637        tool_specified="$WC"
12638        tool_basename="${tool_specified##*/}"
12639        if test "x$tool_basename" = "x$tool_specified"; then
12640          # A command without a complete path is provided, search $PATH.
12641          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12642$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12643          # Extract the first word of "$tool_basename", so it can be a program name with args.
12644set dummy $tool_basename; ac_word=$2
12645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12646$as_echo_n "checking for $ac_word... " >&6; }
12647if ${ac_cv_path_WC+:} false; then :
12648  $as_echo_n "(cached) " >&6
12649else
12650  case $WC in
12651  [\\/]* | ?:[\\/]*)
12652  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12653  ;;
12654  *)
12655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12656for as_dir in $PATH
12657do
12658  IFS=$as_save_IFS
12659  test -z "$as_dir" && as_dir=.
12660    for ac_exec_ext in '' $ac_executable_extensions; do
12661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12662    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12664    break 2
12665  fi
12666done
12667  done
12668IFS=$as_save_IFS
12669
12670  ;;
12671esac
12672fi
12673WC=$ac_cv_path_WC
12674if test -n "$WC"; then
12675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12676$as_echo "$WC" >&6; }
12677else
12678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12679$as_echo "no" >&6; }
12680fi
12681
12682
12683          if test "x$WC" = x; then
12684            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12685          fi
12686        else
12687          # Otherwise we believe it is a complete path. Use it as it is.
12688          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12689$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12690          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12691$as_echo_n "checking for WC... " >&6; }
12692          if test ! -x "$tool_specified"; then
12693            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12694$as_echo "not found" >&6; }
12695            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12696          fi
12697          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12698$as_echo "$tool_specified" >&6; }
12699        fi
12700      fi
12701    fi
12702
12703  fi
12704
12705
12706
12707  if test "x$WC" = x; then
12708    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12709  fi
12710
12711
12712
12713
12714
12715  # Publish this variable in the help.
12716
12717
12718  if [ -z "${WHICH+x}" ]; then
12719    # The variable is not set by user, try to locate tool using the code snippet
12720    for ac_prog in which
12721do
12722  # Extract the first word of "$ac_prog", so it can be a program name with args.
12723set dummy $ac_prog; ac_word=$2
12724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12725$as_echo_n "checking for $ac_word... " >&6; }
12726if ${ac_cv_path_WHICH+:} false; then :
12727  $as_echo_n "(cached) " >&6
12728else
12729  case $WHICH in
12730  [\\/]* | ?:[\\/]*)
12731  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12732  ;;
12733  *)
12734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12735for as_dir in $PATH
12736do
12737  IFS=$as_save_IFS
12738  test -z "$as_dir" && as_dir=.
12739    for ac_exec_ext in '' $ac_executable_extensions; do
12740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12741    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12743    break 2
12744  fi
12745done
12746  done
12747IFS=$as_save_IFS
12748
12749  ;;
12750esac
12751fi
12752WHICH=$ac_cv_path_WHICH
12753if test -n "$WHICH"; then
12754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12755$as_echo "$WHICH" >&6; }
12756else
12757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12758$as_echo "no" >&6; }
12759fi
12760
12761
12762  test -n "$WHICH" && break
12763done
12764
12765  else
12766    # The variable is set, but is it from the command line or the environment?
12767
12768    # Try to remove the string !WHICH! from our list.
12769    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12770    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12771      # If it failed, the variable was not from the command line. Ignore it,
12772      # but warn the user (except for BASH, which is always set by the calling BASH).
12773      if test "xWHICH" != xBASH; then
12774        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12775$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12776      fi
12777      # Try to locate tool using the code snippet
12778      for ac_prog in which
12779do
12780  # Extract the first word of "$ac_prog", so it can be a program name with args.
12781set dummy $ac_prog; ac_word=$2
12782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12783$as_echo_n "checking for $ac_word... " >&6; }
12784if ${ac_cv_path_WHICH+:} false; then :
12785  $as_echo_n "(cached) " >&6
12786else
12787  case $WHICH in
12788  [\\/]* | ?:[\\/]*)
12789  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12790  ;;
12791  *)
12792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12793for as_dir in $PATH
12794do
12795  IFS=$as_save_IFS
12796  test -z "$as_dir" && as_dir=.
12797    for ac_exec_ext in '' $ac_executable_extensions; do
12798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12799    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12801    break 2
12802  fi
12803done
12804  done
12805IFS=$as_save_IFS
12806
12807  ;;
12808esac
12809fi
12810WHICH=$ac_cv_path_WHICH
12811if test -n "$WHICH"; then
12812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12813$as_echo "$WHICH" >&6; }
12814else
12815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12816$as_echo "no" >&6; }
12817fi
12818
12819
12820  test -n "$WHICH" && break
12821done
12822
12823    else
12824      # If it succeeded, then it was overridden by the user. We will use it
12825      # for the tool.
12826
12827      # First remove it from the list of overridden variables, so we can test
12828      # for unknown variables in the end.
12829      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12830
12831      # Check if we try to supply an empty value
12832      if test "x$WHICH" = x; then
12833        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12834$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12835        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12836$as_echo_n "checking for WHICH... " >&6; }
12837        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12838$as_echo "disabled" >&6; }
12839      else
12840        # Check if the provided tool contains a complete path.
12841        tool_specified="$WHICH"
12842        tool_basename="${tool_specified##*/}"
12843        if test "x$tool_basename" = "x$tool_specified"; then
12844          # A command without a complete path is provided, search $PATH.
12845          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12846$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12847          # Extract the first word of "$tool_basename", so it can be a program name with args.
12848set dummy $tool_basename; ac_word=$2
12849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12850$as_echo_n "checking for $ac_word... " >&6; }
12851if ${ac_cv_path_WHICH+:} false; then :
12852  $as_echo_n "(cached) " >&6
12853else
12854  case $WHICH in
12855  [\\/]* | ?:[\\/]*)
12856  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12857  ;;
12858  *)
12859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12860for as_dir in $PATH
12861do
12862  IFS=$as_save_IFS
12863  test -z "$as_dir" && as_dir=.
12864    for ac_exec_ext in '' $ac_executable_extensions; do
12865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12866    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12868    break 2
12869  fi
12870done
12871  done
12872IFS=$as_save_IFS
12873
12874  ;;
12875esac
12876fi
12877WHICH=$ac_cv_path_WHICH
12878if test -n "$WHICH"; then
12879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12880$as_echo "$WHICH" >&6; }
12881else
12882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12883$as_echo "no" >&6; }
12884fi
12885
12886
12887          if test "x$WHICH" = x; then
12888            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12889          fi
12890        else
12891          # Otherwise we believe it is a complete path. Use it as it is.
12892          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12893$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12894          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12895$as_echo_n "checking for WHICH... " >&6; }
12896          if test ! -x "$tool_specified"; then
12897            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12898$as_echo "not found" >&6; }
12899            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12900          fi
12901          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12902$as_echo "$tool_specified" >&6; }
12903        fi
12904      fi
12905    fi
12906
12907  fi
12908
12909
12910
12911  if test "x$WHICH" = x; then
12912    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12913  fi
12914
12915
12916
12917
12918
12919  # Publish this variable in the help.
12920
12921
12922  if [ -z "${XARGS+x}" ]; then
12923    # The variable is not set by user, try to locate tool using the code snippet
12924    for ac_prog in xargs
12925do
12926  # Extract the first word of "$ac_prog", so it can be a program name with args.
12927set dummy $ac_prog; ac_word=$2
12928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12929$as_echo_n "checking for $ac_word... " >&6; }
12930if ${ac_cv_path_XARGS+:} false; then :
12931  $as_echo_n "(cached) " >&6
12932else
12933  case $XARGS in
12934  [\\/]* | ?:[\\/]*)
12935  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12936  ;;
12937  *)
12938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12939for as_dir in $PATH
12940do
12941  IFS=$as_save_IFS
12942  test -z "$as_dir" && as_dir=.
12943    for ac_exec_ext in '' $ac_executable_extensions; do
12944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12945    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12947    break 2
12948  fi
12949done
12950  done
12951IFS=$as_save_IFS
12952
12953  ;;
12954esac
12955fi
12956XARGS=$ac_cv_path_XARGS
12957if test -n "$XARGS"; then
12958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12959$as_echo "$XARGS" >&6; }
12960else
12961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12962$as_echo "no" >&6; }
12963fi
12964
12965
12966  test -n "$XARGS" && break
12967done
12968
12969  else
12970    # The variable is set, but is it from the command line or the environment?
12971
12972    # Try to remove the string !XARGS! from our list.
12973    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12974    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12975      # If it failed, the variable was not from the command line. Ignore it,
12976      # but warn the user (except for BASH, which is always set by the calling BASH).
12977      if test "xXARGS" != xBASH; then
12978        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12979$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12980      fi
12981      # Try to locate tool using the code snippet
12982      for ac_prog in xargs
12983do
12984  # Extract the first word of "$ac_prog", so it can be a program name with args.
12985set dummy $ac_prog; ac_word=$2
12986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12987$as_echo_n "checking for $ac_word... " >&6; }
12988if ${ac_cv_path_XARGS+:} false; then :
12989  $as_echo_n "(cached) " >&6
12990else
12991  case $XARGS in
12992  [\\/]* | ?:[\\/]*)
12993  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12994  ;;
12995  *)
12996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12997for as_dir in $PATH
12998do
12999  IFS=$as_save_IFS
13000  test -z "$as_dir" && as_dir=.
13001    for ac_exec_ext in '' $ac_executable_extensions; do
13002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13003    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13005    break 2
13006  fi
13007done
13008  done
13009IFS=$as_save_IFS
13010
13011  ;;
13012esac
13013fi
13014XARGS=$ac_cv_path_XARGS
13015if test -n "$XARGS"; then
13016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13017$as_echo "$XARGS" >&6; }
13018else
13019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13020$as_echo "no" >&6; }
13021fi
13022
13023
13024  test -n "$XARGS" && break
13025done
13026
13027    else
13028      # If it succeeded, then it was overridden by the user. We will use it
13029      # for the tool.
13030
13031      # First remove it from the list of overridden variables, so we can test
13032      # for unknown variables in the end.
13033      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13034
13035      # Check if we try to supply an empty value
13036      if test "x$XARGS" = x; then
13037        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13038$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13039        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13040$as_echo_n "checking for XARGS... " >&6; }
13041        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13042$as_echo "disabled" >&6; }
13043      else
13044        # Check if the provided tool contains a complete path.
13045        tool_specified="$XARGS"
13046        tool_basename="${tool_specified##*/}"
13047        if test "x$tool_basename" = "x$tool_specified"; then
13048          # A command without a complete path is provided, search $PATH.
13049          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13050$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13051          # Extract the first word of "$tool_basename", so it can be a program name with args.
13052set dummy $tool_basename; ac_word=$2
13053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13054$as_echo_n "checking for $ac_word... " >&6; }
13055if ${ac_cv_path_XARGS+:} false; then :
13056  $as_echo_n "(cached) " >&6
13057else
13058  case $XARGS in
13059  [\\/]* | ?:[\\/]*)
13060  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13061  ;;
13062  *)
13063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13064for as_dir in $PATH
13065do
13066  IFS=$as_save_IFS
13067  test -z "$as_dir" && as_dir=.
13068    for ac_exec_ext in '' $ac_executable_extensions; do
13069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13070    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13072    break 2
13073  fi
13074done
13075  done
13076IFS=$as_save_IFS
13077
13078  ;;
13079esac
13080fi
13081XARGS=$ac_cv_path_XARGS
13082if test -n "$XARGS"; then
13083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13084$as_echo "$XARGS" >&6; }
13085else
13086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13087$as_echo "no" >&6; }
13088fi
13089
13090
13091          if test "x$XARGS" = x; then
13092            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13093          fi
13094        else
13095          # Otherwise we believe it is a complete path. Use it as it is.
13096          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13097$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13098          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13099$as_echo_n "checking for XARGS... " >&6; }
13100          if test ! -x "$tool_specified"; then
13101            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13102$as_echo "not found" >&6; }
13103            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13104          fi
13105          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13106$as_echo "$tool_specified" >&6; }
13107        fi
13108      fi
13109    fi
13110
13111  fi
13112
13113
13114
13115  if test "x$XARGS" = x; then
13116    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13117  fi
13118
13119
13120
13121  # Then required tools that require some special treatment.
13122
13123
13124  # Publish this variable in the help.
13125
13126
13127  if [ -z "${AWK+x}" ]; then
13128    # The variable is not set by user, try to locate tool using the code snippet
13129    for ac_prog in gawk mawk nawk awk
13130do
13131  # Extract the first word of "$ac_prog", so it can be a program name with args.
13132set dummy $ac_prog; ac_word=$2
13133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13134$as_echo_n "checking for $ac_word... " >&6; }
13135if ${ac_cv_prog_AWK+:} false; then :
13136  $as_echo_n "(cached) " >&6
13137else
13138  if test -n "$AWK"; then
13139  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13140else
13141as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13142for as_dir in $PATH
13143do
13144  IFS=$as_save_IFS
13145  test -z "$as_dir" && as_dir=.
13146    for ac_exec_ext in '' $ac_executable_extensions; do
13147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13148    ac_cv_prog_AWK="$ac_prog"
13149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13150    break 2
13151  fi
13152done
13153  done
13154IFS=$as_save_IFS
13155
13156fi
13157fi
13158AWK=$ac_cv_prog_AWK
13159if test -n "$AWK"; then
13160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13161$as_echo "$AWK" >&6; }
13162else
13163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13164$as_echo "no" >&6; }
13165fi
13166
13167
13168  test -n "$AWK" && break
13169done
13170
13171  else
13172    # The variable is set, but is it from the command line or the environment?
13173
13174    # Try to remove the string !AWK! from our list.
13175    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13176    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13177      # If it failed, the variable was not from the command line. Ignore it,
13178      # but warn the user (except for BASH, which is always set by the calling BASH).
13179      if test "xAWK" != xBASH; then
13180        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13181$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13182      fi
13183      # Try to locate tool using the code snippet
13184      for ac_prog in gawk mawk nawk awk
13185do
13186  # Extract the first word of "$ac_prog", so it can be a program name with args.
13187set dummy $ac_prog; ac_word=$2
13188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13189$as_echo_n "checking for $ac_word... " >&6; }
13190if ${ac_cv_prog_AWK+:} false; then :
13191  $as_echo_n "(cached) " >&6
13192else
13193  if test -n "$AWK"; then
13194  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13195else
13196as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13197for as_dir in $PATH
13198do
13199  IFS=$as_save_IFS
13200  test -z "$as_dir" && as_dir=.
13201    for ac_exec_ext in '' $ac_executable_extensions; do
13202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13203    ac_cv_prog_AWK="$ac_prog"
13204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13205    break 2
13206  fi
13207done
13208  done
13209IFS=$as_save_IFS
13210
13211fi
13212fi
13213AWK=$ac_cv_prog_AWK
13214if test -n "$AWK"; then
13215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13216$as_echo "$AWK" >&6; }
13217else
13218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13219$as_echo "no" >&6; }
13220fi
13221
13222
13223  test -n "$AWK" && break
13224done
13225
13226    else
13227      # If it succeeded, then it was overridden by the user. We will use it
13228      # for the tool.
13229
13230      # First remove it from the list of overridden variables, so we can test
13231      # for unknown variables in the end.
13232      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13233
13234      # Check if we try to supply an empty value
13235      if test "x$AWK" = x; then
13236        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13237$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13238        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13239$as_echo_n "checking for AWK... " >&6; }
13240        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13241$as_echo "disabled" >&6; }
13242      else
13243        # Check if the provided tool contains a complete path.
13244        tool_specified="$AWK"
13245        tool_basename="${tool_specified##*/}"
13246        if test "x$tool_basename" = "x$tool_specified"; then
13247          # A command without a complete path is provided, search $PATH.
13248          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13249$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13250          # Extract the first word of "$tool_basename", so it can be a program name with args.
13251set dummy $tool_basename; ac_word=$2
13252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13253$as_echo_n "checking for $ac_word... " >&6; }
13254if ${ac_cv_path_AWK+:} false; then :
13255  $as_echo_n "(cached) " >&6
13256else
13257  case $AWK in
13258  [\\/]* | ?:[\\/]*)
13259  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13260  ;;
13261  *)
13262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13263for as_dir in $PATH
13264do
13265  IFS=$as_save_IFS
13266  test -z "$as_dir" && as_dir=.
13267    for ac_exec_ext in '' $ac_executable_extensions; do
13268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13269    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13271    break 2
13272  fi
13273done
13274  done
13275IFS=$as_save_IFS
13276
13277  ;;
13278esac
13279fi
13280AWK=$ac_cv_path_AWK
13281if test -n "$AWK"; then
13282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13283$as_echo "$AWK" >&6; }
13284else
13285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13286$as_echo "no" >&6; }
13287fi
13288
13289
13290          if test "x$AWK" = x; then
13291            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13292          fi
13293        else
13294          # Otherwise we believe it is a complete path. Use it as it is.
13295          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13296$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13297          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13298$as_echo_n "checking for AWK... " >&6; }
13299          if test ! -x "$tool_specified"; then
13300            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13301$as_echo "not found" >&6; }
13302            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13303          fi
13304          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13305$as_echo "$tool_specified" >&6; }
13306        fi
13307      fi
13308    fi
13309
13310  fi
13311
13312
13313  if test "x$AWK" = x; then
13314    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13315  fi
13316
13317
13318
13319
13320  # Publish this variable in the help.
13321
13322
13323  if [ -z "${GREP+x}" ]; then
13324    # The variable is not set by user, try to locate tool using the code snippet
13325    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13326$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13327if ${ac_cv_path_GREP+:} false; then :
13328  $as_echo_n "(cached) " >&6
13329else
13330  if test -z "$GREP"; then
13331  ac_path_GREP_found=false
13332  # Loop through the user's path and test for each of PROGNAME-LIST
13333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13334for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13335do
13336  IFS=$as_save_IFS
13337  test -z "$as_dir" && as_dir=.
13338    for ac_prog in grep ggrep; do
13339    for ac_exec_ext in '' $ac_executable_extensions; do
13340      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13341      as_fn_executable_p "$ac_path_GREP" || continue
13342# Check for GNU ac_path_GREP and select it if it is found.
13343  # Check for GNU $ac_path_GREP
13344case `"$ac_path_GREP" --version 2>&1` in
13345*GNU*)
13346  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13347*)
13348  ac_count=0
13349  $as_echo_n 0123456789 >"conftest.in"
13350  while :
13351  do
13352    cat "conftest.in" "conftest.in" >"conftest.tmp"
13353    mv "conftest.tmp" "conftest.in"
13354    cp "conftest.in" "conftest.nl"
13355    $as_echo 'GREP' >> "conftest.nl"
13356    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13357    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13358    as_fn_arith $ac_count + 1 && ac_count=$as_val
13359    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13360      # Best one so far, save it but keep looking for a better one
13361      ac_cv_path_GREP="$ac_path_GREP"
13362      ac_path_GREP_max=$ac_count
13363    fi
13364    # 10*(2^10) chars as input seems more than enough
13365    test $ac_count -gt 10 && break
13366  done
13367  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13368esac
13369
13370      $ac_path_GREP_found && break 3
13371    done
13372  done
13373  done
13374IFS=$as_save_IFS
13375  if test -z "$ac_cv_path_GREP"; then
13376    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13377  fi
13378else
13379  ac_cv_path_GREP=$GREP
13380fi
13381
13382fi
13383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13384$as_echo "$ac_cv_path_GREP" >&6; }
13385 GREP="$ac_cv_path_GREP"
13386
13387
13388  else
13389    # The variable is set, but is it from the command line or the environment?
13390
13391    # Try to remove the string !GREP! from our list.
13392    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13393    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13394      # If it failed, the variable was not from the command line. Ignore it,
13395      # but warn the user (except for BASH, which is always set by the calling BASH).
13396      if test "xGREP" != xBASH; then
13397        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13398$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13399      fi
13400      # Try to locate tool using the code snippet
13401      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13402$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13403if ${ac_cv_path_GREP+:} false; then :
13404  $as_echo_n "(cached) " >&6
13405else
13406  if test -z "$GREP"; then
13407  ac_path_GREP_found=false
13408  # Loop through the user's path and test for each of PROGNAME-LIST
13409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13410for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13411do
13412  IFS=$as_save_IFS
13413  test -z "$as_dir" && as_dir=.
13414    for ac_prog in grep ggrep; do
13415    for ac_exec_ext in '' $ac_executable_extensions; do
13416      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13417      as_fn_executable_p "$ac_path_GREP" || continue
13418# Check for GNU ac_path_GREP and select it if it is found.
13419  # Check for GNU $ac_path_GREP
13420case `"$ac_path_GREP" --version 2>&1` in
13421*GNU*)
13422  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13423*)
13424  ac_count=0
13425  $as_echo_n 0123456789 >"conftest.in"
13426  while :
13427  do
13428    cat "conftest.in" "conftest.in" >"conftest.tmp"
13429    mv "conftest.tmp" "conftest.in"
13430    cp "conftest.in" "conftest.nl"
13431    $as_echo 'GREP' >> "conftest.nl"
13432    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13433    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13434    as_fn_arith $ac_count + 1 && ac_count=$as_val
13435    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13436      # Best one so far, save it but keep looking for a better one
13437      ac_cv_path_GREP="$ac_path_GREP"
13438      ac_path_GREP_max=$ac_count
13439    fi
13440    # 10*(2^10) chars as input seems more than enough
13441    test $ac_count -gt 10 && break
13442  done
13443  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13444esac
13445
13446      $ac_path_GREP_found && break 3
13447    done
13448  done
13449  done
13450IFS=$as_save_IFS
13451  if test -z "$ac_cv_path_GREP"; then
13452    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13453  fi
13454else
13455  ac_cv_path_GREP=$GREP
13456fi
13457
13458fi
13459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13460$as_echo "$ac_cv_path_GREP" >&6; }
13461 GREP="$ac_cv_path_GREP"
13462
13463
13464    else
13465      # If it succeeded, then it was overridden by the user. We will use it
13466      # for the tool.
13467
13468      # First remove it from the list of overridden variables, so we can test
13469      # for unknown variables in the end.
13470      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13471
13472      # Check if we try to supply an empty value
13473      if test "x$GREP" = x; then
13474        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13475$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13476        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13477$as_echo_n "checking for GREP... " >&6; }
13478        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13479$as_echo "disabled" >&6; }
13480      else
13481        # Check if the provided tool contains a complete path.
13482        tool_specified="$GREP"
13483        tool_basename="${tool_specified##*/}"
13484        if test "x$tool_basename" = "x$tool_specified"; then
13485          # A command without a complete path is provided, search $PATH.
13486          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13487$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13488          # Extract the first word of "$tool_basename", so it can be a program name with args.
13489set dummy $tool_basename; ac_word=$2
13490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13491$as_echo_n "checking for $ac_word... " >&6; }
13492if ${ac_cv_path_GREP+:} false; then :
13493  $as_echo_n "(cached) " >&6
13494else
13495  case $GREP in
13496  [\\/]* | ?:[\\/]*)
13497  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13498  ;;
13499  *)
13500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13501for as_dir in $PATH
13502do
13503  IFS=$as_save_IFS
13504  test -z "$as_dir" && as_dir=.
13505    for ac_exec_ext in '' $ac_executable_extensions; do
13506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13507    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13509    break 2
13510  fi
13511done
13512  done
13513IFS=$as_save_IFS
13514
13515  ;;
13516esac
13517fi
13518GREP=$ac_cv_path_GREP
13519if test -n "$GREP"; then
13520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13521$as_echo "$GREP" >&6; }
13522else
13523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13524$as_echo "no" >&6; }
13525fi
13526
13527
13528          if test "x$GREP" = x; then
13529            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13530          fi
13531        else
13532          # Otherwise we believe it is a complete path. Use it as it is.
13533          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13534$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13535          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13536$as_echo_n "checking for GREP... " >&6; }
13537          if test ! -x "$tool_specified"; then
13538            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13539$as_echo "not found" >&6; }
13540            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13541          fi
13542          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13543$as_echo "$tool_specified" >&6; }
13544        fi
13545      fi
13546    fi
13547
13548  fi
13549
13550
13551  if test "x$GREP" = x; then
13552    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13553  fi
13554
13555
13556
13557
13558  # Publish this variable in the help.
13559
13560
13561  if [ -z "${EGREP+x}" ]; then
13562    # The variable is not set by user, try to locate tool using the code snippet
13563    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13564$as_echo_n "checking for egrep... " >&6; }
13565if ${ac_cv_path_EGREP+:} false; then :
13566  $as_echo_n "(cached) " >&6
13567else
13568  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13569   then ac_cv_path_EGREP="$GREP -E"
13570   else
13571     if test -z "$EGREP"; then
13572  ac_path_EGREP_found=false
13573  # Loop through the user's path and test for each of PROGNAME-LIST
13574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13575for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13576do
13577  IFS=$as_save_IFS
13578  test -z "$as_dir" && as_dir=.
13579    for ac_prog in egrep; do
13580    for ac_exec_ext in '' $ac_executable_extensions; do
13581      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13582      as_fn_executable_p "$ac_path_EGREP" || continue
13583# Check for GNU ac_path_EGREP and select it if it is found.
13584  # Check for GNU $ac_path_EGREP
13585case `"$ac_path_EGREP" --version 2>&1` in
13586*GNU*)
13587  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13588*)
13589  ac_count=0
13590  $as_echo_n 0123456789 >"conftest.in"
13591  while :
13592  do
13593    cat "conftest.in" "conftest.in" >"conftest.tmp"
13594    mv "conftest.tmp" "conftest.in"
13595    cp "conftest.in" "conftest.nl"
13596    $as_echo 'EGREP' >> "conftest.nl"
13597    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13598    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13599    as_fn_arith $ac_count + 1 && ac_count=$as_val
13600    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13601      # Best one so far, save it but keep looking for a better one
13602      ac_cv_path_EGREP="$ac_path_EGREP"
13603      ac_path_EGREP_max=$ac_count
13604    fi
13605    # 10*(2^10) chars as input seems more than enough
13606    test $ac_count -gt 10 && break
13607  done
13608  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13609esac
13610
13611      $ac_path_EGREP_found && break 3
13612    done
13613  done
13614  done
13615IFS=$as_save_IFS
13616  if test -z "$ac_cv_path_EGREP"; then
13617    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13618  fi
13619else
13620  ac_cv_path_EGREP=$EGREP
13621fi
13622
13623   fi
13624fi
13625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13626$as_echo "$ac_cv_path_EGREP" >&6; }
13627 EGREP="$ac_cv_path_EGREP"
13628
13629
13630  else
13631    # The variable is set, but is it from the command line or the environment?
13632
13633    # Try to remove the string !EGREP! from our list.
13634    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13635    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13636      # If it failed, the variable was not from the command line. Ignore it,
13637      # but warn the user (except for BASH, which is always set by the calling BASH).
13638      if test "xEGREP" != xBASH; then
13639        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13640$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13641      fi
13642      # Try to locate tool using the code snippet
13643      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13644$as_echo_n "checking for egrep... " >&6; }
13645if ${ac_cv_path_EGREP+:} false; then :
13646  $as_echo_n "(cached) " >&6
13647else
13648  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13649   then ac_cv_path_EGREP="$GREP -E"
13650   else
13651     if test -z "$EGREP"; then
13652  ac_path_EGREP_found=false
13653  # Loop through the user's path and test for each of PROGNAME-LIST
13654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13655for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13656do
13657  IFS=$as_save_IFS
13658  test -z "$as_dir" && as_dir=.
13659    for ac_prog in egrep; do
13660    for ac_exec_ext in '' $ac_executable_extensions; do
13661      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13662      as_fn_executable_p "$ac_path_EGREP" || continue
13663# Check for GNU ac_path_EGREP and select it if it is found.
13664  # Check for GNU $ac_path_EGREP
13665case `"$ac_path_EGREP" --version 2>&1` in
13666*GNU*)
13667  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13668*)
13669  ac_count=0
13670  $as_echo_n 0123456789 >"conftest.in"
13671  while :
13672  do
13673    cat "conftest.in" "conftest.in" >"conftest.tmp"
13674    mv "conftest.tmp" "conftest.in"
13675    cp "conftest.in" "conftest.nl"
13676    $as_echo 'EGREP' >> "conftest.nl"
13677    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13678    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13679    as_fn_arith $ac_count + 1 && ac_count=$as_val
13680    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13681      # Best one so far, save it but keep looking for a better one
13682      ac_cv_path_EGREP="$ac_path_EGREP"
13683      ac_path_EGREP_max=$ac_count
13684    fi
13685    # 10*(2^10) chars as input seems more than enough
13686    test $ac_count -gt 10 && break
13687  done
13688  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13689esac
13690
13691      $ac_path_EGREP_found && break 3
13692    done
13693  done
13694  done
13695IFS=$as_save_IFS
13696  if test -z "$ac_cv_path_EGREP"; then
13697    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13698  fi
13699else
13700  ac_cv_path_EGREP=$EGREP
13701fi
13702
13703   fi
13704fi
13705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13706$as_echo "$ac_cv_path_EGREP" >&6; }
13707 EGREP="$ac_cv_path_EGREP"
13708
13709
13710    else
13711      # If it succeeded, then it was overridden by the user. We will use it
13712      # for the tool.
13713
13714      # First remove it from the list of overridden variables, so we can test
13715      # for unknown variables in the end.
13716      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13717
13718      # Check if we try to supply an empty value
13719      if test "x$EGREP" = x; then
13720        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13721$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13722        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13723$as_echo_n "checking for EGREP... " >&6; }
13724        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13725$as_echo "disabled" >&6; }
13726      else
13727        # Check if the provided tool contains a complete path.
13728        tool_specified="$EGREP"
13729        tool_basename="${tool_specified##*/}"
13730        if test "x$tool_basename" = "x$tool_specified"; then
13731          # A command without a complete path is provided, search $PATH.
13732          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13733$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13734          # Extract the first word of "$tool_basename", so it can be a program name with args.
13735set dummy $tool_basename; ac_word=$2
13736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13737$as_echo_n "checking for $ac_word... " >&6; }
13738if ${ac_cv_path_EGREP+:} false; then :
13739  $as_echo_n "(cached) " >&6
13740else
13741  case $EGREP in
13742  [\\/]* | ?:[\\/]*)
13743  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13744  ;;
13745  *)
13746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13747for as_dir in $PATH
13748do
13749  IFS=$as_save_IFS
13750  test -z "$as_dir" && as_dir=.
13751    for ac_exec_ext in '' $ac_executable_extensions; do
13752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13753    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13755    break 2
13756  fi
13757done
13758  done
13759IFS=$as_save_IFS
13760
13761  ;;
13762esac
13763fi
13764EGREP=$ac_cv_path_EGREP
13765if test -n "$EGREP"; then
13766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13767$as_echo "$EGREP" >&6; }
13768else
13769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13770$as_echo "no" >&6; }
13771fi
13772
13773
13774          if test "x$EGREP" = x; then
13775            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13776          fi
13777        else
13778          # Otherwise we believe it is a complete path. Use it as it is.
13779          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13780$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13781          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13782$as_echo_n "checking for EGREP... " >&6; }
13783          if test ! -x "$tool_specified"; then
13784            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13785$as_echo "not found" >&6; }
13786            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13787          fi
13788          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13789$as_echo "$tool_specified" >&6; }
13790        fi
13791      fi
13792    fi
13793
13794  fi
13795
13796
13797  if test "x$EGREP" = x; then
13798    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13799  fi
13800
13801
13802
13803
13804  # Publish this variable in the help.
13805
13806
13807  if [ -z "${FGREP+x}" ]; then
13808    # The variable is not set by user, try to locate tool using the code snippet
13809    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13810$as_echo_n "checking for fgrep... " >&6; }
13811if ${ac_cv_path_FGREP+:} false; then :
13812  $as_echo_n "(cached) " >&6
13813else
13814  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13815   then ac_cv_path_FGREP="$GREP -F"
13816   else
13817     if test -z "$FGREP"; then
13818  ac_path_FGREP_found=false
13819  # Loop through the user's path and test for each of PROGNAME-LIST
13820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13821for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13822do
13823  IFS=$as_save_IFS
13824  test -z "$as_dir" && as_dir=.
13825    for ac_prog in fgrep; do
13826    for ac_exec_ext in '' $ac_executable_extensions; do
13827      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13828      as_fn_executable_p "$ac_path_FGREP" || continue
13829# Check for GNU ac_path_FGREP and select it if it is found.
13830  # Check for GNU $ac_path_FGREP
13831case `"$ac_path_FGREP" --version 2>&1` in
13832*GNU*)
13833  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13834*)
13835  ac_count=0
13836  $as_echo_n 0123456789 >"conftest.in"
13837  while :
13838  do
13839    cat "conftest.in" "conftest.in" >"conftest.tmp"
13840    mv "conftest.tmp" "conftest.in"
13841    cp "conftest.in" "conftest.nl"
13842    $as_echo 'FGREP' >> "conftest.nl"
13843    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13844    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13845    as_fn_arith $ac_count + 1 && ac_count=$as_val
13846    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13847      # Best one so far, save it but keep looking for a better one
13848      ac_cv_path_FGREP="$ac_path_FGREP"
13849      ac_path_FGREP_max=$ac_count
13850    fi
13851    # 10*(2^10) chars as input seems more than enough
13852    test $ac_count -gt 10 && break
13853  done
13854  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13855esac
13856
13857      $ac_path_FGREP_found && break 3
13858    done
13859  done
13860  done
13861IFS=$as_save_IFS
13862  if test -z "$ac_cv_path_FGREP"; then
13863    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13864  fi
13865else
13866  ac_cv_path_FGREP=$FGREP
13867fi
13868
13869   fi
13870fi
13871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13872$as_echo "$ac_cv_path_FGREP" >&6; }
13873 FGREP="$ac_cv_path_FGREP"
13874
13875
13876  else
13877    # The variable is set, but is it from the command line or the environment?
13878
13879    # Try to remove the string !FGREP! from our list.
13880    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13881    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13882      # If it failed, the variable was not from the command line. Ignore it,
13883      # but warn the user (except for BASH, which is always set by the calling BASH).
13884      if test "xFGREP" != xBASH; then
13885        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13886$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13887      fi
13888      # Try to locate tool using the code snippet
13889      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13890$as_echo_n "checking for fgrep... " >&6; }
13891if ${ac_cv_path_FGREP+:} false; then :
13892  $as_echo_n "(cached) " >&6
13893else
13894  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13895   then ac_cv_path_FGREP="$GREP -F"
13896   else
13897     if test -z "$FGREP"; then
13898  ac_path_FGREP_found=false
13899  # Loop through the user's path and test for each of PROGNAME-LIST
13900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13901for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13902do
13903  IFS=$as_save_IFS
13904  test -z "$as_dir" && as_dir=.
13905    for ac_prog in fgrep; do
13906    for ac_exec_ext in '' $ac_executable_extensions; do
13907      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13908      as_fn_executable_p "$ac_path_FGREP" || continue
13909# Check for GNU ac_path_FGREP and select it if it is found.
13910  # Check for GNU $ac_path_FGREP
13911case `"$ac_path_FGREP" --version 2>&1` in
13912*GNU*)
13913  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13914*)
13915  ac_count=0
13916  $as_echo_n 0123456789 >"conftest.in"
13917  while :
13918  do
13919    cat "conftest.in" "conftest.in" >"conftest.tmp"
13920    mv "conftest.tmp" "conftest.in"
13921    cp "conftest.in" "conftest.nl"
13922    $as_echo 'FGREP' >> "conftest.nl"
13923    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13924    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13925    as_fn_arith $ac_count + 1 && ac_count=$as_val
13926    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13927      # Best one so far, save it but keep looking for a better one
13928      ac_cv_path_FGREP="$ac_path_FGREP"
13929      ac_path_FGREP_max=$ac_count
13930    fi
13931    # 10*(2^10) chars as input seems more than enough
13932    test $ac_count -gt 10 && break
13933  done
13934  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13935esac
13936
13937      $ac_path_FGREP_found && break 3
13938    done
13939  done
13940  done
13941IFS=$as_save_IFS
13942  if test -z "$ac_cv_path_FGREP"; then
13943    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13944  fi
13945else
13946  ac_cv_path_FGREP=$FGREP
13947fi
13948
13949   fi
13950fi
13951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13952$as_echo "$ac_cv_path_FGREP" >&6; }
13953 FGREP="$ac_cv_path_FGREP"
13954
13955
13956    else
13957      # If it succeeded, then it was overridden by the user. We will use it
13958      # for the tool.
13959
13960      # First remove it from the list of overridden variables, so we can test
13961      # for unknown variables in the end.
13962      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13963
13964      # Check if we try to supply an empty value
13965      if test "x$FGREP" = x; then
13966        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13967$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13968        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13969$as_echo_n "checking for FGREP... " >&6; }
13970        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13971$as_echo "disabled" >&6; }
13972      else
13973        # Check if the provided tool contains a complete path.
13974        tool_specified="$FGREP"
13975        tool_basename="${tool_specified##*/}"
13976        if test "x$tool_basename" = "x$tool_specified"; then
13977          # A command without a complete path is provided, search $PATH.
13978          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13979$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13980          # Extract the first word of "$tool_basename", so it can be a program name with args.
13981set dummy $tool_basename; ac_word=$2
13982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13983$as_echo_n "checking for $ac_word... " >&6; }
13984if ${ac_cv_path_FGREP+:} false; then :
13985  $as_echo_n "(cached) " >&6
13986else
13987  case $FGREP in
13988  [\\/]* | ?:[\\/]*)
13989  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13990  ;;
13991  *)
13992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13993for as_dir in $PATH
13994do
13995  IFS=$as_save_IFS
13996  test -z "$as_dir" && as_dir=.
13997    for ac_exec_ext in '' $ac_executable_extensions; do
13998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13999    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14001    break 2
14002  fi
14003done
14004  done
14005IFS=$as_save_IFS
14006
14007  ;;
14008esac
14009fi
14010FGREP=$ac_cv_path_FGREP
14011if test -n "$FGREP"; then
14012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14013$as_echo "$FGREP" >&6; }
14014else
14015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14016$as_echo "no" >&6; }
14017fi
14018
14019
14020          if test "x$FGREP" = x; then
14021            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14022          fi
14023        else
14024          # Otherwise we believe it is a complete path. Use it as it is.
14025          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14026$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14027          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14028$as_echo_n "checking for FGREP... " >&6; }
14029          if test ! -x "$tool_specified"; then
14030            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14031$as_echo "not found" >&6; }
14032            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14033          fi
14034          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14035$as_echo "$tool_specified" >&6; }
14036        fi
14037      fi
14038    fi
14039
14040  fi
14041
14042
14043  if test "x$FGREP" = x; then
14044    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14045  fi
14046
14047
14048
14049
14050  # Publish this variable in the help.
14051
14052
14053  if [ -z "${SED+x}" ]; then
14054    # The variable is not set by user, try to locate tool using the code snippet
14055    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14056$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14057if ${ac_cv_path_SED+:} false; then :
14058  $as_echo_n "(cached) " >&6
14059else
14060            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14061     for ac_i in 1 2 3 4 5 6 7; do
14062       ac_script="$ac_script$as_nl$ac_script"
14063     done
14064     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14065     { ac_script=; unset ac_script;}
14066     if test -z "$SED"; then
14067  ac_path_SED_found=false
14068  # Loop through the user's path and test for each of PROGNAME-LIST
14069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14070for as_dir in $PATH
14071do
14072  IFS=$as_save_IFS
14073  test -z "$as_dir" && as_dir=.
14074    for ac_prog in sed gsed; do
14075    for ac_exec_ext in '' $ac_executable_extensions; do
14076      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14077      as_fn_executable_p "$ac_path_SED" || continue
14078# Check for GNU ac_path_SED and select it if it is found.
14079  # Check for GNU $ac_path_SED
14080case `"$ac_path_SED" --version 2>&1` in
14081*GNU*)
14082  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14083*)
14084  ac_count=0
14085  $as_echo_n 0123456789 >"conftest.in"
14086  while :
14087  do
14088    cat "conftest.in" "conftest.in" >"conftest.tmp"
14089    mv "conftest.tmp" "conftest.in"
14090    cp "conftest.in" "conftest.nl"
14091    $as_echo '' >> "conftest.nl"
14092    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14093    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14094    as_fn_arith $ac_count + 1 && ac_count=$as_val
14095    if test $ac_count -gt ${ac_path_SED_max-0}; then
14096      # Best one so far, save it but keep looking for a better one
14097      ac_cv_path_SED="$ac_path_SED"
14098      ac_path_SED_max=$ac_count
14099    fi
14100    # 10*(2^10) chars as input seems more than enough
14101    test $ac_count -gt 10 && break
14102  done
14103  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14104esac
14105
14106      $ac_path_SED_found && break 3
14107    done
14108  done
14109  done
14110IFS=$as_save_IFS
14111  if test -z "$ac_cv_path_SED"; then
14112    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14113  fi
14114else
14115  ac_cv_path_SED=$SED
14116fi
14117
14118fi
14119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14120$as_echo "$ac_cv_path_SED" >&6; }
14121 SED="$ac_cv_path_SED"
14122  rm -f conftest.sed
14123
14124  else
14125    # The variable is set, but is it from the command line or the environment?
14126
14127    # Try to remove the string !SED! from our list.
14128    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14129    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14130      # If it failed, the variable was not from the command line. Ignore it,
14131      # but warn the user (except for BASH, which is always set by the calling BASH).
14132      if test "xSED" != xBASH; then
14133        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14134$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14135      fi
14136      # Try to locate tool using the code snippet
14137      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14138$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14139if ${ac_cv_path_SED+:} false; then :
14140  $as_echo_n "(cached) " >&6
14141else
14142            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14143     for ac_i in 1 2 3 4 5 6 7; do
14144       ac_script="$ac_script$as_nl$ac_script"
14145     done
14146     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14147     { ac_script=; unset ac_script;}
14148     if test -z "$SED"; then
14149  ac_path_SED_found=false
14150  # Loop through the user's path and test for each of PROGNAME-LIST
14151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14152for as_dir in $PATH
14153do
14154  IFS=$as_save_IFS
14155  test -z "$as_dir" && as_dir=.
14156    for ac_prog in sed gsed; do
14157    for ac_exec_ext in '' $ac_executable_extensions; do
14158      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14159      as_fn_executable_p "$ac_path_SED" || continue
14160# Check for GNU ac_path_SED and select it if it is found.
14161  # Check for GNU $ac_path_SED
14162case `"$ac_path_SED" --version 2>&1` in
14163*GNU*)
14164  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14165*)
14166  ac_count=0
14167  $as_echo_n 0123456789 >"conftest.in"
14168  while :
14169  do
14170    cat "conftest.in" "conftest.in" >"conftest.tmp"
14171    mv "conftest.tmp" "conftest.in"
14172    cp "conftest.in" "conftest.nl"
14173    $as_echo '' >> "conftest.nl"
14174    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14175    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14176    as_fn_arith $ac_count + 1 && ac_count=$as_val
14177    if test $ac_count -gt ${ac_path_SED_max-0}; then
14178      # Best one so far, save it but keep looking for a better one
14179      ac_cv_path_SED="$ac_path_SED"
14180      ac_path_SED_max=$ac_count
14181    fi
14182    # 10*(2^10) chars as input seems more than enough
14183    test $ac_count -gt 10 && break
14184  done
14185  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14186esac
14187
14188      $ac_path_SED_found && break 3
14189    done
14190  done
14191  done
14192IFS=$as_save_IFS
14193  if test -z "$ac_cv_path_SED"; then
14194    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14195  fi
14196else
14197  ac_cv_path_SED=$SED
14198fi
14199
14200fi
14201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14202$as_echo "$ac_cv_path_SED" >&6; }
14203 SED="$ac_cv_path_SED"
14204  rm -f conftest.sed
14205
14206    else
14207      # If it succeeded, then it was overridden by the user. We will use it
14208      # for the tool.
14209
14210      # First remove it from the list of overridden variables, so we can test
14211      # for unknown variables in the end.
14212      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14213
14214      # Check if we try to supply an empty value
14215      if test "x$SED" = x; then
14216        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14217$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14218        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14219$as_echo_n "checking for SED... " >&6; }
14220        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14221$as_echo "disabled" >&6; }
14222      else
14223        # Check if the provided tool contains a complete path.
14224        tool_specified="$SED"
14225        tool_basename="${tool_specified##*/}"
14226        if test "x$tool_basename" = "x$tool_specified"; then
14227          # A command without a complete path is provided, search $PATH.
14228          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14229$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14230          # Extract the first word of "$tool_basename", so it can be a program name with args.
14231set dummy $tool_basename; ac_word=$2
14232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14233$as_echo_n "checking for $ac_word... " >&6; }
14234if ${ac_cv_path_SED+:} false; then :
14235  $as_echo_n "(cached) " >&6
14236else
14237  case $SED in
14238  [\\/]* | ?:[\\/]*)
14239  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14240  ;;
14241  *)
14242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14243for as_dir in $PATH
14244do
14245  IFS=$as_save_IFS
14246  test -z "$as_dir" && as_dir=.
14247    for ac_exec_ext in '' $ac_executable_extensions; do
14248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14249    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14251    break 2
14252  fi
14253done
14254  done
14255IFS=$as_save_IFS
14256
14257  ;;
14258esac
14259fi
14260SED=$ac_cv_path_SED
14261if test -n "$SED"; then
14262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14263$as_echo "$SED" >&6; }
14264else
14265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14266$as_echo "no" >&6; }
14267fi
14268
14269
14270          if test "x$SED" = x; then
14271            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14272          fi
14273        else
14274          # Otherwise we believe it is a complete path. Use it as it is.
14275          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14276$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14277          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14278$as_echo_n "checking for SED... " >&6; }
14279          if test ! -x "$tool_specified"; then
14280            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14281$as_echo "not found" >&6; }
14282            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14283          fi
14284          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14285$as_echo "$tool_specified" >&6; }
14286        fi
14287      fi
14288    fi
14289
14290  fi
14291
14292
14293  if test "x$SED" = x; then
14294    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14295  fi
14296
14297
14298
14299  # Always force rm.
14300  RM="$RM -f"
14301
14302  # pwd behaves differently on various platforms and some don't support the -L flag.
14303  # Always use the bash builtin pwd to get uniform behavior.
14304  THEPWDCMD=pwd
14305
14306  # These are not required on all platforms
14307
14308
14309  # Publish this variable in the help.
14310
14311
14312  if [ -z "${CYGPATH+x}" ]; then
14313    # The variable is not set by user, try to locate tool using the code snippet
14314    for ac_prog in cygpath
14315do
14316  # Extract the first word of "$ac_prog", so it can be a program name with args.
14317set dummy $ac_prog; ac_word=$2
14318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14319$as_echo_n "checking for $ac_word... " >&6; }
14320if ${ac_cv_path_CYGPATH+:} false; then :
14321  $as_echo_n "(cached) " >&6
14322else
14323  case $CYGPATH in
14324  [\\/]* | ?:[\\/]*)
14325  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14326  ;;
14327  *)
14328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14329for as_dir in $PATH
14330do
14331  IFS=$as_save_IFS
14332  test -z "$as_dir" && as_dir=.
14333    for ac_exec_ext in '' $ac_executable_extensions; do
14334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14335    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14337    break 2
14338  fi
14339done
14340  done
14341IFS=$as_save_IFS
14342
14343  ;;
14344esac
14345fi
14346CYGPATH=$ac_cv_path_CYGPATH
14347if test -n "$CYGPATH"; then
14348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14349$as_echo "$CYGPATH" >&6; }
14350else
14351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14352$as_echo "no" >&6; }
14353fi
14354
14355
14356  test -n "$CYGPATH" && break
14357done
14358
14359  else
14360    # The variable is set, but is it from the command line or the environment?
14361
14362    # Try to remove the string !CYGPATH! from our list.
14363    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14364    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14365      # If it failed, the variable was not from the command line. Ignore it,
14366      # but warn the user (except for BASH, which is always set by the calling BASH).
14367      if test "xCYGPATH" != xBASH; then
14368        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14369$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14370      fi
14371      # Try to locate tool using the code snippet
14372      for ac_prog in cygpath
14373do
14374  # Extract the first word of "$ac_prog", so it can be a program name with args.
14375set dummy $ac_prog; ac_word=$2
14376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14377$as_echo_n "checking for $ac_word... " >&6; }
14378if ${ac_cv_path_CYGPATH+:} false; then :
14379  $as_echo_n "(cached) " >&6
14380else
14381  case $CYGPATH in
14382  [\\/]* | ?:[\\/]*)
14383  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14384  ;;
14385  *)
14386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14387for as_dir in $PATH
14388do
14389  IFS=$as_save_IFS
14390  test -z "$as_dir" && as_dir=.
14391    for ac_exec_ext in '' $ac_executable_extensions; do
14392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14393    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14395    break 2
14396  fi
14397done
14398  done
14399IFS=$as_save_IFS
14400
14401  ;;
14402esac
14403fi
14404CYGPATH=$ac_cv_path_CYGPATH
14405if test -n "$CYGPATH"; then
14406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14407$as_echo "$CYGPATH" >&6; }
14408else
14409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14410$as_echo "no" >&6; }
14411fi
14412
14413
14414  test -n "$CYGPATH" && break
14415done
14416
14417    else
14418      # If it succeeded, then it was overridden by the user. We will use it
14419      # for the tool.
14420
14421      # First remove it from the list of overridden variables, so we can test
14422      # for unknown variables in the end.
14423      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14424
14425      # Check if we try to supply an empty value
14426      if test "x$CYGPATH" = x; then
14427        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14428$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14429        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14430$as_echo_n "checking for CYGPATH... " >&6; }
14431        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14432$as_echo "disabled" >&6; }
14433      else
14434        # Check if the provided tool contains a complete path.
14435        tool_specified="$CYGPATH"
14436        tool_basename="${tool_specified##*/}"
14437        if test "x$tool_basename" = "x$tool_specified"; then
14438          # A command without a complete path is provided, search $PATH.
14439          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14440$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14441          # Extract the first word of "$tool_basename", so it can be a program name with args.
14442set dummy $tool_basename; ac_word=$2
14443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14444$as_echo_n "checking for $ac_word... " >&6; }
14445if ${ac_cv_path_CYGPATH+:} false; then :
14446  $as_echo_n "(cached) " >&6
14447else
14448  case $CYGPATH in
14449  [\\/]* | ?:[\\/]*)
14450  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14451  ;;
14452  *)
14453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14454for as_dir in $PATH
14455do
14456  IFS=$as_save_IFS
14457  test -z "$as_dir" && as_dir=.
14458    for ac_exec_ext in '' $ac_executable_extensions; do
14459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14460    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14462    break 2
14463  fi
14464done
14465  done
14466IFS=$as_save_IFS
14467
14468  ;;
14469esac
14470fi
14471CYGPATH=$ac_cv_path_CYGPATH
14472if test -n "$CYGPATH"; then
14473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14474$as_echo "$CYGPATH" >&6; }
14475else
14476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14477$as_echo "no" >&6; }
14478fi
14479
14480
14481          if test "x$CYGPATH" = x; then
14482            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14483          fi
14484        else
14485          # Otherwise we believe it is a complete path. Use it as it is.
14486          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14487$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14488          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14489$as_echo_n "checking for CYGPATH... " >&6; }
14490          if test ! -x "$tool_specified"; then
14491            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14492$as_echo "not found" >&6; }
14493            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14494          fi
14495          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14496$as_echo "$tool_specified" >&6; }
14497        fi
14498      fi
14499    fi
14500
14501  fi
14502
14503
14504
14505
14506  # Publish this variable in the help.
14507
14508
14509  if [ -z "${READLINK+x}" ]; then
14510    # The variable is not set by user, try to locate tool using the code snippet
14511    for ac_prog in greadlink readlink
14512do
14513  # Extract the first word of "$ac_prog", so it can be a program name with args.
14514set dummy $ac_prog; ac_word=$2
14515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14516$as_echo_n "checking for $ac_word... " >&6; }
14517if ${ac_cv_path_READLINK+:} false; then :
14518  $as_echo_n "(cached) " >&6
14519else
14520  case $READLINK in
14521  [\\/]* | ?:[\\/]*)
14522  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14523  ;;
14524  *)
14525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14526for as_dir in $PATH
14527do
14528  IFS=$as_save_IFS
14529  test -z "$as_dir" && as_dir=.
14530    for ac_exec_ext in '' $ac_executable_extensions; do
14531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14532    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14534    break 2
14535  fi
14536done
14537  done
14538IFS=$as_save_IFS
14539
14540  ;;
14541esac
14542fi
14543READLINK=$ac_cv_path_READLINK
14544if test -n "$READLINK"; then
14545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14546$as_echo "$READLINK" >&6; }
14547else
14548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14549$as_echo "no" >&6; }
14550fi
14551
14552
14553  test -n "$READLINK" && break
14554done
14555
14556  else
14557    # The variable is set, but is it from the command line or the environment?
14558
14559    # Try to remove the string !READLINK! from our list.
14560    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14561    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14562      # If it failed, the variable was not from the command line. Ignore it,
14563      # but warn the user (except for BASH, which is always set by the calling BASH).
14564      if test "xREADLINK" != xBASH; then
14565        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14566$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14567      fi
14568      # Try to locate tool using the code snippet
14569      for ac_prog in greadlink readlink
14570do
14571  # Extract the first word of "$ac_prog", so it can be a program name with args.
14572set dummy $ac_prog; ac_word=$2
14573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14574$as_echo_n "checking for $ac_word... " >&6; }
14575if ${ac_cv_path_READLINK+:} false; then :
14576  $as_echo_n "(cached) " >&6
14577else
14578  case $READLINK in
14579  [\\/]* | ?:[\\/]*)
14580  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14581  ;;
14582  *)
14583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14584for as_dir in $PATH
14585do
14586  IFS=$as_save_IFS
14587  test -z "$as_dir" && as_dir=.
14588    for ac_exec_ext in '' $ac_executable_extensions; do
14589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14590    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14592    break 2
14593  fi
14594done
14595  done
14596IFS=$as_save_IFS
14597
14598  ;;
14599esac
14600fi
14601READLINK=$ac_cv_path_READLINK
14602if test -n "$READLINK"; then
14603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14604$as_echo "$READLINK" >&6; }
14605else
14606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14607$as_echo "no" >&6; }
14608fi
14609
14610
14611  test -n "$READLINK" && break
14612done
14613
14614    else
14615      # If it succeeded, then it was overridden by the user. We will use it
14616      # for the tool.
14617
14618      # First remove it from the list of overridden variables, so we can test
14619      # for unknown variables in the end.
14620      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14621
14622      # Check if we try to supply an empty value
14623      if test "x$READLINK" = x; then
14624        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14625$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14626        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14627$as_echo_n "checking for READLINK... " >&6; }
14628        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14629$as_echo "disabled" >&6; }
14630      else
14631        # Check if the provided tool contains a complete path.
14632        tool_specified="$READLINK"
14633        tool_basename="${tool_specified##*/}"
14634        if test "x$tool_basename" = "x$tool_specified"; then
14635          # A command without a complete path is provided, search $PATH.
14636          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14637$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14638          # Extract the first word of "$tool_basename", so it can be a program name with args.
14639set dummy $tool_basename; ac_word=$2
14640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14641$as_echo_n "checking for $ac_word... " >&6; }
14642if ${ac_cv_path_READLINK+:} false; then :
14643  $as_echo_n "(cached) " >&6
14644else
14645  case $READLINK in
14646  [\\/]* | ?:[\\/]*)
14647  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14648  ;;
14649  *)
14650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14651for as_dir in $PATH
14652do
14653  IFS=$as_save_IFS
14654  test -z "$as_dir" && as_dir=.
14655    for ac_exec_ext in '' $ac_executable_extensions; do
14656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14657    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14659    break 2
14660  fi
14661done
14662  done
14663IFS=$as_save_IFS
14664
14665  ;;
14666esac
14667fi
14668READLINK=$ac_cv_path_READLINK
14669if test -n "$READLINK"; then
14670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14671$as_echo "$READLINK" >&6; }
14672else
14673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14674$as_echo "no" >&6; }
14675fi
14676
14677
14678          if test "x$READLINK" = x; then
14679            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14680          fi
14681        else
14682          # Otherwise we believe it is a complete path. Use it as it is.
14683          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14684$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14685          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14686$as_echo_n "checking for READLINK... " >&6; }
14687          if test ! -x "$tool_specified"; then
14688            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14689$as_echo "not found" >&6; }
14690            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14691          fi
14692          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14693$as_echo "$tool_specified" >&6; }
14694        fi
14695      fi
14696    fi
14697
14698  fi
14699
14700
14701
14702
14703  # Publish this variable in the help.
14704
14705
14706  if [ -z "${DF+x}" ]; then
14707    # The variable is not set by user, try to locate tool using the code snippet
14708    for ac_prog in df
14709do
14710  # Extract the first word of "$ac_prog", so it can be a program name with args.
14711set dummy $ac_prog; ac_word=$2
14712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14713$as_echo_n "checking for $ac_word... " >&6; }
14714if ${ac_cv_path_DF+:} false; then :
14715  $as_echo_n "(cached) " >&6
14716else
14717  case $DF in
14718  [\\/]* | ?:[\\/]*)
14719  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14720  ;;
14721  *)
14722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14723for as_dir in $PATH
14724do
14725  IFS=$as_save_IFS
14726  test -z "$as_dir" && as_dir=.
14727    for ac_exec_ext in '' $ac_executable_extensions; do
14728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14729    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14731    break 2
14732  fi
14733done
14734  done
14735IFS=$as_save_IFS
14736
14737  ;;
14738esac
14739fi
14740DF=$ac_cv_path_DF
14741if test -n "$DF"; then
14742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14743$as_echo "$DF" >&6; }
14744else
14745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14746$as_echo "no" >&6; }
14747fi
14748
14749
14750  test -n "$DF" && break
14751done
14752
14753  else
14754    # The variable is set, but is it from the command line or the environment?
14755
14756    # Try to remove the string !DF! from our list.
14757    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14758    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14759      # If it failed, the variable was not from the command line. Ignore it,
14760      # but warn the user (except for BASH, which is always set by the calling BASH).
14761      if test "xDF" != xBASH; then
14762        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14763$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14764      fi
14765      # Try to locate tool using the code snippet
14766      for ac_prog in df
14767do
14768  # Extract the first word of "$ac_prog", so it can be a program name with args.
14769set dummy $ac_prog; ac_word=$2
14770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14771$as_echo_n "checking for $ac_word... " >&6; }
14772if ${ac_cv_path_DF+:} false; then :
14773  $as_echo_n "(cached) " >&6
14774else
14775  case $DF in
14776  [\\/]* | ?:[\\/]*)
14777  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14778  ;;
14779  *)
14780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14781for as_dir in $PATH
14782do
14783  IFS=$as_save_IFS
14784  test -z "$as_dir" && as_dir=.
14785    for ac_exec_ext in '' $ac_executable_extensions; do
14786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14787    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14789    break 2
14790  fi
14791done
14792  done
14793IFS=$as_save_IFS
14794
14795  ;;
14796esac
14797fi
14798DF=$ac_cv_path_DF
14799if test -n "$DF"; then
14800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14801$as_echo "$DF" >&6; }
14802else
14803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14804$as_echo "no" >&6; }
14805fi
14806
14807
14808  test -n "$DF" && break
14809done
14810
14811    else
14812      # If it succeeded, then it was overridden by the user. We will use it
14813      # for the tool.
14814
14815      # First remove it from the list of overridden variables, so we can test
14816      # for unknown variables in the end.
14817      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14818
14819      # Check if we try to supply an empty value
14820      if test "x$DF" = x; then
14821        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14822$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14823        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14824$as_echo_n "checking for DF... " >&6; }
14825        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14826$as_echo "disabled" >&6; }
14827      else
14828        # Check if the provided tool contains a complete path.
14829        tool_specified="$DF"
14830        tool_basename="${tool_specified##*/}"
14831        if test "x$tool_basename" = "x$tool_specified"; then
14832          # A command without a complete path is provided, search $PATH.
14833          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14834$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14835          # Extract the first word of "$tool_basename", so it can be a program name with args.
14836set dummy $tool_basename; ac_word=$2
14837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14838$as_echo_n "checking for $ac_word... " >&6; }
14839if ${ac_cv_path_DF+:} false; then :
14840  $as_echo_n "(cached) " >&6
14841else
14842  case $DF in
14843  [\\/]* | ?:[\\/]*)
14844  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14845  ;;
14846  *)
14847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14848for as_dir in $PATH
14849do
14850  IFS=$as_save_IFS
14851  test -z "$as_dir" && as_dir=.
14852    for ac_exec_ext in '' $ac_executable_extensions; do
14853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14854    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14856    break 2
14857  fi
14858done
14859  done
14860IFS=$as_save_IFS
14861
14862  ;;
14863esac
14864fi
14865DF=$ac_cv_path_DF
14866if test -n "$DF"; then
14867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14868$as_echo "$DF" >&6; }
14869else
14870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14871$as_echo "no" >&6; }
14872fi
14873
14874
14875          if test "x$DF" = x; then
14876            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14877          fi
14878        else
14879          # Otherwise we believe it is a complete path. Use it as it is.
14880          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14881$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14882          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14883$as_echo_n "checking for DF... " >&6; }
14884          if test ! -x "$tool_specified"; then
14885            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14886$as_echo "not found" >&6; }
14887            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14888          fi
14889          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14890$as_echo "$tool_specified" >&6; }
14891        fi
14892      fi
14893    fi
14894
14895  fi
14896
14897
14898
14899
14900  # Publish this variable in the help.
14901
14902
14903  if [ -z "${CPIO+x}" ]; then
14904    # The variable is not set by user, try to locate tool using the code snippet
14905    for ac_prog in cpio bsdcpio
14906do
14907  # Extract the first word of "$ac_prog", so it can be a program name with args.
14908set dummy $ac_prog; ac_word=$2
14909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14910$as_echo_n "checking for $ac_word... " >&6; }
14911if ${ac_cv_path_CPIO+:} false; then :
14912  $as_echo_n "(cached) " >&6
14913else
14914  case $CPIO in
14915  [\\/]* | ?:[\\/]*)
14916  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14917  ;;
14918  *)
14919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14920for as_dir in $PATH
14921do
14922  IFS=$as_save_IFS
14923  test -z "$as_dir" && as_dir=.
14924    for ac_exec_ext in '' $ac_executable_extensions; do
14925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14926    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14928    break 2
14929  fi
14930done
14931  done
14932IFS=$as_save_IFS
14933
14934  ;;
14935esac
14936fi
14937CPIO=$ac_cv_path_CPIO
14938if test -n "$CPIO"; then
14939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14940$as_echo "$CPIO" >&6; }
14941else
14942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14943$as_echo "no" >&6; }
14944fi
14945
14946
14947  test -n "$CPIO" && break
14948done
14949
14950  else
14951    # The variable is set, but is it from the command line or the environment?
14952
14953    # Try to remove the string !CPIO! from our list.
14954    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14955    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14956      # If it failed, the variable was not from the command line. Ignore it,
14957      # but warn the user (except for BASH, which is always set by the calling BASH).
14958      if test "xCPIO" != xBASH; then
14959        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14960$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14961      fi
14962      # Try to locate tool using the code snippet
14963      for ac_prog in cpio bsdcpio
14964do
14965  # Extract the first word of "$ac_prog", so it can be a program name with args.
14966set dummy $ac_prog; ac_word=$2
14967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14968$as_echo_n "checking for $ac_word... " >&6; }
14969if ${ac_cv_path_CPIO+:} false; then :
14970  $as_echo_n "(cached) " >&6
14971else
14972  case $CPIO in
14973  [\\/]* | ?:[\\/]*)
14974  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14975  ;;
14976  *)
14977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14978for as_dir in $PATH
14979do
14980  IFS=$as_save_IFS
14981  test -z "$as_dir" && as_dir=.
14982    for ac_exec_ext in '' $ac_executable_extensions; do
14983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14984    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14986    break 2
14987  fi
14988done
14989  done
14990IFS=$as_save_IFS
14991
14992  ;;
14993esac
14994fi
14995CPIO=$ac_cv_path_CPIO
14996if test -n "$CPIO"; then
14997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14998$as_echo "$CPIO" >&6; }
14999else
15000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15001$as_echo "no" >&6; }
15002fi
15003
15004
15005  test -n "$CPIO" && break
15006done
15007
15008    else
15009      # If it succeeded, then it was overridden by the user. We will use it
15010      # for the tool.
15011
15012      # First remove it from the list of overridden variables, so we can test
15013      # for unknown variables in the end.
15014      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15015
15016      # Check if we try to supply an empty value
15017      if test "x$CPIO" = x; then
15018        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15019$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15020        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15021$as_echo_n "checking for CPIO... " >&6; }
15022        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15023$as_echo "disabled" >&6; }
15024      else
15025        # Check if the provided tool contains a complete path.
15026        tool_specified="$CPIO"
15027        tool_basename="${tool_specified##*/}"
15028        if test "x$tool_basename" = "x$tool_specified"; then
15029          # A command without a complete path is provided, search $PATH.
15030          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15031$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15032          # Extract the first word of "$tool_basename", so it can be a program name with args.
15033set dummy $tool_basename; ac_word=$2
15034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15035$as_echo_n "checking for $ac_word... " >&6; }
15036if ${ac_cv_path_CPIO+:} false; then :
15037  $as_echo_n "(cached) " >&6
15038else
15039  case $CPIO in
15040  [\\/]* | ?:[\\/]*)
15041  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15042  ;;
15043  *)
15044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15045for as_dir in $PATH
15046do
15047  IFS=$as_save_IFS
15048  test -z "$as_dir" && as_dir=.
15049    for ac_exec_ext in '' $ac_executable_extensions; do
15050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15051    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15053    break 2
15054  fi
15055done
15056  done
15057IFS=$as_save_IFS
15058
15059  ;;
15060esac
15061fi
15062CPIO=$ac_cv_path_CPIO
15063if test -n "$CPIO"; then
15064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15065$as_echo "$CPIO" >&6; }
15066else
15067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15068$as_echo "no" >&6; }
15069fi
15070
15071
15072          if test "x$CPIO" = x; then
15073            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15074          fi
15075        else
15076          # Otherwise we believe it is a complete path. Use it as it is.
15077          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15078$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15079          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15080$as_echo_n "checking for CPIO... " >&6; }
15081          if test ! -x "$tool_specified"; then
15082            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15083$as_echo "not found" >&6; }
15084            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15085          fi
15086          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15087$as_echo "$tool_specified" >&6; }
15088        fi
15089      fi
15090    fi
15091
15092  fi
15093
15094
15095
15096
15097  # Publish this variable in the help.
15098
15099
15100  if [ -z "${NICE+x}" ]; then
15101    # The variable is not set by user, try to locate tool using the code snippet
15102    for ac_prog in nice
15103do
15104  # Extract the first word of "$ac_prog", so it can be a program name with args.
15105set dummy $ac_prog; ac_word=$2
15106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15107$as_echo_n "checking for $ac_word... " >&6; }
15108if ${ac_cv_path_NICE+:} false; then :
15109  $as_echo_n "(cached) " >&6
15110else
15111  case $NICE in
15112  [\\/]* | ?:[\\/]*)
15113  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15114  ;;
15115  *)
15116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15117for as_dir in $PATH
15118do
15119  IFS=$as_save_IFS
15120  test -z "$as_dir" && as_dir=.
15121    for ac_exec_ext in '' $ac_executable_extensions; do
15122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15123    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15125    break 2
15126  fi
15127done
15128  done
15129IFS=$as_save_IFS
15130
15131  ;;
15132esac
15133fi
15134NICE=$ac_cv_path_NICE
15135if test -n "$NICE"; then
15136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15137$as_echo "$NICE" >&6; }
15138else
15139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15140$as_echo "no" >&6; }
15141fi
15142
15143
15144  test -n "$NICE" && break
15145done
15146
15147  else
15148    # The variable is set, but is it from the command line or the environment?
15149
15150    # Try to remove the string !NICE! from our list.
15151    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15152    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15153      # If it failed, the variable was not from the command line. Ignore it,
15154      # but warn the user (except for BASH, which is always set by the calling BASH).
15155      if test "xNICE" != xBASH; then
15156        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15157$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15158      fi
15159      # Try to locate tool using the code snippet
15160      for ac_prog in nice
15161do
15162  # Extract the first word of "$ac_prog", so it can be a program name with args.
15163set dummy $ac_prog; ac_word=$2
15164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15165$as_echo_n "checking for $ac_word... " >&6; }
15166if ${ac_cv_path_NICE+:} false; then :
15167  $as_echo_n "(cached) " >&6
15168else
15169  case $NICE in
15170  [\\/]* | ?:[\\/]*)
15171  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15172  ;;
15173  *)
15174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15175for as_dir in $PATH
15176do
15177  IFS=$as_save_IFS
15178  test -z "$as_dir" && as_dir=.
15179    for ac_exec_ext in '' $ac_executable_extensions; do
15180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15181    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15183    break 2
15184  fi
15185done
15186  done
15187IFS=$as_save_IFS
15188
15189  ;;
15190esac
15191fi
15192NICE=$ac_cv_path_NICE
15193if test -n "$NICE"; then
15194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15195$as_echo "$NICE" >&6; }
15196else
15197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15198$as_echo "no" >&6; }
15199fi
15200
15201
15202  test -n "$NICE" && break
15203done
15204
15205    else
15206      # If it succeeded, then it was overridden by the user. We will use it
15207      # for the tool.
15208
15209      # First remove it from the list of overridden variables, so we can test
15210      # for unknown variables in the end.
15211      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15212
15213      # Check if we try to supply an empty value
15214      if test "x$NICE" = x; then
15215        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15216$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15217        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15218$as_echo_n "checking for NICE... " >&6; }
15219        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15220$as_echo "disabled" >&6; }
15221      else
15222        # Check if the provided tool contains a complete path.
15223        tool_specified="$NICE"
15224        tool_basename="${tool_specified##*/}"
15225        if test "x$tool_basename" = "x$tool_specified"; then
15226          # A command without a complete path is provided, search $PATH.
15227          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15228$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15229          # Extract the first word of "$tool_basename", so it can be a program name with args.
15230set dummy $tool_basename; ac_word=$2
15231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15232$as_echo_n "checking for $ac_word... " >&6; }
15233if ${ac_cv_path_NICE+:} false; then :
15234  $as_echo_n "(cached) " >&6
15235else
15236  case $NICE in
15237  [\\/]* | ?:[\\/]*)
15238  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15239  ;;
15240  *)
15241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15242for as_dir in $PATH
15243do
15244  IFS=$as_save_IFS
15245  test -z "$as_dir" && as_dir=.
15246    for ac_exec_ext in '' $ac_executable_extensions; do
15247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15248    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15250    break 2
15251  fi
15252done
15253  done
15254IFS=$as_save_IFS
15255
15256  ;;
15257esac
15258fi
15259NICE=$ac_cv_path_NICE
15260if test -n "$NICE"; then
15261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15262$as_echo "$NICE" >&6; }
15263else
15264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15265$as_echo "no" >&6; }
15266fi
15267
15268
15269          if test "x$NICE" = x; then
15270            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15271          fi
15272        else
15273          # Otherwise we believe it is a complete path. Use it as it is.
15274          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15275$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15276          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15277$as_echo_n "checking for NICE... " >&6; }
15278          if test ! -x "$tool_specified"; then
15279            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15280$as_echo "not found" >&6; }
15281            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15282          fi
15283          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15284$as_echo "$tool_specified" >&6; }
15285        fi
15286      fi
15287    fi
15288
15289  fi
15290
15291
15292
15293
15294# Now we can determine OpenJDK build and target platforms. This is required to
15295# have early on.
15296# Make sure we can run config.sub.
15297$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15298  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15299
15300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15301$as_echo_n "checking build system type... " >&6; }
15302if ${ac_cv_build+:} false; then :
15303  $as_echo_n "(cached) " >&6
15304else
15305  ac_build_alias=$build_alias
15306test "x$ac_build_alias" = x &&
15307  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15308test "x$ac_build_alias" = x &&
15309  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15310ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15311  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15312
15313fi
15314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15315$as_echo "$ac_cv_build" >&6; }
15316case $ac_cv_build in
15317*-*-*) ;;
15318*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15319esac
15320build=$ac_cv_build
15321ac_save_IFS=$IFS; IFS='-'
15322set x $ac_cv_build
15323shift
15324build_cpu=$1
15325build_vendor=$2
15326shift; shift
15327# Remember, the first character of IFS is used to create $*,
15328# except with old shells:
15329build_os=$*
15330IFS=$ac_save_IFS
15331case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15332
15333
15334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15335$as_echo_n "checking host system type... " >&6; }
15336if ${ac_cv_host+:} false; then :
15337  $as_echo_n "(cached) " >&6
15338else
15339  if test "x$host_alias" = x; then
15340  ac_cv_host=$ac_cv_build
15341else
15342  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15343    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15344fi
15345
15346fi
15347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15348$as_echo "$ac_cv_host" >&6; }
15349case $ac_cv_host in
15350*-*-*) ;;
15351*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15352esac
15353host=$ac_cv_host
15354ac_save_IFS=$IFS; IFS='-'
15355set x $ac_cv_host
15356shift
15357host_cpu=$1
15358host_vendor=$2
15359shift; shift
15360# Remember, the first character of IFS is used to create $*,
15361# except with old shells:
15362host_os=$*
15363IFS=$ac_save_IFS
15364case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15365
15366
15367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15368$as_echo_n "checking target system type... " >&6; }
15369if ${ac_cv_target+:} false; then :
15370  $as_echo_n "(cached) " >&6
15371else
15372  if test "x$target_alias" = x; then
15373  ac_cv_target=$ac_cv_host
15374else
15375  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15376    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15377fi
15378
15379fi
15380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15381$as_echo "$ac_cv_target" >&6; }
15382case $ac_cv_target in
15383*-*-*) ;;
15384*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15385esac
15386target=$ac_cv_target
15387ac_save_IFS=$IFS; IFS='-'
15388set x $ac_cv_target
15389shift
15390target_cpu=$1
15391target_vendor=$2
15392shift; shift
15393# Remember, the first character of IFS is used to create $*,
15394# except with old shells:
15395target_os=$*
15396IFS=$ac_save_IFS
15397case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15398
15399
15400# The aliases save the names the user supplied, while $host etc.
15401# will get canonicalized.
15402test -n "$target_alias" &&
15403  test "$program_prefix$program_suffix$program_transform_name" = \
15404    NONENONEs,x,x, &&
15405  program_prefix=${target_alias}-
15406
15407  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15408  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15409  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15410  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15411  # to use the configure naming style.
15412
15413
15414
15415
15416
15417  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15418  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15419  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15420  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15421  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15422  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15423
15424
15425
15426  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15427
15428  case "$build_os" in
15429    *linux*)
15430      VAR_OS=linux
15431      VAR_OS_TYPE=unix
15432      ;;
15433    *solaris*)
15434      VAR_OS=solaris
15435      VAR_OS_TYPE=unix
15436      ;;
15437    *darwin*)
15438      VAR_OS=macosx
15439      VAR_OS_TYPE=unix
15440      ;;
15441    *bsd*)
15442      VAR_OS=bsd
15443      VAR_OS_TYPE=unix
15444      ;;
15445    *cygwin*)
15446      VAR_OS=windows
15447      VAR_OS_ENV=windows.cygwin
15448      ;;
15449    *mingw*)
15450      VAR_OS=windows
15451      VAR_OS_ENV=windows.msys
15452      ;;
15453    *aix*)
15454      VAR_OS=aix
15455      VAR_OS_TYPE=unix
15456      ;;
15457    *)
15458      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15459      ;;
15460  esac
15461
15462
15463  # First argument is the cpu name from the trip/quad
15464  case "$build_cpu" in
15465    x86_64)
15466      VAR_CPU=x86_64
15467      VAR_CPU_ARCH=x86
15468      VAR_CPU_BITS=64
15469      VAR_CPU_ENDIAN=little
15470      ;;
15471    i?86)
15472      VAR_CPU=x86
15473      VAR_CPU_ARCH=x86
15474      VAR_CPU_BITS=32
15475      VAR_CPU_ENDIAN=little
15476      ;;
15477    arm*)
15478      VAR_CPU=arm
15479      VAR_CPU_ARCH=arm
15480      VAR_CPU_BITS=32
15481      VAR_CPU_ENDIAN=little
15482      ;;
15483    aarch64)
15484      VAR_CPU=aarch64
15485      VAR_CPU_ARCH=aarch64
15486      VAR_CPU_BITS=64
15487      VAR_CPU_ENDIAN=little
15488      ;;
15489    powerpc)
15490      VAR_CPU=ppc
15491      VAR_CPU_ARCH=ppc
15492      VAR_CPU_BITS=32
15493      VAR_CPU_ENDIAN=big
15494      ;;
15495    powerpc64)
15496      VAR_CPU=ppc64
15497      VAR_CPU_ARCH=ppc
15498      VAR_CPU_BITS=64
15499      VAR_CPU_ENDIAN=big
15500      ;;
15501    powerpc64le)
15502      VAR_CPU=ppc64le
15503      VAR_CPU_ARCH=ppc
15504      VAR_CPU_BITS=64
15505      VAR_CPU_ENDIAN=little
15506      ;;
15507    s390)
15508      VAR_CPU=s390
15509      VAR_CPU_ARCH=s390
15510      VAR_CPU_BITS=32
15511      VAR_CPU_ENDIAN=big
15512      ;;
15513    s390x)
15514      VAR_CPU=s390x
15515      VAR_CPU_ARCH=s390
15516      VAR_CPU_BITS=64
15517      VAR_CPU_ENDIAN=big
15518      ;;
15519    sparc)
15520      VAR_CPU=sparc
15521      VAR_CPU_ARCH=sparc
15522      VAR_CPU_BITS=32
15523      VAR_CPU_ENDIAN=big
15524      ;;
15525    sparcv9|sparc64)
15526      VAR_CPU=sparcv9
15527      VAR_CPU_ARCH=sparc
15528      VAR_CPU_BITS=64
15529      VAR_CPU_ENDIAN=big
15530      ;;
15531    *)
15532      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15533      ;;
15534  esac
15535
15536  # ..and setup our own variables. (Do this explicitely to facilitate searching)
15537  OPENJDK_BUILD_OS="$VAR_OS"
15538  if test "x$VAR_OS_TYPE" != x; then
15539    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15540  else
15541    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15542  fi
15543  if test "x$VAR_OS_ENV" != x; then
15544    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15545  else
15546    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15547  fi
15548  OPENJDK_BUILD_CPU="$VAR_CPU"
15549  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15550  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15551  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15552
15553
15554
15555
15556
15557
15558
15559
15560  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15561$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15563$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15564
15565  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15566
15567  case "$host_os" in
15568    *linux*)
15569      VAR_OS=linux
15570      VAR_OS_TYPE=unix
15571      ;;
15572    *solaris*)
15573      VAR_OS=solaris
15574      VAR_OS_TYPE=unix
15575      ;;
15576    *darwin*)
15577      VAR_OS=macosx
15578      VAR_OS_TYPE=unix
15579      ;;
15580    *bsd*)
15581      VAR_OS=bsd
15582      VAR_OS_TYPE=unix
15583      ;;
15584    *cygwin*)
15585      VAR_OS=windows
15586      VAR_OS_ENV=windows.cygwin
15587      ;;
15588    *mingw*)
15589      VAR_OS=windows
15590      VAR_OS_ENV=windows.msys
15591      ;;
15592    *aix*)
15593      VAR_OS=aix
15594      VAR_OS_TYPE=unix
15595      ;;
15596    *)
15597      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15598      ;;
15599  esac
15600
15601
15602  # First argument is the cpu name from the trip/quad
15603  case "$host_cpu" in
15604    x86_64)
15605      VAR_CPU=x86_64
15606      VAR_CPU_ARCH=x86
15607      VAR_CPU_BITS=64
15608      VAR_CPU_ENDIAN=little
15609      ;;
15610    i?86)
15611      VAR_CPU=x86
15612      VAR_CPU_ARCH=x86
15613      VAR_CPU_BITS=32
15614      VAR_CPU_ENDIAN=little
15615      ;;
15616    arm*)
15617      VAR_CPU=arm
15618      VAR_CPU_ARCH=arm
15619      VAR_CPU_BITS=32
15620      VAR_CPU_ENDIAN=little
15621      ;;
15622    aarch64)
15623      VAR_CPU=aarch64
15624      VAR_CPU_ARCH=aarch64
15625      VAR_CPU_BITS=64
15626      VAR_CPU_ENDIAN=little
15627      ;;
15628    powerpc)
15629      VAR_CPU=ppc
15630      VAR_CPU_ARCH=ppc
15631      VAR_CPU_BITS=32
15632      VAR_CPU_ENDIAN=big
15633      ;;
15634    powerpc64)
15635      VAR_CPU=ppc64
15636      VAR_CPU_ARCH=ppc
15637      VAR_CPU_BITS=64
15638      VAR_CPU_ENDIAN=big
15639      ;;
15640    powerpc64le)
15641      VAR_CPU=ppc64le
15642      VAR_CPU_ARCH=ppc
15643      VAR_CPU_BITS=64
15644      VAR_CPU_ENDIAN=little
15645      ;;
15646    s390)
15647      VAR_CPU=s390
15648      VAR_CPU_ARCH=s390
15649      VAR_CPU_BITS=32
15650      VAR_CPU_ENDIAN=big
15651      ;;
15652    s390x)
15653      VAR_CPU=s390x
15654      VAR_CPU_ARCH=s390
15655      VAR_CPU_BITS=64
15656      VAR_CPU_ENDIAN=big
15657      ;;
15658    sparc)
15659      VAR_CPU=sparc
15660      VAR_CPU_ARCH=sparc
15661      VAR_CPU_BITS=32
15662      VAR_CPU_ENDIAN=big
15663      ;;
15664    sparcv9|sparc64)
15665      VAR_CPU=sparcv9
15666      VAR_CPU_ARCH=sparc
15667      VAR_CPU_BITS=64
15668      VAR_CPU_ENDIAN=big
15669      ;;
15670    *)
15671      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15672      ;;
15673  esac
15674
15675  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15676  OPENJDK_TARGET_OS="$VAR_OS"
15677  if test "x$VAR_OS_TYPE" != x; then
15678    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15679  else
15680    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15681  fi
15682  if test "x$VAR_OS_ENV" != x; then
15683    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15684  else
15685    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15686  fi
15687  OPENJDK_TARGET_CPU="$VAR_CPU"
15688  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15689  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15690  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15691
15692
15693
15694
15695
15696
15697
15698
15699  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15700$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15702$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15703
15704
15705
15706# Check whether --with-target-bits was given.
15707if test "${with_target_bits+set}" = set; then :
15708  withval=$with_target_bits;
15709fi
15710
15711
15712  # We have three types of compiles:
15713  # native  == normal compilation, target system == build system
15714  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15715  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15716  #
15717  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15718    # We're doing a proper cross-compilation
15719    COMPILE_TYPE="cross"
15720  else
15721    COMPILE_TYPE="native"
15722  fi
15723
15724  if test "x$with_target_bits" != x; then
15725    if test "x$COMPILE_TYPE" = "xcross"; then
15726      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15727    fi
15728
15729    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15730      # A reduced build is requested
15731      COMPILE_TYPE="reduced"
15732      OPENJDK_TARGET_CPU_BITS=32
15733      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15734        OPENJDK_TARGET_CPU=x86
15735      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15736        OPENJDK_TARGET_CPU=sparc
15737      else
15738        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15739      fi
15740    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15741      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
15742    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15743      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15744$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15745    else
15746      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15747    fi
15748  fi
15749
15750
15751  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15752$as_echo_n "checking compilation type... " >&6; }
15753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15754$as_echo "$COMPILE_TYPE" >&6; }
15755
15756
15757  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15758    REQUIRED_OS_NAME=SunOS
15759    REQUIRED_OS_VERSION=5.10
15760  fi
15761  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15762    REQUIRED_OS_NAME=Linux
15763    REQUIRED_OS_VERSION=2.6
15764  fi
15765  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15766    REQUIRED_OS_NAME=Windows
15767    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15768      REQUIRED_OS_VERSION=5.2
15769    else
15770      REQUIRED_OS_VERSION=5.1
15771    fi
15772  fi
15773  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15774    REQUIRED_OS_NAME=Darwin
15775    REQUIRED_OS_VERSION=11.2
15776  fi
15777  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15778    REQUIRED_OS_NAME=AIX
15779    REQUIRED_OS_VERSION=7.1
15780  fi
15781
15782
15783
15784
15785
15786
15787  # Also store the legacy naming of the cpu.
15788  # Ie i586 and amd64 instead of x86 and x86_64
15789  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15790  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15791    OPENJDK_TARGET_CPU_LEGACY="i586"
15792  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15793    # On all platforms except MacOSX replace x86_64 with amd64.
15794    OPENJDK_TARGET_CPU_LEGACY="amd64"
15795  fi
15796
15797
15798  # And the second legacy naming of the cpu.
15799  # Ie i386 and amd64 instead of x86 and x86_64.
15800  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15801  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15802    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15803  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15804    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15805  fi
15806
15807
15808  # This is the name of the cpu (but using i386 and amd64 instead of
15809  # x86 and x86_64, respectively), preceeded by a /, to be used when
15810  # locating libraries. On macosx, it's empty, though.
15811  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15812  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15813    OPENJDK_TARGET_CPU_LIBDIR=""
15814  fi
15815
15816
15817  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15818  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15819  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15820  OPENJDK_TARGET_CPU_ISADIR=""
15821  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15822    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15823      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15824    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15825      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15826    fi
15827  fi
15828
15829
15830  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15831  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15832  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15833    # On linux only, we replace x86 with i386.
15834    OPENJDK_TARGET_CPU_OSARCH="i386"
15835  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15836    # On all platforms except macosx, we replace x86_64 with amd64.
15837    OPENJDK_TARGET_CPU_OSARCH="amd64"
15838  fi
15839
15840
15841  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15842  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15843    OPENJDK_TARGET_CPU_JLI="i386"
15844  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15845    # On all platforms except macosx, we replace x86_64 with amd64.
15846    OPENJDK_TARGET_CPU_JLI="amd64"
15847  fi
15848  # Now setup the -D flags for building libjli.
15849  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15850  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15851    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15852      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15853    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15854      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15855    fi
15856  fi
15857
15858
15859  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15860      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15861  else
15862      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15863  fi
15864
15865
15866  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15867  # Macosx is osx and x86_64 is x64
15868  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15869    OPENJDK_TARGET_OS_BUNDLE="osx"
15870  else
15871    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15872  fi
15873  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15874    OPENJDK_TARGET_CPU_BUNDLE="x64"
15875  else
15876    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15877  fi
15878  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15879
15880
15881
15882
15883  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15884    A_LP64="LP64:="
15885    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15886    # unpack200.exe
15887    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15888      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15889    fi
15890  fi
15891  LP64=$A_LP64
15892
15893
15894  if test "x$COMPILE_TYPE" = "xcross"; then
15895    # FIXME: ... or should this include reduced builds..?
15896    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15897  else
15898    DEFINE_CROSS_COMPILE_ARCH=""
15899  fi
15900
15901
15902  # Convert openjdk platform names to hotspot names
15903
15904  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15905  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15906    HOTSPOT_TARGET_OS=bsd
15907  fi
15908
15909
15910  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15911  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15912    HOTSPOT_TARGET_OS_TYPE=posix
15913  fi
15914
15915
15916  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15917  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15918    HOTSPOT_TARGET_CPU=x86_32
15919  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15920    HOTSPOT_TARGET_CPU=sparc
15921  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15922    HOTSPOT_TARGET_CPU=ppc_64
15923  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15924    HOTSPOT_TARGET_CPU=ppc_64
15925  fi
15926
15927
15928  # This is identical with OPENJDK_*, but define anyway for consistency.
15929  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15930
15931
15932  # Setup HOTSPOT_TARGET_CPU_DEFINE
15933  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15934    HOTSPOT_TARGET_CPU_DEFINE=IA32
15935  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15936    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15937  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15938    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15939  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15940    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15941  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15942    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15943  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15944    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15945
15946  # The cpu defines below are for zero, we don't support them directly.
15947  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15948    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15949  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15950    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15951  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15952    HOTSPOT_TARGET_CPU_DEFINE=S390
15953  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15954    HOTSPOT_TARGET_CPU_DEFINE=S390
15955  elif test "x$OPENJDK_TARGET_CPU" != x; then
15956    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
15957  fi
15958
15959
15960
15961
15962  # Also store the legacy naming of the cpu.
15963  # Ie i586 and amd64 instead of x86 and x86_64
15964  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15965  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15966    OPENJDK_BUILD_CPU_LEGACY="i586"
15967  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15968    # On all platforms except MacOSX replace x86_64 with amd64.
15969    OPENJDK_BUILD_CPU_LEGACY="amd64"
15970  fi
15971
15972
15973  # And the second legacy naming of the cpu.
15974  # Ie i386 and amd64 instead of x86 and x86_64.
15975  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15976  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15977    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15978  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15979    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15980  fi
15981
15982
15983  # This is the name of the cpu (but using i386 and amd64 instead of
15984  # x86 and x86_64, respectively), preceeded by a /, to be used when
15985  # locating libraries. On macosx, it's empty, though.
15986  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15987  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15988    OPENJDK_BUILD_CPU_LIBDIR=""
15989  fi
15990
15991
15992  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15993  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15994  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15995  OPENJDK_BUILD_CPU_ISADIR=""
15996  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15997    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15998      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15999    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16000      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16001    fi
16002  fi
16003
16004
16005  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16006  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16007  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16008    # On linux only, we replace x86 with i386.
16009    OPENJDK_BUILD_CPU_OSARCH="i386"
16010  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16011    # On all platforms except macosx, we replace x86_64 with amd64.
16012    OPENJDK_BUILD_CPU_OSARCH="amd64"
16013  fi
16014
16015
16016  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16017  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16018    OPENJDK_BUILD_CPU_JLI="i386"
16019  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16020    # On all platforms except macosx, we replace x86_64 with amd64.
16021    OPENJDK_BUILD_CPU_JLI="amd64"
16022  fi
16023  # Now setup the -D flags for building libjli.
16024  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
16025  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16026    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
16027      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
16028    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
16029      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
16030    fi
16031  fi
16032
16033
16034  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16035      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16036  else
16037      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16038  fi
16039
16040
16041  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16042  # Macosx is osx and x86_64 is x64
16043  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16044    OPENJDK_BUILD_OS_BUNDLE="osx"
16045  else
16046    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16047  fi
16048  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16049    OPENJDK_BUILD_CPU_BUNDLE="x64"
16050  else
16051    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16052  fi
16053  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16054
16055
16056
16057
16058  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16059    A_LP64="LP64:="
16060    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16061    # unpack200.exe
16062    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16063      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16064    fi
16065  fi
16066  LP64=$A_LP64
16067
16068
16069  if test "x$COMPILE_TYPE" = "xcross"; then
16070    # FIXME: ... or should this include reduced builds..?
16071    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16072  else
16073    DEFINE_CROSS_COMPILE_ARCH=""
16074  fi
16075
16076
16077  # Convert openjdk platform names to hotspot names
16078
16079  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16080  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16081    HOTSPOT_BUILD_OS=bsd
16082  fi
16083
16084
16085  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16086  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16087    HOTSPOT_BUILD_OS_TYPE=posix
16088  fi
16089
16090
16091  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16092  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16093    HOTSPOT_BUILD_CPU=x86_32
16094  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16095    HOTSPOT_BUILD_CPU=sparc
16096  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16097    HOTSPOT_BUILD_CPU=ppc_64
16098  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16099    HOTSPOT_BUILD_CPU=ppc_64
16100  fi
16101
16102
16103  # This is identical with OPENJDK_*, but define anyway for consistency.
16104  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16105
16106
16107  # Setup HOTSPOT_BUILD_CPU_DEFINE
16108  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16109    HOTSPOT_BUILD_CPU_DEFINE=IA32
16110  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16111    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16112  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16113    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16114  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16115    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16116  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16117    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16118  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16119    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16120
16121  # The cpu defines below are for zero, we don't support them directly.
16122  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16123    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16124  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16125    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16126  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16127    HOTSPOT_BUILD_CPU_DEFINE=S390
16128  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16129    HOTSPOT_BUILD_CPU_DEFINE=S390
16130  elif test "x$OPENJDK_BUILD_CPU" != x; then
16131    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16132  fi
16133
16134
16135
16136
16137  # ZERO_ARCHDEF is used to enable architecture-specific code.
16138  # This is used in legacy hotspot build.
16139  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16140
16141
16142
16143
16144
16145# Continue setting up basic stuff. Most remaining code require fundamental tools.
16146
16147  # Save the current directory this script was started from
16148  CURDIR="$PWD"
16149
16150  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16151  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16152  # was not available at that time.
16153  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16154  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16155    ORIGINAL_PATH="$REWRITTEN_PATH"
16156    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16157$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16158  fi
16159
16160  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16161    PATH_SEP=";"
16162
16163  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16164  if test $SRC_ROOT_LENGTH -gt 100; then
16165    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16166  fi
16167
16168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16169    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16170$as_echo_n "checking cygwin release... " >&6; }
16171    CYGWIN_VERSION=`$UNAME -r`
16172    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16173$as_echo "$CYGWIN_VERSION" >&6; }
16174    WINDOWS_ENV_VENDOR='cygwin'
16175    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16176
16177    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16178    if test "x$CYGWIN_VERSION_OLD" != x; then
16179      { $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
16180$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;}
16181      as_fn_error $? "Cannot continue" "$LINENO" 5
16182    fi
16183    if test "x$CYGPATH" = x; then
16184      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16185    fi
16186    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16187$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16188    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16189    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16190    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16191    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16192    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16193$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16194    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16195    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16196    if test "x$test_cygdrive_prefix" = x; then
16197      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16198    fi
16199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16200    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16201$as_echo_n "checking msys release... " >&6; }
16202    MSYS_VERSION=`$UNAME -r`
16203    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16204$as_echo "$MSYS_VERSION" >&6; }
16205
16206    WINDOWS_ENV_VENDOR='msys'
16207    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16208
16209    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16210$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16211    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16212    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16213
16214  windows_path="$MSYS_ROOT_PATH"
16215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16216    unix_path=`$CYGPATH -u "$windows_path"`
16217    MSYS_ROOT_PATH="$unix_path"
16218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16220    MSYS_ROOT_PATH="$unix_path"
16221  fi
16222
16223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16224$as_echo "$MSYS_ROOT_PATH" >&6; }
16225    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16226  else
16227    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16228  fi
16229
16230  # Test if windows or unix (cygwin/msys) find is first in path.
16231  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16232$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16233  FIND_BINARY_OUTPUT=`find --version 2>&1`
16234  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16235    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16236$as_echo "unix style" >&6; }
16237  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16239$as_echo "Windows" >&6; }
16240    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16241$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16242    { $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
16243$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16244    as_fn_error $? "Cannot continue" "$LINENO" 5
16245  else
16246    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16247$as_echo "unknown" >&6; }
16248    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16249$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16250  fi
16251
16252  else
16253    PATH_SEP=":"
16254  fi
16255
16256
16257  # We get the top-level directory from the supporting wrappers.
16258  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16259$as_echo_n "checking for top-level directory... " >&6; }
16260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16261$as_echo "$TOPDIR" >&6; }
16262
16263
16264  # Save the original version of TOPDIR for string comparisons
16265  ORIGINAL_TOPDIR="$TOPDIR"
16266
16267
16268  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16269
16270  # Only process if variable expands to non-empty
16271
16272  if test "x$CURDIR" != x; then
16273    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16274
16275  # Input might be given as Windows format, start by converting to
16276  # unix format.
16277  path="$CURDIR"
16278  new_path=`$CYGPATH -u "$path"`
16279
16280  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16281  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16282  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16283  # "foo.exe" is OK but "foo" is an error.
16284  #
16285  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16286  # It is also a way to make sure we got the proper file name for the real test later on.
16287  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16288  if test "x$test_shortpath" = x; then
16289    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16290$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16291    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16292  fi
16293
16294  # Call helper function which possibly converts this using DOS-style short mode.
16295  # If so, the updated path is stored in $new_path.
16296
16297  input_path="$new_path"
16298  # Check if we need to convert this using DOS-style short mode. If the path
16299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16300  # take no chances and rewrite it.
16301  # Note: m4 eats our [], so we need to use [ and ] instead.
16302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16303  if test "x$has_forbidden_chars" != x; then
16304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16305    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16306    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16307    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16308      # Going to short mode and back again did indeed matter. Since short mode is
16309      # case insensitive, let's make it lowercase to improve readability.
16310      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16311      # Now convert it back to Unix-style (cygpath)
16312      input_path=`$CYGPATH -u "$shortmode_path"`
16313      new_path="$input_path"
16314    fi
16315  fi
16316
16317  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16318  if test "x$test_cygdrive_prefix" = x; then
16319    # As a simple fix, exclude /usr/bin since it's not a real path.
16320    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16321      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16322      # a path prefixed by /cygdrive for fixpath to work.
16323      new_path="$CYGWIN_ROOT_PATH$input_path"
16324    fi
16325  fi
16326
16327
16328  if test "x$path" != "x$new_path"; then
16329    CURDIR="$new_path"
16330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16331$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16332  fi
16333
16334    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16335
16336  path="$CURDIR"
16337  has_colon=`$ECHO $path | $GREP ^.:`
16338  new_path="$path"
16339  if test "x$has_colon" = x; then
16340    # Not in mixed or Windows style, start by that.
16341    new_path=`cmd //c echo $path`
16342  fi
16343
16344
16345  input_path="$new_path"
16346  # Check if we need to convert this using DOS-style short mode. If the path
16347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16348  # take no chances and rewrite it.
16349  # Note: m4 eats our [], so we need to use [ and ] instead.
16350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16351  if test "x$has_forbidden_chars" != x; then
16352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16353    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16354  fi
16355
16356
16357  windows_path="$new_path"
16358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16359    unix_path=`$CYGPATH -u "$windows_path"`
16360    new_path="$unix_path"
16361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16363    new_path="$unix_path"
16364  fi
16365
16366  if test "x$path" != "x$new_path"; then
16367    CURDIR="$new_path"
16368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16369$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16370  fi
16371
16372  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16373  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16374
16375    else
16376      # We're on a unix platform. Hooray! :)
16377      path="$CURDIR"
16378      has_space=`$ECHO "$path" | $GREP " "`
16379      if test "x$has_space" != x; then
16380        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16381$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16382        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16383      fi
16384
16385      # Use eval to expand a potential ~
16386      eval path="$path"
16387      if test ! -f "$path" && test ! -d "$path"; then
16388        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16389      fi
16390
16391      if test -d "$path"; then
16392        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16393      else
16394        dir="`$DIRNAME "$path"`"
16395        base="`$BASENAME "$path"`"
16396        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16397      fi
16398    fi
16399  fi
16400
16401
16402  # Only process if variable expands to non-empty
16403
16404  if test "x$TOPDIR" != x; then
16405    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16406
16407  # Input might be given as Windows format, start by converting to
16408  # unix format.
16409  path="$TOPDIR"
16410  new_path=`$CYGPATH -u "$path"`
16411
16412  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16413  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16414  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16415  # "foo.exe" is OK but "foo" is an error.
16416  #
16417  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16418  # It is also a way to make sure we got the proper file name for the real test later on.
16419  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16420  if test "x$test_shortpath" = x; then
16421    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16422$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16423    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16424  fi
16425
16426  # Call helper function which possibly converts this using DOS-style short mode.
16427  # If so, the updated path is stored in $new_path.
16428
16429  input_path="$new_path"
16430  # Check if we need to convert this using DOS-style short mode. If the path
16431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16432  # take no chances and rewrite it.
16433  # Note: m4 eats our [], so we need to use [ and ] instead.
16434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16435  if test "x$has_forbidden_chars" != x; then
16436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16437    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16438    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16439    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16440      # Going to short mode and back again did indeed matter. Since short mode is
16441      # case insensitive, let's make it lowercase to improve readability.
16442      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16443      # Now convert it back to Unix-style (cygpath)
16444      input_path=`$CYGPATH -u "$shortmode_path"`
16445      new_path="$input_path"
16446    fi
16447  fi
16448
16449  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16450  if test "x$test_cygdrive_prefix" = x; then
16451    # As a simple fix, exclude /usr/bin since it's not a real path.
16452    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16453      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16454      # a path prefixed by /cygdrive for fixpath to work.
16455      new_path="$CYGWIN_ROOT_PATH$input_path"
16456    fi
16457  fi
16458
16459
16460  if test "x$path" != "x$new_path"; then
16461    TOPDIR="$new_path"
16462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16463$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16464  fi
16465
16466    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16467
16468  path="$TOPDIR"
16469  has_colon=`$ECHO $path | $GREP ^.:`
16470  new_path="$path"
16471  if test "x$has_colon" = x; then
16472    # Not in mixed or Windows style, start by that.
16473    new_path=`cmd //c echo $path`
16474  fi
16475
16476
16477  input_path="$new_path"
16478  # Check if we need to convert this using DOS-style short mode. If the path
16479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16480  # take no chances and rewrite it.
16481  # Note: m4 eats our [], so we need to use [ and ] instead.
16482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16483  if test "x$has_forbidden_chars" != x; then
16484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16485    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16486  fi
16487
16488
16489  windows_path="$new_path"
16490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16491    unix_path=`$CYGPATH -u "$windows_path"`
16492    new_path="$unix_path"
16493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16495    new_path="$unix_path"
16496  fi
16497
16498  if test "x$path" != "x$new_path"; then
16499    TOPDIR="$new_path"
16500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16501$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16502  fi
16503
16504  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16505  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16506
16507    else
16508      # We're on a unix platform. Hooray! :)
16509      path="$TOPDIR"
16510      has_space=`$ECHO "$path" | $GREP " "`
16511      if test "x$has_space" != x; then
16512        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16513$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16514        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16515      fi
16516
16517      # Use eval to expand a potential ~
16518      eval path="$path"
16519      if test ! -f "$path" && test ! -d "$path"; then
16520        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16521      fi
16522
16523      if test -d "$path"; then
16524        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16525      else
16526        dir="`$DIRNAME "$path"`"
16527        base="`$BASENAME "$path"`"
16528        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16529      fi
16530    fi
16531  fi
16532
16533  # SRC_ROOT is a traditional alias for TOPDIR.
16534  SRC_ROOT=$TOPDIR
16535
16536  # Calculate a canonical version of TOPDIR for string comparisons
16537  CANONICAL_TOPDIR=$TOPDIR
16538
16539  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16540    # Follow a chain of symbolic links. Use readlink
16541    # where it exists, else fall back to horribly
16542    # complicated shell code.
16543    if test "x$READLINK_TESTED" != yes; then
16544      # On MacOSX there is a readlink tool with a different
16545      # purpose than the GNU readlink tool. Check the found readlink.
16546      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16547      if test "x$ISGNU" = x; then
16548        # A readlink that we do not know how to use.
16549        # Are there other non-GNU readlinks out there?
16550        READLINK_TESTED=yes
16551        READLINK=
16552      fi
16553    fi
16554
16555    if test "x$READLINK" != x; then
16556      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16557    else
16558      # Save the current directory for restoring afterwards
16559      STARTDIR=$PWD
16560      COUNTER=0
16561      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16562      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16563      cd $sym_link_dir
16564      # Use -P flag to resolve symlinks in directories.
16565      cd `$THEPWDCMD -P`
16566      sym_link_dir=`$THEPWDCMD -P`
16567      # Resolve file symlinks
16568      while test $COUNTER -lt 20; do
16569        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16570        if test "x$ISLINK" == x; then
16571          # This is not a symbolic link! We are done!
16572          break
16573        fi
16574        # Again resolve directory symlinks since the target of the just found
16575        # link could be in a different directory
16576        cd `$DIRNAME $ISLINK`
16577        sym_link_dir=`$THEPWDCMD -P`
16578        sym_link_file=`$BASENAME $ISLINK`
16579        let COUNTER=COUNTER+1
16580      done
16581      cd $STARTDIR
16582      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16583    fi
16584  fi
16585
16586
16587
16588  # Locate the directory of this script.
16589  AUTOCONF_DIR=$TOPDIR/common/autoconf
16590
16591  # Setup username (for use in adhoc version strings etc)
16592  # Outer [ ] to quote m4.
16593   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16594
16595
16596
16597# Check if it's a pure open build or if custom sources are to be used.
16598
16599  # Check whether --enable-openjdk-only was given.
16600if test "${enable_openjdk_only+set}" = set; then :
16601  enableval=$enable_openjdk_only;
16602else
16603  enable_openjdk_only="no"
16604fi
16605
16606
16607  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16608$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16610$as_echo "$enable_openjdk_only" >&6; }
16611  if test "x$enable_openjdk_only" = "xyes"; then
16612    SUPPRESS_CUSTOM_EXTENSIONS="true"
16613  elif test "x$enable_openjdk_only" = "xno"; then
16614    SUPPRESS_CUSTOM_EXTENSIONS="false"
16615  else
16616    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16617  fi
16618
16619  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16620  # the IncludeCustomExtension macro.
16621
16622
16623# Check whether --with-custom-make-dir was given.
16624if test "${with_custom_make_dir+set}" = set; then :
16625  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
16626$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16627fi
16628
16629
16630
16631
16632# These are needed to be able to create a configuration name (and thus the output directory)
16633
16634  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16635$as_echo_n "checking which variant of the JDK to build... " >&6; }
16636
16637# Check whether --with-jdk-variant was given.
16638if test "${with_jdk_variant+set}" = set; then :
16639  withval=$with_jdk_variant;
16640fi
16641
16642
16643  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16644    JDK_VARIANT="normal"
16645  else
16646    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16647  fi
16648
16649
16650
16651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16652$as_echo "$JDK_VARIANT" >&6; }
16653
16654
16655  DEBUG_LEVEL="release"
16656  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16657$as_echo_n "checking which debug level to use... " >&6; }
16658  # Check whether --enable-debug was given.
16659if test "${enable_debug+set}" = set; then :
16660  enableval=$enable_debug;
16661        ENABLE_DEBUG="${enableval}"
16662        DEBUG_LEVEL="fastdebug"
16663
16664else
16665  ENABLE_DEBUG="no"
16666fi
16667
16668
16669
16670# Check whether --with-debug-level was given.
16671if test "${with_debug_level+set}" = set; then :
16672  withval=$with_debug_level;
16673        DEBUG_LEVEL="${withval}"
16674        if test "x$ENABLE_DEBUG" = xyes; then
16675          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16676        fi
16677
16678fi
16679
16680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16681$as_echo "$DEBUG_LEVEL" >&6; }
16682
16683  if test "x$DEBUG_LEVEL" != xrelease && \
16684      test "x$DEBUG_LEVEL" != xoptimized && \
16685      test "x$DEBUG_LEVEL" != xfastdebug && \
16686      test "x$DEBUG_LEVEL" != xslowdebug; then
16687    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16688  fi
16689
16690  # Translate DEBUG_LEVEL to debug level used by Hotspot
16691  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16692  if test "x$DEBUG_LEVEL" = xrelease; then
16693    HOTSPOT_DEBUG_LEVEL="product"
16694  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16695    HOTSPOT_DEBUG_LEVEL="debug"
16696  fi
16697
16698  if test "x$DEBUG_LEVEL" = xoptimized; then
16699    # The debug level 'optimized' is a little special because it is currently only
16700    # applicable to the HotSpot build where it means to build a completely
16701    # optimized version of the VM without any debugging code (like for the
16702    # 'release' debug level which is called 'product' in the HotSpot build) but
16703    # with the exception that it can contain additional code which is otherwise
16704    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16705    # test new and/or experimental features which are not intended for customer
16706    # shipment. Because these new features need to be tested and benchmarked in
16707    # real world scenarios, we want to build the containing JDK at the 'release'
16708    # debug level.
16709    DEBUG_LEVEL="release"
16710  fi
16711
16712
16713
16714
16715
16716
16717# Check whether --with-jvm-variants was given.
16718if test "${with_jvm_variants+set}" = set; then :
16719  withval=$with_jvm_variants;
16720fi
16721
16722
16723  if test "x$with_jvm_variants" = x; then
16724    with_jvm_variants="server"
16725  fi
16726  JVM_VARIANTS_OPT="$with_jvm_variants"
16727
16728  # Has the user listed more than one variant?
16729  # Additional [] needed to keep m4 from mangling shell constructs.
16730  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16731    BUILDING_MULTIPLE_JVM_VARIANTS=true
16732  else
16733    BUILDING_MULTIPLE_JVM_VARIANTS=false
16734  fi
16735  # Replace the commas with AND for use in the build directory name.
16736  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16737
16738  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16739$as_echo_n "checking which variants of the JVM to build... " >&6; }
16740  # JVM_VARIANTS is a space-separated list.
16741  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16742  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16744$as_echo "$JVM_VARIANTS" >&6; }
16745
16746  # Check that the selected variants are valid
16747
16748  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16749  # Notice that the original variant failes on SLES 10 and 11
16750  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16751  STACK=${JVM_VARIANTS// /$'\n'}
16752  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16753  if test "x$INVALID_VARIANTS" != x; then
16754    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16755$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16756    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16757  fi
16758
16759  # All "special" variants share the same output directory ("server")
16760  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16761  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16762  STACK=${JVM_VARIANTS// /$'\n'}
16763  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16764  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16765    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16766  fi
16767
16768
16769
16770
16771  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16772    # zero behaves as a platform and rewrites these values. This is really weird. :(
16773    # We are guaranteed that we do not build any other variants when building zero.
16774    HOTSPOT_TARGET_CPU=zero
16775    HOTSPOT_TARGET_CPU_ARCH=zero
16776  fi
16777
16778
16779# With basic setup done, call the custom early hook.
16780
16781
16782# Check if we have devkits, extra paths or sysroot set.
16783
16784
16785# Check whether --with-devkit was given.
16786if test "${with_devkit+set}" = set; then :
16787  withval=$with_devkit;
16788
16789  # Only process if variable expands to non-empty
16790
16791  if test "x$with_devkit" != x; then
16792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16793
16794  # Input might be given as Windows format, start by converting to
16795  # unix format.
16796  path="$with_devkit"
16797  new_path=`$CYGPATH -u "$path"`
16798
16799  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16800  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16801  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16802  # "foo.exe" is OK but "foo" is an error.
16803  #
16804  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16805  # It is also a way to make sure we got the proper file name for the real test later on.
16806  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16807  if test "x$test_shortpath" = x; then
16808    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16809$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16810    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16811  fi
16812
16813  # Call helper function which possibly converts this using DOS-style short mode.
16814  # If so, the updated path is stored in $new_path.
16815
16816  input_path="$new_path"
16817  # Check if we need to convert this using DOS-style short mode. If the path
16818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16819  # take no chances and rewrite it.
16820  # Note: m4 eats our [], so we need to use [ and ] instead.
16821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16822  if test "x$has_forbidden_chars" != x; then
16823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16824    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16825    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16826    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16827      # Going to short mode and back again did indeed matter. Since short mode is
16828      # case insensitive, let's make it lowercase to improve readability.
16829      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16830      # Now convert it back to Unix-style (cygpath)
16831      input_path=`$CYGPATH -u "$shortmode_path"`
16832      new_path="$input_path"
16833    fi
16834  fi
16835
16836  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16837  if test "x$test_cygdrive_prefix" = x; then
16838    # As a simple fix, exclude /usr/bin since it's not a real path.
16839    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16840      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16841      # a path prefixed by /cygdrive for fixpath to work.
16842      new_path="$CYGWIN_ROOT_PATH$input_path"
16843    fi
16844  fi
16845
16846
16847  if test "x$path" != "x$new_path"; then
16848    with_devkit="$new_path"
16849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16850$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16851  fi
16852
16853    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16854
16855  path="$with_devkit"
16856  has_colon=`$ECHO $path | $GREP ^.:`
16857  new_path="$path"
16858  if test "x$has_colon" = x; then
16859    # Not in mixed or Windows style, start by that.
16860    new_path=`cmd //c echo $path`
16861  fi
16862
16863
16864  input_path="$new_path"
16865  # Check if we need to convert this using DOS-style short mode. If the path
16866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16867  # take no chances and rewrite it.
16868  # Note: m4 eats our [], so we need to use [ and ] instead.
16869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16870  if test "x$has_forbidden_chars" != x; then
16871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16872    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16873  fi
16874
16875
16876  windows_path="$new_path"
16877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16878    unix_path=`$CYGPATH -u "$windows_path"`
16879    new_path="$unix_path"
16880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16882    new_path="$unix_path"
16883  fi
16884
16885  if test "x$path" != "x$new_path"; then
16886    with_devkit="$new_path"
16887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16888$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16889  fi
16890
16891  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16892  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16893
16894    else
16895      # We're on a unix platform. Hooray! :)
16896      path="$with_devkit"
16897      has_space=`$ECHO "$path" | $GREP " "`
16898      if test "x$has_space" != x; then
16899        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16900$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16901        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16902      fi
16903
16904      # Use eval to expand a potential ~
16905      eval path="$path"
16906      if test ! -f "$path" && test ! -d "$path"; then
16907        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16908      fi
16909
16910      if test -d "$path"; then
16911        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16912      else
16913        dir="`$DIRNAME "$path"`"
16914        base="`$BASENAME "$path"`"
16915        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16916      fi
16917    fi
16918  fi
16919
16920        DEVKIT_ROOT="$with_devkit"
16921        # Check for a meta data info file in the root of the devkit
16922        if test -f "$DEVKIT_ROOT/devkit.info"; then
16923          . $DEVKIT_ROOT/devkit.info
16924          # This potentially sets the following:
16925          # A descriptive name of the devkit
16926
16927  if test "x$DEVKIT_NAME" = x; then
16928    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16929  fi
16930
16931          # Corresponds to --with-extra-path
16932
16933  if test "x$DEVKIT_EXTRA_PATH" = x; then
16934    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16935  fi
16936
16937          # Corresponds to --with-toolchain-path
16938
16939  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16940    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16941  fi
16942
16943          # Corresponds to --with-sysroot
16944
16945  if test "x$DEVKIT_SYSROOT" = x; then
16946    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16947  fi
16948
16949
16950          # Identifies the Visual Studio version in the devkit
16951
16952  if test "x$DEVKIT_VS_VERSION" = x; then
16953    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16954  fi
16955
16956          # The Visual Studio include environment variable
16957
16958  if test "x$DEVKIT_VS_INCLUDE" = x; then
16959    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16960  fi
16961
16962          # The Visual Studio lib environment variable
16963
16964  if test "x$DEVKIT_VS_LIB" = x; then
16965    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16966  fi
16967
16968          # Corresponds to --with-msvcr-dll
16969
16970  if test "x$DEVKIT_MSVCR_DLL" = x; then
16971    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16972  fi
16973
16974          # Corresponds to --with-msvcp-dll
16975
16976  if test "x$DEVKIT_MSVCP_DLL" = x; then
16977    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16978  fi
16979
16980        fi
16981
16982        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16983$as_echo_n "checking for devkit... " >&6; }
16984        if test "x$DEVKIT_NAME" != x; then
16985          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16986$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16987        else
16988          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16989$as_echo "$DEVKIT_ROOT" >&6; }
16990        fi
16991
16992
16993  if test "x$DEVKIT_EXTRA_PATH" != x; then
16994    if test "x$EXTRA_PATH" = x; then
16995      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16996    else
16997      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16998    fi
16999  fi
17000
17001
17002        # Fallback default of just /bin if DEVKIT_PATH is not defined
17003        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17004          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17005        fi
17006
17007  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17008    if test "x$TOOLCHAIN_PATH" = x; then
17009      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17010    else
17011      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17012    fi
17013  fi
17014
17015
17016        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17017        # places for backwards compatiblity.
17018        if test "x$DEVKIT_SYSROOT" != x; then
17019          SYSROOT="$DEVKIT_SYSROOT"
17020        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17021          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17022        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17023          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17024        fi
17025
17026
17027fi
17028
17029
17030  # You can force the sysroot if the sysroot encoded into the compiler tools
17031  # is not correct.
17032
17033# Check whether --with-sys-root was given.
17034if test "${with_sys_root+set}" = set; then :
17035  withval=$with_sys_root; SYSROOT=$with_sys_root
17036
17037fi
17038
17039
17040
17041# Check whether --with-sysroot was given.
17042if test "${with_sysroot+set}" = set; then :
17043  withval=$with_sysroot; SYSROOT=$with_sysroot
17044
17045fi
17046
17047
17048
17049# Check whether --with-tools-dir was given.
17050if test "${with_tools_dir+set}" = set; then :
17051  withval=$with_tools_dir;
17052  if test "x$with_tools_dir" != x; then
17053    if test "x$TOOLCHAIN_PATH" = x; then
17054      TOOLCHAIN_PATH="$with_tools_dir"
17055    else
17056      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17057    fi
17058  fi
17059
17060
17061fi
17062
17063
17064
17065# Check whether --with-toolchain-path was given.
17066if test "${with_toolchain_path+set}" = set; then :
17067  withval=$with_toolchain_path;
17068  if test "x$with_toolchain_path" != x; then
17069    if test "x$TOOLCHAIN_PATH" = x; then
17070      TOOLCHAIN_PATH="$with_toolchain_path"
17071    else
17072      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17073    fi
17074  fi
17075
17076
17077fi
17078
17079
17080
17081# Check whether --with-extra-path was given.
17082if test "${with_extra_path+set}" = set; then :
17083  withval=$with_extra_path;
17084  if test "x$with_extra_path" != x; then
17085    if test "x$EXTRA_PATH" = x; then
17086      EXTRA_PATH="$with_extra_path"
17087    else
17088      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17089    fi
17090  fi
17091
17092
17093fi
17094
17095
17096  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17097    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17098    # If not, detect if Xcode is installed by running xcodebuild -version
17099    # if no Xcode installed, xcodebuild exits with 1
17100    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17101    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17102      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17103      # fall back on the stub binary in /usr/bin/xcodebuild
17104      # Extract the first word of "xcodebuild", so it can be a program name with args.
17105set dummy xcodebuild; ac_word=$2
17106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17107$as_echo_n "checking for $ac_word... " >&6; }
17108if ${ac_cv_path_XCODEBUILD+:} false; then :
17109  $as_echo_n "(cached) " >&6
17110else
17111  case $XCODEBUILD in
17112  [\\/]* | ?:[\\/]*)
17113  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17114  ;;
17115  *)
17116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17117for as_dir in $TOOLCHAIN_PATH
17118do
17119  IFS=$as_save_IFS
17120  test -z "$as_dir" && as_dir=.
17121    for ac_exec_ext in '' $ac_executable_extensions; do
17122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17123    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17125    break 2
17126  fi
17127done
17128  done
17129IFS=$as_save_IFS
17130
17131  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17132  ;;
17133esac
17134fi
17135XCODEBUILD=$ac_cv_path_XCODEBUILD
17136if test -n "$XCODEBUILD"; then
17137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17138$as_echo "$XCODEBUILD" >&6; }
17139else
17140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17141$as_echo "no" >&6; }
17142fi
17143
17144
17145    else
17146      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17147      # when only the command line tools are installed there are no SDKs, so headers
17148      # are copied into the system frameworks
17149      XCODEBUILD=
17150
17151    fi
17152
17153    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17154$as_echo_n "checking for sdk name... " >&6; }
17155
17156# Check whether --with-sdk-name was given.
17157if test "${with_sdk_name+set}" = set; then :
17158  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17159
17160fi
17161
17162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17163$as_echo "$SDKNAME" >&6; }
17164
17165    # if toolchain path is specified then don't rely on system headers, they may not compile
17166    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17167    test -z "$TOOLCHAIN_PATH" && \
17168      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17169
17170    if test -z "$SYSROOT"; then
17171      if test -n "$XCODEBUILD"; then
17172        # if we don't have system headers, use default SDK name (last resort)
17173        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17174          SDKNAME=${SDKNAME:-macosx}
17175        fi
17176
17177        if test -n "$SDKNAME"; then
17178          # Call xcodebuild to determine SYSROOT
17179          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17180        fi
17181      else
17182        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17183          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
17184        fi
17185      fi
17186    else
17187      # warn user if --with-sdk-name was also set
17188      if test -n "$with_sdk_name"; then
17189        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17190$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17191      fi
17192    fi
17193
17194    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17195      # If no system framework headers, then SYSROOT must be set, or we won't build
17196      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
17197    fi
17198
17199    # Perform a basic sanity test
17200    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17201      if test -z "$SYSROOT"; then
17202        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
17203      else
17204        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17205      fi
17206    fi
17207
17208    # set SDKROOT too, Xcode tools will pick it up
17209    SDKROOT=$SYSROOT
17210
17211  fi
17212
17213  # Prepend the extra path to the global path
17214
17215  if test "x$EXTRA_PATH" != x; then
17216    if test "x$PATH" = x; then
17217      PATH="$EXTRA_PATH"
17218    else
17219      PATH="$EXTRA_PATH:$PATH"
17220    fi
17221  fi
17222
17223
17224  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17225$as_echo_n "checking for sysroot... " >&6; }
17226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17227$as_echo "$SYSROOT" >&6; }
17228  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17229$as_echo_n "checking for toolchain path... " >&6; }
17230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17231$as_echo "$TOOLCHAIN_PATH" >&6; }
17232  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17233$as_echo_n "checking for extra path... " >&6; }
17234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17235$as_echo "$EXTRA_PATH" >&6; }
17236
17237
17238# To properly create a configuration name, we need to have the OpenJDK target
17239# and options (variants and debug level) parsed.
17240
17241
17242
17243# Check whether --with-conf-name was given.
17244if test "${with_conf_name+set}" = set; then :
17245  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17246fi
17247
17248
17249  # Test from where we are running configure, in or outside of src root.
17250  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17251$as_echo_n "checking where to store configuration... " >&6; }
17252  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17253      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17254      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17255    # We are running configure from the src root.
17256    # Create a default ./build/target-variant-debuglevel output root.
17257    if test "x${CONF_NAME}" = x; then
17258      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17259$as_echo "in default location" >&6; }
17260      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17261    else
17262      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17263$as_echo "in build directory with custom name" >&6; }
17264    fi
17265    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17266    $MKDIR -p "$OUTPUT_ROOT"
17267    if test ! -d "$OUTPUT_ROOT"; then
17268      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17269    fi
17270  else
17271    # We are running configure from outside of the src dir.
17272    # Then use the current directory as output dir!
17273    # If configuration is situated in normal build directory, just use the build
17274    # directory name as configuration name, otherwise use the complete path.
17275    if test "x${CONF_NAME}" = x; then
17276      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17277    fi
17278    OUTPUT_ROOT="$CURDIR"
17279    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17280$as_echo "in current directory" >&6; }
17281
17282    # WARNING: This might be a bad thing to do. You need to be sure you want to
17283    # have a configuration in this directory. Do some sanity checks!
17284
17285    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17286      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17287      # other files
17288      files_present=`$LS $OUTPUT_ROOT`
17289      # Configure has already touched config.log and confdefs.h in the current dir when this check
17290      # is performed.
17291      filtered_files=`$ECHO "$files_present" \
17292          | $SED -e 's/config.log//g' \
17293              -e 's/configure.log//g' \
17294              -e 's/confdefs.h//g' \
17295              -e 's/ //g' \
17296          | $TR -d '\n'`
17297      if test "x$filtered_files" != x; then
17298        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17299$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17300        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17301$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17302        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17303$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17304        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17305$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17306        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17307$as_echo "$as_me: seriously mess up just about everything." >&6;}
17308        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17309$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17310        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17311$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17312        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17313      fi
17314    fi
17315  fi
17316  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17317$as_echo_n "checking what configuration name to use... " >&6; }
17318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17319$as_echo "$CONF_NAME" >&6; }
17320
17321
17322  # Only process if variable expands to non-empty
17323
17324  if test "x$OUTPUT_ROOT" != x; then
17325    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17326
17327  # Input might be given as Windows format, start by converting to
17328  # unix format.
17329  path="$OUTPUT_ROOT"
17330  new_path=`$CYGPATH -u "$path"`
17331
17332  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17333  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17334  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17335  # "foo.exe" is OK but "foo" is an error.
17336  #
17337  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17338  # It is also a way to make sure we got the proper file name for the real test later on.
17339  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17340  if test "x$test_shortpath" = x; then
17341    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17342$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17343    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17344  fi
17345
17346  # Call helper function which possibly converts this using DOS-style short mode.
17347  # If so, the updated path is stored in $new_path.
17348
17349  input_path="$new_path"
17350  # Check if we need to convert this using DOS-style short mode. If the path
17351  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17352  # take no chances and rewrite it.
17353  # Note: m4 eats our [], so we need to use [ and ] instead.
17354  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17355  if test "x$has_forbidden_chars" != x; then
17356    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17357    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17358    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17359    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17360      # Going to short mode and back again did indeed matter. Since short mode is
17361      # case insensitive, let's make it lowercase to improve readability.
17362      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17363      # Now convert it back to Unix-style (cygpath)
17364      input_path=`$CYGPATH -u "$shortmode_path"`
17365      new_path="$input_path"
17366    fi
17367  fi
17368
17369  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17370  if test "x$test_cygdrive_prefix" = x; then
17371    # As a simple fix, exclude /usr/bin since it's not a real path.
17372    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17373      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17374      # a path prefixed by /cygdrive for fixpath to work.
17375      new_path="$CYGWIN_ROOT_PATH$input_path"
17376    fi
17377  fi
17378
17379
17380  if test "x$path" != "x$new_path"; then
17381    OUTPUT_ROOT="$new_path"
17382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17383$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17384  fi
17385
17386    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17387
17388  path="$OUTPUT_ROOT"
17389  has_colon=`$ECHO $path | $GREP ^.:`
17390  new_path="$path"
17391  if test "x$has_colon" = x; then
17392    # Not in mixed or Windows style, start by that.
17393    new_path=`cmd //c echo $path`
17394  fi
17395
17396
17397  input_path="$new_path"
17398  # Check if we need to convert this using DOS-style short mode. If the path
17399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17400  # take no chances and rewrite it.
17401  # Note: m4 eats our [], so we need to use [ and ] instead.
17402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17403  if test "x$has_forbidden_chars" != x; then
17404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17405    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17406  fi
17407
17408
17409  windows_path="$new_path"
17410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17411    unix_path=`$CYGPATH -u "$windows_path"`
17412    new_path="$unix_path"
17413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17415    new_path="$unix_path"
17416  fi
17417
17418  if test "x$path" != "x$new_path"; then
17419    OUTPUT_ROOT="$new_path"
17420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17421$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17422  fi
17423
17424  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17425  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17426
17427    else
17428      # We're on a unix platform. Hooray! :)
17429      path="$OUTPUT_ROOT"
17430      has_space=`$ECHO "$path" | $GREP " "`
17431      if test "x$has_space" != x; then
17432        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17433$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17434        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17435      fi
17436
17437      # Use eval to expand a potential ~
17438      eval path="$path"
17439      if test ! -f "$path" && test ! -d "$path"; then
17440        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17441      fi
17442
17443      if test -d "$path"; then
17444        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17445      else
17446        dir="`$DIRNAME "$path"`"
17447        base="`$BASENAME "$path"`"
17448        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17449      fi
17450    fi
17451  fi
17452
17453
17454  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17455  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17456
17457  SPEC=$OUTPUT_ROOT/spec.gmk
17458
17459  CONF_NAME=$CONF_NAME
17460
17461  OUTPUT_ROOT=$OUTPUT_ROOT
17462
17463
17464
17465  # The spec.gmk file contains all variables for the make system.
17466  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17467
17468  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17469  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17470
17471  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17472  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17473
17474  # The compare.sh is used to compare the build output to other builds.
17475  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17476
17477  # The generated Makefile knows where the spec.gmk is and where the source is.
17478  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17479  # which will look for generated configurations
17480  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17481
17482
17483
17484# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17485
17486  for ac_prog in apt-get yum port pkgutil pkgadd
17487do
17488  # Extract the first word of "$ac_prog", so it can be a program name with args.
17489set dummy $ac_prog; ac_word=$2
17490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17491$as_echo_n "checking for $ac_word... " >&6; }
17492if ${ac_cv_prog_PKGHANDLER+:} false; then :
17493  $as_echo_n "(cached) " >&6
17494else
17495  if test -n "$PKGHANDLER"; then
17496  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17497else
17498as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17499for as_dir in $PATH
17500do
17501  IFS=$as_save_IFS
17502  test -z "$as_dir" && as_dir=.
17503    for ac_exec_ext in '' $ac_executable_extensions; do
17504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17505    ac_cv_prog_PKGHANDLER="$ac_prog"
17506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17507    break 2
17508  fi
17509done
17510  done
17511IFS=$as_save_IFS
17512
17513fi
17514fi
17515PKGHANDLER=$ac_cv_prog_PKGHANDLER
17516if test -n "$PKGHANDLER"; then
17517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17518$as_echo "$PKGHANDLER" >&6; }
17519else
17520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17521$as_echo "no" >&6; }
17522fi
17523
17524
17525  test -n "$PKGHANDLER" && break
17526done
17527
17528
17529
17530# Setup tools that requires more complex handling, or that is not needed by the configure script.
17531
17532
17533
17534  # Publish this variable in the help.
17535
17536
17537  if [ -z "${MAKE+x}" ]; then
17538    # The variable is not set by user, try to locate tool using the code snippet
17539
17540    # Try our hardest to locate a correct version of GNU make
17541    for ac_prog in gmake
17542do
17543  # Extract the first word of "$ac_prog", so it can be a program name with args.
17544set dummy $ac_prog; ac_word=$2
17545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17546$as_echo_n "checking for $ac_word... " >&6; }
17547if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17548  $as_echo_n "(cached) " >&6
17549else
17550  case $CHECK_GMAKE in
17551  [\\/]* | ?:[\\/]*)
17552  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17553  ;;
17554  *)
17555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17556for as_dir in $PATH
17557do
17558  IFS=$as_save_IFS
17559  test -z "$as_dir" && as_dir=.
17560    for ac_exec_ext in '' $ac_executable_extensions; do
17561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17562    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17564    break 2
17565  fi
17566done
17567  done
17568IFS=$as_save_IFS
17569
17570  ;;
17571esac
17572fi
17573CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17574if test -n "$CHECK_GMAKE"; then
17575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17576$as_echo "$CHECK_GMAKE" >&6; }
17577else
17578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17579$as_echo "no" >&6; }
17580fi
17581
17582
17583  test -n "$CHECK_GMAKE" && break
17584done
17585
17586
17587  MAKE_CANDIDATE=""$CHECK_GMAKE""
17588  DESCRIPTION="gmake in PATH"
17589
17590  # On Cygwin, we require a newer version of make than on other platforms
17591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17592    MAKE_VERSION_EXPR="-e 4\."
17593    MAKE_REQUIRED_VERSION="4.0"
17594   else
17595    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17596    MAKE_REQUIRED_VERSION="3.81"
17597  fi
17598
17599  if test "x$MAKE_CANDIDATE" != x; then
17600    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17601$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17602    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17603    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17604    if test "x$IS_GNU_MAKE" = x; then
17605      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17606$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17607    else
17608      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17609      if test "x$IS_MODERN_MAKE" = x; then
17610        { $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
17611$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;}
17612      else
17613        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17614          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17615            MAKE_EXPECTED_ENV='cygwin'
17616          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17617            MAKE_EXPECTED_ENV='msys'
17618          else
17619            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17620          fi
17621          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17622          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17623        else
17624          # Not relevant for non-Windows
17625          IS_MAKE_CORRECT_ENV=true
17626        fi
17627        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17628          { $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
17629$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;}
17630        else
17631          FOUND_MAKE=$MAKE_CANDIDATE
17632
17633  # Only process if variable expands to non-empty
17634
17635  if test "x$FOUND_MAKE" != x; then
17636    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17637
17638  # First separate the path from the arguments. This will split at the first
17639  # space.
17640  complete="$FOUND_MAKE"
17641  path="${complete%% *}"
17642  tmp="$complete EOL"
17643  arguments="${tmp#* }"
17644
17645  # Input might be given as Windows format, start by converting to
17646  # unix format.
17647  new_path=`$CYGPATH -u "$path"`
17648
17649  # Now try to locate executable using which
17650  new_path=`$WHICH "$new_path" 2> /dev/null`
17651  # bat and cmd files are not always considered executable in cygwin causing which
17652  # to not find them
17653  if test "x$new_path" = x \
17654      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17655      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17656    new_path=`$CYGPATH -u "$path"`
17657  fi
17658  if test "x$new_path" = x; then
17659    # Oops. Which didn't find the executable.
17660    # The splitting of arguments from the executable at a space might have been incorrect,
17661    # since paths with space are more likely in Windows. Give it another try with the whole
17662    # argument.
17663    path="$complete"
17664    arguments="EOL"
17665    new_path=`$CYGPATH -u "$path"`
17666    new_path=`$WHICH "$new_path" 2> /dev/null`
17667    # bat and cmd files are not always considered executable in cygwin causing which
17668    # to not find them
17669    if test "x$new_path" = x \
17670        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17671        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17672      new_path=`$CYGPATH -u "$path"`
17673    fi
17674    if test "x$new_path" = x; then
17675      # It's still not found. Now this is an unrecoverable error.
17676      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17677$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17678      has_space=`$ECHO "$complete" | $GREP " "`
17679      if test "x$has_space" != x; then
17680        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17681$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17682      fi
17683      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17684    fi
17685  fi
17686
17687  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17688  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17689  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17690  # "foo.exe" is OK but "foo" is an error.
17691  #
17692  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17693  # It is also a way to make sure we got the proper file name for the real test later on.
17694  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17695  if test "x$test_shortpath" = x; then
17696    # Short path failed, file does not exist as specified.
17697    # Try adding .exe or .cmd
17698    if test -f "${new_path}.exe"; then
17699      input_to_shortpath="${new_path}.exe"
17700    elif test -f "${new_path}.cmd"; then
17701      input_to_shortpath="${new_path}.cmd"
17702    else
17703      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17704$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17705      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17706$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17707      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17708    fi
17709  else
17710    input_to_shortpath="$new_path"
17711  fi
17712
17713  # Call helper function which possibly converts this using DOS-style short mode.
17714  # If so, the updated path is stored in $new_path.
17715  new_path="$input_to_shortpath"
17716
17717  input_path="$input_to_shortpath"
17718  # Check if we need to convert this using DOS-style short mode. If the path
17719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17720  # take no chances and rewrite it.
17721  # Note: m4 eats our [], so we need to use [ and ] instead.
17722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17723  if test "x$has_forbidden_chars" != x; then
17724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17725    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17726    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17727    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17728      # Going to short mode and back again did indeed matter. Since short mode is
17729      # case insensitive, let's make it lowercase to improve readability.
17730      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17731      # Now convert it back to Unix-style (cygpath)
17732      input_path=`$CYGPATH -u "$shortmode_path"`
17733      new_path="$input_path"
17734    fi
17735  fi
17736
17737  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17738  if test "x$test_cygdrive_prefix" = x; then
17739    # As a simple fix, exclude /usr/bin since it's not a real path.
17740    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17741      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17742      # a path prefixed by /cygdrive for fixpath to work.
17743      new_path="$CYGWIN_ROOT_PATH$input_path"
17744    fi
17745  fi
17746
17747  # remove trailing .exe if any
17748  new_path="${new_path/%.exe/}"
17749
17750    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17751
17752  # First separate the path from the arguments. This will split at the first
17753  # space.
17754  complete="$FOUND_MAKE"
17755  path="${complete%% *}"
17756  tmp="$complete EOL"
17757  arguments="${tmp#* }"
17758
17759  # Input might be given as Windows format, start by converting to
17760  # unix format.
17761  new_path="$path"
17762
17763  windows_path="$new_path"
17764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17765    unix_path=`$CYGPATH -u "$windows_path"`
17766    new_path="$unix_path"
17767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17769    new_path="$unix_path"
17770  fi
17771
17772
17773  # Now try to locate executable using which
17774  new_path=`$WHICH "$new_path" 2> /dev/null`
17775
17776  if test "x$new_path" = x; then
17777    # Oops. Which didn't find the executable.
17778    # The splitting of arguments from the executable at a space might have been incorrect,
17779    # since paths with space are more likely in Windows. Give it another try with the whole
17780    # argument.
17781    path="$complete"
17782    arguments="EOL"
17783    new_path="$path"
17784
17785  windows_path="$new_path"
17786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17787    unix_path=`$CYGPATH -u "$windows_path"`
17788    new_path="$unix_path"
17789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17791    new_path="$unix_path"
17792  fi
17793
17794
17795    new_path=`$WHICH "$new_path" 2> /dev/null`
17796    # bat and cmd files are not always considered executable in MSYS causing which
17797    # to not find them
17798    if test "x$new_path" = x \
17799        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17800        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17801      new_path="$path"
17802
17803  windows_path="$new_path"
17804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17805    unix_path=`$CYGPATH -u "$windows_path"`
17806    new_path="$unix_path"
17807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17809    new_path="$unix_path"
17810  fi
17811
17812    fi
17813
17814    if test "x$new_path" = x; then
17815      # It's still not found. Now this is an unrecoverable error.
17816      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17817$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17818      has_space=`$ECHO "$complete" | $GREP " "`
17819      if test "x$has_space" != x; then
17820        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17821$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17822      fi
17823      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17824    fi
17825  fi
17826
17827  # Now new_path has a complete unix path to the binary
17828  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17829    # Keep paths in /bin as-is, but remove trailing .exe if any
17830    new_path="${new_path/%.exe/}"
17831    # Do not save /bin paths to all_fixpath_prefixes!
17832  else
17833    # Not in mixed or Windows style, start by that.
17834    new_path=`cmd //c echo $new_path`
17835
17836  input_path="$new_path"
17837  # Check if we need to convert this using DOS-style short mode. If the path
17838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17839  # take no chances and rewrite it.
17840  # Note: m4 eats our [], so we need to use [ and ] instead.
17841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17842  if test "x$has_forbidden_chars" != x; then
17843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17844    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17845  fi
17846
17847    # Output is in $new_path
17848
17849  windows_path="$new_path"
17850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17851    unix_path=`$CYGPATH -u "$windows_path"`
17852    new_path="$unix_path"
17853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17855    new_path="$unix_path"
17856  fi
17857
17858    # remove trailing .exe if any
17859    new_path="${new_path/%.exe/}"
17860
17861    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17862    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17863  fi
17864
17865    else
17866      # We're on a unix platform. Hooray! :)
17867      # First separate the path from the arguments. This will split at the first
17868      # space.
17869      complete="$FOUND_MAKE"
17870      path="${complete%% *}"
17871      tmp="$complete EOL"
17872      arguments="${tmp#* }"
17873
17874      # Cannot rely on the command "which" here since it doesn't always work.
17875      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17876      if test -z "$is_absolute_path"; then
17877        # Path to executable is not absolute. Find it.
17878        IFS_save="$IFS"
17879        IFS=:
17880        for p in $PATH; do
17881          if test -f "$p/$path" && test -x "$p/$path"; then
17882            new_path="$p/$path"
17883            break
17884          fi
17885        done
17886        IFS="$IFS_save"
17887      else
17888        # This is an absolute path, we can use it without further modifications.
17889        new_path="$path"
17890      fi
17891
17892      if test "x$new_path" = x; then
17893        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17894$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17895        has_space=`$ECHO "$complete" | $GREP " "`
17896        if test "x$has_space" != x; then
17897          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17898$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17899        fi
17900        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17901      fi
17902    fi
17903
17904    # Now join together the path and the arguments once again
17905    if test "x$arguments" != xEOL; then
17906      new_complete="$new_path ${arguments% *}"
17907    else
17908      new_complete="$new_path"
17909    fi
17910
17911    if test "x$complete" != "x$new_complete"; then
17912      FOUND_MAKE="$new_complete"
17913      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17914$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17915    fi
17916  fi
17917
17918        fi
17919      fi
17920    fi
17921  fi
17922
17923
17924    if test "x$FOUND_MAKE" = x; then
17925      for ac_prog in make
17926do
17927  # Extract the first word of "$ac_prog", so it can be a program name with args.
17928set dummy $ac_prog; ac_word=$2
17929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17930$as_echo_n "checking for $ac_word... " >&6; }
17931if ${ac_cv_path_CHECK_MAKE+:} false; then :
17932  $as_echo_n "(cached) " >&6
17933else
17934  case $CHECK_MAKE in
17935  [\\/]* | ?:[\\/]*)
17936  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17937  ;;
17938  *)
17939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17940for as_dir in $PATH
17941do
17942  IFS=$as_save_IFS
17943  test -z "$as_dir" && as_dir=.
17944    for ac_exec_ext in '' $ac_executable_extensions; do
17945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17946    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17948    break 2
17949  fi
17950done
17951  done
17952IFS=$as_save_IFS
17953
17954  ;;
17955esac
17956fi
17957CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17958if test -n "$CHECK_MAKE"; then
17959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17960$as_echo "$CHECK_MAKE" >&6; }
17961else
17962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17963$as_echo "no" >&6; }
17964fi
17965
17966
17967  test -n "$CHECK_MAKE" && break
17968done
17969
17970
17971  MAKE_CANDIDATE=""$CHECK_MAKE""
17972  DESCRIPTION="make in PATH"
17973
17974  # On Cygwin, we require a newer version of make than on other platforms
17975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17976    MAKE_VERSION_EXPR="-e 4\."
17977    MAKE_REQUIRED_VERSION="4.0"
17978   else
17979    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17980    MAKE_REQUIRED_VERSION="3.81"
17981  fi
17982
17983  if test "x$MAKE_CANDIDATE" != x; then
17984    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17985$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17986    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17987    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17988    if test "x$IS_GNU_MAKE" = x; then
17989      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17990$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17991    else
17992      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17993      if test "x$IS_MODERN_MAKE" = x; then
17994        { $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
17995$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;}
17996      else
17997        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17998          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17999            MAKE_EXPECTED_ENV='cygwin'
18000          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18001            MAKE_EXPECTED_ENV='msys'
18002          else
18003            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18004          fi
18005          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18006          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18007        else
18008          # Not relevant for non-Windows
18009          IS_MAKE_CORRECT_ENV=true
18010        fi
18011        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18012          { $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
18013$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;}
18014        else
18015          FOUND_MAKE=$MAKE_CANDIDATE
18016
18017  # Only process if variable expands to non-empty
18018
18019  if test "x$FOUND_MAKE" != x; then
18020    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18021
18022  # First separate the path from the arguments. This will split at the first
18023  # space.
18024  complete="$FOUND_MAKE"
18025  path="${complete%% *}"
18026  tmp="$complete EOL"
18027  arguments="${tmp#* }"
18028
18029  # Input might be given as Windows format, start by converting to
18030  # unix format.
18031  new_path=`$CYGPATH -u "$path"`
18032
18033  # Now try to locate executable using which
18034  new_path=`$WHICH "$new_path" 2> /dev/null`
18035  # bat and cmd files are not always considered executable in cygwin causing which
18036  # to not find them
18037  if test "x$new_path" = x \
18038      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18039      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18040    new_path=`$CYGPATH -u "$path"`
18041  fi
18042  if test "x$new_path" = x; then
18043    # Oops. Which didn't find the executable.
18044    # The splitting of arguments from the executable at a space might have been incorrect,
18045    # since paths with space are more likely in Windows. Give it another try with the whole
18046    # argument.
18047    path="$complete"
18048    arguments="EOL"
18049    new_path=`$CYGPATH -u "$path"`
18050    new_path=`$WHICH "$new_path" 2> /dev/null`
18051    # bat and cmd files are not always considered executable in cygwin causing which
18052    # to not find them
18053    if test "x$new_path" = x \
18054        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18055        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18056      new_path=`$CYGPATH -u "$path"`
18057    fi
18058    if test "x$new_path" = x; then
18059      # It's still not found. Now this is an unrecoverable error.
18060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18061$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18062      has_space=`$ECHO "$complete" | $GREP " "`
18063      if test "x$has_space" != x; then
18064        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18065$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18066      fi
18067      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18068    fi
18069  fi
18070
18071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18074  # "foo.exe" is OK but "foo" is an error.
18075  #
18076  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18077  # It is also a way to make sure we got the proper file name for the real test later on.
18078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18079  if test "x$test_shortpath" = x; then
18080    # Short path failed, file does not exist as specified.
18081    # Try adding .exe or .cmd
18082    if test -f "${new_path}.exe"; then
18083      input_to_shortpath="${new_path}.exe"
18084    elif test -f "${new_path}.cmd"; then
18085      input_to_shortpath="${new_path}.cmd"
18086    else
18087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18088$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18089      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18090$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18091      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18092    fi
18093  else
18094    input_to_shortpath="$new_path"
18095  fi
18096
18097  # Call helper function which possibly converts this using DOS-style short mode.
18098  # If so, the updated path is stored in $new_path.
18099  new_path="$input_to_shortpath"
18100
18101  input_path="$input_to_shortpath"
18102  # Check if we need to convert this using DOS-style short mode. If the path
18103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18104  # take no chances and rewrite it.
18105  # Note: m4 eats our [], so we need to use [ and ] instead.
18106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18107  if test "x$has_forbidden_chars" != x; then
18108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18109    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18110    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18111    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18112      # Going to short mode and back again did indeed matter. Since short mode is
18113      # case insensitive, let's make it lowercase to improve readability.
18114      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18115      # Now convert it back to Unix-style (cygpath)
18116      input_path=`$CYGPATH -u "$shortmode_path"`
18117      new_path="$input_path"
18118    fi
18119  fi
18120
18121  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18122  if test "x$test_cygdrive_prefix" = x; then
18123    # As a simple fix, exclude /usr/bin since it's not a real path.
18124    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18125      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18126      # a path prefixed by /cygdrive for fixpath to work.
18127      new_path="$CYGWIN_ROOT_PATH$input_path"
18128    fi
18129  fi
18130
18131  # remove trailing .exe if any
18132  new_path="${new_path/%.exe/}"
18133
18134    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18135
18136  # First separate the path from the arguments. This will split at the first
18137  # space.
18138  complete="$FOUND_MAKE"
18139  path="${complete%% *}"
18140  tmp="$complete EOL"
18141  arguments="${tmp#* }"
18142
18143  # Input might be given as Windows format, start by converting to
18144  # unix format.
18145  new_path="$path"
18146
18147  windows_path="$new_path"
18148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18149    unix_path=`$CYGPATH -u "$windows_path"`
18150    new_path="$unix_path"
18151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18153    new_path="$unix_path"
18154  fi
18155
18156
18157  # Now try to locate executable using which
18158  new_path=`$WHICH "$new_path" 2> /dev/null`
18159
18160  if test "x$new_path" = x; then
18161    # Oops. Which didn't find the executable.
18162    # The splitting of arguments from the executable at a space might have been incorrect,
18163    # since paths with space are more likely in Windows. Give it another try with the whole
18164    # argument.
18165    path="$complete"
18166    arguments="EOL"
18167    new_path="$path"
18168
18169  windows_path="$new_path"
18170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18171    unix_path=`$CYGPATH -u "$windows_path"`
18172    new_path="$unix_path"
18173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18175    new_path="$unix_path"
18176  fi
18177
18178
18179    new_path=`$WHICH "$new_path" 2> /dev/null`
18180    # bat and cmd files are not always considered executable in MSYS causing which
18181    # to not find them
18182    if test "x$new_path" = x \
18183        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18184        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18185      new_path="$path"
18186
18187  windows_path="$new_path"
18188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18189    unix_path=`$CYGPATH -u "$windows_path"`
18190    new_path="$unix_path"
18191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18193    new_path="$unix_path"
18194  fi
18195
18196    fi
18197
18198    if test "x$new_path" = x; then
18199      # It's still not found. Now this is an unrecoverable error.
18200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18201$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18202      has_space=`$ECHO "$complete" | $GREP " "`
18203      if test "x$has_space" != x; then
18204        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18205$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18206      fi
18207      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18208    fi
18209  fi
18210
18211  # Now new_path has a complete unix path to the binary
18212  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18213    # Keep paths in /bin as-is, but remove trailing .exe if any
18214    new_path="${new_path/%.exe/}"
18215    # Do not save /bin paths to all_fixpath_prefixes!
18216  else
18217    # Not in mixed or Windows style, start by that.
18218    new_path=`cmd //c echo $new_path`
18219
18220  input_path="$new_path"
18221  # Check if we need to convert this using DOS-style short mode. If the path
18222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18223  # take no chances and rewrite it.
18224  # Note: m4 eats our [], so we need to use [ and ] instead.
18225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18226  if test "x$has_forbidden_chars" != x; then
18227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18228    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18229  fi
18230
18231    # Output is in $new_path
18232
18233  windows_path="$new_path"
18234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18235    unix_path=`$CYGPATH -u "$windows_path"`
18236    new_path="$unix_path"
18237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18239    new_path="$unix_path"
18240  fi
18241
18242    # remove trailing .exe if any
18243    new_path="${new_path/%.exe/}"
18244
18245    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18246    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18247  fi
18248
18249    else
18250      # We're on a unix platform. Hooray! :)
18251      # First separate the path from the arguments. This will split at the first
18252      # space.
18253      complete="$FOUND_MAKE"
18254      path="${complete%% *}"
18255      tmp="$complete EOL"
18256      arguments="${tmp#* }"
18257
18258      # Cannot rely on the command "which" here since it doesn't always work.
18259      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18260      if test -z "$is_absolute_path"; then
18261        # Path to executable is not absolute. Find it.
18262        IFS_save="$IFS"
18263        IFS=:
18264        for p in $PATH; do
18265          if test -f "$p/$path" && test -x "$p/$path"; then
18266            new_path="$p/$path"
18267            break
18268          fi
18269        done
18270        IFS="$IFS_save"
18271      else
18272        # This is an absolute path, we can use it without further modifications.
18273        new_path="$path"
18274      fi
18275
18276      if test "x$new_path" = x; then
18277        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18278$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18279        has_space=`$ECHO "$complete" | $GREP " "`
18280        if test "x$has_space" != x; then
18281          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18282$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18283        fi
18284        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18285      fi
18286    fi
18287
18288    # Now join together the path and the arguments once again
18289    if test "x$arguments" != xEOL; then
18290      new_complete="$new_path ${arguments% *}"
18291    else
18292      new_complete="$new_path"
18293    fi
18294
18295    if test "x$complete" != "x$new_complete"; then
18296      FOUND_MAKE="$new_complete"
18297      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18298$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18299    fi
18300  fi
18301
18302        fi
18303      fi
18304    fi
18305  fi
18306
18307    fi
18308
18309    if test "x$FOUND_MAKE" = x; then
18310      if test "x$TOOLCHAIN_PATH" != x; then
18311        # We have a toolchain path, check that as well before giving up.
18312        OLD_PATH=$PATH
18313        PATH=$TOOLCHAIN_PATH:$PATH
18314        for ac_prog in gmake
18315do
18316  # Extract the first word of "$ac_prog", so it can be a program name with args.
18317set dummy $ac_prog; ac_word=$2
18318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18319$as_echo_n "checking for $ac_word... " >&6; }
18320if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18321  $as_echo_n "(cached) " >&6
18322else
18323  case $CHECK_TOOLSDIR_GMAKE in
18324  [\\/]* | ?:[\\/]*)
18325  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18326  ;;
18327  *)
18328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18329for as_dir in $PATH
18330do
18331  IFS=$as_save_IFS
18332  test -z "$as_dir" && as_dir=.
18333    for ac_exec_ext in '' $ac_executable_extensions; do
18334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18335    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18337    break 2
18338  fi
18339done
18340  done
18341IFS=$as_save_IFS
18342
18343  ;;
18344esac
18345fi
18346CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18347if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18349$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18350else
18351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18352$as_echo "no" >&6; }
18353fi
18354
18355
18356  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18357done
18358
18359
18360  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18361  DESCRIPTION="gmake in tools-dir"
18362
18363  # On Cygwin, we require a newer version of make than on other platforms
18364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18365    MAKE_VERSION_EXPR="-e 4\."
18366    MAKE_REQUIRED_VERSION="4.0"
18367   else
18368    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18369    MAKE_REQUIRED_VERSION="3.81"
18370  fi
18371
18372  if test "x$MAKE_CANDIDATE" != x; then
18373    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18374$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18375    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18376    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18377    if test "x$IS_GNU_MAKE" = x; then
18378      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18379$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18380    else
18381      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18382      if test "x$IS_MODERN_MAKE" = x; then
18383        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
18384$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
18385      else
18386        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18387          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18388            MAKE_EXPECTED_ENV='cygwin'
18389          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18390            MAKE_EXPECTED_ENV='msys'
18391          else
18392            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18393          fi
18394          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18395          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18396        else
18397          # Not relevant for non-Windows
18398          IS_MAKE_CORRECT_ENV=true
18399        fi
18400        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18401          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
18402$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
18403        else
18404          FOUND_MAKE=$MAKE_CANDIDATE
18405
18406  # Only process if variable expands to non-empty
18407
18408  if test "x$FOUND_MAKE" != x; then
18409    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18410
18411  # First separate the path from the arguments. This will split at the first
18412  # space.
18413  complete="$FOUND_MAKE"
18414  path="${complete%% *}"
18415  tmp="$complete EOL"
18416  arguments="${tmp#* }"
18417
18418  # Input might be given as Windows format, start by converting to
18419  # unix format.
18420  new_path=`$CYGPATH -u "$path"`
18421
18422  # Now try to locate executable using which
18423  new_path=`$WHICH "$new_path" 2> /dev/null`
18424  # bat and cmd files are not always considered executable in cygwin causing which
18425  # to not find them
18426  if test "x$new_path" = x \
18427      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18428      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18429    new_path=`$CYGPATH -u "$path"`
18430  fi
18431  if test "x$new_path" = x; then
18432    # Oops. Which didn't find the executable.
18433    # The splitting of arguments from the executable at a space might have been incorrect,
18434    # since paths with space are more likely in Windows. Give it another try with the whole
18435    # argument.
18436    path="$complete"
18437    arguments="EOL"
18438    new_path=`$CYGPATH -u "$path"`
18439    new_path=`$WHICH "$new_path" 2> /dev/null`
18440    # bat and cmd files are not always considered executable in cygwin causing which
18441    # to not find them
18442    if test "x$new_path" = x \
18443        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18444        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18445      new_path=`$CYGPATH -u "$path"`
18446    fi
18447    if test "x$new_path" = x; then
18448      # It's still not found. Now this is an unrecoverable error.
18449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18450$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18451      has_space=`$ECHO "$complete" | $GREP " "`
18452      if test "x$has_space" != x; then
18453        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18454$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18455      fi
18456      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18457    fi
18458  fi
18459
18460  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18461  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18462  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18463  # "foo.exe" is OK but "foo" is an error.
18464  #
18465  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18466  # It is also a way to make sure we got the proper file name for the real test later on.
18467  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18468  if test "x$test_shortpath" = x; then
18469    # Short path failed, file does not exist as specified.
18470    # Try adding .exe or .cmd
18471    if test -f "${new_path}.exe"; then
18472      input_to_shortpath="${new_path}.exe"
18473    elif test -f "${new_path}.cmd"; then
18474      input_to_shortpath="${new_path}.cmd"
18475    else
18476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18477$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18478      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18479$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18480      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18481    fi
18482  else
18483    input_to_shortpath="$new_path"
18484  fi
18485
18486  # Call helper function which possibly converts this using DOS-style short mode.
18487  # If so, the updated path is stored in $new_path.
18488  new_path="$input_to_shortpath"
18489
18490  input_path="$input_to_shortpath"
18491  # Check if we need to convert this using DOS-style short mode. If the path
18492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18493  # take no chances and rewrite it.
18494  # Note: m4 eats our [], so we need to use [ and ] instead.
18495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18496  if test "x$has_forbidden_chars" != x; then
18497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18498    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18499    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18500    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18501      # Going to short mode and back again did indeed matter. Since short mode is
18502      # case insensitive, let's make it lowercase to improve readability.
18503      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18504      # Now convert it back to Unix-style (cygpath)
18505      input_path=`$CYGPATH -u "$shortmode_path"`
18506      new_path="$input_path"
18507    fi
18508  fi
18509
18510  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18511  if test "x$test_cygdrive_prefix" = x; then
18512    # As a simple fix, exclude /usr/bin since it's not a real path.
18513    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18514      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18515      # a path prefixed by /cygdrive for fixpath to work.
18516      new_path="$CYGWIN_ROOT_PATH$input_path"
18517    fi
18518  fi
18519
18520  # remove trailing .exe if any
18521  new_path="${new_path/%.exe/}"
18522
18523    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18524
18525  # First separate the path from the arguments. This will split at the first
18526  # space.
18527  complete="$FOUND_MAKE"
18528  path="${complete%% *}"
18529  tmp="$complete EOL"
18530  arguments="${tmp#* }"
18531
18532  # Input might be given as Windows format, start by converting to
18533  # unix format.
18534  new_path="$path"
18535
18536  windows_path="$new_path"
18537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18538    unix_path=`$CYGPATH -u "$windows_path"`
18539    new_path="$unix_path"
18540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18542    new_path="$unix_path"
18543  fi
18544
18545
18546  # Now try to locate executable using which
18547  new_path=`$WHICH "$new_path" 2> /dev/null`
18548
18549  if test "x$new_path" = x; then
18550    # Oops. Which didn't find the executable.
18551    # The splitting of arguments from the executable at a space might have been incorrect,
18552    # since paths with space are more likely in Windows. Give it another try with the whole
18553    # argument.
18554    path="$complete"
18555    arguments="EOL"
18556    new_path="$path"
18557
18558  windows_path="$new_path"
18559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18560    unix_path=`$CYGPATH -u "$windows_path"`
18561    new_path="$unix_path"
18562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18564    new_path="$unix_path"
18565  fi
18566
18567
18568    new_path=`$WHICH "$new_path" 2> /dev/null`
18569    # bat and cmd files are not always considered executable in MSYS causing which
18570    # to not find them
18571    if test "x$new_path" = x \
18572        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18573        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18574      new_path="$path"
18575
18576  windows_path="$new_path"
18577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18578    unix_path=`$CYGPATH -u "$windows_path"`
18579    new_path="$unix_path"
18580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18582    new_path="$unix_path"
18583  fi
18584
18585    fi
18586
18587    if test "x$new_path" = x; then
18588      # It's still not found. Now this is an unrecoverable error.
18589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18590$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18591      has_space=`$ECHO "$complete" | $GREP " "`
18592      if test "x$has_space" != x; then
18593        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18594$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18595      fi
18596      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18597    fi
18598  fi
18599
18600  # Now new_path has a complete unix path to the binary
18601  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18602    # Keep paths in /bin as-is, but remove trailing .exe if any
18603    new_path="${new_path/%.exe/}"
18604    # Do not save /bin paths to all_fixpath_prefixes!
18605  else
18606    # Not in mixed or Windows style, start by that.
18607    new_path=`cmd //c echo $new_path`
18608
18609  input_path="$new_path"
18610  # Check if we need to convert this using DOS-style short mode. If the path
18611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18612  # take no chances and rewrite it.
18613  # Note: m4 eats our [], so we need to use [ and ] instead.
18614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18615  if test "x$has_forbidden_chars" != x; then
18616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18617    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18618  fi
18619
18620    # Output is in $new_path
18621
18622  windows_path="$new_path"
18623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18624    unix_path=`$CYGPATH -u "$windows_path"`
18625    new_path="$unix_path"
18626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18628    new_path="$unix_path"
18629  fi
18630
18631    # remove trailing .exe if any
18632    new_path="${new_path/%.exe/}"
18633
18634    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18635    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18636  fi
18637
18638    else
18639      # We're on a unix platform. Hooray! :)
18640      # First separate the path from the arguments. This will split at the first
18641      # space.
18642      complete="$FOUND_MAKE"
18643      path="${complete%% *}"
18644      tmp="$complete EOL"
18645      arguments="${tmp#* }"
18646
18647      # Cannot rely on the command "which" here since it doesn't always work.
18648      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18649      if test -z "$is_absolute_path"; then
18650        # Path to executable is not absolute. Find it.
18651        IFS_save="$IFS"
18652        IFS=:
18653        for p in $PATH; do
18654          if test -f "$p/$path" && test -x "$p/$path"; then
18655            new_path="$p/$path"
18656            break
18657          fi
18658        done
18659        IFS="$IFS_save"
18660      else
18661        # This is an absolute path, we can use it without further modifications.
18662        new_path="$path"
18663      fi
18664
18665      if test "x$new_path" = x; then
18666        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18667$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18668        has_space=`$ECHO "$complete" | $GREP " "`
18669        if test "x$has_space" != x; then
18670          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18671$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18672        fi
18673        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18674      fi
18675    fi
18676
18677    # Now join together the path and the arguments once again
18678    if test "x$arguments" != xEOL; then
18679      new_complete="$new_path ${arguments% *}"
18680    else
18681      new_complete="$new_path"
18682    fi
18683
18684    if test "x$complete" != "x$new_complete"; then
18685      FOUND_MAKE="$new_complete"
18686      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18687$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18688    fi
18689  fi
18690
18691        fi
18692      fi
18693    fi
18694  fi
18695
18696        if test "x$FOUND_MAKE" = x; then
18697          for ac_prog in make
18698do
18699  # Extract the first word of "$ac_prog", so it can be a program name with args.
18700set dummy $ac_prog; ac_word=$2
18701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18702$as_echo_n "checking for $ac_word... " >&6; }
18703if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18704  $as_echo_n "(cached) " >&6
18705else
18706  case $CHECK_TOOLSDIR_MAKE in
18707  [\\/]* | ?:[\\/]*)
18708  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18709  ;;
18710  *)
18711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18712for as_dir in $PATH
18713do
18714  IFS=$as_save_IFS
18715  test -z "$as_dir" && as_dir=.
18716    for ac_exec_ext in '' $ac_executable_extensions; do
18717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18718    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18720    break 2
18721  fi
18722done
18723  done
18724IFS=$as_save_IFS
18725
18726  ;;
18727esac
18728fi
18729CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18730if test -n "$CHECK_TOOLSDIR_MAKE"; then
18731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18732$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18733else
18734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18735$as_echo "no" >&6; }
18736fi
18737
18738
18739  test -n "$CHECK_TOOLSDIR_MAKE" && break
18740done
18741
18742
18743  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18744  DESCRIPTION="make in tools-dir"
18745
18746  # On Cygwin, we require a newer version of make than on other platforms
18747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18748    MAKE_VERSION_EXPR="-e 4\."
18749    MAKE_REQUIRED_VERSION="4.0"
18750   else
18751    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18752    MAKE_REQUIRED_VERSION="3.81"
18753  fi
18754
18755  if test "x$MAKE_CANDIDATE" != x; then
18756    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18757$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18758    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18759    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18760    if test "x$IS_GNU_MAKE" = x; then
18761      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18762$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18763    else
18764      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18765      if test "x$IS_MODERN_MAKE" = x; then
18766        { $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
18767$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;}
18768      else
18769        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18770          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18771            MAKE_EXPECTED_ENV='cygwin'
18772          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18773            MAKE_EXPECTED_ENV='msys'
18774          else
18775            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18776          fi
18777          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18778          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18779        else
18780          # Not relevant for non-Windows
18781          IS_MAKE_CORRECT_ENV=true
18782        fi
18783        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18784          { $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
18785$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;}
18786        else
18787          FOUND_MAKE=$MAKE_CANDIDATE
18788
18789  # Only process if variable expands to non-empty
18790
18791  if test "x$FOUND_MAKE" != x; then
18792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18793
18794  # First separate the path from the arguments. This will split at the first
18795  # space.
18796  complete="$FOUND_MAKE"
18797  path="${complete%% *}"
18798  tmp="$complete EOL"
18799  arguments="${tmp#* }"
18800
18801  # Input might be given as Windows format, start by converting to
18802  # unix format.
18803  new_path=`$CYGPATH -u "$path"`
18804
18805  # Now try to locate executable using which
18806  new_path=`$WHICH "$new_path" 2> /dev/null`
18807  # bat and cmd files are not always considered executable in cygwin causing which
18808  # to not find them
18809  if test "x$new_path" = x \
18810      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18811      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18812    new_path=`$CYGPATH -u "$path"`
18813  fi
18814  if test "x$new_path" = x; then
18815    # Oops. Which didn't find the executable.
18816    # The splitting of arguments from the executable at a space might have been incorrect,
18817    # since paths with space are more likely in Windows. Give it another try with the whole
18818    # argument.
18819    path="$complete"
18820    arguments="EOL"
18821    new_path=`$CYGPATH -u "$path"`
18822    new_path=`$WHICH "$new_path" 2> /dev/null`
18823    # bat and cmd files are not always considered executable in cygwin causing which
18824    # to not find them
18825    if test "x$new_path" = x \
18826        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18827        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18828      new_path=`$CYGPATH -u "$path"`
18829    fi
18830    if test "x$new_path" = x; then
18831      # It's still not found. Now this is an unrecoverable error.
18832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18833$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18834      has_space=`$ECHO "$complete" | $GREP " "`
18835      if test "x$has_space" != x; then
18836        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18837$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18838      fi
18839      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18840    fi
18841  fi
18842
18843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18846  # "foo.exe" is OK but "foo" is an error.
18847  #
18848  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18849  # It is also a way to make sure we got the proper file name for the real test later on.
18850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18851  if test "x$test_shortpath" = x; then
18852    # Short path failed, file does not exist as specified.
18853    # Try adding .exe or .cmd
18854    if test -f "${new_path}.exe"; then
18855      input_to_shortpath="${new_path}.exe"
18856    elif test -f "${new_path}.cmd"; then
18857      input_to_shortpath="${new_path}.cmd"
18858    else
18859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18860$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18861      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18862$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18863      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18864    fi
18865  else
18866    input_to_shortpath="$new_path"
18867  fi
18868
18869  # Call helper function which possibly converts this using DOS-style short mode.
18870  # If so, the updated path is stored in $new_path.
18871  new_path="$input_to_shortpath"
18872
18873  input_path="$input_to_shortpath"
18874  # Check if we need to convert this using DOS-style short mode. If the path
18875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18876  # take no chances and rewrite it.
18877  # Note: m4 eats our [], so we need to use [ and ] instead.
18878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18879  if test "x$has_forbidden_chars" != x; then
18880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18884      # Going to short mode and back again did indeed matter. Since short mode is
18885      # case insensitive, let's make it lowercase to improve readability.
18886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18887      # Now convert it back to Unix-style (cygpath)
18888      input_path=`$CYGPATH -u "$shortmode_path"`
18889      new_path="$input_path"
18890    fi
18891  fi
18892
18893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18894  if test "x$test_cygdrive_prefix" = x; then
18895    # As a simple fix, exclude /usr/bin since it's not a real path.
18896    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18898      # a path prefixed by /cygdrive for fixpath to work.
18899      new_path="$CYGWIN_ROOT_PATH$input_path"
18900    fi
18901  fi
18902
18903  # remove trailing .exe if any
18904  new_path="${new_path/%.exe/}"
18905
18906    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18907
18908  # First separate the path from the arguments. This will split at the first
18909  # space.
18910  complete="$FOUND_MAKE"
18911  path="${complete%% *}"
18912  tmp="$complete EOL"
18913  arguments="${tmp#* }"
18914
18915  # Input might be given as Windows format, start by converting to
18916  # unix format.
18917  new_path="$path"
18918
18919  windows_path="$new_path"
18920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18921    unix_path=`$CYGPATH -u "$windows_path"`
18922    new_path="$unix_path"
18923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18925    new_path="$unix_path"
18926  fi
18927
18928
18929  # Now try to locate executable using which
18930  new_path=`$WHICH "$new_path" 2> /dev/null`
18931
18932  if test "x$new_path" = x; then
18933    # Oops. Which didn't find the executable.
18934    # The splitting of arguments from the executable at a space might have been incorrect,
18935    # since paths with space are more likely in Windows. Give it another try with the whole
18936    # argument.
18937    path="$complete"
18938    arguments="EOL"
18939    new_path="$path"
18940
18941  windows_path="$new_path"
18942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18943    unix_path=`$CYGPATH -u "$windows_path"`
18944    new_path="$unix_path"
18945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18947    new_path="$unix_path"
18948  fi
18949
18950
18951    new_path=`$WHICH "$new_path" 2> /dev/null`
18952    # bat and cmd files are not always considered executable in MSYS causing which
18953    # to not find them
18954    if test "x$new_path" = x \
18955        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18956        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18957      new_path="$path"
18958
18959  windows_path="$new_path"
18960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18961    unix_path=`$CYGPATH -u "$windows_path"`
18962    new_path="$unix_path"
18963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18965    new_path="$unix_path"
18966  fi
18967
18968    fi
18969
18970    if test "x$new_path" = x; then
18971      # It's still not found. Now this is an unrecoverable error.
18972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18973$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18974      has_space=`$ECHO "$complete" | $GREP " "`
18975      if test "x$has_space" != x; then
18976        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18977$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18978      fi
18979      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18980    fi
18981  fi
18982
18983  # Now new_path has a complete unix path to the binary
18984  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18985    # Keep paths in /bin as-is, but remove trailing .exe if any
18986    new_path="${new_path/%.exe/}"
18987    # Do not save /bin paths to all_fixpath_prefixes!
18988  else
18989    # Not in mixed or Windows style, start by that.
18990    new_path=`cmd //c echo $new_path`
18991
18992  input_path="$new_path"
18993  # Check if we need to convert this using DOS-style short mode. If the path
18994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18995  # take no chances and rewrite it.
18996  # Note: m4 eats our [], so we need to use [ and ] instead.
18997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18998  if test "x$has_forbidden_chars" != x; then
18999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19000    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19001  fi
19002
19003    # Output is in $new_path
19004
19005  windows_path="$new_path"
19006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19007    unix_path=`$CYGPATH -u "$windows_path"`
19008    new_path="$unix_path"
19009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19011    new_path="$unix_path"
19012  fi
19013
19014    # remove trailing .exe if any
19015    new_path="${new_path/%.exe/}"
19016
19017    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19018    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19019  fi
19020
19021    else
19022      # We're on a unix platform. Hooray! :)
19023      # First separate the path from the arguments. This will split at the first
19024      # space.
19025      complete="$FOUND_MAKE"
19026      path="${complete%% *}"
19027      tmp="$complete EOL"
19028      arguments="${tmp#* }"
19029
19030      # Cannot rely on the command "which" here since it doesn't always work.
19031      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19032      if test -z "$is_absolute_path"; then
19033        # Path to executable is not absolute. Find it.
19034        IFS_save="$IFS"
19035        IFS=:
19036        for p in $PATH; do
19037          if test -f "$p/$path" && test -x "$p/$path"; then
19038            new_path="$p/$path"
19039            break
19040          fi
19041        done
19042        IFS="$IFS_save"
19043      else
19044        # This is an absolute path, we can use it without further modifications.
19045        new_path="$path"
19046      fi
19047
19048      if test "x$new_path" = x; then
19049        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19050$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19051        has_space=`$ECHO "$complete" | $GREP " "`
19052        if test "x$has_space" != x; then
19053          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19054$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19055        fi
19056        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19057      fi
19058    fi
19059
19060    # Now join together the path and the arguments once again
19061    if test "x$arguments" != xEOL; then
19062      new_complete="$new_path ${arguments% *}"
19063    else
19064      new_complete="$new_path"
19065    fi
19066
19067    if test "x$complete" != "x$new_complete"; then
19068      FOUND_MAKE="$new_complete"
19069      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19070$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19071    fi
19072  fi
19073
19074        fi
19075      fi
19076    fi
19077  fi
19078
19079        fi
19080        PATH=$OLD_PATH
19081      fi
19082    fi
19083
19084    if test "x$FOUND_MAKE" = x; then
19085      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
19086    fi
19087
19088  else
19089    # The variable is set, but is it from the command line or the environment?
19090
19091    # Try to remove the string !MAKE! from our list.
19092    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19093    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19094      # If it failed, the variable was not from the command line. Ignore it,
19095      # but warn the user (except for BASH, which is always set by the calling BASH).
19096      if test "xMAKE" != xBASH; then
19097        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19098$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19099      fi
19100      # Try to locate tool using the code snippet
19101
19102    # Try our hardest to locate a correct version of GNU make
19103    for ac_prog in gmake
19104do
19105  # Extract the first word of "$ac_prog", so it can be a program name with args.
19106set dummy $ac_prog; ac_word=$2
19107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19108$as_echo_n "checking for $ac_word... " >&6; }
19109if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19110  $as_echo_n "(cached) " >&6
19111else
19112  case $CHECK_GMAKE in
19113  [\\/]* | ?:[\\/]*)
19114  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19115  ;;
19116  *)
19117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19118for as_dir in $PATH
19119do
19120  IFS=$as_save_IFS
19121  test -z "$as_dir" && as_dir=.
19122    for ac_exec_ext in '' $ac_executable_extensions; do
19123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19124    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19126    break 2
19127  fi
19128done
19129  done
19130IFS=$as_save_IFS
19131
19132  ;;
19133esac
19134fi
19135CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19136if test -n "$CHECK_GMAKE"; then
19137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19138$as_echo "$CHECK_GMAKE" >&6; }
19139else
19140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19141$as_echo "no" >&6; }
19142fi
19143
19144
19145  test -n "$CHECK_GMAKE" && break
19146done
19147
19148
19149  MAKE_CANDIDATE=""$CHECK_GMAKE""
19150  DESCRIPTION="gmake in PATH"
19151
19152  # On Cygwin, we require a newer version of make than on other platforms
19153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19154    MAKE_VERSION_EXPR="-e 4\."
19155    MAKE_REQUIRED_VERSION="4.0"
19156   else
19157    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19158    MAKE_REQUIRED_VERSION="3.81"
19159  fi
19160
19161  if test "x$MAKE_CANDIDATE" != x; then
19162    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19163$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19164    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19165    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19166    if test "x$IS_GNU_MAKE" = x; then
19167      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19168$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19169    else
19170      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19171      if test "x$IS_MODERN_MAKE" = x; then
19172        { $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
19173$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;}
19174      else
19175        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19176          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19177            MAKE_EXPECTED_ENV='cygwin'
19178          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19179            MAKE_EXPECTED_ENV='msys'
19180          else
19181            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19182          fi
19183          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19184          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19185        else
19186          # Not relevant for non-Windows
19187          IS_MAKE_CORRECT_ENV=true
19188        fi
19189        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19190          { $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
19191$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;}
19192        else
19193          FOUND_MAKE=$MAKE_CANDIDATE
19194
19195  # Only process if variable expands to non-empty
19196
19197  if test "x$FOUND_MAKE" != x; then
19198    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19199
19200  # First separate the path from the arguments. This will split at the first
19201  # space.
19202  complete="$FOUND_MAKE"
19203  path="${complete%% *}"
19204  tmp="$complete EOL"
19205  arguments="${tmp#* }"
19206
19207  # Input might be given as Windows format, start by converting to
19208  # unix format.
19209  new_path=`$CYGPATH -u "$path"`
19210
19211  # Now try to locate executable using which
19212  new_path=`$WHICH "$new_path" 2> /dev/null`
19213  # bat and cmd files are not always considered executable in cygwin causing which
19214  # to not find them
19215  if test "x$new_path" = x \
19216      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19217      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19218    new_path=`$CYGPATH -u "$path"`
19219  fi
19220  if test "x$new_path" = x; then
19221    # Oops. Which didn't find the executable.
19222    # The splitting of arguments from the executable at a space might have been incorrect,
19223    # since paths with space are more likely in Windows. Give it another try with the whole
19224    # argument.
19225    path="$complete"
19226    arguments="EOL"
19227    new_path=`$CYGPATH -u "$path"`
19228    new_path=`$WHICH "$new_path" 2> /dev/null`
19229    # bat and cmd files are not always considered executable in cygwin causing which
19230    # to not find them
19231    if test "x$new_path" = x \
19232        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19233        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19234      new_path=`$CYGPATH -u "$path"`
19235    fi
19236    if test "x$new_path" = x; then
19237      # It's still not found. Now this is an unrecoverable error.
19238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19239$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19240      has_space=`$ECHO "$complete" | $GREP " "`
19241      if test "x$has_space" != x; then
19242        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19243$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19244      fi
19245      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19246    fi
19247  fi
19248
19249  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19250  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19251  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19252  # "foo.exe" is OK but "foo" is an error.
19253  #
19254  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19255  # It is also a way to make sure we got the proper file name for the real test later on.
19256  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19257  if test "x$test_shortpath" = x; then
19258    # Short path failed, file does not exist as specified.
19259    # Try adding .exe or .cmd
19260    if test -f "${new_path}.exe"; then
19261      input_to_shortpath="${new_path}.exe"
19262    elif test -f "${new_path}.cmd"; then
19263      input_to_shortpath="${new_path}.cmd"
19264    else
19265      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19266$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19267      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19268$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19269      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19270    fi
19271  else
19272    input_to_shortpath="$new_path"
19273  fi
19274
19275  # Call helper function which possibly converts this using DOS-style short mode.
19276  # If so, the updated path is stored in $new_path.
19277  new_path="$input_to_shortpath"
19278
19279  input_path="$input_to_shortpath"
19280  # Check if we need to convert this using DOS-style short mode. If the path
19281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19282  # take no chances and rewrite it.
19283  # Note: m4 eats our [], so we need to use [ and ] instead.
19284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19285  if test "x$has_forbidden_chars" != x; then
19286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19287    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19288    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19289    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19290      # Going to short mode and back again did indeed matter. Since short mode is
19291      # case insensitive, let's make it lowercase to improve readability.
19292      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19293      # Now convert it back to Unix-style (cygpath)
19294      input_path=`$CYGPATH -u "$shortmode_path"`
19295      new_path="$input_path"
19296    fi
19297  fi
19298
19299  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19300  if test "x$test_cygdrive_prefix" = x; then
19301    # As a simple fix, exclude /usr/bin since it's not a real path.
19302    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19303      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19304      # a path prefixed by /cygdrive for fixpath to work.
19305      new_path="$CYGWIN_ROOT_PATH$input_path"
19306    fi
19307  fi
19308
19309  # remove trailing .exe if any
19310  new_path="${new_path/%.exe/}"
19311
19312    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19313
19314  # First separate the path from the arguments. This will split at the first
19315  # space.
19316  complete="$FOUND_MAKE"
19317  path="${complete%% *}"
19318  tmp="$complete EOL"
19319  arguments="${tmp#* }"
19320
19321  # Input might be given as Windows format, start by converting to
19322  # unix format.
19323  new_path="$path"
19324
19325  windows_path="$new_path"
19326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19327    unix_path=`$CYGPATH -u "$windows_path"`
19328    new_path="$unix_path"
19329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19331    new_path="$unix_path"
19332  fi
19333
19334
19335  # Now try to locate executable using which
19336  new_path=`$WHICH "$new_path" 2> /dev/null`
19337
19338  if test "x$new_path" = x; then
19339    # Oops. Which didn't find the executable.
19340    # The splitting of arguments from the executable at a space might have been incorrect,
19341    # since paths with space are more likely in Windows. Give it another try with the whole
19342    # argument.
19343    path="$complete"
19344    arguments="EOL"
19345    new_path="$path"
19346
19347  windows_path="$new_path"
19348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19349    unix_path=`$CYGPATH -u "$windows_path"`
19350    new_path="$unix_path"
19351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19353    new_path="$unix_path"
19354  fi
19355
19356
19357    new_path=`$WHICH "$new_path" 2> /dev/null`
19358    # bat and cmd files are not always considered executable in MSYS causing which
19359    # to not find them
19360    if test "x$new_path" = x \
19361        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19362        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19363      new_path="$path"
19364
19365  windows_path="$new_path"
19366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19367    unix_path=`$CYGPATH -u "$windows_path"`
19368    new_path="$unix_path"
19369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19371    new_path="$unix_path"
19372  fi
19373
19374    fi
19375
19376    if test "x$new_path" = x; then
19377      # It's still not found. Now this is an unrecoverable error.
19378      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19379$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19380      has_space=`$ECHO "$complete" | $GREP " "`
19381      if test "x$has_space" != x; then
19382        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19383$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19384      fi
19385      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19386    fi
19387  fi
19388
19389  # Now new_path has a complete unix path to the binary
19390  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19391    # Keep paths in /bin as-is, but remove trailing .exe if any
19392    new_path="${new_path/%.exe/}"
19393    # Do not save /bin paths to all_fixpath_prefixes!
19394  else
19395    # Not in mixed or Windows style, start by that.
19396    new_path=`cmd //c echo $new_path`
19397
19398  input_path="$new_path"
19399  # Check if we need to convert this using DOS-style short mode. If the path
19400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19401  # take no chances and rewrite it.
19402  # Note: m4 eats our [], so we need to use [ and ] instead.
19403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19404  if test "x$has_forbidden_chars" != x; then
19405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19406    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19407  fi
19408
19409    # Output is in $new_path
19410
19411  windows_path="$new_path"
19412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19413    unix_path=`$CYGPATH -u "$windows_path"`
19414    new_path="$unix_path"
19415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19417    new_path="$unix_path"
19418  fi
19419
19420    # remove trailing .exe if any
19421    new_path="${new_path/%.exe/}"
19422
19423    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19424    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19425  fi
19426
19427    else
19428      # We're on a unix platform. Hooray! :)
19429      # First separate the path from the arguments. This will split at the first
19430      # space.
19431      complete="$FOUND_MAKE"
19432      path="${complete%% *}"
19433      tmp="$complete EOL"
19434      arguments="${tmp#* }"
19435
19436      # Cannot rely on the command "which" here since it doesn't always work.
19437      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19438      if test -z "$is_absolute_path"; then
19439        # Path to executable is not absolute. Find it.
19440        IFS_save="$IFS"
19441        IFS=:
19442        for p in $PATH; do
19443          if test -f "$p/$path" && test -x "$p/$path"; then
19444            new_path="$p/$path"
19445            break
19446          fi
19447        done
19448        IFS="$IFS_save"
19449      else
19450        # This is an absolute path, we can use it without further modifications.
19451        new_path="$path"
19452      fi
19453
19454      if test "x$new_path" = x; then
19455        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19456$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19457        has_space=`$ECHO "$complete" | $GREP " "`
19458        if test "x$has_space" != x; then
19459          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19460$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19461        fi
19462        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19463      fi
19464    fi
19465
19466    # Now join together the path and the arguments once again
19467    if test "x$arguments" != xEOL; then
19468      new_complete="$new_path ${arguments% *}"
19469    else
19470      new_complete="$new_path"
19471    fi
19472
19473    if test "x$complete" != "x$new_complete"; then
19474      FOUND_MAKE="$new_complete"
19475      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19476$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19477    fi
19478  fi
19479
19480        fi
19481      fi
19482    fi
19483  fi
19484
19485
19486    if test "x$FOUND_MAKE" = x; then
19487      for ac_prog in make
19488do
19489  # Extract the first word of "$ac_prog", so it can be a program name with args.
19490set dummy $ac_prog; ac_word=$2
19491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19492$as_echo_n "checking for $ac_word... " >&6; }
19493if ${ac_cv_path_CHECK_MAKE+:} false; then :
19494  $as_echo_n "(cached) " >&6
19495else
19496  case $CHECK_MAKE in
19497  [\\/]* | ?:[\\/]*)
19498  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19499  ;;
19500  *)
19501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19502for as_dir in $PATH
19503do
19504  IFS=$as_save_IFS
19505  test -z "$as_dir" && as_dir=.
19506    for ac_exec_ext in '' $ac_executable_extensions; do
19507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19508    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19510    break 2
19511  fi
19512done
19513  done
19514IFS=$as_save_IFS
19515
19516  ;;
19517esac
19518fi
19519CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19520if test -n "$CHECK_MAKE"; then
19521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19522$as_echo "$CHECK_MAKE" >&6; }
19523else
19524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19525$as_echo "no" >&6; }
19526fi
19527
19528
19529  test -n "$CHECK_MAKE" && break
19530done
19531
19532
19533  MAKE_CANDIDATE=""$CHECK_MAKE""
19534  DESCRIPTION="make in PATH"
19535
19536  # On Cygwin, we require a newer version of make than on other platforms
19537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19538    MAKE_VERSION_EXPR="-e 4\."
19539    MAKE_REQUIRED_VERSION="4.0"
19540   else
19541    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19542    MAKE_REQUIRED_VERSION="3.81"
19543  fi
19544
19545  if test "x$MAKE_CANDIDATE" != x; then
19546    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19547$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19548    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19549    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19550    if test "x$IS_GNU_MAKE" = x; then
19551      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19552$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19553    else
19554      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19555      if test "x$IS_MODERN_MAKE" = x; then
19556        { $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
19557$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;}
19558      else
19559        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19560          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19561            MAKE_EXPECTED_ENV='cygwin'
19562          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19563            MAKE_EXPECTED_ENV='msys'
19564          else
19565            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19566          fi
19567          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19568          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19569        else
19570          # Not relevant for non-Windows
19571          IS_MAKE_CORRECT_ENV=true
19572        fi
19573        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19574          { $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
19575$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;}
19576        else
19577          FOUND_MAKE=$MAKE_CANDIDATE
19578
19579  # Only process if variable expands to non-empty
19580
19581  if test "x$FOUND_MAKE" != x; then
19582    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19583
19584  # First separate the path from the arguments. This will split at the first
19585  # space.
19586  complete="$FOUND_MAKE"
19587  path="${complete%% *}"
19588  tmp="$complete EOL"
19589  arguments="${tmp#* }"
19590
19591  # Input might be given as Windows format, start by converting to
19592  # unix format.
19593  new_path=`$CYGPATH -u "$path"`
19594
19595  # Now try to locate executable using which
19596  new_path=`$WHICH "$new_path" 2> /dev/null`
19597  # bat and cmd files are not always considered executable in cygwin causing which
19598  # to not find them
19599  if test "x$new_path" = x \
19600      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19601      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19602    new_path=`$CYGPATH -u "$path"`
19603  fi
19604  if test "x$new_path" = x; then
19605    # Oops. Which didn't find the executable.
19606    # The splitting of arguments from the executable at a space might have been incorrect,
19607    # since paths with space are more likely in Windows. Give it another try with the whole
19608    # argument.
19609    path="$complete"
19610    arguments="EOL"
19611    new_path=`$CYGPATH -u "$path"`
19612    new_path=`$WHICH "$new_path" 2> /dev/null`
19613    # bat and cmd files are not always considered executable in cygwin causing which
19614    # to not find them
19615    if test "x$new_path" = x \
19616        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19617        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19618      new_path=`$CYGPATH -u "$path"`
19619    fi
19620    if test "x$new_path" = x; then
19621      # It's still not found. Now this is an unrecoverable error.
19622      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19623$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19624      has_space=`$ECHO "$complete" | $GREP " "`
19625      if test "x$has_space" != x; then
19626        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19627$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19628      fi
19629      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19630    fi
19631  fi
19632
19633  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19634  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19635  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19636  # "foo.exe" is OK but "foo" is an error.
19637  #
19638  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19639  # It is also a way to make sure we got the proper file name for the real test later on.
19640  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19641  if test "x$test_shortpath" = x; then
19642    # Short path failed, file does not exist as specified.
19643    # Try adding .exe or .cmd
19644    if test -f "${new_path}.exe"; then
19645      input_to_shortpath="${new_path}.exe"
19646    elif test -f "${new_path}.cmd"; then
19647      input_to_shortpath="${new_path}.cmd"
19648    else
19649      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19650$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19651      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19652$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19653      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19654    fi
19655  else
19656    input_to_shortpath="$new_path"
19657  fi
19658
19659  # Call helper function which possibly converts this using DOS-style short mode.
19660  # If so, the updated path is stored in $new_path.
19661  new_path="$input_to_shortpath"
19662
19663  input_path="$input_to_shortpath"
19664  # Check if we need to convert this using DOS-style short mode. If the path
19665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19666  # take no chances and rewrite it.
19667  # Note: m4 eats our [], so we need to use [ and ] instead.
19668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19669  if test "x$has_forbidden_chars" != x; then
19670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19671    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19672    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19673    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19674      # Going to short mode and back again did indeed matter. Since short mode is
19675      # case insensitive, let's make it lowercase to improve readability.
19676      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19677      # Now convert it back to Unix-style (cygpath)
19678      input_path=`$CYGPATH -u "$shortmode_path"`
19679      new_path="$input_path"
19680    fi
19681  fi
19682
19683  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19684  if test "x$test_cygdrive_prefix" = x; then
19685    # As a simple fix, exclude /usr/bin since it's not a real path.
19686    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19687      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19688      # a path prefixed by /cygdrive for fixpath to work.
19689      new_path="$CYGWIN_ROOT_PATH$input_path"
19690    fi
19691  fi
19692
19693  # remove trailing .exe if any
19694  new_path="${new_path/%.exe/}"
19695
19696    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19697
19698  # First separate the path from the arguments. This will split at the first
19699  # space.
19700  complete="$FOUND_MAKE"
19701  path="${complete%% *}"
19702  tmp="$complete EOL"
19703  arguments="${tmp#* }"
19704
19705  # Input might be given as Windows format, start by converting to
19706  # unix format.
19707  new_path="$path"
19708
19709  windows_path="$new_path"
19710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19711    unix_path=`$CYGPATH -u "$windows_path"`
19712    new_path="$unix_path"
19713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19715    new_path="$unix_path"
19716  fi
19717
19718
19719  # Now try to locate executable using which
19720  new_path=`$WHICH "$new_path" 2> /dev/null`
19721
19722  if test "x$new_path" = x; then
19723    # Oops. Which didn't find the executable.
19724    # The splitting of arguments from the executable at a space might have been incorrect,
19725    # since paths with space are more likely in Windows. Give it another try with the whole
19726    # argument.
19727    path="$complete"
19728    arguments="EOL"
19729    new_path="$path"
19730
19731  windows_path="$new_path"
19732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19733    unix_path=`$CYGPATH -u "$windows_path"`
19734    new_path="$unix_path"
19735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19737    new_path="$unix_path"
19738  fi
19739
19740
19741    new_path=`$WHICH "$new_path" 2> /dev/null`
19742    # bat and cmd files are not always considered executable in MSYS causing which
19743    # to not find them
19744    if test "x$new_path" = x \
19745        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19746        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19747      new_path="$path"
19748
19749  windows_path="$new_path"
19750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19751    unix_path=`$CYGPATH -u "$windows_path"`
19752    new_path="$unix_path"
19753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19755    new_path="$unix_path"
19756  fi
19757
19758    fi
19759
19760    if test "x$new_path" = x; then
19761      # It's still not found. Now this is an unrecoverable error.
19762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19763$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19764      has_space=`$ECHO "$complete" | $GREP " "`
19765      if test "x$has_space" != x; then
19766        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19767$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19768      fi
19769      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19770    fi
19771  fi
19772
19773  # Now new_path has a complete unix path to the binary
19774  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19775    # Keep paths in /bin as-is, but remove trailing .exe if any
19776    new_path="${new_path/%.exe/}"
19777    # Do not save /bin paths to all_fixpath_prefixes!
19778  else
19779    # Not in mixed or Windows style, start by that.
19780    new_path=`cmd //c echo $new_path`
19781
19782  input_path="$new_path"
19783  # Check if we need to convert this using DOS-style short mode. If the path
19784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19785  # take no chances and rewrite it.
19786  # Note: m4 eats our [], so we need to use [ and ] instead.
19787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19788  if test "x$has_forbidden_chars" != x; then
19789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19790    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19791  fi
19792
19793    # Output is in $new_path
19794
19795  windows_path="$new_path"
19796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19797    unix_path=`$CYGPATH -u "$windows_path"`
19798    new_path="$unix_path"
19799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19801    new_path="$unix_path"
19802  fi
19803
19804    # remove trailing .exe if any
19805    new_path="${new_path/%.exe/}"
19806
19807    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19808    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19809  fi
19810
19811    else
19812      # We're on a unix platform. Hooray! :)
19813      # First separate the path from the arguments. This will split at the first
19814      # space.
19815      complete="$FOUND_MAKE"
19816      path="${complete%% *}"
19817      tmp="$complete EOL"
19818      arguments="${tmp#* }"
19819
19820      # Cannot rely on the command "which" here since it doesn't always work.
19821      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19822      if test -z "$is_absolute_path"; then
19823        # Path to executable is not absolute. Find it.
19824        IFS_save="$IFS"
19825        IFS=:
19826        for p in $PATH; do
19827          if test -f "$p/$path" && test -x "$p/$path"; then
19828            new_path="$p/$path"
19829            break
19830          fi
19831        done
19832        IFS="$IFS_save"
19833      else
19834        # This is an absolute path, we can use it without further modifications.
19835        new_path="$path"
19836      fi
19837
19838      if test "x$new_path" = x; then
19839        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19840$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19841        has_space=`$ECHO "$complete" | $GREP " "`
19842        if test "x$has_space" != x; then
19843          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19844$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19845        fi
19846        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19847      fi
19848    fi
19849
19850    # Now join together the path and the arguments once again
19851    if test "x$arguments" != xEOL; then
19852      new_complete="$new_path ${arguments% *}"
19853    else
19854      new_complete="$new_path"
19855    fi
19856
19857    if test "x$complete" != "x$new_complete"; then
19858      FOUND_MAKE="$new_complete"
19859      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19860$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19861    fi
19862  fi
19863
19864        fi
19865      fi
19866    fi
19867  fi
19868
19869    fi
19870
19871    if test "x$FOUND_MAKE" = x; then
19872      if test "x$TOOLCHAIN_PATH" != x; then
19873        # We have a toolchain path, check that as well before giving up.
19874        OLD_PATH=$PATH
19875        PATH=$TOOLCHAIN_PATH:$PATH
19876        for ac_prog in gmake
19877do
19878  # Extract the first word of "$ac_prog", so it can be a program name with args.
19879set dummy $ac_prog; ac_word=$2
19880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19881$as_echo_n "checking for $ac_word... " >&6; }
19882if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19883  $as_echo_n "(cached) " >&6
19884else
19885  case $CHECK_TOOLSDIR_GMAKE in
19886  [\\/]* | ?:[\\/]*)
19887  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19888  ;;
19889  *)
19890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19891for as_dir in $PATH
19892do
19893  IFS=$as_save_IFS
19894  test -z "$as_dir" && as_dir=.
19895    for ac_exec_ext in '' $ac_executable_extensions; do
19896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19897    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19899    break 2
19900  fi
19901done
19902  done
19903IFS=$as_save_IFS
19904
19905  ;;
19906esac
19907fi
19908CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19909if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19911$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19912else
19913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19914$as_echo "no" >&6; }
19915fi
19916
19917
19918  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19919done
19920
19921
19922  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19923  DESCRIPTION="gmake in tools-dir"
19924
19925  # On Cygwin, we require a newer version of make than on other platforms
19926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19927    MAKE_VERSION_EXPR="-e 4\."
19928    MAKE_REQUIRED_VERSION="4.0"
19929   else
19930    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19931    MAKE_REQUIRED_VERSION="3.81"
19932  fi
19933
19934  if test "x$MAKE_CANDIDATE" != x; then
19935    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19936$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19937    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19938    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19939    if test "x$IS_GNU_MAKE" = x; then
19940      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19941$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19942    else
19943      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19944      if test "x$IS_MODERN_MAKE" = x; then
19945        { $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
19946$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;}
19947      else
19948        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19949          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19950            MAKE_EXPECTED_ENV='cygwin'
19951          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19952            MAKE_EXPECTED_ENV='msys'
19953          else
19954            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19955          fi
19956          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19957          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19958        else
19959          # Not relevant for non-Windows
19960          IS_MAKE_CORRECT_ENV=true
19961        fi
19962        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19963          { $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
19964$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;}
19965        else
19966          FOUND_MAKE=$MAKE_CANDIDATE
19967
19968  # Only process if variable expands to non-empty
19969
19970  if test "x$FOUND_MAKE" != x; then
19971    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19972
19973  # First separate the path from the arguments. This will split at the first
19974  # space.
19975  complete="$FOUND_MAKE"
19976  path="${complete%% *}"
19977  tmp="$complete EOL"
19978  arguments="${tmp#* }"
19979
19980  # Input might be given as Windows format, start by converting to
19981  # unix format.
19982  new_path=`$CYGPATH -u "$path"`
19983
19984  # Now try to locate executable using which
19985  new_path=`$WHICH "$new_path" 2> /dev/null`
19986  # bat and cmd files are not always considered executable in cygwin causing which
19987  # to not find them
19988  if test "x$new_path" = x \
19989      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19990      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19991    new_path=`$CYGPATH -u "$path"`
19992  fi
19993  if test "x$new_path" = x; then
19994    # Oops. Which didn't find the executable.
19995    # The splitting of arguments from the executable at a space might have been incorrect,
19996    # since paths with space are more likely in Windows. Give it another try with the whole
19997    # argument.
19998    path="$complete"
19999    arguments="EOL"
20000    new_path=`$CYGPATH -u "$path"`
20001    new_path=`$WHICH "$new_path" 2> /dev/null`
20002    # bat and cmd files are not always considered executable in cygwin causing which
20003    # to not find them
20004    if test "x$new_path" = x \
20005        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20006        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20007      new_path=`$CYGPATH -u "$path"`
20008    fi
20009    if test "x$new_path" = x; then
20010      # It's still not found. Now this is an unrecoverable error.
20011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20012$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20013      has_space=`$ECHO "$complete" | $GREP " "`
20014      if test "x$has_space" != x; then
20015        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20016$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20017      fi
20018      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20019    fi
20020  fi
20021
20022  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20023  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20024  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20025  # "foo.exe" is OK but "foo" is an error.
20026  #
20027  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20028  # It is also a way to make sure we got the proper file name for the real test later on.
20029  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20030  if test "x$test_shortpath" = x; then
20031    # Short path failed, file does not exist as specified.
20032    # Try adding .exe or .cmd
20033    if test -f "${new_path}.exe"; then
20034      input_to_shortpath="${new_path}.exe"
20035    elif test -f "${new_path}.cmd"; then
20036      input_to_shortpath="${new_path}.cmd"
20037    else
20038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20039$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20040      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20041$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20042      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20043    fi
20044  else
20045    input_to_shortpath="$new_path"
20046  fi
20047
20048  # Call helper function which possibly converts this using DOS-style short mode.
20049  # If so, the updated path is stored in $new_path.
20050  new_path="$input_to_shortpath"
20051
20052  input_path="$input_to_shortpath"
20053  # Check if we need to convert this using DOS-style short mode. If the path
20054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20055  # take no chances and rewrite it.
20056  # Note: m4 eats our [], so we need to use [ and ] instead.
20057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20058  if test "x$has_forbidden_chars" != x; then
20059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20060    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20061    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20062    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20063      # Going to short mode and back again did indeed matter. Since short mode is
20064      # case insensitive, let's make it lowercase to improve readability.
20065      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20066      # Now convert it back to Unix-style (cygpath)
20067      input_path=`$CYGPATH -u "$shortmode_path"`
20068      new_path="$input_path"
20069    fi
20070  fi
20071
20072  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20073  if test "x$test_cygdrive_prefix" = x; then
20074    # As a simple fix, exclude /usr/bin since it's not a real path.
20075    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20076      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20077      # a path prefixed by /cygdrive for fixpath to work.
20078      new_path="$CYGWIN_ROOT_PATH$input_path"
20079    fi
20080  fi
20081
20082  # remove trailing .exe if any
20083  new_path="${new_path/%.exe/}"
20084
20085    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20086
20087  # First separate the path from the arguments. This will split at the first
20088  # space.
20089  complete="$FOUND_MAKE"
20090  path="${complete%% *}"
20091  tmp="$complete EOL"
20092  arguments="${tmp#* }"
20093
20094  # Input might be given as Windows format, start by converting to
20095  # unix format.
20096  new_path="$path"
20097
20098  windows_path="$new_path"
20099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20100    unix_path=`$CYGPATH -u "$windows_path"`
20101    new_path="$unix_path"
20102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20104    new_path="$unix_path"
20105  fi
20106
20107
20108  # Now try to locate executable using which
20109  new_path=`$WHICH "$new_path" 2> /dev/null`
20110
20111  if test "x$new_path" = x; then
20112    # Oops. Which didn't find the executable.
20113    # The splitting of arguments from the executable at a space might have been incorrect,
20114    # since paths with space are more likely in Windows. Give it another try with the whole
20115    # argument.
20116    path="$complete"
20117    arguments="EOL"
20118    new_path="$path"
20119
20120  windows_path="$new_path"
20121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20122    unix_path=`$CYGPATH -u "$windows_path"`
20123    new_path="$unix_path"
20124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20126    new_path="$unix_path"
20127  fi
20128
20129
20130    new_path=`$WHICH "$new_path" 2> /dev/null`
20131    # bat and cmd files are not always considered executable in MSYS causing which
20132    # to not find them
20133    if test "x$new_path" = x \
20134        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20135        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20136      new_path="$path"
20137
20138  windows_path="$new_path"
20139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20140    unix_path=`$CYGPATH -u "$windows_path"`
20141    new_path="$unix_path"
20142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20144    new_path="$unix_path"
20145  fi
20146
20147    fi
20148
20149    if test "x$new_path" = x; then
20150      # It's still not found. Now this is an unrecoverable error.
20151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20152$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20153      has_space=`$ECHO "$complete" | $GREP " "`
20154      if test "x$has_space" != x; then
20155        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20156$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20157      fi
20158      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20159    fi
20160  fi
20161
20162  # Now new_path has a complete unix path to the binary
20163  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20164    # Keep paths in /bin as-is, but remove trailing .exe if any
20165    new_path="${new_path/%.exe/}"
20166    # Do not save /bin paths to all_fixpath_prefixes!
20167  else
20168    # Not in mixed or Windows style, start by that.
20169    new_path=`cmd //c echo $new_path`
20170
20171  input_path="$new_path"
20172  # Check if we need to convert this using DOS-style short mode. If the path
20173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20174  # take no chances and rewrite it.
20175  # Note: m4 eats our [], so we need to use [ and ] instead.
20176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20177  if test "x$has_forbidden_chars" != x; then
20178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20179    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20180  fi
20181
20182    # Output is in $new_path
20183
20184  windows_path="$new_path"
20185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20186    unix_path=`$CYGPATH -u "$windows_path"`
20187    new_path="$unix_path"
20188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20190    new_path="$unix_path"
20191  fi
20192
20193    # remove trailing .exe if any
20194    new_path="${new_path/%.exe/}"
20195
20196    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20197    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20198  fi
20199
20200    else
20201      # We're on a unix platform. Hooray! :)
20202      # First separate the path from the arguments. This will split at the first
20203      # space.
20204      complete="$FOUND_MAKE"
20205      path="${complete%% *}"
20206      tmp="$complete EOL"
20207      arguments="${tmp#* }"
20208
20209      # Cannot rely on the command "which" here since it doesn't always work.
20210      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20211      if test -z "$is_absolute_path"; then
20212        # Path to executable is not absolute. Find it.
20213        IFS_save="$IFS"
20214        IFS=:
20215        for p in $PATH; do
20216          if test -f "$p/$path" && test -x "$p/$path"; then
20217            new_path="$p/$path"
20218            break
20219          fi
20220        done
20221        IFS="$IFS_save"
20222      else
20223        # This is an absolute path, we can use it without further modifications.
20224        new_path="$path"
20225      fi
20226
20227      if test "x$new_path" = x; then
20228        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20229$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20230        has_space=`$ECHO "$complete" | $GREP " "`
20231        if test "x$has_space" != x; then
20232          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20233$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20234        fi
20235        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20236      fi
20237    fi
20238
20239    # Now join together the path and the arguments once again
20240    if test "x$arguments" != xEOL; then
20241      new_complete="$new_path ${arguments% *}"
20242    else
20243      new_complete="$new_path"
20244    fi
20245
20246    if test "x$complete" != "x$new_complete"; then
20247      FOUND_MAKE="$new_complete"
20248      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20249$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20250    fi
20251  fi
20252
20253        fi
20254      fi
20255    fi
20256  fi
20257
20258        if test "x$FOUND_MAKE" = x; then
20259          for ac_prog in make
20260do
20261  # Extract the first word of "$ac_prog", so it can be a program name with args.
20262set dummy $ac_prog; ac_word=$2
20263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20264$as_echo_n "checking for $ac_word... " >&6; }
20265if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20266  $as_echo_n "(cached) " >&6
20267else
20268  case $CHECK_TOOLSDIR_MAKE in
20269  [\\/]* | ?:[\\/]*)
20270  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20271  ;;
20272  *)
20273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20274for as_dir in $PATH
20275do
20276  IFS=$as_save_IFS
20277  test -z "$as_dir" && as_dir=.
20278    for ac_exec_ext in '' $ac_executable_extensions; do
20279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20280    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20282    break 2
20283  fi
20284done
20285  done
20286IFS=$as_save_IFS
20287
20288  ;;
20289esac
20290fi
20291CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20292if test -n "$CHECK_TOOLSDIR_MAKE"; then
20293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20294$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20295else
20296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20297$as_echo "no" >&6; }
20298fi
20299
20300
20301  test -n "$CHECK_TOOLSDIR_MAKE" && break
20302done
20303
20304
20305  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20306  DESCRIPTION="make in tools-dir"
20307
20308  # On Cygwin, we require a newer version of make than on other platforms
20309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20310    MAKE_VERSION_EXPR="-e 4\."
20311    MAKE_REQUIRED_VERSION="4.0"
20312   else
20313    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20314    MAKE_REQUIRED_VERSION="3.81"
20315  fi
20316
20317  if test "x$MAKE_CANDIDATE" != x; then
20318    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20319$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20320    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20321    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20322    if test "x$IS_GNU_MAKE" = x; then
20323      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20324$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20325    else
20326      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20327      if test "x$IS_MODERN_MAKE" = x; then
20328        { $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
20329$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;}
20330      else
20331        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20332          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20333            MAKE_EXPECTED_ENV='cygwin'
20334          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20335            MAKE_EXPECTED_ENV='msys'
20336          else
20337            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20338          fi
20339          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20340          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20341        else
20342          # Not relevant for non-Windows
20343          IS_MAKE_CORRECT_ENV=true
20344        fi
20345        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20346          { $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
20347$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;}
20348        else
20349          FOUND_MAKE=$MAKE_CANDIDATE
20350
20351  # Only process if variable expands to non-empty
20352
20353  if test "x$FOUND_MAKE" != x; then
20354    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20355
20356  # First separate the path from the arguments. This will split at the first
20357  # space.
20358  complete="$FOUND_MAKE"
20359  path="${complete%% *}"
20360  tmp="$complete EOL"
20361  arguments="${tmp#* }"
20362
20363  # Input might be given as Windows format, start by converting to
20364  # unix format.
20365  new_path=`$CYGPATH -u "$path"`
20366
20367  # Now try to locate executable using which
20368  new_path=`$WHICH "$new_path" 2> /dev/null`
20369  # bat and cmd files are not always considered executable in cygwin causing which
20370  # to not find them
20371  if test "x$new_path" = x \
20372      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20373      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20374    new_path=`$CYGPATH -u "$path"`
20375  fi
20376  if test "x$new_path" = x; then
20377    # Oops. Which didn't find the executable.
20378    # The splitting of arguments from the executable at a space might have been incorrect,
20379    # since paths with space are more likely in Windows. Give it another try with the whole
20380    # argument.
20381    path="$complete"
20382    arguments="EOL"
20383    new_path=`$CYGPATH -u "$path"`
20384    new_path=`$WHICH "$new_path" 2> /dev/null`
20385    # bat and cmd files are not always considered executable in cygwin causing which
20386    # to not find them
20387    if test "x$new_path" = x \
20388        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20389        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20390      new_path=`$CYGPATH -u "$path"`
20391    fi
20392    if test "x$new_path" = x; then
20393      # It's still not found. Now this is an unrecoverable error.
20394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20395$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20396      has_space=`$ECHO "$complete" | $GREP " "`
20397      if test "x$has_space" != x; then
20398        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20399$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20400      fi
20401      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20402    fi
20403  fi
20404
20405  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20406  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20407  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20408  # "foo.exe" is OK but "foo" is an error.
20409  #
20410  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20411  # It is also a way to make sure we got the proper file name for the real test later on.
20412  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20413  if test "x$test_shortpath" = x; then
20414    # Short path failed, file does not exist as specified.
20415    # Try adding .exe or .cmd
20416    if test -f "${new_path}.exe"; then
20417      input_to_shortpath="${new_path}.exe"
20418    elif test -f "${new_path}.cmd"; then
20419      input_to_shortpath="${new_path}.cmd"
20420    else
20421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20422$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20423      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20424$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20425      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20426    fi
20427  else
20428    input_to_shortpath="$new_path"
20429  fi
20430
20431  # Call helper function which possibly converts this using DOS-style short mode.
20432  # If so, the updated path is stored in $new_path.
20433  new_path="$input_to_shortpath"
20434
20435  input_path="$input_to_shortpath"
20436  # Check if we need to convert this using DOS-style short mode. If the path
20437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20438  # take no chances and rewrite it.
20439  # Note: m4 eats our [], so we need to use [ and ] instead.
20440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20441  if test "x$has_forbidden_chars" != x; then
20442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20443    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20444    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20445    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20446      # Going to short mode and back again did indeed matter. Since short mode is
20447      # case insensitive, let's make it lowercase to improve readability.
20448      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20449      # Now convert it back to Unix-style (cygpath)
20450      input_path=`$CYGPATH -u "$shortmode_path"`
20451      new_path="$input_path"
20452    fi
20453  fi
20454
20455  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20456  if test "x$test_cygdrive_prefix" = x; then
20457    # As a simple fix, exclude /usr/bin since it's not a real path.
20458    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20459      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20460      # a path prefixed by /cygdrive for fixpath to work.
20461      new_path="$CYGWIN_ROOT_PATH$input_path"
20462    fi
20463  fi
20464
20465  # remove trailing .exe if any
20466  new_path="${new_path/%.exe/}"
20467
20468    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20469
20470  # First separate the path from the arguments. This will split at the first
20471  # space.
20472  complete="$FOUND_MAKE"
20473  path="${complete%% *}"
20474  tmp="$complete EOL"
20475  arguments="${tmp#* }"
20476
20477  # Input might be given as Windows format, start by converting to
20478  # unix format.
20479  new_path="$path"
20480
20481  windows_path="$new_path"
20482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20483    unix_path=`$CYGPATH -u "$windows_path"`
20484    new_path="$unix_path"
20485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20487    new_path="$unix_path"
20488  fi
20489
20490
20491  # Now try to locate executable using which
20492  new_path=`$WHICH "$new_path" 2> /dev/null`
20493
20494  if test "x$new_path" = x; then
20495    # Oops. Which didn't find the executable.
20496    # The splitting of arguments from the executable at a space might have been incorrect,
20497    # since paths with space are more likely in Windows. Give it another try with the whole
20498    # argument.
20499    path="$complete"
20500    arguments="EOL"
20501    new_path="$path"
20502
20503  windows_path="$new_path"
20504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20505    unix_path=`$CYGPATH -u "$windows_path"`
20506    new_path="$unix_path"
20507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20509    new_path="$unix_path"
20510  fi
20511
20512
20513    new_path=`$WHICH "$new_path" 2> /dev/null`
20514    # bat and cmd files are not always considered executable in MSYS causing which
20515    # to not find them
20516    if test "x$new_path" = x \
20517        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20518        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20519      new_path="$path"
20520
20521  windows_path="$new_path"
20522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20523    unix_path=`$CYGPATH -u "$windows_path"`
20524    new_path="$unix_path"
20525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20527    new_path="$unix_path"
20528  fi
20529
20530    fi
20531
20532    if test "x$new_path" = x; then
20533      # It's still not found. Now this is an unrecoverable error.
20534      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20535$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20536      has_space=`$ECHO "$complete" | $GREP " "`
20537      if test "x$has_space" != x; then
20538        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20539$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20540      fi
20541      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20542    fi
20543  fi
20544
20545  # Now new_path has a complete unix path to the binary
20546  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20547    # Keep paths in /bin as-is, but remove trailing .exe if any
20548    new_path="${new_path/%.exe/}"
20549    # Do not save /bin paths to all_fixpath_prefixes!
20550  else
20551    # Not in mixed or Windows style, start by that.
20552    new_path=`cmd //c echo $new_path`
20553
20554  input_path="$new_path"
20555  # Check if we need to convert this using DOS-style short mode. If the path
20556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20557  # take no chances and rewrite it.
20558  # Note: m4 eats our [], so we need to use [ and ] instead.
20559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20560  if test "x$has_forbidden_chars" != x; then
20561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20562    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20563  fi
20564
20565    # Output is in $new_path
20566
20567  windows_path="$new_path"
20568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20569    unix_path=`$CYGPATH -u "$windows_path"`
20570    new_path="$unix_path"
20571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20573    new_path="$unix_path"
20574  fi
20575
20576    # remove trailing .exe if any
20577    new_path="${new_path/%.exe/}"
20578
20579    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20580    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20581  fi
20582
20583    else
20584      # We're on a unix platform. Hooray! :)
20585      # First separate the path from the arguments. This will split at the first
20586      # space.
20587      complete="$FOUND_MAKE"
20588      path="${complete%% *}"
20589      tmp="$complete EOL"
20590      arguments="${tmp#* }"
20591
20592      # Cannot rely on the command "which" here since it doesn't always work.
20593      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20594      if test -z "$is_absolute_path"; then
20595        # Path to executable is not absolute. Find it.
20596        IFS_save="$IFS"
20597        IFS=:
20598        for p in $PATH; do
20599          if test -f "$p/$path" && test -x "$p/$path"; then
20600            new_path="$p/$path"
20601            break
20602          fi
20603        done
20604        IFS="$IFS_save"
20605      else
20606        # This is an absolute path, we can use it without further modifications.
20607        new_path="$path"
20608      fi
20609
20610      if test "x$new_path" = x; then
20611        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20612$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20613        has_space=`$ECHO "$complete" | $GREP " "`
20614        if test "x$has_space" != x; then
20615          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20616$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20617        fi
20618        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20619      fi
20620    fi
20621
20622    # Now join together the path and the arguments once again
20623    if test "x$arguments" != xEOL; then
20624      new_complete="$new_path ${arguments% *}"
20625    else
20626      new_complete="$new_path"
20627    fi
20628
20629    if test "x$complete" != "x$new_complete"; then
20630      FOUND_MAKE="$new_complete"
20631      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20632$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20633    fi
20634  fi
20635
20636        fi
20637      fi
20638    fi
20639  fi
20640
20641        fi
20642        PATH=$OLD_PATH
20643      fi
20644    fi
20645
20646    if test "x$FOUND_MAKE" = x; then
20647      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
20648    fi
20649
20650    else
20651      # If it succeeded, then it was overridden by the user. We will use it
20652      # for the tool.
20653
20654      # First remove it from the list of overridden variables, so we can test
20655      # for unknown variables in the end.
20656      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20657
20658      # Check if we try to supply an empty value
20659      if test "x$MAKE" = x; then
20660        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20661$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20662        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20663$as_echo_n "checking for MAKE... " >&6; }
20664        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20665$as_echo "disabled" >&6; }
20666      else
20667        # Check if the provided tool contains a complete path.
20668        tool_specified="$MAKE"
20669        tool_basename="${tool_specified##*/}"
20670        if test "x$tool_basename" = "x$tool_specified"; then
20671          # A command without a complete path is provided, search $PATH.
20672          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20673$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20674          # Extract the first word of "$tool_basename", so it can be a program name with args.
20675set dummy $tool_basename; ac_word=$2
20676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20677$as_echo_n "checking for $ac_word... " >&6; }
20678if ${ac_cv_path_MAKE+:} false; then :
20679  $as_echo_n "(cached) " >&6
20680else
20681  case $MAKE in
20682  [\\/]* | ?:[\\/]*)
20683  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20684  ;;
20685  *)
20686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20687for as_dir in $PATH
20688do
20689  IFS=$as_save_IFS
20690  test -z "$as_dir" && as_dir=.
20691    for ac_exec_ext in '' $ac_executable_extensions; do
20692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20693    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20695    break 2
20696  fi
20697done
20698  done
20699IFS=$as_save_IFS
20700
20701  ;;
20702esac
20703fi
20704MAKE=$ac_cv_path_MAKE
20705if test -n "$MAKE"; then
20706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20707$as_echo "$MAKE" >&6; }
20708else
20709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20710$as_echo "no" >&6; }
20711fi
20712
20713
20714          if test "x$MAKE" = x; then
20715            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20716          fi
20717        else
20718          # Otherwise we believe it is a complete path. Use it as it is.
20719          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20720$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20721          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20722$as_echo_n "checking for MAKE... " >&6; }
20723          if test ! -x "$tool_specified"; then
20724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20725$as_echo "not found" >&6; }
20726            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20727          fi
20728          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20729$as_echo "$tool_specified" >&6; }
20730        fi
20731      fi
20732    fi
20733
20734    # If MAKE was set by user, verify the version
20735
20736  MAKE_CANDIDATE=""$MAKE""
20737  DESCRIPTION="user supplied MAKE=$MAKE"
20738
20739  # On Cygwin, we require a newer version of make than on other platforms
20740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20741    MAKE_VERSION_EXPR="-e 4\."
20742    MAKE_REQUIRED_VERSION="4.0"
20743   else
20744    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20745    MAKE_REQUIRED_VERSION="3.81"
20746  fi
20747
20748  if test "x$MAKE_CANDIDATE" != x; then
20749    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20750$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20751    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20752    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20753    if test "x$IS_GNU_MAKE" = x; then
20754      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20755$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20756    else
20757      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20758      if test "x$IS_MODERN_MAKE" = x; then
20759        { $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
20760$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;}
20761      else
20762        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20763          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20764            MAKE_EXPECTED_ENV='cygwin'
20765          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20766            MAKE_EXPECTED_ENV='msys'
20767          else
20768            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20769          fi
20770          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20771          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20772        else
20773          # Not relevant for non-Windows
20774          IS_MAKE_CORRECT_ENV=true
20775        fi
20776        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20777          { $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
20778$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;}
20779        else
20780          FOUND_MAKE=$MAKE_CANDIDATE
20781
20782  # Only process if variable expands to non-empty
20783
20784  if test "x$FOUND_MAKE" != x; then
20785    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20786
20787  # First separate the path from the arguments. This will split at the first
20788  # space.
20789  complete="$FOUND_MAKE"
20790  path="${complete%% *}"
20791  tmp="$complete EOL"
20792  arguments="${tmp#* }"
20793
20794  # Input might be given as Windows format, start by converting to
20795  # unix format.
20796  new_path=`$CYGPATH -u "$path"`
20797
20798  # Now try to locate executable using which
20799  new_path=`$WHICH "$new_path" 2> /dev/null`
20800  # bat and cmd files are not always considered executable in cygwin causing which
20801  # to not find them
20802  if test "x$new_path" = x \
20803      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20804      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20805    new_path=`$CYGPATH -u "$path"`
20806  fi
20807  if test "x$new_path" = x; then
20808    # Oops. Which didn't find the executable.
20809    # The splitting of arguments from the executable at a space might have been incorrect,
20810    # since paths with space are more likely in Windows. Give it another try with the whole
20811    # argument.
20812    path="$complete"
20813    arguments="EOL"
20814    new_path=`$CYGPATH -u "$path"`
20815    new_path=`$WHICH "$new_path" 2> /dev/null`
20816    # bat and cmd files are not always considered executable in cygwin causing which
20817    # to not find them
20818    if test "x$new_path" = x \
20819        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20820        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20821      new_path=`$CYGPATH -u "$path"`
20822    fi
20823    if test "x$new_path" = x; then
20824      # It's still not found. Now this is an unrecoverable error.
20825      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20826$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20827      has_space=`$ECHO "$complete" | $GREP " "`
20828      if test "x$has_space" != x; then
20829        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20830$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20831      fi
20832      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20833    fi
20834  fi
20835
20836  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20837  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20838  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20839  # "foo.exe" is OK but "foo" is an error.
20840  #
20841  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20842  # It is also a way to make sure we got the proper file name for the real test later on.
20843  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20844  if test "x$test_shortpath" = x; then
20845    # Short path failed, file does not exist as specified.
20846    # Try adding .exe or .cmd
20847    if test -f "${new_path}.exe"; then
20848      input_to_shortpath="${new_path}.exe"
20849    elif test -f "${new_path}.cmd"; then
20850      input_to_shortpath="${new_path}.cmd"
20851    else
20852      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20853$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20854      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20855$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20856      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20857    fi
20858  else
20859    input_to_shortpath="$new_path"
20860  fi
20861
20862  # Call helper function which possibly converts this using DOS-style short mode.
20863  # If so, the updated path is stored in $new_path.
20864  new_path="$input_to_shortpath"
20865
20866  input_path="$input_to_shortpath"
20867  # Check if we need to convert this using DOS-style short mode. If the path
20868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20869  # take no chances and rewrite it.
20870  # Note: m4 eats our [], so we need to use [ and ] instead.
20871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20872  if test "x$has_forbidden_chars" != x; then
20873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20874    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20875    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20876    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20877      # Going to short mode and back again did indeed matter. Since short mode is
20878      # case insensitive, let's make it lowercase to improve readability.
20879      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20880      # Now convert it back to Unix-style (cygpath)
20881      input_path=`$CYGPATH -u "$shortmode_path"`
20882      new_path="$input_path"
20883    fi
20884  fi
20885
20886  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20887  if test "x$test_cygdrive_prefix" = x; then
20888    # As a simple fix, exclude /usr/bin since it's not a real path.
20889    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20890      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20891      # a path prefixed by /cygdrive for fixpath to work.
20892      new_path="$CYGWIN_ROOT_PATH$input_path"
20893    fi
20894  fi
20895
20896  # remove trailing .exe if any
20897  new_path="${new_path/%.exe/}"
20898
20899    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20900
20901  # First separate the path from the arguments. This will split at the first
20902  # space.
20903  complete="$FOUND_MAKE"
20904  path="${complete%% *}"
20905  tmp="$complete EOL"
20906  arguments="${tmp#* }"
20907
20908  # Input might be given as Windows format, start by converting to
20909  # unix format.
20910  new_path="$path"
20911
20912  windows_path="$new_path"
20913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20914    unix_path=`$CYGPATH -u "$windows_path"`
20915    new_path="$unix_path"
20916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20918    new_path="$unix_path"
20919  fi
20920
20921
20922  # Now try to locate executable using which
20923  new_path=`$WHICH "$new_path" 2> /dev/null`
20924
20925  if test "x$new_path" = x; then
20926    # Oops. Which didn't find the executable.
20927    # The splitting of arguments from the executable at a space might have been incorrect,
20928    # since paths with space are more likely in Windows. Give it another try with the whole
20929    # argument.
20930    path="$complete"
20931    arguments="EOL"
20932    new_path="$path"
20933
20934  windows_path="$new_path"
20935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20936    unix_path=`$CYGPATH -u "$windows_path"`
20937    new_path="$unix_path"
20938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20940    new_path="$unix_path"
20941  fi
20942
20943
20944    new_path=`$WHICH "$new_path" 2> /dev/null`
20945    # bat and cmd files are not always considered executable in MSYS causing which
20946    # to not find them
20947    if test "x$new_path" = x \
20948        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20949        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20950      new_path="$path"
20951
20952  windows_path="$new_path"
20953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20954    unix_path=`$CYGPATH -u "$windows_path"`
20955    new_path="$unix_path"
20956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20958    new_path="$unix_path"
20959  fi
20960
20961    fi
20962
20963    if test "x$new_path" = x; then
20964      # It's still not found. Now this is an unrecoverable error.
20965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20966$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20967      has_space=`$ECHO "$complete" | $GREP " "`
20968      if test "x$has_space" != x; then
20969        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20970$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20971      fi
20972      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20973    fi
20974  fi
20975
20976  # Now new_path has a complete unix path to the binary
20977  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20978    # Keep paths in /bin as-is, but remove trailing .exe if any
20979    new_path="${new_path/%.exe/}"
20980    # Do not save /bin paths to all_fixpath_prefixes!
20981  else
20982    # Not in mixed or Windows style, start by that.
20983    new_path=`cmd //c echo $new_path`
20984
20985  input_path="$new_path"
20986  # Check if we need to convert this using DOS-style short mode. If the path
20987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20988  # take no chances and rewrite it.
20989  # Note: m4 eats our [], so we need to use [ and ] instead.
20990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20991  if test "x$has_forbidden_chars" != x; then
20992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20993    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20994  fi
20995
20996    # Output is in $new_path
20997
20998  windows_path="$new_path"
20999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21000    unix_path=`$CYGPATH -u "$windows_path"`
21001    new_path="$unix_path"
21002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21004    new_path="$unix_path"
21005  fi
21006
21007    # remove trailing .exe if any
21008    new_path="${new_path/%.exe/}"
21009
21010    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21011    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21012  fi
21013
21014    else
21015      # We're on a unix platform. Hooray! :)
21016      # First separate the path from the arguments. This will split at the first
21017      # space.
21018      complete="$FOUND_MAKE"
21019      path="${complete%% *}"
21020      tmp="$complete EOL"
21021      arguments="${tmp#* }"
21022
21023      # Cannot rely on the command "which" here since it doesn't always work.
21024      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21025      if test -z "$is_absolute_path"; then
21026        # Path to executable is not absolute. Find it.
21027        IFS_save="$IFS"
21028        IFS=:
21029        for p in $PATH; do
21030          if test -f "$p/$path" && test -x "$p/$path"; then
21031            new_path="$p/$path"
21032            break
21033          fi
21034        done
21035        IFS="$IFS_save"
21036      else
21037        # This is an absolute path, we can use it without further modifications.
21038        new_path="$path"
21039      fi
21040
21041      if test "x$new_path" = x; then
21042        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21043$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21044        has_space=`$ECHO "$complete" | $GREP " "`
21045        if test "x$has_space" != x; then
21046          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21047$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21048        fi
21049        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21050      fi
21051    fi
21052
21053    # Now join together the path and the arguments once again
21054    if test "x$arguments" != xEOL; then
21055      new_complete="$new_path ${arguments% *}"
21056    else
21057      new_complete="$new_path"
21058    fi
21059
21060    if test "x$complete" != "x$new_complete"; then
21061      FOUND_MAKE="$new_complete"
21062      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21063$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21064    fi
21065  fi
21066
21067        fi
21068      fi
21069    fi
21070  fi
21071
21072    if test "x$FOUND_MAKE" = x; then
21073      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21074    fi
21075
21076  fi
21077
21078
21079  MAKE=$FOUND_MAKE
21080
21081  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21082$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21083
21084
21085  # Check if make supports the output sync option and if so, setup using it.
21086  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21087$as_echo_n "checking if make --output-sync is supported... " >&6; }
21088  if $MAKE --version -O > /dev/null 2>&1; then
21089    OUTPUT_SYNC_SUPPORTED=true
21090    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21091$as_echo "yes" >&6; }
21092    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21093$as_echo_n "checking for output-sync value... " >&6; }
21094
21095# Check whether --with-output-sync was given.
21096if test "${with_output_sync+set}" = set; then :
21097  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21098fi
21099
21100    if test "x$OUTPUT_SYNC" = "x"; then
21101      OUTPUT_SYNC=none
21102    fi
21103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21104$as_echo "$OUTPUT_SYNC" >&6; }
21105    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21106      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21107    fi
21108  else
21109    OUTPUT_SYNC_SUPPORTED=false
21110    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21111$as_echo "no" >&6; }
21112  fi
21113
21114
21115
21116
21117
21118
21119  # Test if find supports -delete
21120  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21121$as_echo_n "checking if find supports -delete... " >&6; }
21122  FIND_DELETE="-delete"
21123
21124  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21125
21126  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21127
21128  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21129  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21130    # No, it does not.
21131    $RM $DELETEDIR/TestIfFindSupportsDelete
21132    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21133      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21134      FIND_DELETE="-print | $XARGS $RM"
21135    else
21136      FIND_DELETE="-exec $RM \{\} \+"
21137    fi
21138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21139$as_echo "no" >&6; }
21140  else
21141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21142$as_echo "yes" >&6; }
21143  fi
21144  $RMDIR $DELETEDIR
21145
21146
21147
21148  # Test which kind of tar was found
21149  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21150    TAR_TYPE="gnu"
21151  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21152    TAR_TYPE="bsd"
21153  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21154    TAR_TYPE="solaris"
21155  fi
21156  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21157$as_echo_n "checking what type of tar was found... " >&6; }
21158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21159$as_echo "$TAR_TYPE" >&6; }
21160
21161  TAR_CREATE_FILE_PARAM=""
21162
21163  if test "x$TAR_TYPE" = "xgnu"; then
21164    TAR_INCLUDE_PARAM="T"
21165    TAR_SUPPORTS_TRANSFORM="true"
21166    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21167      # When using gnu tar for Solaris targets, need to use compatibility mode
21168      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21169    fi
21170  else
21171    TAR_INCLUDE_PARAM="I"
21172    TAR_SUPPORTS_TRANSFORM="false"
21173  fi
21174
21175
21176
21177
21178
21179
21180  # These tools might not be installed by default,
21181  # need hint on how to install them.
21182
21183
21184
21185  # Publish this variable in the help.
21186
21187
21188  if [ -z "${UNZIP+x}" ]; then
21189    # The variable is not set by user, try to locate tool using the code snippet
21190    for ac_prog in unzip
21191do
21192  # Extract the first word of "$ac_prog", so it can be a program name with args.
21193set dummy $ac_prog; ac_word=$2
21194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21195$as_echo_n "checking for $ac_word... " >&6; }
21196if ${ac_cv_path_UNZIP+:} false; then :
21197  $as_echo_n "(cached) " >&6
21198else
21199  case $UNZIP in
21200  [\\/]* | ?:[\\/]*)
21201  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21202  ;;
21203  *)
21204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21205for as_dir in $PATH
21206do
21207  IFS=$as_save_IFS
21208  test -z "$as_dir" && as_dir=.
21209    for ac_exec_ext in '' $ac_executable_extensions; do
21210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21211    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21213    break 2
21214  fi
21215done
21216  done
21217IFS=$as_save_IFS
21218
21219  ;;
21220esac
21221fi
21222UNZIP=$ac_cv_path_UNZIP
21223if test -n "$UNZIP"; then
21224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21225$as_echo "$UNZIP" >&6; }
21226else
21227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21228$as_echo "no" >&6; }
21229fi
21230
21231
21232  test -n "$UNZIP" && break
21233done
21234
21235  else
21236    # The variable is set, but is it from the command line or the environment?
21237
21238    # Try to remove the string !UNZIP! from our list.
21239    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21240    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21241      # If it failed, the variable was not from the command line. Ignore it,
21242      # but warn the user (except for BASH, which is always set by the calling BASH).
21243      if test "xUNZIP" != xBASH; then
21244        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21245$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21246      fi
21247      # Try to locate tool using the code snippet
21248      for ac_prog in unzip
21249do
21250  # Extract the first word of "$ac_prog", so it can be a program name with args.
21251set dummy $ac_prog; ac_word=$2
21252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21253$as_echo_n "checking for $ac_word... " >&6; }
21254if ${ac_cv_path_UNZIP+:} false; then :
21255  $as_echo_n "(cached) " >&6
21256else
21257  case $UNZIP in
21258  [\\/]* | ?:[\\/]*)
21259  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21260  ;;
21261  *)
21262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21263for as_dir in $PATH
21264do
21265  IFS=$as_save_IFS
21266  test -z "$as_dir" && as_dir=.
21267    for ac_exec_ext in '' $ac_executable_extensions; do
21268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21269    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21271    break 2
21272  fi
21273done
21274  done
21275IFS=$as_save_IFS
21276
21277  ;;
21278esac
21279fi
21280UNZIP=$ac_cv_path_UNZIP
21281if test -n "$UNZIP"; then
21282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21283$as_echo "$UNZIP" >&6; }
21284else
21285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21286$as_echo "no" >&6; }
21287fi
21288
21289
21290  test -n "$UNZIP" && break
21291done
21292
21293    else
21294      # If it succeeded, then it was overridden by the user. We will use it
21295      # for the tool.
21296
21297      # First remove it from the list of overridden variables, so we can test
21298      # for unknown variables in the end.
21299      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21300
21301      # Check if we try to supply an empty value
21302      if test "x$UNZIP" = x; then
21303        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21304$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21305        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21306$as_echo_n "checking for UNZIP... " >&6; }
21307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21308$as_echo "disabled" >&6; }
21309      else
21310        # Check if the provided tool contains a complete path.
21311        tool_specified="$UNZIP"
21312        tool_basename="${tool_specified##*/}"
21313        if test "x$tool_basename" = "x$tool_specified"; then
21314          # A command without a complete path is provided, search $PATH.
21315          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21316$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21317          # Extract the first word of "$tool_basename", so it can be a program name with args.
21318set dummy $tool_basename; ac_word=$2
21319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21320$as_echo_n "checking for $ac_word... " >&6; }
21321if ${ac_cv_path_UNZIP+:} false; then :
21322  $as_echo_n "(cached) " >&6
21323else
21324  case $UNZIP in
21325  [\\/]* | ?:[\\/]*)
21326  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21327  ;;
21328  *)
21329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21330for as_dir in $PATH
21331do
21332  IFS=$as_save_IFS
21333  test -z "$as_dir" && as_dir=.
21334    for ac_exec_ext in '' $ac_executable_extensions; do
21335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21336    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21338    break 2
21339  fi
21340done
21341  done
21342IFS=$as_save_IFS
21343
21344  ;;
21345esac
21346fi
21347UNZIP=$ac_cv_path_UNZIP
21348if test -n "$UNZIP"; then
21349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21350$as_echo "$UNZIP" >&6; }
21351else
21352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21353$as_echo "no" >&6; }
21354fi
21355
21356
21357          if test "x$UNZIP" = x; then
21358            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21359          fi
21360        else
21361          # Otherwise we believe it is a complete path. Use it as it is.
21362          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21363$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21364          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21365$as_echo_n "checking for UNZIP... " >&6; }
21366          if test ! -x "$tool_specified"; then
21367            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21368$as_echo "not found" >&6; }
21369            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21370          fi
21371          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21372$as_echo "$tool_specified" >&6; }
21373        fi
21374      fi
21375    fi
21376
21377  fi
21378
21379
21380
21381  if test "x$UNZIP" = x; then
21382    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21383  fi
21384
21385
21386
21387
21388
21389  # Publish this variable in the help.
21390
21391
21392  if [ -z "${ZIP+x}" ]; then
21393    # The variable is not set by user, try to locate tool using the code snippet
21394    for ac_prog in zip
21395do
21396  # Extract the first word of "$ac_prog", so it can be a program name with args.
21397set dummy $ac_prog; ac_word=$2
21398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21399$as_echo_n "checking for $ac_word... " >&6; }
21400if ${ac_cv_path_ZIP+:} false; then :
21401  $as_echo_n "(cached) " >&6
21402else
21403  case $ZIP in
21404  [\\/]* | ?:[\\/]*)
21405  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21406  ;;
21407  *)
21408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21409for as_dir in $PATH
21410do
21411  IFS=$as_save_IFS
21412  test -z "$as_dir" && as_dir=.
21413    for ac_exec_ext in '' $ac_executable_extensions; do
21414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21415    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21417    break 2
21418  fi
21419done
21420  done
21421IFS=$as_save_IFS
21422
21423  ;;
21424esac
21425fi
21426ZIP=$ac_cv_path_ZIP
21427if test -n "$ZIP"; then
21428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21429$as_echo "$ZIP" >&6; }
21430else
21431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21432$as_echo "no" >&6; }
21433fi
21434
21435
21436  test -n "$ZIP" && break
21437done
21438
21439  else
21440    # The variable is set, but is it from the command line or the environment?
21441
21442    # Try to remove the string !ZIP! from our list.
21443    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
21444    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21445      # If it failed, the variable was not from the command line. Ignore it,
21446      # but warn the user (except for BASH, which is always set by the calling BASH).
21447      if test "xZIP" != xBASH; then
21448        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
21449$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
21450      fi
21451      # Try to locate tool using the code snippet
21452      for ac_prog in zip
21453do
21454  # Extract the first word of "$ac_prog", so it can be a program name with args.
21455set dummy $ac_prog; ac_word=$2
21456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21457$as_echo_n "checking for $ac_word... " >&6; }
21458if ${ac_cv_path_ZIP+:} false; then :
21459  $as_echo_n "(cached) " >&6
21460else
21461  case $ZIP in
21462  [\\/]* | ?:[\\/]*)
21463  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21464  ;;
21465  *)
21466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21467for as_dir in $PATH
21468do
21469  IFS=$as_save_IFS
21470  test -z "$as_dir" && as_dir=.
21471    for ac_exec_ext in '' $ac_executable_extensions; do
21472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21473    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21475    break 2
21476  fi
21477done
21478  done
21479IFS=$as_save_IFS
21480
21481  ;;
21482esac
21483fi
21484ZIP=$ac_cv_path_ZIP
21485if test -n "$ZIP"; then
21486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21487$as_echo "$ZIP" >&6; }
21488else
21489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21490$as_echo "no" >&6; }
21491fi
21492
21493
21494  test -n "$ZIP" && break
21495done
21496
21497    else
21498      # If it succeeded, then it was overridden by the user. We will use it
21499      # for the tool.
21500
21501      # First remove it from the list of overridden variables, so we can test
21502      # for unknown variables in the end.
21503      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21504
21505      # Check if we try to supply an empty value
21506      if test "x$ZIP" = x; then
21507        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21508$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21509        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21510$as_echo_n "checking for ZIP... " >&6; }
21511        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21512$as_echo "disabled" >&6; }
21513      else
21514        # Check if the provided tool contains a complete path.
21515        tool_specified="$ZIP"
21516        tool_basename="${tool_specified##*/}"
21517        if test "x$tool_basename" = "x$tool_specified"; then
21518          # A command without a complete path is provided, search $PATH.
21519          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21520$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21521          # Extract the first word of "$tool_basename", so it can be a program name with args.
21522set dummy $tool_basename; ac_word=$2
21523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21524$as_echo_n "checking for $ac_word... " >&6; }
21525if ${ac_cv_path_ZIP+:} false; then :
21526  $as_echo_n "(cached) " >&6
21527else
21528  case $ZIP in
21529  [\\/]* | ?:[\\/]*)
21530  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21531  ;;
21532  *)
21533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21534for as_dir in $PATH
21535do
21536  IFS=$as_save_IFS
21537  test -z "$as_dir" && as_dir=.
21538    for ac_exec_ext in '' $ac_executable_extensions; do
21539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21540    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21542    break 2
21543  fi
21544done
21545  done
21546IFS=$as_save_IFS
21547
21548  ;;
21549esac
21550fi
21551ZIP=$ac_cv_path_ZIP
21552if test -n "$ZIP"; then
21553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21554$as_echo "$ZIP" >&6; }
21555else
21556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21557$as_echo "no" >&6; }
21558fi
21559
21560
21561          if test "x$ZIP" = x; then
21562            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21563          fi
21564        else
21565          # Otherwise we believe it is a complete path. Use it as it is.
21566          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21567$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21568          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21569$as_echo_n "checking for ZIP... " >&6; }
21570          if test ! -x "$tool_specified"; then
21571            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21572$as_echo "not found" >&6; }
21573            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21574          fi
21575          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21576$as_echo "$tool_specified" >&6; }
21577        fi
21578      fi
21579    fi
21580
21581  fi
21582
21583
21584
21585  if test "x$ZIP" = x; then
21586    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21587  fi
21588
21589
21590
21591  # Non-required basic tools
21592
21593
21594
21595  # Publish this variable in the help.
21596
21597
21598  if [ -z "${LDD+x}" ]; then
21599    # The variable is not set by user, try to locate tool using the code snippet
21600    for ac_prog in ldd
21601do
21602  # Extract the first word of "$ac_prog", so it can be a program name with args.
21603set dummy $ac_prog; ac_word=$2
21604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21605$as_echo_n "checking for $ac_word... " >&6; }
21606if ${ac_cv_path_LDD+:} false; then :
21607  $as_echo_n "(cached) " >&6
21608else
21609  case $LDD in
21610  [\\/]* | ?:[\\/]*)
21611  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21612  ;;
21613  *)
21614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21615for as_dir in $PATH
21616do
21617  IFS=$as_save_IFS
21618  test -z "$as_dir" && as_dir=.
21619    for ac_exec_ext in '' $ac_executable_extensions; do
21620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21621    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21623    break 2
21624  fi
21625done
21626  done
21627IFS=$as_save_IFS
21628
21629  ;;
21630esac
21631fi
21632LDD=$ac_cv_path_LDD
21633if test -n "$LDD"; then
21634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21635$as_echo "$LDD" >&6; }
21636else
21637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21638$as_echo "no" >&6; }
21639fi
21640
21641
21642  test -n "$LDD" && break
21643done
21644
21645  else
21646    # The variable is set, but is it from the command line or the environment?
21647
21648    # Try to remove the string !LDD! from our list.
21649    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21650    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21651      # If it failed, the variable was not from the command line. Ignore it,
21652      # but warn the user (except for BASH, which is always set by the calling BASH).
21653      if test "xLDD" != xBASH; then
21654        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21655$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21656      fi
21657      # Try to locate tool using the code snippet
21658      for ac_prog in ldd
21659do
21660  # Extract the first word of "$ac_prog", so it can be a program name with args.
21661set dummy $ac_prog; ac_word=$2
21662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21663$as_echo_n "checking for $ac_word... " >&6; }
21664if ${ac_cv_path_LDD+:} false; then :
21665  $as_echo_n "(cached) " >&6
21666else
21667  case $LDD in
21668  [\\/]* | ?:[\\/]*)
21669  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21670  ;;
21671  *)
21672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21673for as_dir in $PATH
21674do
21675  IFS=$as_save_IFS
21676  test -z "$as_dir" && as_dir=.
21677    for ac_exec_ext in '' $ac_executable_extensions; do
21678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21679    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21681    break 2
21682  fi
21683done
21684  done
21685IFS=$as_save_IFS
21686
21687  ;;
21688esac
21689fi
21690LDD=$ac_cv_path_LDD
21691if test -n "$LDD"; then
21692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21693$as_echo "$LDD" >&6; }
21694else
21695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21696$as_echo "no" >&6; }
21697fi
21698
21699
21700  test -n "$LDD" && break
21701done
21702
21703    else
21704      # If it succeeded, then it was overridden by the user. We will use it
21705      # for the tool.
21706
21707      # First remove it from the list of overridden variables, so we can test
21708      # for unknown variables in the end.
21709      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21710
21711      # Check if we try to supply an empty value
21712      if test "x$LDD" = x; then
21713        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21714$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21715        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21716$as_echo_n "checking for LDD... " >&6; }
21717        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21718$as_echo "disabled" >&6; }
21719      else
21720        # Check if the provided tool contains a complete path.
21721        tool_specified="$LDD"
21722        tool_basename="${tool_specified##*/}"
21723        if test "x$tool_basename" = "x$tool_specified"; then
21724          # A command without a complete path is provided, search $PATH.
21725          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21726$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21727          # Extract the first word of "$tool_basename", so it can be a program name with args.
21728set dummy $tool_basename; ac_word=$2
21729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21730$as_echo_n "checking for $ac_word... " >&6; }
21731if ${ac_cv_path_LDD+:} false; then :
21732  $as_echo_n "(cached) " >&6
21733else
21734  case $LDD in
21735  [\\/]* | ?:[\\/]*)
21736  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21737  ;;
21738  *)
21739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21740for as_dir in $PATH
21741do
21742  IFS=$as_save_IFS
21743  test -z "$as_dir" && as_dir=.
21744    for ac_exec_ext in '' $ac_executable_extensions; do
21745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21746    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21748    break 2
21749  fi
21750done
21751  done
21752IFS=$as_save_IFS
21753
21754  ;;
21755esac
21756fi
21757LDD=$ac_cv_path_LDD
21758if test -n "$LDD"; then
21759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21760$as_echo "$LDD" >&6; }
21761else
21762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21763$as_echo "no" >&6; }
21764fi
21765
21766
21767          if test "x$LDD" = x; then
21768            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21769          fi
21770        else
21771          # Otherwise we believe it is a complete path. Use it as it is.
21772          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21773$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21774          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21775$as_echo_n "checking for LDD... " >&6; }
21776          if test ! -x "$tool_specified"; then
21777            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21778$as_echo "not found" >&6; }
21779            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21780          fi
21781          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21782$as_echo "$tool_specified" >&6; }
21783        fi
21784      fi
21785    fi
21786
21787  fi
21788
21789
21790  if test "x$LDD" = "x"; then
21791    # List shared lib dependencies is used for
21792    # debug output and checking for forbidden dependencies.
21793    # We can build without it.
21794    LDD="true"
21795  fi
21796
21797
21798  # Publish this variable in the help.
21799
21800
21801  if [ -z "${OTOOL+x}" ]; then
21802    # The variable is not set by user, try to locate tool using the code snippet
21803    for ac_prog in otool
21804do
21805  # Extract the first word of "$ac_prog", so it can be a program name with args.
21806set dummy $ac_prog; ac_word=$2
21807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21808$as_echo_n "checking for $ac_word... " >&6; }
21809if ${ac_cv_path_OTOOL+:} false; then :
21810  $as_echo_n "(cached) " >&6
21811else
21812  case $OTOOL in
21813  [\\/]* | ?:[\\/]*)
21814  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21815  ;;
21816  *)
21817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21818for as_dir in $PATH
21819do
21820  IFS=$as_save_IFS
21821  test -z "$as_dir" && as_dir=.
21822    for ac_exec_ext in '' $ac_executable_extensions; do
21823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21824    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21826    break 2
21827  fi
21828done
21829  done
21830IFS=$as_save_IFS
21831
21832  ;;
21833esac
21834fi
21835OTOOL=$ac_cv_path_OTOOL
21836if test -n "$OTOOL"; then
21837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21838$as_echo "$OTOOL" >&6; }
21839else
21840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21841$as_echo "no" >&6; }
21842fi
21843
21844
21845  test -n "$OTOOL" && break
21846done
21847
21848  else
21849    # The variable is set, but is it from the command line or the environment?
21850
21851    # Try to remove the string !OTOOL! from our list.
21852    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21853    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21854      # If it failed, the variable was not from the command line. Ignore it,
21855      # but warn the user (except for BASH, which is always set by the calling BASH).
21856      if test "xOTOOL" != xBASH; then
21857        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21858$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21859      fi
21860      # Try to locate tool using the code snippet
21861      for ac_prog in otool
21862do
21863  # Extract the first word of "$ac_prog", so it can be a program name with args.
21864set dummy $ac_prog; ac_word=$2
21865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21866$as_echo_n "checking for $ac_word... " >&6; }
21867if ${ac_cv_path_OTOOL+:} false; then :
21868  $as_echo_n "(cached) " >&6
21869else
21870  case $OTOOL in
21871  [\\/]* | ?:[\\/]*)
21872  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21873  ;;
21874  *)
21875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21876for as_dir in $PATH
21877do
21878  IFS=$as_save_IFS
21879  test -z "$as_dir" && as_dir=.
21880    for ac_exec_ext in '' $ac_executable_extensions; do
21881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21882    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21884    break 2
21885  fi
21886done
21887  done
21888IFS=$as_save_IFS
21889
21890  ;;
21891esac
21892fi
21893OTOOL=$ac_cv_path_OTOOL
21894if test -n "$OTOOL"; then
21895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21896$as_echo "$OTOOL" >&6; }
21897else
21898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21899$as_echo "no" >&6; }
21900fi
21901
21902
21903  test -n "$OTOOL" && break
21904done
21905
21906    else
21907      # If it succeeded, then it was overridden by the user. We will use it
21908      # for the tool.
21909
21910      # First remove it from the list of overridden variables, so we can test
21911      # for unknown variables in the end.
21912      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21913
21914      # Check if we try to supply an empty value
21915      if test "x$OTOOL" = x; then
21916        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21917$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21918        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21919$as_echo_n "checking for OTOOL... " >&6; }
21920        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21921$as_echo "disabled" >&6; }
21922      else
21923        # Check if the provided tool contains a complete path.
21924        tool_specified="$OTOOL"
21925        tool_basename="${tool_specified##*/}"
21926        if test "x$tool_basename" = "x$tool_specified"; then
21927          # A command without a complete path is provided, search $PATH.
21928          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21929$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21930          # Extract the first word of "$tool_basename", so it can be a program name with args.
21931set dummy $tool_basename; ac_word=$2
21932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21933$as_echo_n "checking for $ac_word... " >&6; }
21934if ${ac_cv_path_OTOOL+:} false; then :
21935  $as_echo_n "(cached) " >&6
21936else
21937  case $OTOOL in
21938  [\\/]* | ?:[\\/]*)
21939  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21940  ;;
21941  *)
21942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21943for as_dir in $PATH
21944do
21945  IFS=$as_save_IFS
21946  test -z "$as_dir" && as_dir=.
21947    for ac_exec_ext in '' $ac_executable_extensions; do
21948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21949    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21951    break 2
21952  fi
21953done
21954  done
21955IFS=$as_save_IFS
21956
21957  ;;
21958esac
21959fi
21960OTOOL=$ac_cv_path_OTOOL
21961if test -n "$OTOOL"; then
21962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21963$as_echo "$OTOOL" >&6; }
21964else
21965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21966$as_echo "no" >&6; }
21967fi
21968
21969
21970          if test "x$OTOOL" = x; then
21971            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21972          fi
21973        else
21974          # Otherwise we believe it is a complete path. Use it as it is.
21975          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21976$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21977          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21978$as_echo_n "checking for OTOOL... " >&6; }
21979          if test ! -x "$tool_specified"; then
21980            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21981$as_echo "not found" >&6; }
21982            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21983          fi
21984          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21985$as_echo "$tool_specified" >&6; }
21986        fi
21987      fi
21988    fi
21989
21990  fi
21991
21992
21993  if test "x$OTOOL" = "x"; then
21994    OTOOL="true"
21995  fi
21996
21997
21998  # Publish this variable in the help.
21999
22000
22001  if [ -z "${READELF+x}" ]; then
22002    # The variable is not set by user, try to locate tool using the code snippet
22003    for ac_prog in greadelf readelf
22004do
22005  # Extract the first word of "$ac_prog", so it can be a program name with args.
22006set dummy $ac_prog; ac_word=$2
22007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22008$as_echo_n "checking for $ac_word... " >&6; }
22009if ${ac_cv_path_READELF+:} false; then :
22010  $as_echo_n "(cached) " >&6
22011else
22012  case $READELF in
22013  [\\/]* | ?:[\\/]*)
22014  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22015  ;;
22016  *)
22017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22018for as_dir in $PATH
22019do
22020  IFS=$as_save_IFS
22021  test -z "$as_dir" && as_dir=.
22022    for ac_exec_ext in '' $ac_executable_extensions; do
22023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22024    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22026    break 2
22027  fi
22028done
22029  done
22030IFS=$as_save_IFS
22031
22032  ;;
22033esac
22034fi
22035READELF=$ac_cv_path_READELF
22036if test -n "$READELF"; then
22037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22038$as_echo "$READELF" >&6; }
22039else
22040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22041$as_echo "no" >&6; }
22042fi
22043
22044
22045  test -n "$READELF" && break
22046done
22047
22048  else
22049    # The variable is set, but is it from the command line or the environment?
22050
22051    # Try to remove the string !READELF! from our list.
22052    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22053    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22054      # If it failed, the variable was not from the command line. Ignore it,
22055      # but warn the user (except for BASH, which is always set by the calling BASH).
22056      if test "xREADELF" != xBASH; then
22057        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22058$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22059      fi
22060      # Try to locate tool using the code snippet
22061      for ac_prog in greadelf readelf
22062do
22063  # Extract the first word of "$ac_prog", so it can be a program name with args.
22064set dummy $ac_prog; ac_word=$2
22065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22066$as_echo_n "checking for $ac_word... " >&6; }
22067if ${ac_cv_path_READELF+:} false; then :
22068  $as_echo_n "(cached) " >&6
22069else
22070  case $READELF in
22071  [\\/]* | ?:[\\/]*)
22072  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22073  ;;
22074  *)
22075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22076for as_dir in $PATH
22077do
22078  IFS=$as_save_IFS
22079  test -z "$as_dir" && as_dir=.
22080    for ac_exec_ext in '' $ac_executable_extensions; do
22081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22082    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22084    break 2
22085  fi
22086done
22087  done
22088IFS=$as_save_IFS
22089
22090  ;;
22091esac
22092fi
22093READELF=$ac_cv_path_READELF
22094if test -n "$READELF"; then
22095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22096$as_echo "$READELF" >&6; }
22097else
22098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22099$as_echo "no" >&6; }
22100fi
22101
22102
22103  test -n "$READELF" && break
22104done
22105
22106    else
22107      # If it succeeded, then it was overridden by the user. We will use it
22108      # for the tool.
22109
22110      # First remove it from the list of overridden variables, so we can test
22111      # for unknown variables in the end.
22112      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22113
22114      # Check if we try to supply an empty value
22115      if test "x$READELF" = x; then
22116        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22117$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22118        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22119$as_echo_n "checking for READELF... " >&6; }
22120        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22121$as_echo "disabled" >&6; }
22122      else
22123        # Check if the provided tool contains a complete path.
22124        tool_specified="$READELF"
22125        tool_basename="${tool_specified##*/}"
22126        if test "x$tool_basename" = "x$tool_specified"; then
22127          # A command without a complete path is provided, search $PATH.
22128          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22129$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22130          # Extract the first word of "$tool_basename", so it can be a program name with args.
22131set dummy $tool_basename; ac_word=$2
22132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22133$as_echo_n "checking for $ac_word... " >&6; }
22134if ${ac_cv_path_READELF+:} false; then :
22135  $as_echo_n "(cached) " >&6
22136else
22137  case $READELF in
22138  [\\/]* | ?:[\\/]*)
22139  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22140  ;;
22141  *)
22142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22143for as_dir in $PATH
22144do
22145  IFS=$as_save_IFS
22146  test -z "$as_dir" && as_dir=.
22147    for ac_exec_ext in '' $ac_executable_extensions; do
22148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22149    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22151    break 2
22152  fi
22153done
22154  done
22155IFS=$as_save_IFS
22156
22157  ;;
22158esac
22159fi
22160READELF=$ac_cv_path_READELF
22161if test -n "$READELF"; then
22162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22163$as_echo "$READELF" >&6; }
22164else
22165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22166$as_echo "no" >&6; }
22167fi
22168
22169
22170          if test "x$READELF" = x; then
22171            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22172          fi
22173        else
22174          # Otherwise we believe it is a complete path. Use it as it is.
22175          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22176$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22177          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22178$as_echo_n "checking for READELF... " >&6; }
22179          if test ! -x "$tool_specified"; then
22180            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22181$as_echo "not found" >&6; }
22182            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22183          fi
22184          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22185$as_echo "$tool_specified" >&6; }
22186        fi
22187      fi
22188    fi
22189
22190  fi
22191
22192
22193
22194
22195  # Publish this variable in the help.
22196
22197
22198  if [ -z "${HG+x}" ]; then
22199    # The variable is not set by user, try to locate tool using the code snippet
22200    for ac_prog in hg
22201do
22202  # Extract the first word of "$ac_prog", so it can be a program name with args.
22203set dummy $ac_prog; ac_word=$2
22204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22205$as_echo_n "checking for $ac_word... " >&6; }
22206if ${ac_cv_path_HG+:} false; then :
22207  $as_echo_n "(cached) " >&6
22208else
22209  case $HG in
22210  [\\/]* | ?:[\\/]*)
22211  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22212  ;;
22213  *)
22214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22215for as_dir in $PATH
22216do
22217  IFS=$as_save_IFS
22218  test -z "$as_dir" && as_dir=.
22219    for ac_exec_ext in '' $ac_executable_extensions; do
22220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22221    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22223    break 2
22224  fi
22225done
22226  done
22227IFS=$as_save_IFS
22228
22229  ;;
22230esac
22231fi
22232HG=$ac_cv_path_HG
22233if test -n "$HG"; then
22234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22235$as_echo "$HG" >&6; }
22236else
22237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22238$as_echo "no" >&6; }
22239fi
22240
22241
22242  test -n "$HG" && break
22243done
22244
22245  else
22246    # The variable is set, but is it from the command line or the environment?
22247
22248    # Try to remove the string !HG! from our list.
22249    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22250    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22251      # If it failed, the variable was not from the command line. Ignore it,
22252      # but warn the user (except for BASH, which is always set by the calling BASH).
22253      if test "xHG" != xBASH; then
22254        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22255$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22256      fi
22257      # Try to locate tool using the code snippet
22258      for ac_prog in hg
22259do
22260  # Extract the first word of "$ac_prog", so it can be a program name with args.
22261set dummy $ac_prog; ac_word=$2
22262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22263$as_echo_n "checking for $ac_word... " >&6; }
22264if ${ac_cv_path_HG+:} false; then :
22265  $as_echo_n "(cached) " >&6
22266else
22267  case $HG in
22268  [\\/]* | ?:[\\/]*)
22269  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22270  ;;
22271  *)
22272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22273for as_dir in $PATH
22274do
22275  IFS=$as_save_IFS
22276  test -z "$as_dir" && as_dir=.
22277    for ac_exec_ext in '' $ac_executable_extensions; do
22278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22279    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22281    break 2
22282  fi
22283done
22284  done
22285IFS=$as_save_IFS
22286
22287  ;;
22288esac
22289fi
22290HG=$ac_cv_path_HG
22291if test -n "$HG"; then
22292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22293$as_echo "$HG" >&6; }
22294else
22295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22296$as_echo "no" >&6; }
22297fi
22298
22299
22300  test -n "$HG" && break
22301done
22302
22303    else
22304      # If it succeeded, then it was overridden by the user. We will use it
22305      # for the tool.
22306
22307      # First remove it from the list of overridden variables, so we can test
22308      # for unknown variables in the end.
22309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22310
22311      # Check if we try to supply an empty value
22312      if test "x$HG" = x; then
22313        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22314$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22315        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22316$as_echo_n "checking for HG... " >&6; }
22317        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22318$as_echo "disabled" >&6; }
22319      else
22320        # Check if the provided tool contains a complete path.
22321        tool_specified="$HG"
22322        tool_basename="${tool_specified##*/}"
22323        if test "x$tool_basename" = "x$tool_specified"; then
22324          # A command without a complete path is provided, search $PATH.
22325          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22326$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22327          # Extract the first word of "$tool_basename", so it can be a program name with args.
22328set dummy $tool_basename; ac_word=$2
22329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22330$as_echo_n "checking for $ac_word... " >&6; }
22331if ${ac_cv_path_HG+:} false; then :
22332  $as_echo_n "(cached) " >&6
22333else
22334  case $HG in
22335  [\\/]* | ?:[\\/]*)
22336  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22337  ;;
22338  *)
22339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22340for as_dir in $PATH
22341do
22342  IFS=$as_save_IFS
22343  test -z "$as_dir" && as_dir=.
22344    for ac_exec_ext in '' $ac_executable_extensions; do
22345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22346    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22348    break 2
22349  fi
22350done
22351  done
22352IFS=$as_save_IFS
22353
22354  ;;
22355esac
22356fi
22357HG=$ac_cv_path_HG
22358if test -n "$HG"; then
22359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22360$as_echo "$HG" >&6; }
22361else
22362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22363$as_echo "no" >&6; }
22364fi
22365
22366
22367          if test "x$HG" = x; then
22368            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22369          fi
22370        else
22371          # Otherwise we believe it is a complete path. Use it as it is.
22372          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22373$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22374          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22375$as_echo_n "checking for HG... " >&6; }
22376          if test ! -x "$tool_specified"; then
22377            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22378$as_echo "not found" >&6; }
22379            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22380          fi
22381          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22382$as_echo "$tool_specified" >&6; }
22383        fi
22384      fi
22385    fi
22386
22387  fi
22388
22389
22390
22391
22392  # Publish this variable in the help.
22393
22394
22395  if [ -z "${STAT+x}" ]; then
22396    # The variable is not set by user, try to locate tool using the code snippet
22397    for ac_prog in stat
22398do
22399  # Extract the first word of "$ac_prog", so it can be a program name with args.
22400set dummy $ac_prog; ac_word=$2
22401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22402$as_echo_n "checking for $ac_word... " >&6; }
22403if ${ac_cv_path_STAT+:} false; then :
22404  $as_echo_n "(cached) " >&6
22405else
22406  case $STAT in
22407  [\\/]* | ?:[\\/]*)
22408  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22409  ;;
22410  *)
22411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22412for as_dir in $PATH
22413do
22414  IFS=$as_save_IFS
22415  test -z "$as_dir" && as_dir=.
22416    for ac_exec_ext in '' $ac_executable_extensions; do
22417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22418    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22420    break 2
22421  fi
22422done
22423  done
22424IFS=$as_save_IFS
22425
22426  ;;
22427esac
22428fi
22429STAT=$ac_cv_path_STAT
22430if test -n "$STAT"; then
22431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22432$as_echo "$STAT" >&6; }
22433else
22434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22435$as_echo "no" >&6; }
22436fi
22437
22438
22439  test -n "$STAT" && break
22440done
22441
22442  else
22443    # The variable is set, but is it from the command line or the environment?
22444
22445    # Try to remove the string !STAT! from our list.
22446    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22447    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22448      # If it failed, the variable was not from the command line. Ignore it,
22449      # but warn the user (except for BASH, which is always set by the calling BASH).
22450      if test "xSTAT" != xBASH; then
22451        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22452$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22453      fi
22454      # Try to locate tool using the code snippet
22455      for ac_prog in stat
22456do
22457  # Extract the first word of "$ac_prog", so it can be a program name with args.
22458set dummy $ac_prog; ac_word=$2
22459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22460$as_echo_n "checking for $ac_word... " >&6; }
22461if ${ac_cv_path_STAT+:} false; then :
22462  $as_echo_n "(cached) " >&6
22463else
22464  case $STAT in
22465  [\\/]* | ?:[\\/]*)
22466  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22467  ;;
22468  *)
22469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22470for as_dir in $PATH
22471do
22472  IFS=$as_save_IFS
22473  test -z "$as_dir" && as_dir=.
22474    for ac_exec_ext in '' $ac_executable_extensions; do
22475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22476    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22478    break 2
22479  fi
22480done
22481  done
22482IFS=$as_save_IFS
22483
22484  ;;
22485esac
22486fi
22487STAT=$ac_cv_path_STAT
22488if test -n "$STAT"; then
22489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22490$as_echo "$STAT" >&6; }
22491else
22492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22493$as_echo "no" >&6; }
22494fi
22495
22496
22497  test -n "$STAT" && break
22498done
22499
22500    else
22501      # If it succeeded, then it was overridden by the user. We will use it
22502      # for the tool.
22503
22504      # First remove it from the list of overridden variables, so we can test
22505      # for unknown variables in the end.
22506      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22507
22508      # Check if we try to supply an empty value
22509      if test "x$STAT" = x; then
22510        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22511$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22512        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22513$as_echo_n "checking for STAT... " >&6; }
22514        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22515$as_echo "disabled" >&6; }
22516      else
22517        # Check if the provided tool contains a complete path.
22518        tool_specified="$STAT"
22519        tool_basename="${tool_specified##*/}"
22520        if test "x$tool_basename" = "x$tool_specified"; then
22521          # A command without a complete path is provided, search $PATH.
22522          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22523$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22524          # Extract the first word of "$tool_basename", so it can be a program name with args.
22525set dummy $tool_basename; ac_word=$2
22526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22527$as_echo_n "checking for $ac_word... " >&6; }
22528if ${ac_cv_path_STAT+:} false; then :
22529  $as_echo_n "(cached) " >&6
22530else
22531  case $STAT in
22532  [\\/]* | ?:[\\/]*)
22533  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22534  ;;
22535  *)
22536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22537for as_dir in $PATH
22538do
22539  IFS=$as_save_IFS
22540  test -z "$as_dir" && as_dir=.
22541    for ac_exec_ext in '' $ac_executable_extensions; do
22542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22543    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22545    break 2
22546  fi
22547done
22548  done
22549IFS=$as_save_IFS
22550
22551  ;;
22552esac
22553fi
22554STAT=$ac_cv_path_STAT
22555if test -n "$STAT"; then
22556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22557$as_echo "$STAT" >&6; }
22558else
22559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22560$as_echo "no" >&6; }
22561fi
22562
22563
22564          if test "x$STAT" = x; then
22565            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22566          fi
22567        else
22568          # Otherwise we believe it is a complete path. Use it as it is.
22569          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22570$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22571          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22572$as_echo_n "checking for STAT... " >&6; }
22573          if test ! -x "$tool_specified"; then
22574            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22575$as_echo "not found" >&6; }
22576            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22577          fi
22578          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22579$as_echo "$tool_specified" >&6; }
22580        fi
22581      fi
22582    fi
22583
22584  fi
22585
22586
22587
22588
22589  # Publish this variable in the help.
22590
22591
22592  if [ -z "${TIME+x}" ]; then
22593    # The variable is not set by user, try to locate tool using the code snippet
22594    for ac_prog in time
22595do
22596  # Extract the first word of "$ac_prog", so it can be a program name with args.
22597set dummy $ac_prog; ac_word=$2
22598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22599$as_echo_n "checking for $ac_word... " >&6; }
22600if ${ac_cv_path_TIME+:} false; then :
22601  $as_echo_n "(cached) " >&6
22602else
22603  case $TIME in
22604  [\\/]* | ?:[\\/]*)
22605  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22606  ;;
22607  *)
22608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22609for as_dir in $PATH
22610do
22611  IFS=$as_save_IFS
22612  test -z "$as_dir" && as_dir=.
22613    for ac_exec_ext in '' $ac_executable_extensions; do
22614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22615    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22617    break 2
22618  fi
22619done
22620  done
22621IFS=$as_save_IFS
22622
22623  ;;
22624esac
22625fi
22626TIME=$ac_cv_path_TIME
22627if test -n "$TIME"; then
22628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22629$as_echo "$TIME" >&6; }
22630else
22631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22632$as_echo "no" >&6; }
22633fi
22634
22635
22636  test -n "$TIME" && break
22637done
22638
22639  else
22640    # The variable is set, but is it from the command line or the environment?
22641
22642    # Try to remove the string !TIME! from our list.
22643    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22644    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22645      # If it failed, the variable was not from the command line. Ignore it,
22646      # but warn the user (except for BASH, which is always set by the calling BASH).
22647      if test "xTIME" != xBASH; then
22648        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22649$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22650      fi
22651      # Try to locate tool using the code snippet
22652      for ac_prog in time
22653do
22654  # Extract the first word of "$ac_prog", so it can be a program name with args.
22655set dummy $ac_prog; ac_word=$2
22656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22657$as_echo_n "checking for $ac_word... " >&6; }
22658if ${ac_cv_path_TIME+:} false; then :
22659  $as_echo_n "(cached) " >&6
22660else
22661  case $TIME in
22662  [\\/]* | ?:[\\/]*)
22663  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22664  ;;
22665  *)
22666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22667for as_dir in $PATH
22668do
22669  IFS=$as_save_IFS
22670  test -z "$as_dir" && as_dir=.
22671    for ac_exec_ext in '' $ac_executable_extensions; do
22672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22673    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22675    break 2
22676  fi
22677done
22678  done
22679IFS=$as_save_IFS
22680
22681  ;;
22682esac
22683fi
22684TIME=$ac_cv_path_TIME
22685if test -n "$TIME"; then
22686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22687$as_echo "$TIME" >&6; }
22688else
22689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22690$as_echo "no" >&6; }
22691fi
22692
22693
22694  test -n "$TIME" && break
22695done
22696
22697    else
22698      # If it succeeded, then it was overridden by the user. We will use it
22699      # for the tool.
22700
22701      # First remove it from the list of overridden variables, so we can test
22702      # for unknown variables in the end.
22703      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22704
22705      # Check if we try to supply an empty value
22706      if test "x$TIME" = x; then
22707        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22708$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22709        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22710$as_echo_n "checking for TIME... " >&6; }
22711        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22712$as_echo "disabled" >&6; }
22713      else
22714        # Check if the provided tool contains a complete path.
22715        tool_specified="$TIME"
22716        tool_basename="${tool_specified##*/}"
22717        if test "x$tool_basename" = "x$tool_specified"; then
22718          # A command without a complete path is provided, search $PATH.
22719          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22720$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22721          # Extract the first word of "$tool_basename", so it can be a program name with args.
22722set dummy $tool_basename; ac_word=$2
22723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22724$as_echo_n "checking for $ac_word... " >&6; }
22725if ${ac_cv_path_TIME+:} false; then :
22726  $as_echo_n "(cached) " >&6
22727else
22728  case $TIME in
22729  [\\/]* | ?:[\\/]*)
22730  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22731  ;;
22732  *)
22733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22734for as_dir in $PATH
22735do
22736  IFS=$as_save_IFS
22737  test -z "$as_dir" && as_dir=.
22738    for ac_exec_ext in '' $ac_executable_extensions; do
22739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22740    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22742    break 2
22743  fi
22744done
22745  done
22746IFS=$as_save_IFS
22747
22748  ;;
22749esac
22750fi
22751TIME=$ac_cv_path_TIME
22752if test -n "$TIME"; then
22753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22754$as_echo "$TIME" >&6; }
22755else
22756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22757$as_echo "no" >&6; }
22758fi
22759
22760
22761          if test "x$TIME" = x; then
22762            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22763          fi
22764        else
22765          # Otherwise we believe it is a complete path. Use it as it is.
22766          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22767$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22768          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22769$as_echo_n "checking for TIME... " >&6; }
22770          if test ! -x "$tool_specified"; then
22771            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22772$as_echo "not found" >&6; }
22773            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22774          fi
22775          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22776$as_echo "$tool_specified" >&6; }
22777        fi
22778      fi
22779    fi
22780
22781  fi
22782
22783
22784
22785
22786  # Publish this variable in the help.
22787
22788
22789  if [ -z "${DTRACE+x}" ]; then
22790    # The variable is not set by user, try to locate tool using the code snippet
22791    for ac_prog in dtrace
22792do
22793  # Extract the first word of "$ac_prog", so it can be a program name with args.
22794set dummy $ac_prog; ac_word=$2
22795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22796$as_echo_n "checking for $ac_word... " >&6; }
22797if ${ac_cv_path_DTRACE+:} false; then :
22798  $as_echo_n "(cached) " >&6
22799else
22800  case $DTRACE in
22801  [\\/]* | ?:[\\/]*)
22802  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22803  ;;
22804  *)
22805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22806for as_dir in $PATH
22807do
22808  IFS=$as_save_IFS
22809  test -z "$as_dir" && as_dir=.
22810    for ac_exec_ext in '' $ac_executable_extensions; do
22811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22812    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22814    break 2
22815  fi
22816done
22817  done
22818IFS=$as_save_IFS
22819
22820  ;;
22821esac
22822fi
22823DTRACE=$ac_cv_path_DTRACE
22824if test -n "$DTRACE"; then
22825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22826$as_echo "$DTRACE" >&6; }
22827else
22828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22829$as_echo "no" >&6; }
22830fi
22831
22832
22833  test -n "$DTRACE" && break
22834done
22835
22836  else
22837    # The variable is set, but is it from the command line or the environment?
22838
22839    # Try to remove the string !DTRACE! from our list.
22840    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22841    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22842      # If it failed, the variable was not from the command line. Ignore it,
22843      # but warn the user (except for BASH, which is always set by the calling BASH).
22844      if test "xDTRACE" != xBASH; then
22845        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22846$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22847      fi
22848      # Try to locate tool using the code snippet
22849      for ac_prog in dtrace
22850do
22851  # Extract the first word of "$ac_prog", so it can be a program name with args.
22852set dummy $ac_prog; ac_word=$2
22853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22854$as_echo_n "checking for $ac_word... " >&6; }
22855if ${ac_cv_path_DTRACE+:} false; then :
22856  $as_echo_n "(cached) " >&6
22857else
22858  case $DTRACE in
22859  [\\/]* | ?:[\\/]*)
22860  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22861  ;;
22862  *)
22863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22864for as_dir in $PATH
22865do
22866  IFS=$as_save_IFS
22867  test -z "$as_dir" && as_dir=.
22868    for ac_exec_ext in '' $ac_executable_extensions; do
22869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22870    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22872    break 2
22873  fi
22874done
22875  done
22876IFS=$as_save_IFS
22877
22878  ;;
22879esac
22880fi
22881DTRACE=$ac_cv_path_DTRACE
22882if test -n "$DTRACE"; then
22883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22884$as_echo "$DTRACE" >&6; }
22885else
22886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22887$as_echo "no" >&6; }
22888fi
22889
22890
22891  test -n "$DTRACE" && break
22892done
22893
22894    else
22895      # If it succeeded, then it was overridden by the user. We will use it
22896      # for the tool.
22897
22898      # First remove it from the list of overridden variables, so we can test
22899      # for unknown variables in the end.
22900      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22901
22902      # Check if we try to supply an empty value
22903      if test "x$DTRACE" = x; then
22904        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22905$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22906        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22907$as_echo_n "checking for DTRACE... " >&6; }
22908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22909$as_echo "disabled" >&6; }
22910      else
22911        # Check if the provided tool contains a complete path.
22912        tool_specified="$DTRACE"
22913        tool_basename="${tool_specified##*/}"
22914        if test "x$tool_basename" = "x$tool_specified"; then
22915          # A command without a complete path is provided, search $PATH.
22916          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22917$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22918          # Extract the first word of "$tool_basename", so it can be a program name with args.
22919set dummy $tool_basename; ac_word=$2
22920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22921$as_echo_n "checking for $ac_word... " >&6; }
22922if ${ac_cv_path_DTRACE+:} false; then :
22923  $as_echo_n "(cached) " >&6
22924else
22925  case $DTRACE in
22926  [\\/]* | ?:[\\/]*)
22927  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22928  ;;
22929  *)
22930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22931for as_dir in $PATH
22932do
22933  IFS=$as_save_IFS
22934  test -z "$as_dir" && as_dir=.
22935    for ac_exec_ext in '' $ac_executable_extensions; do
22936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22937    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22939    break 2
22940  fi
22941done
22942  done
22943IFS=$as_save_IFS
22944
22945  ;;
22946esac
22947fi
22948DTRACE=$ac_cv_path_DTRACE
22949if test -n "$DTRACE"; then
22950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22951$as_echo "$DTRACE" >&6; }
22952else
22953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22954$as_echo "no" >&6; }
22955fi
22956
22957
22958          if test "x$DTRACE" = x; then
22959            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22960          fi
22961        else
22962          # Otherwise we believe it is a complete path. Use it as it is.
22963          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22964$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22965          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22966$as_echo_n "checking for DTRACE... " >&6; }
22967          if test ! -x "$tool_specified"; then
22968            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22969$as_echo "not found" >&6; }
22970            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22971          fi
22972          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22973$as_echo "$tool_specified" >&6; }
22974        fi
22975      fi
22976    fi
22977
22978  fi
22979
22980
22981
22982
22983  # Publish this variable in the help.
22984
22985
22986  if [ -z "${PATCH+x}" ]; then
22987    # The variable is not set by user, try to locate tool using the code snippet
22988    for ac_prog in gpatch patch
22989do
22990  # Extract the first word of "$ac_prog", so it can be a program name with args.
22991set dummy $ac_prog; ac_word=$2
22992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22993$as_echo_n "checking for $ac_word... " >&6; }
22994if ${ac_cv_path_PATCH+:} false; then :
22995  $as_echo_n "(cached) " >&6
22996else
22997  case $PATCH in
22998  [\\/]* | ?:[\\/]*)
22999  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23000  ;;
23001  *)
23002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23003for as_dir in $PATH
23004do
23005  IFS=$as_save_IFS
23006  test -z "$as_dir" && as_dir=.
23007    for ac_exec_ext in '' $ac_executable_extensions; do
23008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23009    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23011    break 2
23012  fi
23013done
23014  done
23015IFS=$as_save_IFS
23016
23017  ;;
23018esac
23019fi
23020PATCH=$ac_cv_path_PATCH
23021if test -n "$PATCH"; then
23022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23023$as_echo "$PATCH" >&6; }
23024else
23025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23026$as_echo "no" >&6; }
23027fi
23028
23029
23030  test -n "$PATCH" && break
23031done
23032
23033  else
23034    # The variable is set, but is it from the command line or the environment?
23035
23036    # Try to remove the string !PATCH! from our list.
23037    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23038    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23039      # If it failed, the variable was not from the command line. Ignore it,
23040      # but warn the user (except for BASH, which is always set by the calling BASH).
23041      if test "xPATCH" != xBASH; then
23042        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23043$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23044      fi
23045      # Try to locate tool using the code snippet
23046      for ac_prog in gpatch patch
23047do
23048  # Extract the first word of "$ac_prog", so it can be a program name with args.
23049set dummy $ac_prog; ac_word=$2
23050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23051$as_echo_n "checking for $ac_word... " >&6; }
23052if ${ac_cv_path_PATCH+:} false; then :
23053  $as_echo_n "(cached) " >&6
23054else
23055  case $PATCH in
23056  [\\/]* | ?:[\\/]*)
23057  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23058  ;;
23059  *)
23060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23061for as_dir in $PATH
23062do
23063  IFS=$as_save_IFS
23064  test -z "$as_dir" && as_dir=.
23065    for ac_exec_ext in '' $ac_executable_extensions; do
23066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23067    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23069    break 2
23070  fi
23071done
23072  done
23073IFS=$as_save_IFS
23074
23075  ;;
23076esac
23077fi
23078PATCH=$ac_cv_path_PATCH
23079if test -n "$PATCH"; then
23080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23081$as_echo "$PATCH" >&6; }
23082else
23083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23084$as_echo "no" >&6; }
23085fi
23086
23087
23088  test -n "$PATCH" && break
23089done
23090
23091    else
23092      # If it succeeded, then it was overridden by the user. We will use it
23093      # for the tool.
23094
23095      # First remove it from the list of overridden variables, so we can test
23096      # for unknown variables in the end.
23097      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23098
23099      # Check if we try to supply an empty value
23100      if test "x$PATCH" = x; then
23101        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23102$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23103        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23104$as_echo_n "checking for PATCH... " >&6; }
23105        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23106$as_echo "disabled" >&6; }
23107      else
23108        # Check if the provided tool contains a complete path.
23109        tool_specified="$PATCH"
23110        tool_basename="${tool_specified##*/}"
23111        if test "x$tool_basename" = "x$tool_specified"; then
23112          # A command without a complete path is provided, search $PATH.
23113          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23114$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23115          # Extract the first word of "$tool_basename", so it can be a program name with args.
23116set dummy $tool_basename; ac_word=$2
23117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23118$as_echo_n "checking for $ac_word... " >&6; }
23119if ${ac_cv_path_PATCH+:} false; then :
23120  $as_echo_n "(cached) " >&6
23121else
23122  case $PATCH in
23123  [\\/]* | ?:[\\/]*)
23124  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23125  ;;
23126  *)
23127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23128for as_dir in $PATH
23129do
23130  IFS=$as_save_IFS
23131  test -z "$as_dir" && as_dir=.
23132    for ac_exec_ext in '' $ac_executable_extensions; do
23133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23134    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23136    break 2
23137  fi
23138done
23139  done
23140IFS=$as_save_IFS
23141
23142  ;;
23143esac
23144fi
23145PATCH=$ac_cv_path_PATCH
23146if test -n "$PATCH"; then
23147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23148$as_echo "$PATCH" >&6; }
23149else
23150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23151$as_echo "no" >&6; }
23152fi
23153
23154
23155          if test "x$PATCH" = x; then
23156            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23157          fi
23158        else
23159          # Otherwise we believe it is a complete path. Use it as it is.
23160          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23161$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23162          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23163$as_echo_n "checking for PATCH... " >&6; }
23164          if test ! -x "$tool_specified"; then
23165            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23166$as_echo "not found" >&6; }
23167            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23168          fi
23169          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23170$as_echo "$tool_specified" >&6; }
23171        fi
23172      fi
23173    fi
23174
23175  fi
23176
23177
23178  # Check if it's GNU time
23179  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23180  if test "x$IS_GNU_TIME" != x; then
23181    IS_GNU_TIME=yes
23182  else
23183    IS_GNU_TIME=no
23184  fi
23185
23186
23187  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23188
23189
23190
23191  # Publish this variable in the help.
23192
23193
23194  if [ -z "${DSYMUTIL+x}" ]; then
23195    # The variable is not set by user, try to locate tool using the code snippet
23196    for ac_prog in dsymutil
23197do
23198  # Extract the first word of "$ac_prog", so it can be a program name with args.
23199set dummy $ac_prog; ac_word=$2
23200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23201$as_echo_n "checking for $ac_word... " >&6; }
23202if ${ac_cv_path_DSYMUTIL+:} false; then :
23203  $as_echo_n "(cached) " >&6
23204else
23205  case $DSYMUTIL in
23206  [\\/]* | ?:[\\/]*)
23207  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23208  ;;
23209  *)
23210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23211for as_dir in $PATH
23212do
23213  IFS=$as_save_IFS
23214  test -z "$as_dir" && as_dir=.
23215    for ac_exec_ext in '' $ac_executable_extensions; do
23216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23217    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23219    break 2
23220  fi
23221done
23222  done
23223IFS=$as_save_IFS
23224
23225  ;;
23226esac
23227fi
23228DSYMUTIL=$ac_cv_path_DSYMUTIL
23229if test -n "$DSYMUTIL"; then
23230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23231$as_echo "$DSYMUTIL" >&6; }
23232else
23233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23234$as_echo "no" >&6; }
23235fi
23236
23237
23238  test -n "$DSYMUTIL" && break
23239done
23240
23241  else
23242    # The variable is set, but is it from the command line or the environment?
23243
23244    # Try to remove the string !DSYMUTIL! from our list.
23245    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23246    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23247      # If it failed, the variable was not from the command line. Ignore it,
23248      # but warn the user (except for BASH, which is always set by the calling BASH).
23249      if test "xDSYMUTIL" != xBASH; then
23250        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23251$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23252      fi
23253      # Try to locate tool using the code snippet
23254      for ac_prog in dsymutil
23255do
23256  # Extract the first word of "$ac_prog", so it can be a program name with args.
23257set dummy $ac_prog; ac_word=$2
23258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23259$as_echo_n "checking for $ac_word... " >&6; }
23260if ${ac_cv_path_DSYMUTIL+:} false; then :
23261  $as_echo_n "(cached) " >&6
23262else
23263  case $DSYMUTIL in
23264  [\\/]* | ?:[\\/]*)
23265  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23266  ;;
23267  *)
23268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23269for as_dir in $PATH
23270do
23271  IFS=$as_save_IFS
23272  test -z "$as_dir" && as_dir=.
23273    for ac_exec_ext in '' $ac_executable_extensions; do
23274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23275    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23277    break 2
23278  fi
23279done
23280  done
23281IFS=$as_save_IFS
23282
23283  ;;
23284esac
23285fi
23286DSYMUTIL=$ac_cv_path_DSYMUTIL
23287if test -n "$DSYMUTIL"; then
23288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23289$as_echo "$DSYMUTIL" >&6; }
23290else
23291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23292$as_echo "no" >&6; }
23293fi
23294
23295
23296  test -n "$DSYMUTIL" && break
23297done
23298
23299    else
23300      # If it succeeded, then it was overridden by the user. We will use it
23301      # for the tool.
23302
23303      # First remove it from the list of overridden variables, so we can test
23304      # for unknown variables in the end.
23305      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23306
23307      # Check if we try to supply an empty value
23308      if test "x$DSYMUTIL" = x; then
23309        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23310$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23311        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23312$as_echo_n "checking for DSYMUTIL... " >&6; }
23313        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23314$as_echo "disabled" >&6; }
23315      else
23316        # Check if the provided tool contains a complete path.
23317        tool_specified="$DSYMUTIL"
23318        tool_basename="${tool_specified##*/}"
23319        if test "x$tool_basename" = "x$tool_specified"; then
23320          # A command without a complete path is provided, search $PATH.
23321          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23322$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23323          # Extract the first word of "$tool_basename", so it can be a program name with args.
23324set dummy $tool_basename; ac_word=$2
23325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23326$as_echo_n "checking for $ac_word... " >&6; }
23327if ${ac_cv_path_DSYMUTIL+:} false; then :
23328  $as_echo_n "(cached) " >&6
23329else
23330  case $DSYMUTIL in
23331  [\\/]* | ?:[\\/]*)
23332  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23333  ;;
23334  *)
23335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23336for as_dir in $PATH
23337do
23338  IFS=$as_save_IFS
23339  test -z "$as_dir" && as_dir=.
23340    for ac_exec_ext in '' $ac_executable_extensions; do
23341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23342    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23344    break 2
23345  fi
23346done
23347  done
23348IFS=$as_save_IFS
23349
23350  ;;
23351esac
23352fi
23353DSYMUTIL=$ac_cv_path_DSYMUTIL
23354if test -n "$DSYMUTIL"; then
23355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23356$as_echo "$DSYMUTIL" >&6; }
23357else
23358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23359$as_echo "no" >&6; }
23360fi
23361
23362
23363          if test "x$DSYMUTIL" = x; then
23364            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23365          fi
23366        else
23367          # Otherwise we believe it is a complete path. Use it as it is.
23368          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23369$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23370          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23371$as_echo_n "checking for DSYMUTIL... " >&6; }
23372          if test ! -x "$tool_specified"; then
23373            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23374$as_echo "not found" >&6; }
23375            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23376          fi
23377          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23378$as_echo "$tool_specified" >&6; }
23379        fi
23380      fi
23381    fi
23382
23383  fi
23384
23385
23386
23387  if test "x$DSYMUTIL" = x; then
23388    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23389  fi
23390
23391
23392
23393
23394
23395  # Publish this variable in the help.
23396
23397
23398  if [ -z "${XATTR+x}" ]; then
23399    # The variable is not set by user, try to locate tool using the code snippet
23400    for ac_prog in xattr
23401do
23402  # Extract the first word of "$ac_prog", so it can be a program name with args.
23403set dummy $ac_prog; ac_word=$2
23404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23405$as_echo_n "checking for $ac_word... " >&6; }
23406if ${ac_cv_path_XATTR+:} false; then :
23407  $as_echo_n "(cached) " >&6
23408else
23409  case $XATTR in
23410  [\\/]* | ?:[\\/]*)
23411  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23412  ;;
23413  *)
23414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23415for as_dir in $PATH
23416do
23417  IFS=$as_save_IFS
23418  test -z "$as_dir" && as_dir=.
23419    for ac_exec_ext in '' $ac_executable_extensions; do
23420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23421    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23423    break 2
23424  fi
23425done
23426  done
23427IFS=$as_save_IFS
23428
23429  ;;
23430esac
23431fi
23432XATTR=$ac_cv_path_XATTR
23433if test -n "$XATTR"; then
23434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23435$as_echo "$XATTR" >&6; }
23436else
23437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23438$as_echo "no" >&6; }
23439fi
23440
23441
23442  test -n "$XATTR" && break
23443done
23444
23445  else
23446    # The variable is set, but is it from the command line or the environment?
23447
23448    # Try to remove the string !XATTR! from our list.
23449    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23450    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23451      # If it failed, the variable was not from the command line. Ignore it,
23452      # but warn the user (except for BASH, which is always set by the calling BASH).
23453      if test "xXATTR" != xBASH; then
23454        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23455$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23456      fi
23457      # Try to locate tool using the code snippet
23458      for ac_prog in xattr
23459do
23460  # Extract the first word of "$ac_prog", so it can be a program name with args.
23461set dummy $ac_prog; ac_word=$2
23462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23463$as_echo_n "checking for $ac_word... " >&6; }
23464if ${ac_cv_path_XATTR+:} false; then :
23465  $as_echo_n "(cached) " >&6
23466else
23467  case $XATTR in
23468  [\\/]* | ?:[\\/]*)
23469  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23470  ;;
23471  *)
23472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23473for as_dir in $PATH
23474do
23475  IFS=$as_save_IFS
23476  test -z "$as_dir" && as_dir=.
23477    for ac_exec_ext in '' $ac_executable_extensions; do
23478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23479    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23481    break 2
23482  fi
23483done
23484  done
23485IFS=$as_save_IFS
23486
23487  ;;
23488esac
23489fi
23490XATTR=$ac_cv_path_XATTR
23491if test -n "$XATTR"; then
23492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23493$as_echo "$XATTR" >&6; }
23494else
23495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23496$as_echo "no" >&6; }
23497fi
23498
23499
23500  test -n "$XATTR" && break
23501done
23502
23503    else
23504      # If it succeeded, then it was overridden by the user. We will use it
23505      # for the tool.
23506
23507      # First remove it from the list of overridden variables, so we can test
23508      # for unknown variables in the end.
23509      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23510
23511      # Check if we try to supply an empty value
23512      if test "x$XATTR" = x; then
23513        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23514$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23515        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23516$as_echo_n "checking for XATTR... " >&6; }
23517        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23518$as_echo "disabled" >&6; }
23519      else
23520        # Check if the provided tool contains a complete path.
23521        tool_specified="$XATTR"
23522        tool_basename="${tool_specified##*/}"
23523        if test "x$tool_basename" = "x$tool_specified"; then
23524          # A command without a complete path is provided, search $PATH.
23525          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23526$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23527          # Extract the first word of "$tool_basename", so it can be a program name with args.
23528set dummy $tool_basename; ac_word=$2
23529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23530$as_echo_n "checking for $ac_word... " >&6; }
23531if ${ac_cv_path_XATTR+:} false; then :
23532  $as_echo_n "(cached) " >&6
23533else
23534  case $XATTR in
23535  [\\/]* | ?:[\\/]*)
23536  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23537  ;;
23538  *)
23539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23540for as_dir in $PATH
23541do
23542  IFS=$as_save_IFS
23543  test -z "$as_dir" && as_dir=.
23544    for ac_exec_ext in '' $ac_executable_extensions; do
23545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23546    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23548    break 2
23549  fi
23550done
23551  done
23552IFS=$as_save_IFS
23553
23554  ;;
23555esac
23556fi
23557XATTR=$ac_cv_path_XATTR
23558if test -n "$XATTR"; then
23559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23560$as_echo "$XATTR" >&6; }
23561else
23562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23563$as_echo "no" >&6; }
23564fi
23565
23566
23567          if test "x$XATTR" = x; then
23568            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23569          fi
23570        else
23571          # Otherwise we believe it is a complete path. Use it as it is.
23572          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23573$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23574          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23575$as_echo_n "checking for XATTR... " >&6; }
23576          if test ! -x "$tool_specified"; then
23577            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23578$as_echo "not found" >&6; }
23579            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23580          fi
23581          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23582$as_echo "$tool_specified" >&6; }
23583        fi
23584      fi
23585    fi
23586
23587  fi
23588
23589
23590
23591  if test "x$XATTR" = x; then
23592    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23593  fi
23594
23595
23596
23597
23598  # Publish this variable in the help.
23599
23600
23601  if [ -z "${CODESIGN+x}" ]; then
23602    # The variable is not set by user, try to locate tool using the code snippet
23603    for ac_prog in codesign
23604do
23605  # Extract the first word of "$ac_prog", so it can be a program name with args.
23606set dummy $ac_prog; ac_word=$2
23607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23608$as_echo_n "checking for $ac_word... " >&6; }
23609if ${ac_cv_path_CODESIGN+:} false; then :
23610  $as_echo_n "(cached) " >&6
23611else
23612  case $CODESIGN in
23613  [\\/]* | ?:[\\/]*)
23614  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23615  ;;
23616  *)
23617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23618for as_dir in $PATH
23619do
23620  IFS=$as_save_IFS
23621  test -z "$as_dir" && as_dir=.
23622    for ac_exec_ext in '' $ac_executable_extensions; do
23623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23624    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23626    break 2
23627  fi
23628done
23629  done
23630IFS=$as_save_IFS
23631
23632  ;;
23633esac
23634fi
23635CODESIGN=$ac_cv_path_CODESIGN
23636if test -n "$CODESIGN"; then
23637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23638$as_echo "$CODESIGN" >&6; }
23639else
23640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23641$as_echo "no" >&6; }
23642fi
23643
23644
23645  test -n "$CODESIGN" && break
23646done
23647
23648  else
23649    # The variable is set, but is it from the command line or the environment?
23650
23651    # Try to remove the string !CODESIGN! from our list.
23652    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23653    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23654      # If it failed, the variable was not from the command line. Ignore it,
23655      # but warn the user (except for BASH, which is always set by the calling BASH).
23656      if test "xCODESIGN" != xBASH; then
23657        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23658$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23659      fi
23660      # Try to locate tool using the code snippet
23661      for ac_prog in codesign
23662do
23663  # Extract the first word of "$ac_prog", so it can be a program name with args.
23664set dummy $ac_prog; ac_word=$2
23665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23666$as_echo_n "checking for $ac_word... " >&6; }
23667if ${ac_cv_path_CODESIGN+:} false; then :
23668  $as_echo_n "(cached) " >&6
23669else
23670  case $CODESIGN in
23671  [\\/]* | ?:[\\/]*)
23672  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23673  ;;
23674  *)
23675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23676for as_dir in $PATH
23677do
23678  IFS=$as_save_IFS
23679  test -z "$as_dir" && as_dir=.
23680    for ac_exec_ext in '' $ac_executable_extensions; do
23681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23682    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23684    break 2
23685  fi
23686done
23687  done
23688IFS=$as_save_IFS
23689
23690  ;;
23691esac
23692fi
23693CODESIGN=$ac_cv_path_CODESIGN
23694if test -n "$CODESIGN"; then
23695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23696$as_echo "$CODESIGN" >&6; }
23697else
23698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23699$as_echo "no" >&6; }
23700fi
23701
23702
23703  test -n "$CODESIGN" && break
23704done
23705
23706    else
23707      # If it succeeded, then it was overridden by the user. We will use it
23708      # for the tool.
23709
23710      # First remove it from the list of overridden variables, so we can test
23711      # for unknown variables in the end.
23712      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23713
23714      # Check if we try to supply an empty value
23715      if test "x$CODESIGN" = x; then
23716        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23717$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23718        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23719$as_echo_n "checking for CODESIGN... " >&6; }
23720        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23721$as_echo "disabled" >&6; }
23722      else
23723        # Check if the provided tool contains a complete path.
23724        tool_specified="$CODESIGN"
23725        tool_basename="${tool_specified##*/}"
23726        if test "x$tool_basename" = "x$tool_specified"; then
23727          # A command without a complete path is provided, search $PATH.
23728          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23729$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23730          # Extract the first word of "$tool_basename", so it can be a program name with args.
23731set dummy $tool_basename; ac_word=$2
23732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23733$as_echo_n "checking for $ac_word... " >&6; }
23734if ${ac_cv_path_CODESIGN+:} false; then :
23735  $as_echo_n "(cached) " >&6
23736else
23737  case $CODESIGN in
23738  [\\/]* | ?:[\\/]*)
23739  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23740  ;;
23741  *)
23742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23743for as_dir in $PATH
23744do
23745  IFS=$as_save_IFS
23746  test -z "$as_dir" && as_dir=.
23747    for ac_exec_ext in '' $ac_executable_extensions; do
23748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23749    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23751    break 2
23752  fi
23753done
23754  done
23755IFS=$as_save_IFS
23756
23757  ;;
23758esac
23759fi
23760CODESIGN=$ac_cv_path_CODESIGN
23761if test -n "$CODESIGN"; then
23762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23763$as_echo "$CODESIGN" >&6; }
23764else
23765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23766$as_echo "no" >&6; }
23767fi
23768
23769
23770          if test "x$CODESIGN" = x; then
23771            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23772          fi
23773        else
23774          # Otherwise we believe it is a complete path. Use it as it is.
23775          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23776$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23777          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23778$as_echo_n "checking for CODESIGN... " >&6; }
23779          if test ! -x "$tool_specified"; then
23780            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23781$as_echo "not found" >&6; }
23782            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23783          fi
23784          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23785$as_echo "$tool_specified" >&6; }
23786        fi
23787      fi
23788    fi
23789
23790  fi
23791
23792
23793    if test "x$CODESIGN" != "x"; then
23794      # Verify that the openjdk_codesign certificate is present
23795      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23796$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23797      $RM codesign-testfile
23798      $TOUCH codesign-testfile
23799      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23800      $RM codesign-testfile
23801      if test "x$CODESIGN" = x; then
23802        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23803$as_echo "no" >&6; }
23804      else
23805        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23806$as_echo "yes" >&6; }
23807      fi
23808    fi
23809
23810
23811
23812  # Publish this variable in the help.
23813
23814
23815  if [ -z "${SETFILE+x}" ]; then
23816    # The variable is not set by user, try to locate tool using the code snippet
23817    for ac_prog in SetFile
23818do
23819  # Extract the first word of "$ac_prog", so it can be a program name with args.
23820set dummy $ac_prog; ac_word=$2
23821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23822$as_echo_n "checking for $ac_word... " >&6; }
23823if ${ac_cv_path_SETFILE+:} false; then :
23824  $as_echo_n "(cached) " >&6
23825else
23826  case $SETFILE in
23827  [\\/]* | ?:[\\/]*)
23828  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23829  ;;
23830  *)
23831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23832for as_dir in $PATH
23833do
23834  IFS=$as_save_IFS
23835  test -z "$as_dir" && as_dir=.
23836    for ac_exec_ext in '' $ac_executable_extensions; do
23837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23838    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23840    break 2
23841  fi
23842done
23843  done
23844IFS=$as_save_IFS
23845
23846  ;;
23847esac
23848fi
23849SETFILE=$ac_cv_path_SETFILE
23850if test -n "$SETFILE"; then
23851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23852$as_echo "$SETFILE" >&6; }
23853else
23854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23855$as_echo "no" >&6; }
23856fi
23857
23858
23859  test -n "$SETFILE" && break
23860done
23861
23862  else
23863    # The variable is set, but is it from the command line or the environment?
23864
23865    # Try to remove the string !SETFILE! from our list.
23866    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23867    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23868      # If it failed, the variable was not from the command line. Ignore it,
23869      # but warn the user (except for BASH, which is always set by the calling BASH).
23870      if test "xSETFILE" != xBASH; then
23871        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23872$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23873      fi
23874      # Try to locate tool using the code snippet
23875      for ac_prog in SetFile
23876do
23877  # Extract the first word of "$ac_prog", so it can be a program name with args.
23878set dummy $ac_prog; ac_word=$2
23879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23880$as_echo_n "checking for $ac_word... " >&6; }
23881if ${ac_cv_path_SETFILE+:} false; then :
23882  $as_echo_n "(cached) " >&6
23883else
23884  case $SETFILE in
23885  [\\/]* | ?:[\\/]*)
23886  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23887  ;;
23888  *)
23889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23890for as_dir in $PATH
23891do
23892  IFS=$as_save_IFS
23893  test -z "$as_dir" && as_dir=.
23894    for ac_exec_ext in '' $ac_executable_extensions; do
23895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23896    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23898    break 2
23899  fi
23900done
23901  done
23902IFS=$as_save_IFS
23903
23904  ;;
23905esac
23906fi
23907SETFILE=$ac_cv_path_SETFILE
23908if test -n "$SETFILE"; then
23909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23910$as_echo "$SETFILE" >&6; }
23911else
23912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23913$as_echo "no" >&6; }
23914fi
23915
23916
23917  test -n "$SETFILE" && break
23918done
23919
23920    else
23921      # If it succeeded, then it was overridden by the user. We will use it
23922      # for the tool.
23923
23924      # First remove it from the list of overridden variables, so we can test
23925      # for unknown variables in the end.
23926      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23927
23928      # Check if we try to supply an empty value
23929      if test "x$SETFILE" = x; then
23930        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23931$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23932        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23933$as_echo_n "checking for SETFILE... " >&6; }
23934        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23935$as_echo "disabled" >&6; }
23936      else
23937        # Check if the provided tool contains a complete path.
23938        tool_specified="$SETFILE"
23939        tool_basename="${tool_specified##*/}"
23940        if test "x$tool_basename" = "x$tool_specified"; then
23941          # A command without a complete path is provided, search $PATH.
23942          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23943$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23944          # Extract the first word of "$tool_basename", so it can be a program name with args.
23945set dummy $tool_basename; ac_word=$2
23946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23947$as_echo_n "checking for $ac_word... " >&6; }
23948if ${ac_cv_path_SETFILE+:} false; then :
23949  $as_echo_n "(cached) " >&6
23950else
23951  case $SETFILE in
23952  [\\/]* | ?:[\\/]*)
23953  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23954  ;;
23955  *)
23956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23957for as_dir in $PATH
23958do
23959  IFS=$as_save_IFS
23960  test -z "$as_dir" && as_dir=.
23961    for ac_exec_ext in '' $ac_executable_extensions; do
23962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23963    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23965    break 2
23966  fi
23967done
23968  done
23969IFS=$as_save_IFS
23970
23971  ;;
23972esac
23973fi
23974SETFILE=$ac_cv_path_SETFILE
23975if test -n "$SETFILE"; then
23976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23977$as_echo "$SETFILE" >&6; }
23978else
23979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23980$as_echo "no" >&6; }
23981fi
23982
23983
23984          if test "x$SETFILE" = x; then
23985            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23986          fi
23987        else
23988          # Otherwise we believe it is a complete path. Use it as it is.
23989          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23990$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23991          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23992$as_echo_n "checking for SETFILE... " >&6; }
23993          if test ! -x "$tool_specified"; then
23994            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23995$as_echo "not found" >&6; }
23996            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23997          fi
23998          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23999$as_echo "$tool_specified" >&6; }
24000        fi
24001      fi
24002    fi
24003
24004  fi
24005
24006
24007
24008  if test "x$SETFILE" = x; then
24009    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24010  fi
24011
24012
24013  fi
24014
24015
24016  # Test if bash supports pipefail.
24017  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24018$as_echo_n "checking if bash supports pipefail... " >&6; }
24019  if ${BASH} -c 'set -o pipefail'; then
24020    BASH_ARGS="$BASH_ARGS -o pipefail"
24021    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24022$as_echo "yes" >&6; }
24023  else
24024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24025$as_echo "no" >&6; }
24026  fi
24027
24028  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24029$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24030  if ${BASH} -e -c 'true'; then
24031    BASH_ARGS="$BASH_ARGS -e"
24032    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24033$as_echo "yes" >&6; }
24034  else
24035    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24036$as_echo "no" >&6; }
24037  fi
24038
24039
24040
24041
24042# Check if pkg-config is available.
24043
24044
24045if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24046	if test -n "$ac_tool_prefix"; then
24047  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24048set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24050$as_echo_n "checking for $ac_word... " >&6; }
24051if ${ac_cv_path_PKG_CONFIG+:} false; then :
24052  $as_echo_n "(cached) " >&6
24053else
24054  case $PKG_CONFIG in
24055  [\\/]* | ?:[\\/]*)
24056  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24057  ;;
24058  *)
24059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24060for as_dir in $PATH
24061do
24062  IFS=$as_save_IFS
24063  test -z "$as_dir" && as_dir=.
24064    for ac_exec_ext in '' $ac_executable_extensions; do
24065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24066    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24068    break 2
24069  fi
24070done
24071  done
24072IFS=$as_save_IFS
24073
24074  ;;
24075esac
24076fi
24077PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24078if test -n "$PKG_CONFIG"; then
24079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24080$as_echo "$PKG_CONFIG" >&6; }
24081else
24082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24083$as_echo "no" >&6; }
24084fi
24085
24086
24087fi
24088if test -z "$ac_cv_path_PKG_CONFIG"; then
24089  ac_pt_PKG_CONFIG=$PKG_CONFIG
24090  # Extract the first word of "pkg-config", so it can be a program name with args.
24091set dummy pkg-config; ac_word=$2
24092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24093$as_echo_n "checking for $ac_word... " >&6; }
24094if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24095  $as_echo_n "(cached) " >&6
24096else
24097  case $ac_pt_PKG_CONFIG in
24098  [\\/]* | ?:[\\/]*)
24099  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24100  ;;
24101  *)
24102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24103for as_dir in $PATH
24104do
24105  IFS=$as_save_IFS
24106  test -z "$as_dir" && as_dir=.
24107    for ac_exec_ext in '' $ac_executable_extensions; do
24108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24109    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24111    break 2
24112  fi
24113done
24114  done
24115IFS=$as_save_IFS
24116
24117  ;;
24118esac
24119fi
24120ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24121if test -n "$ac_pt_PKG_CONFIG"; then
24122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24123$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24124else
24125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24126$as_echo "no" >&6; }
24127fi
24128
24129  if test "x$ac_pt_PKG_CONFIG" = x; then
24130    PKG_CONFIG=""
24131  else
24132    case $cross_compiling:$ac_tool_warned in
24133yes:)
24134{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24135$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24136ac_tool_warned=yes ;;
24137esac
24138    PKG_CONFIG=$ac_pt_PKG_CONFIG
24139  fi
24140else
24141  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24142fi
24143
24144fi
24145if test -n "$PKG_CONFIG"; then
24146	_pkg_min_version=0.9.0
24147	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24148$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24149	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24150		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24151$as_echo "yes" >&6; }
24152	else
24153		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24154$as_echo "no" >&6; }
24155		PKG_CONFIG=""
24156	fi
24157
24158fi
24159
24160# After basic tools have been setup, we can check build os specific details.
24161
24162  ###############################################################################
24163
24164  # Note that this is the build platform OS version!
24165
24166  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24167  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24168  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24169  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24170
24171
24172
24173
24174
24175# Misc basic settings
24176
24177
24178# Check whether --with-default-make-target was given.
24179if test "${with_default_make_target+set}" = set; then :
24180  withval=$with_default_make_target;
24181fi
24182
24183  if test "x$with_default_make_target" = "x" \
24184      || test "x$with_default_make_target" = "xyes"; then
24185    DEFAULT_MAKE_TARGET="exploded-image"
24186  elif test "x$with_default_make_target" = "xno"; then
24187    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24188  else
24189    DEFAULT_MAKE_TARGET="$with_default_make_target"
24190  fi
24191
24192
24193
24194
24195###############################################################################
24196#
24197# Determine OpenJDK variants, options and version numbers.
24198#
24199###############################################################################
24200
24201# We need build & target for this.
24202
24203  # Should we build a JDK without a graphical UI?
24204  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24205$as_echo_n "checking headless only... " >&6; }
24206  # Check whether --enable-headless-only was given.
24207if test "${enable_headless_only+set}" = set; then :
24208  enableval=$enable_headless_only;
24209fi
24210
24211
24212  if test "x$enable_headless_only" = "xyes"; then
24213    ENABLE_HEADLESS_ONLY="true"
24214    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24215$as_echo "yes" >&6; }
24216  elif test "x$enable_headless_only" = "xno"; then
24217    ENABLE_HEADLESS_ONLY="false"
24218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24219$as_echo "no" >&6; }
24220  elif test "x$enable_headless_only" = "x"; then
24221    ENABLE_HEADLESS_ONLY="false"
24222    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24223$as_echo "no" >&6; }
24224  else
24225    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24226  fi
24227
24228
24229
24230  # Choose cacerts source file
24231
24232# Check whether --with-cacerts-file was given.
24233if test "${with_cacerts_file+set}" = set; then :
24234  withval=$with_cacerts_file;
24235fi
24236
24237  if test "x$with_cacerts_file" != x; then
24238    CACERTS_FILE=$with_cacerts_file
24239  fi
24240
24241
24242  # Enable or disable unlimited crypto
24243  # Check whether --enable-unlimited-crypto was given.
24244if test "${enable_unlimited_crypto+set}" = set; then :
24245  enableval=$enable_unlimited_crypto;
24246else
24247  enable_unlimited_crypto=no
24248fi
24249
24250  if test "x$enable_unlimited_crypto" = "xyes"; then
24251    UNLIMITED_CRYPTO=true
24252  else
24253    UNLIMITED_CRYPTO=false
24254  fi
24255
24256
24257  # Should we build the serviceability agent (SA)?
24258  INCLUDE_SA=true
24259  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24260    INCLUDE_SA=false
24261  fi
24262  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24263    INCLUDE_SA=false
24264  fi
24265
24266
24267  # Compress jars
24268  COMPRESS_JARS=false
24269
24270
24271
24272  # Setup default copyright year. Mostly overridden when building close to a new year.
24273
24274# Check whether --with-copyright-year was given.
24275if test "${with_copyright_year+set}" = set; then :
24276  withval=$with_copyright_year;
24277fi
24278
24279  if test "x$with_copyright_year" = xyes; then
24280    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24281  elif test "x$with_copyright_year" != x; then
24282    COPYRIGHT_YEAR="$with_copyright_year"
24283  else
24284    COPYRIGHT_YEAR=`$DATE +'%Y'`
24285  fi
24286
24287
24288
24289  # Check whether --enable-keep-packaged-modules was given.
24290if test "${enable_keep_packaged_modules+set}" = set; then :
24291  enableval=$enable_keep_packaged_modules;
24292fi
24293
24294
24295  if test "x$enable_keep_packaged_modules" = "xyes"; then
24296    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24297$as_echo_n "checking if packaged modules are kept... " >&6; }
24298    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24299$as_echo "yes" >&6; }
24300    JLINK_KEEP_PACKAGED_MODULES=true
24301  elif test "x$enable_keep_packaged_modules" = "xno"; then
24302    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24303$as_echo_n "checking if packaged modules are kept... " >&6; }
24304    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24305$as_echo "no" >&6; }
24306    JLINK_KEEP_PACKAGED_MODULES=false
24307  elif test "x$enable_keep_packaged_modules" = "x"; then
24308    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24309$as_echo "yes (default)" >&6; }
24310    JLINK_KEEP_PACKAGED_MODULES=true
24311  else
24312    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24313  fi
24314
24315
24316
24317
24318  # Warn user that old version arguments are deprecated.
24319
24320
24321# Check whether --with-milestone was given.
24322if test "${with_milestone+set}" = set; then :
24323  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24324$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24325fi
24326
24327
24328
24329
24330# Check whether --with-update-version was given.
24331if test "${with_update_version+set}" = set; then :
24332  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24333$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24334fi
24335
24336
24337
24338
24339# Check whether --with-user-release-suffix was given.
24340if test "${with_user_release_suffix+set}" = set; then :
24341  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
24342$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24343fi
24344
24345
24346
24347
24348# Check whether --with-build-number was given.
24349if test "${with_build_number+set}" = set; then :
24350  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24351$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24352fi
24353
24354
24355
24356  # Source the version numbers file
24357  . $AUTOCONF_DIR/version-numbers
24358
24359  # Some non-version number information is set in that file
24360
24361
24362
24363
24364
24365
24366
24367
24368
24369  # Override version from arguments
24370
24371  # If --with-version-string is set, process it first. It is possible to
24372  # override parts with more specific flags, since these are processed later.
24373
24374# Check whether --with-version-string was given.
24375if test "${with_version_string+set}" = set; then :
24376  withval=$with_version_string;
24377fi
24378
24379  if test "x$with_version_string" = xyes; then
24380    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24381  elif test "x$with_version_string" != x; then
24382    # Additional [] needed to keep m4 from mangling shell constructs.
24383    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24384      VERSION_MAJOR=${BASH_REMATCH[1]}
24385      VERSION_MINOR=${BASH_REMATCH[3]}
24386      VERSION_SECURITY=${BASH_REMATCH[5]}
24387      VERSION_PATCH=${BASH_REMATCH[7]}
24388      VERSION_PRE=${BASH_REMATCH[9]}
24389      version_plus_separator=${BASH_REMATCH[11]}
24390      VERSION_BUILD=${BASH_REMATCH[12]}
24391      VERSION_OPT=${BASH_REMATCH[14]}
24392      # Unspecified numerical fields are interpreted as 0.
24393      if test "x$VERSION_MINOR" = x; then
24394        VERSION_MINOR=0
24395      fi
24396      if test "x$VERSION_SECURITY" = x; then
24397        VERSION_SECURITY=0
24398      fi
24399      if test "x$VERSION_PATCH" = x; then
24400        VERSION_PATCH=0
24401      fi
24402      if test "x$version_plus_separator" != x \
24403          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24404        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24405      fi
24406      # Stop the version part process from setting default values.
24407      # We still allow them to explicitely override though.
24408      NO_DEFAULT_VERSION_PARTS=true
24409    else
24410      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24411    fi
24412  fi
24413
24414
24415# Check whether --with-version-pre was given.
24416if test "${with_version_pre+set}" = set; then :
24417  withval=$with_version_pre; with_version_pre_present=true
24418else
24419  with_version_pre_present=false
24420fi
24421
24422
24423  if test "x$with_version_pre_present" = xtrue; then
24424    if test "x$with_version_pre" = xyes; then
24425      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24426    elif test "x$with_version_pre" = xno; then
24427      # Interpret --without-* as empty string instead of the literal "no"
24428      VERSION_PRE=
24429    else
24430      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24431       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24432      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24433        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24434$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24435      fi
24436    fi
24437  else
24438    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24439      # Default is to use "internal" as pre
24440      VERSION_PRE="internal"
24441    fi
24442  fi
24443
24444
24445# Check whether --with-version-opt was given.
24446if test "${with_version_opt+set}" = set; then :
24447  withval=$with_version_opt; with_version_opt_present=true
24448else
24449  with_version_opt_present=false
24450fi
24451
24452
24453  if test "x$with_version_opt_present" = xtrue; then
24454    if test "x$with_version_opt" = xyes; then
24455      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24456    elif test "x$with_version_opt" = xno; then
24457      # Interpret --without-* as empty string instead of the literal "no"
24458      VERSION_OPT=
24459    else
24460      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24461       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24462      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24463        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24464$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24465      fi
24466    fi
24467  else
24468    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24469      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
24470      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
24471      # Outer [ ] to quote m4.
24472       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24473      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24474    fi
24475  fi
24476
24477
24478# Check whether --with-version-build was given.
24479if test "${with_version_build+set}" = set; then :
24480  withval=$with_version_build; with_version_build_present=true
24481else
24482  with_version_build_present=false
24483fi
24484
24485
24486  if test "x$with_version_build_present" = xtrue; then
24487    if test "x$with_version_build" = xyes; then
24488      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24489    elif test "x$with_version_build" = xno; then
24490      # Interpret --without-* as empty string instead of the literal "no"
24491      VERSION_BUILD=
24492    elif test "x$with_version_build" = x; then
24493      VERSION_BUILD=
24494    else
24495
24496  # Additional [] needed to keep m4 from mangling shell constructs.
24497  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24498    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24499  fi
24500  # Extract the version number without leading zeros.
24501  cleaned_value=${BASH_REMATCH[1]}
24502  if test "x$cleaned_value" = x; then
24503    # Special case for zero
24504    cleaned_value=${BASH_REMATCH[2]}
24505  fi
24506
24507  if test $cleaned_value -gt 255; then
24508    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24509  fi
24510  if test "x$cleaned_value" != "x$with_version_build"; then
24511    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24512$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24513  fi
24514  VERSION_BUILD=$cleaned_value
24515
24516    fi
24517  else
24518    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24519      # Default is to not have a build number.
24520      VERSION_BUILD=""
24521      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24522      VERSION_BUILD=0
24523    fi
24524  fi
24525
24526
24527# Check whether --with-version-major was given.
24528if test "${with_version_major+set}" = set; then :
24529  withval=$with_version_major; with_version_major_present=true
24530else
24531  with_version_major_present=false
24532fi
24533
24534
24535  if test "x$with_version_major_present" = xtrue; then
24536    if test "x$with_version_major" = xyes; then
24537      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24538    else
24539
24540  # Additional [] needed to keep m4 from mangling shell constructs.
24541  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24542    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24543  fi
24544  # Extract the version number without leading zeros.
24545  cleaned_value=${BASH_REMATCH[1]}
24546  if test "x$cleaned_value" = x; then
24547    # Special case for zero
24548    cleaned_value=${BASH_REMATCH[2]}
24549  fi
24550
24551  if test $cleaned_value -gt 255; then
24552    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24553  fi
24554  if test "x$cleaned_value" != "x$with_version_major"; then
24555    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24556$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24557  fi
24558  VERSION_MAJOR=$cleaned_value
24559
24560    fi
24561  else
24562    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24563      # Default is to get value from version-numbers
24564      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24565    fi
24566  fi
24567
24568
24569# Check whether --with-version-minor was given.
24570if test "${with_version_minor+set}" = set; then :
24571  withval=$with_version_minor; with_version_minor_present=true
24572else
24573  with_version_minor_present=false
24574fi
24575
24576
24577  if test "x$with_version_minor_present" = xtrue; then
24578    if test "x$with_version_minor" = xyes; then
24579      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24580    elif test "x$with_version_minor" = xno; then
24581      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24582      VERSION_MINOR=0
24583    elif test "x$with_version_minor" = x; then
24584      VERSION_MINOR=0
24585    else
24586
24587  # Additional [] needed to keep m4 from mangling shell constructs.
24588  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24589    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24590  fi
24591  # Extract the version number without leading zeros.
24592  cleaned_value=${BASH_REMATCH[1]}
24593  if test "x$cleaned_value" = x; then
24594    # Special case for zero
24595    cleaned_value=${BASH_REMATCH[2]}
24596  fi
24597
24598  if test $cleaned_value -gt 255; then
24599    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24600  fi
24601  if test "x$cleaned_value" != "x$with_version_minor"; then
24602    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24603$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24604  fi
24605  VERSION_MINOR=$cleaned_value
24606
24607    fi
24608  else
24609    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24610      # Default is 0, if unspecified
24611      VERSION_MINOR=0
24612    fi
24613  fi
24614
24615
24616# Check whether --with-version-security was given.
24617if test "${with_version_security+set}" = set; then :
24618  withval=$with_version_security; with_version_security_present=true
24619else
24620  with_version_security_present=false
24621fi
24622
24623
24624  if test "x$with_version_security_present" = xtrue; then
24625    if test "x$with_version_security" = xyes; then
24626      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24627    elif test "x$with_version_security" = xno; then
24628      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24629      VERSION_SECURITY=0
24630    elif test "x$with_version_security" = x; then
24631      VERSION_SECURITY=0
24632    else
24633
24634  # Additional [] needed to keep m4 from mangling shell constructs.
24635  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24636    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24637  fi
24638  # Extract the version number without leading zeros.
24639  cleaned_value=${BASH_REMATCH[1]}
24640  if test "x$cleaned_value" = x; then
24641    # Special case for zero
24642    cleaned_value=${BASH_REMATCH[2]}
24643  fi
24644
24645  if test $cleaned_value -gt 255; then
24646    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24647  fi
24648  if test "x$cleaned_value" != "x$with_version_security"; then
24649    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24650$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24651  fi
24652  VERSION_SECURITY=$cleaned_value
24653
24654    fi
24655  else
24656    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24657      # Default is 0, if unspecified
24658      VERSION_SECURITY=0
24659    fi
24660  fi
24661
24662
24663# Check whether --with-version-patch was given.
24664if test "${with_version_patch+set}" = set; then :
24665  withval=$with_version_patch; with_version_patch_present=true
24666else
24667  with_version_patch_present=false
24668fi
24669
24670
24671  if test "x$with_version_patch_present" = xtrue; then
24672    if test "x$with_version_patch" = xyes; then
24673      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24674    elif test "x$with_version_patch" = xno; then
24675      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24676      VERSION_PATCH=0
24677    elif test "x$with_version_patch" = x; then
24678      VERSION_PATCH=0
24679    else
24680
24681  # Additional [] needed to keep m4 from mangling shell constructs.
24682  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24683    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24684  fi
24685  # Extract the version number without leading zeros.
24686  cleaned_value=${BASH_REMATCH[1]}
24687  if test "x$cleaned_value" = x; then
24688    # Special case for zero
24689    cleaned_value=${BASH_REMATCH[2]}
24690  fi
24691
24692  if test $cleaned_value -gt 255; then
24693    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24694  fi
24695  if test "x$cleaned_value" != "x$with_version_patch"; then
24696    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24697$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24698  fi
24699  VERSION_PATCH=$cleaned_value
24700
24701    fi
24702  else
24703    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24704      # Default is 0, if unspecified
24705      VERSION_PATCH=0
24706    fi
24707  fi
24708
24709  # Calculate derived version properties
24710
24711  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24712  if test "x$VERSION_PRE" = x; then
24713    VERSION_IS_GA=true
24714  else
24715    VERSION_IS_GA=false
24716  fi
24717
24718  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24719  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24720
24721  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24722  # Strip trailing zeroes from stripped_version_number
24723  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24724  VERSION_NUMBER=$stripped_version_number
24725
24726  # The complete version string, with additional build information
24727  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24728    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24729  else
24730    # If either build or opt is set, we need a + separator
24731    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24732  fi
24733
24734  # The short version string, just VERSION_NUMBER and PRE, if present.
24735  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24736
24737  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24738$as_echo_n "checking for version string... " >&6; }
24739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24740$as_echo "$VERSION_STRING" >&6; }
24741
24742
24743
24744
24745
24746
24747
24748
24749
24750
24751
24752
24753
24754
24755
24756###############################################################################
24757#
24758# Setup BootJDK, used to bootstrap the build.
24759#
24760###############################################################################
24761
24762
24763  BOOT_JDK_FOUND=no
24764
24765# Check whether --with-boot-jdk was given.
24766if test "${with_boot_jdk+set}" = set; then :
24767  withval=$with_boot_jdk;
24768fi
24769
24770
24771  # We look for the Boot JDK through various means, going from more certain to
24772  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24773  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24774  # must check if this is indeed valid; otherwise we'll continue looking.
24775
24776  # Test: Is bootjdk explicitely set by command line arguments?
24777
24778  if test "x$BOOT_JDK_FOUND" = xno; then
24779    # Now execute the test
24780
24781  if test "x$with_boot_jdk" != x; then
24782    BOOT_JDK=$with_boot_jdk
24783    BOOT_JDK_FOUND=maybe
24784    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24785$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24786  fi
24787
24788
24789    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24790    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24791      # Do we have a bin/java?
24792      if test ! -x "$BOOT_JDK/bin/java"; then
24793        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24795        BOOT_JDK_FOUND=no
24796      else
24797        # Do we have a bin/javac?
24798        if test ! -x "$BOOT_JDK/bin/javac"; then
24799          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24800$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24801          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24802$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24803          BOOT_JDK_FOUND=no
24804        else
24805          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24806          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24807
24808          # Extra M4 quote needed to protect [] in grep expression.
24809          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24810          if test "x$FOUND_CORRECT_VERSION" = x; then
24811            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24812$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24813            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24814$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24815            BOOT_JDK_FOUND=no
24816          else
24817            # We're done! :-)
24818            BOOT_JDK_FOUND=yes
24819
24820  # Only process if variable expands to non-empty
24821
24822  if test "x$BOOT_JDK" != x; then
24823    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24824
24825  # Input might be given as Windows format, start by converting to
24826  # unix format.
24827  path="$BOOT_JDK"
24828  new_path=`$CYGPATH -u "$path"`
24829
24830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24833  # "foo.exe" is OK but "foo" is an error.
24834  #
24835  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24836  # It is also a way to make sure we got the proper file name for the real test later on.
24837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24838  if test "x$test_shortpath" = x; then
24839    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24840$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24841    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24842  fi
24843
24844  # Call helper function which possibly converts this using DOS-style short mode.
24845  # If so, the updated path is stored in $new_path.
24846
24847  input_path="$new_path"
24848  # Check if we need to convert this using DOS-style short mode. If the path
24849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24850  # take no chances and rewrite it.
24851  # Note: m4 eats our [], so we need to use [ and ] instead.
24852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24853  if test "x$has_forbidden_chars" != x; then
24854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24855    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24856    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24857    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24858      # Going to short mode and back again did indeed matter. Since short mode is
24859      # case insensitive, let's make it lowercase to improve readability.
24860      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24861      # Now convert it back to Unix-style (cygpath)
24862      input_path=`$CYGPATH -u "$shortmode_path"`
24863      new_path="$input_path"
24864    fi
24865  fi
24866
24867  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24868  if test "x$test_cygdrive_prefix" = x; then
24869    # As a simple fix, exclude /usr/bin since it's not a real path.
24870    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24871      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24872      # a path prefixed by /cygdrive for fixpath to work.
24873      new_path="$CYGWIN_ROOT_PATH$input_path"
24874    fi
24875  fi
24876
24877
24878  if test "x$path" != "x$new_path"; then
24879    BOOT_JDK="$new_path"
24880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24881$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24882  fi
24883
24884    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24885
24886  path="$BOOT_JDK"
24887  has_colon=`$ECHO $path | $GREP ^.:`
24888  new_path="$path"
24889  if test "x$has_colon" = x; then
24890    # Not in mixed or Windows style, start by that.
24891    new_path=`cmd //c echo $path`
24892  fi
24893
24894
24895  input_path="$new_path"
24896  # Check if we need to convert this using DOS-style short mode. If the path
24897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24898  # take no chances and rewrite it.
24899  # Note: m4 eats our [], so we need to use [ and ] instead.
24900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24901  if test "x$has_forbidden_chars" != x; then
24902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24903    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24904  fi
24905
24906
24907  windows_path="$new_path"
24908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24909    unix_path=`$CYGPATH -u "$windows_path"`
24910    new_path="$unix_path"
24911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24913    new_path="$unix_path"
24914  fi
24915
24916  if test "x$path" != "x$new_path"; then
24917    BOOT_JDK="$new_path"
24918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24919$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24920  fi
24921
24922  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24923  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24924
24925    else
24926      # We're on a unix platform. Hooray! :)
24927      path="$BOOT_JDK"
24928      has_space=`$ECHO "$path" | $GREP " "`
24929      if test "x$has_space" != x; then
24930        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24931$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24932        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24933      fi
24934
24935      # Use eval to expand a potential ~
24936      eval path="$path"
24937      if test ! -f "$path" && test ! -d "$path"; then
24938        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24939      fi
24940
24941      if test -d "$path"; then
24942        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24943      else
24944        dir="`$DIRNAME "$path"`"
24945        base="`$BASENAME "$path"`"
24946        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24947      fi
24948    fi
24949  fi
24950
24951            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24952$as_echo_n "checking for Boot JDK... " >&6; }
24953            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24954$as_echo "$BOOT_JDK" >&6; }
24955            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24956$as_echo_n "checking Boot JDK version... " >&6; }
24957            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24958            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24959$as_echo "$BOOT_JDK_VERSION" >&6; }
24960          fi # end check jdk version
24961        fi # end check javac
24962      fi # end check java
24963    fi # end check boot jdk found
24964  fi
24965
24966  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24967    # Having specified an argument which is incorrect will produce an instant failure;
24968    # we should not go on looking
24969    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24970  fi
24971
24972  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24973
24974  if test "x$BOOT_JDK_FOUND" = xno; then
24975    # Now execute the test
24976
24977  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24978    # First check at user selected default
24979
24980  if test "x$BOOT_JDK_FOUND" = xno; then
24981    # Now execute the test
24982
24983  if test -x /usr/libexec/java_home; then
24984    BOOT_JDK=`/usr/libexec/java_home `
24985    BOOT_JDK_FOUND=maybe
24986    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24987$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24988  fi
24989
24990
24991    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24992    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24993      # Do we have a bin/java?
24994      if test ! -x "$BOOT_JDK/bin/java"; then
24995        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24996$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24997        BOOT_JDK_FOUND=no
24998      else
24999        # Do we have a bin/javac?
25000        if test ! -x "$BOOT_JDK/bin/javac"; then
25001          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25003          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25004$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25005          BOOT_JDK_FOUND=no
25006        else
25007          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25008          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25009
25010          # Extra M4 quote needed to protect [] in grep expression.
25011          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25012          if test "x$FOUND_CORRECT_VERSION" = x; then
25013            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25014$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25015            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25016$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25017            BOOT_JDK_FOUND=no
25018          else
25019            # We're done! :-)
25020            BOOT_JDK_FOUND=yes
25021
25022  # Only process if variable expands to non-empty
25023
25024  if test "x$BOOT_JDK" != x; then
25025    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25026
25027  # Input might be given as Windows format, start by converting to
25028  # unix format.
25029  path="$BOOT_JDK"
25030  new_path=`$CYGPATH -u "$path"`
25031
25032  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25033  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25034  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25035  # "foo.exe" is OK but "foo" is an error.
25036  #
25037  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25038  # It is also a way to make sure we got the proper file name for the real test later on.
25039  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25040  if test "x$test_shortpath" = x; then
25041    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25042$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25043    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25044  fi
25045
25046  # Call helper function which possibly converts this using DOS-style short mode.
25047  # If so, the updated path is stored in $new_path.
25048
25049  input_path="$new_path"
25050  # Check if we need to convert this using DOS-style short mode. If the path
25051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25052  # take no chances and rewrite it.
25053  # Note: m4 eats our [], so we need to use [ and ] instead.
25054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25055  if test "x$has_forbidden_chars" != x; then
25056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25057    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25058    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25059    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25060      # Going to short mode and back again did indeed matter. Since short mode is
25061      # case insensitive, let's make it lowercase to improve readability.
25062      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25063      # Now convert it back to Unix-style (cygpath)
25064      input_path=`$CYGPATH -u "$shortmode_path"`
25065      new_path="$input_path"
25066    fi
25067  fi
25068
25069  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25070  if test "x$test_cygdrive_prefix" = x; then
25071    # As a simple fix, exclude /usr/bin since it's not a real path.
25072    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25073      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25074      # a path prefixed by /cygdrive for fixpath to work.
25075      new_path="$CYGWIN_ROOT_PATH$input_path"
25076    fi
25077  fi
25078
25079
25080  if test "x$path" != "x$new_path"; then
25081    BOOT_JDK="$new_path"
25082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25083$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25084  fi
25085
25086    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25087
25088  path="$BOOT_JDK"
25089  has_colon=`$ECHO $path | $GREP ^.:`
25090  new_path="$path"
25091  if test "x$has_colon" = x; then
25092    # Not in mixed or Windows style, start by that.
25093    new_path=`cmd //c echo $path`
25094  fi
25095
25096
25097  input_path="$new_path"
25098  # Check if we need to convert this using DOS-style short mode. If the path
25099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25100  # take no chances and rewrite it.
25101  # Note: m4 eats our [], so we need to use [ and ] instead.
25102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25103  if test "x$has_forbidden_chars" != x; then
25104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25105    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25106  fi
25107
25108
25109  windows_path="$new_path"
25110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25111    unix_path=`$CYGPATH -u "$windows_path"`
25112    new_path="$unix_path"
25113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25115    new_path="$unix_path"
25116  fi
25117
25118  if test "x$path" != "x$new_path"; then
25119    BOOT_JDK="$new_path"
25120    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25121$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25122  fi
25123
25124  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25125  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25126
25127    else
25128      # We're on a unix platform. Hooray! :)
25129      path="$BOOT_JDK"
25130      has_space=`$ECHO "$path" | $GREP " "`
25131      if test "x$has_space" != x; then
25132        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25133$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25134        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25135      fi
25136
25137      # Use eval to expand a potential ~
25138      eval path="$path"
25139      if test ! -f "$path" && test ! -d "$path"; then
25140        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25141      fi
25142
25143      if test -d "$path"; then
25144        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25145      else
25146        dir="`$DIRNAME "$path"`"
25147        base="`$BASENAME "$path"`"
25148        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25149      fi
25150    fi
25151  fi
25152
25153            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25154$as_echo_n "checking for Boot JDK... " >&6; }
25155            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25156$as_echo "$BOOT_JDK" >&6; }
25157            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25158$as_echo_n "checking Boot JDK version... " >&6; }
25159            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25160            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25161$as_echo "$BOOT_JDK_VERSION" >&6; }
25162          fi # end check jdk version
25163        fi # end check javac
25164      fi # end check java
25165    fi # end check boot jdk found
25166  fi
25167
25168    # If that did not work out (e.g. too old), try explicit versions instead
25169
25170  if test "x$BOOT_JDK_FOUND" = xno; then
25171    # Now execute the test
25172
25173  if test -x /usr/libexec/java_home; then
25174    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25175    BOOT_JDK_FOUND=maybe
25176    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25177$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25178  fi
25179
25180
25181    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25182    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25183      # Do we have a bin/java?
25184      if test ! -x "$BOOT_JDK/bin/java"; then
25185        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25186$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25187        BOOT_JDK_FOUND=no
25188      else
25189        # Do we have a bin/javac?
25190        if test ! -x "$BOOT_JDK/bin/javac"; then
25191          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25192$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25193          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25194$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25195          BOOT_JDK_FOUND=no
25196        else
25197          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25198          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25199
25200          # Extra M4 quote needed to protect [] in grep expression.
25201          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25202          if test "x$FOUND_CORRECT_VERSION" = x; then
25203            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25205            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25206$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25207            BOOT_JDK_FOUND=no
25208          else
25209            # We're done! :-)
25210            BOOT_JDK_FOUND=yes
25211
25212  # Only process if variable expands to non-empty
25213
25214  if test "x$BOOT_JDK" != x; then
25215    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25216
25217  # Input might be given as Windows format, start by converting to
25218  # unix format.
25219  path="$BOOT_JDK"
25220  new_path=`$CYGPATH -u "$path"`
25221
25222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25225  # "foo.exe" is OK but "foo" is an error.
25226  #
25227  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25228  # It is also a way to make sure we got the proper file name for the real test later on.
25229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25230  if test "x$test_shortpath" = x; then
25231    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25232$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25233    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25234  fi
25235
25236  # Call helper function which possibly converts this using DOS-style short mode.
25237  # If so, the updated path is stored in $new_path.
25238
25239  input_path="$new_path"
25240  # Check if we need to convert this using DOS-style short mode. If the path
25241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25242  # take no chances and rewrite it.
25243  # Note: m4 eats our [], so we need to use [ and ] instead.
25244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25245  if test "x$has_forbidden_chars" != x; then
25246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25250      # Going to short mode and back again did indeed matter. Since short mode is
25251      # case insensitive, let's make it lowercase to improve readability.
25252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25253      # Now convert it back to Unix-style (cygpath)
25254      input_path=`$CYGPATH -u "$shortmode_path"`
25255      new_path="$input_path"
25256    fi
25257  fi
25258
25259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25260  if test "x$test_cygdrive_prefix" = x; then
25261    # As a simple fix, exclude /usr/bin since it's not a real path.
25262    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25264      # a path prefixed by /cygdrive for fixpath to work.
25265      new_path="$CYGWIN_ROOT_PATH$input_path"
25266    fi
25267  fi
25268
25269
25270  if test "x$path" != "x$new_path"; then
25271    BOOT_JDK="$new_path"
25272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25273$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25274  fi
25275
25276    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25277
25278  path="$BOOT_JDK"
25279  has_colon=`$ECHO $path | $GREP ^.:`
25280  new_path="$path"
25281  if test "x$has_colon" = x; then
25282    # Not in mixed or Windows style, start by that.
25283    new_path=`cmd //c echo $path`
25284  fi
25285
25286
25287  input_path="$new_path"
25288  # Check if we need to convert this using DOS-style short mode. If the path
25289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25290  # take no chances and rewrite it.
25291  # Note: m4 eats our [], so we need to use [ and ] instead.
25292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25293  if test "x$has_forbidden_chars" != x; then
25294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25295    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25296  fi
25297
25298
25299  windows_path="$new_path"
25300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25301    unix_path=`$CYGPATH -u "$windows_path"`
25302    new_path="$unix_path"
25303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25305    new_path="$unix_path"
25306  fi
25307
25308  if test "x$path" != "x$new_path"; then
25309    BOOT_JDK="$new_path"
25310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25311$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25312  fi
25313
25314  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25315  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25316
25317    else
25318      # We're on a unix platform. Hooray! :)
25319      path="$BOOT_JDK"
25320      has_space=`$ECHO "$path" | $GREP " "`
25321      if test "x$has_space" != x; then
25322        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25323$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25324        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25325      fi
25326
25327      # Use eval to expand a potential ~
25328      eval path="$path"
25329      if test ! -f "$path" && test ! -d "$path"; then
25330        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25331      fi
25332
25333      if test -d "$path"; then
25334        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25335      else
25336        dir="`$DIRNAME "$path"`"
25337        base="`$BASENAME "$path"`"
25338        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25339      fi
25340    fi
25341  fi
25342
25343            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25344$as_echo_n "checking for Boot JDK... " >&6; }
25345            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25346$as_echo "$BOOT_JDK" >&6; }
25347            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25348$as_echo_n "checking Boot JDK version... " >&6; }
25349            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25350            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25351$as_echo "$BOOT_JDK_VERSION" >&6; }
25352          fi # end check jdk version
25353        fi # end check javac
25354      fi # end check java
25355    fi # end check boot jdk found
25356  fi
25357
25358
25359  if test "x$BOOT_JDK_FOUND" = xno; then
25360    # Now execute the test
25361
25362  if test -x /usr/libexec/java_home; then
25363    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25364    BOOT_JDK_FOUND=maybe
25365    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25366$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25367  fi
25368
25369
25370    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25371    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25372      # Do we have a bin/java?
25373      if test ! -x "$BOOT_JDK/bin/java"; then
25374        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25375$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25376        BOOT_JDK_FOUND=no
25377      else
25378        # Do we have a bin/javac?
25379        if test ! -x "$BOOT_JDK/bin/javac"; then
25380          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25381$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25382          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25383$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25384          BOOT_JDK_FOUND=no
25385        else
25386          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25387          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25388
25389          # Extra M4 quote needed to protect [] in grep expression.
25390          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25391          if test "x$FOUND_CORRECT_VERSION" = x; then
25392            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25393$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25394            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25395$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25396            BOOT_JDK_FOUND=no
25397          else
25398            # We're done! :-)
25399            BOOT_JDK_FOUND=yes
25400
25401  # Only process if variable expands to non-empty
25402
25403  if test "x$BOOT_JDK" != x; then
25404    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25405
25406  # Input might be given as Windows format, start by converting to
25407  # unix format.
25408  path="$BOOT_JDK"
25409  new_path=`$CYGPATH -u "$path"`
25410
25411  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25412  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25413  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25414  # "foo.exe" is OK but "foo" is an error.
25415  #
25416  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25417  # It is also a way to make sure we got the proper file name for the real test later on.
25418  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25419  if test "x$test_shortpath" = x; then
25420    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25421$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25422    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25423  fi
25424
25425  # Call helper function which possibly converts this using DOS-style short mode.
25426  # If so, the updated path is stored in $new_path.
25427
25428  input_path="$new_path"
25429  # Check if we need to convert this using DOS-style short mode. If the path
25430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25431  # take no chances and rewrite it.
25432  # Note: m4 eats our [], so we need to use [ and ] instead.
25433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25434  if test "x$has_forbidden_chars" != x; then
25435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25436    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25437    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25438    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25439      # Going to short mode and back again did indeed matter. Since short mode is
25440      # case insensitive, let's make it lowercase to improve readability.
25441      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25442      # Now convert it back to Unix-style (cygpath)
25443      input_path=`$CYGPATH -u "$shortmode_path"`
25444      new_path="$input_path"
25445    fi
25446  fi
25447
25448  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25449  if test "x$test_cygdrive_prefix" = x; then
25450    # As a simple fix, exclude /usr/bin since it's not a real path.
25451    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25452      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25453      # a path prefixed by /cygdrive for fixpath to work.
25454      new_path="$CYGWIN_ROOT_PATH$input_path"
25455    fi
25456  fi
25457
25458
25459  if test "x$path" != "x$new_path"; then
25460    BOOT_JDK="$new_path"
25461    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25462$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25463  fi
25464
25465    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25466
25467  path="$BOOT_JDK"
25468  has_colon=`$ECHO $path | $GREP ^.:`
25469  new_path="$path"
25470  if test "x$has_colon" = x; then
25471    # Not in mixed or Windows style, start by that.
25472    new_path=`cmd //c echo $path`
25473  fi
25474
25475
25476  input_path="$new_path"
25477  # Check if we need to convert this using DOS-style short mode. If the path
25478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25479  # take no chances and rewrite it.
25480  # Note: m4 eats our [], so we need to use [ and ] instead.
25481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25482  if test "x$has_forbidden_chars" != x; then
25483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25484    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25485  fi
25486
25487
25488  windows_path="$new_path"
25489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25490    unix_path=`$CYGPATH -u "$windows_path"`
25491    new_path="$unix_path"
25492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25494    new_path="$unix_path"
25495  fi
25496
25497  if test "x$path" != "x$new_path"; then
25498    BOOT_JDK="$new_path"
25499    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25500$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25501  fi
25502
25503  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25504  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25505
25506    else
25507      # We're on a unix platform. Hooray! :)
25508      path="$BOOT_JDK"
25509      has_space=`$ECHO "$path" | $GREP " "`
25510      if test "x$has_space" != x; then
25511        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25512$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25513        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25514      fi
25515
25516      # Use eval to expand a potential ~
25517      eval path="$path"
25518      if test ! -f "$path" && test ! -d "$path"; then
25519        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25520      fi
25521
25522      if test -d "$path"; then
25523        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25524      else
25525        dir="`$DIRNAME "$path"`"
25526        base="`$BASENAME "$path"`"
25527        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25528      fi
25529    fi
25530  fi
25531
25532            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25533$as_echo_n "checking for Boot JDK... " >&6; }
25534            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25535$as_echo "$BOOT_JDK" >&6; }
25536            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25537$as_echo_n "checking Boot JDK version... " >&6; }
25538            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25539            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25540$as_echo "$BOOT_JDK_VERSION" >&6; }
25541          fi # end check jdk version
25542        fi # end check javac
25543      fi # end check java
25544    fi # end check boot jdk found
25545  fi
25546
25547
25548  if test "x$BOOT_JDK_FOUND" = xno; then
25549    # Now execute the test
25550
25551  if test -x /usr/libexec/java_home; then
25552    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25553    BOOT_JDK_FOUND=maybe
25554    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25555$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25556  fi
25557
25558
25559    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25560    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25561      # Do we have a bin/java?
25562      if test ! -x "$BOOT_JDK/bin/java"; then
25563        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25564$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25565        BOOT_JDK_FOUND=no
25566      else
25567        # Do we have a bin/javac?
25568        if test ! -x "$BOOT_JDK/bin/javac"; then
25569          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25570$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25571          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25572$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25573          BOOT_JDK_FOUND=no
25574        else
25575          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25576          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25577
25578          # Extra M4 quote needed to protect [] in grep expression.
25579          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25580          if test "x$FOUND_CORRECT_VERSION" = x; then
25581            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25582$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25583            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25584$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25585            BOOT_JDK_FOUND=no
25586          else
25587            # We're done! :-)
25588            BOOT_JDK_FOUND=yes
25589
25590  # Only process if variable expands to non-empty
25591
25592  if test "x$BOOT_JDK" != x; then
25593    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25594
25595  # Input might be given as Windows format, start by converting to
25596  # unix format.
25597  path="$BOOT_JDK"
25598  new_path=`$CYGPATH -u "$path"`
25599
25600  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25601  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25602  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25603  # "foo.exe" is OK but "foo" is an error.
25604  #
25605  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25606  # It is also a way to make sure we got the proper file name for the real test later on.
25607  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25608  if test "x$test_shortpath" = x; then
25609    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25610$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25611    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25612  fi
25613
25614  # Call helper function which possibly converts this using DOS-style short mode.
25615  # If so, the updated path is stored in $new_path.
25616
25617  input_path="$new_path"
25618  # Check if we need to convert this using DOS-style short mode. If the path
25619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25620  # take no chances and rewrite it.
25621  # Note: m4 eats our [], so we need to use [ and ] instead.
25622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25623  if test "x$has_forbidden_chars" != x; then
25624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25625    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25626    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25627    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25628      # Going to short mode and back again did indeed matter. Since short mode is
25629      # case insensitive, let's make it lowercase to improve readability.
25630      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25631      # Now convert it back to Unix-style (cygpath)
25632      input_path=`$CYGPATH -u "$shortmode_path"`
25633      new_path="$input_path"
25634    fi
25635  fi
25636
25637  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25638  if test "x$test_cygdrive_prefix" = x; then
25639    # As a simple fix, exclude /usr/bin since it's not a real path.
25640    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25641      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25642      # a path prefixed by /cygdrive for fixpath to work.
25643      new_path="$CYGWIN_ROOT_PATH$input_path"
25644    fi
25645  fi
25646
25647
25648  if test "x$path" != "x$new_path"; then
25649    BOOT_JDK="$new_path"
25650    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25651$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25652  fi
25653
25654    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25655
25656  path="$BOOT_JDK"
25657  has_colon=`$ECHO $path | $GREP ^.:`
25658  new_path="$path"
25659  if test "x$has_colon" = x; then
25660    # Not in mixed or Windows style, start by that.
25661    new_path=`cmd //c echo $path`
25662  fi
25663
25664
25665  input_path="$new_path"
25666  # Check if we need to convert this using DOS-style short mode. If the path
25667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25668  # take no chances and rewrite it.
25669  # Note: m4 eats our [], so we need to use [ and ] instead.
25670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25671  if test "x$has_forbidden_chars" != x; then
25672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25673    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25674  fi
25675
25676
25677  windows_path="$new_path"
25678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25679    unix_path=`$CYGPATH -u "$windows_path"`
25680    new_path="$unix_path"
25681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25683    new_path="$unix_path"
25684  fi
25685
25686  if test "x$path" != "x$new_path"; then
25687    BOOT_JDK="$new_path"
25688    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25689$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25690  fi
25691
25692  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25693  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25694
25695    else
25696      # We're on a unix platform. Hooray! :)
25697      path="$BOOT_JDK"
25698      has_space=`$ECHO "$path" | $GREP " "`
25699      if test "x$has_space" != x; then
25700        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25701$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25702        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25703      fi
25704
25705      # Use eval to expand a potential ~
25706      eval path="$path"
25707      if test ! -f "$path" && test ! -d "$path"; then
25708        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25709      fi
25710
25711      if test -d "$path"; then
25712        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25713      else
25714        dir="`$DIRNAME "$path"`"
25715        base="`$BASENAME "$path"`"
25716        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25717      fi
25718    fi
25719  fi
25720
25721            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25722$as_echo_n "checking for Boot JDK... " >&6; }
25723            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25724$as_echo "$BOOT_JDK" >&6; }
25725            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25726$as_echo_n "checking Boot JDK version... " >&6; }
25727            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25728            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25729$as_echo "$BOOT_JDK_VERSION" >&6; }
25730          fi # end check jdk version
25731        fi # end check javac
25732      fi # end check java
25733    fi # end check boot jdk found
25734  fi
25735
25736  fi
25737
25738
25739    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25740    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25741      # Do we have a bin/java?
25742      if test ! -x "$BOOT_JDK/bin/java"; then
25743        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25744$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25745        BOOT_JDK_FOUND=no
25746      else
25747        # Do we have a bin/javac?
25748        if test ! -x "$BOOT_JDK/bin/javac"; then
25749          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25750$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25751          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25752$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25753          BOOT_JDK_FOUND=no
25754        else
25755          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25756          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25757
25758          # Extra M4 quote needed to protect [] in grep expression.
25759          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25760          if test "x$FOUND_CORRECT_VERSION" = x; then
25761            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25762$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25763            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25764$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25765            BOOT_JDK_FOUND=no
25766          else
25767            # We're done! :-)
25768            BOOT_JDK_FOUND=yes
25769
25770  # Only process if variable expands to non-empty
25771
25772  if test "x$BOOT_JDK" != x; then
25773    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25774
25775  # Input might be given as Windows format, start by converting to
25776  # unix format.
25777  path="$BOOT_JDK"
25778  new_path=`$CYGPATH -u "$path"`
25779
25780  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25781  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25782  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25783  # "foo.exe" is OK but "foo" is an error.
25784  #
25785  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25786  # It is also a way to make sure we got the proper file name for the real test later on.
25787  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25788  if test "x$test_shortpath" = x; then
25789    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25790$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25791    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25792  fi
25793
25794  # Call helper function which possibly converts this using DOS-style short mode.
25795  # If so, the updated path is stored in $new_path.
25796
25797  input_path="$new_path"
25798  # Check if we need to convert this using DOS-style short mode. If the path
25799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25800  # take no chances and rewrite it.
25801  # Note: m4 eats our [], so we need to use [ and ] instead.
25802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25803  if test "x$has_forbidden_chars" != x; then
25804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25805    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25806    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25807    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25808      # Going to short mode and back again did indeed matter. Since short mode is
25809      # case insensitive, let's make it lowercase to improve readability.
25810      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25811      # Now convert it back to Unix-style (cygpath)
25812      input_path=`$CYGPATH -u "$shortmode_path"`
25813      new_path="$input_path"
25814    fi
25815  fi
25816
25817  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25818  if test "x$test_cygdrive_prefix" = x; then
25819    # As a simple fix, exclude /usr/bin since it's not a real path.
25820    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25821      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25822      # a path prefixed by /cygdrive for fixpath to work.
25823      new_path="$CYGWIN_ROOT_PATH$input_path"
25824    fi
25825  fi
25826
25827
25828  if test "x$path" != "x$new_path"; then
25829    BOOT_JDK="$new_path"
25830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25831$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25832  fi
25833
25834    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25835
25836  path="$BOOT_JDK"
25837  has_colon=`$ECHO $path | $GREP ^.:`
25838  new_path="$path"
25839  if test "x$has_colon" = x; then
25840    # Not in mixed or Windows style, start by that.
25841    new_path=`cmd //c echo $path`
25842  fi
25843
25844
25845  input_path="$new_path"
25846  # Check if we need to convert this using DOS-style short mode. If the path
25847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25848  # take no chances and rewrite it.
25849  # Note: m4 eats our [], so we need to use [ and ] instead.
25850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25851  if test "x$has_forbidden_chars" != x; then
25852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25853    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25854  fi
25855
25856
25857  windows_path="$new_path"
25858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25859    unix_path=`$CYGPATH -u "$windows_path"`
25860    new_path="$unix_path"
25861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25863    new_path="$unix_path"
25864  fi
25865
25866  if test "x$path" != "x$new_path"; then
25867    BOOT_JDK="$new_path"
25868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25869$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25870  fi
25871
25872  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25873  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25874
25875    else
25876      # We're on a unix platform. Hooray! :)
25877      path="$BOOT_JDK"
25878      has_space=`$ECHO "$path" | $GREP " "`
25879      if test "x$has_space" != x; then
25880        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25881$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25882        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25883      fi
25884
25885      # Use eval to expand a potential ~
25886      eval path="$path"
25887      if test ! -f "$path" && test ! -d "$path"; then
25888        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25889      fi
25890
25891      if test -d "$path"; then
25892        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25893      else
25894        dir="`$DIRNAME "$path"`"
25895        base="`$BASENAME "$path"`"
25896        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25897      fi
25898    fi
25899  fi
25900
25901            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25902$as_echo_n "checking for Boot JDK... " >&6; }
25903            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25904$as_echo "$BOOT_JDK" >&6; }
25905            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25906$as_echo_n "checking Boot JDK version... " >&6; }
25907            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25908            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25909$as_echo "$BOOT_JDK_VERSION" >&6; }
25910          fi # end check jdk version
25911        fi # end check javac
25912      fi # end check java
25913    fi # end check boot jdk found
25914  fi
25915
25916
25917  # Test: Is $JAVA_HOME set?
25918
25919  if test "x$BOOT_JDK_FOUND" = xno; then
25920    # Now execute the test
25921
25922  if test "x$JAVA_HOME" != x; then
25923    JAVA_HOME_PROCESSED="$JAVA_HOME"
25924
25925  # Only process if variable expands to non-empty
25926
25927  if test "x$JAVA_HOME_PROCESSED" != x; then
25928    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25929
25930  # Input might be given as Windows format, start by converting to
25931  # unix format.
25932  path="$JAVA_HOME_PROCESSED"
25933  new_path=`$CYGPATH -u "$path"`
25934
25935  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25936  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25937  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25938  # "foo.exe" is OK but "foo" is an error.
25939  #
25940  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25941  # It is also a way to make sure we got the proper file name for the real test later on.
25942  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25943  if test "x$test_shortpath" = x; then
25944    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25945$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25946    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25947  fi
25948
25949  # Call helper function which possibly converts this using DOS-style short mode.
25950  # If so, the updated path is stored in $new_path.
25951
25952  input_path="$new_path"
25953  # Check if we need to convert this using DOS-style short mode. If the path
25954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25955  # take no chances and rewrite it.
25956  # Note: m4 eats our [], so we need to use [ and ] instead.
25957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25958  if test "x$has_forbidden_chars" != x; then
25959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25960    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25961    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25962    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25963      # Going to short mode and back again did indeed matter. Since short mode is
25964      # case insensitive, let's make it lowercase to improve readability.
25965      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25966      # Now convert it back to Unix-style (cygpath)
25967      input_path=`$CYGPATH -u "$shortmode_path"`
25968      new_path="$input_path"
25969    fi
25970  fi
25971
25972  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25973  if test "x$test_cygdrive_prefix" = x; then
25974    # As a simple fix, exclude /usr/bin since it's not a real path.
25975    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25976      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25977      # a path prefixed by /cygdrive for fixpath to work.
25978      new_path="$CYGWIN_ROOT_PATH$input_path"
25979    fi
25980  fi
25981
25982
25983  if test "x$path" != "x$new_path"; then
25984    JAVA_HOME_PROCESSED="$new_path"
25985    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25986$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25987  fi
25988
25989    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25990
25991  path="$JAVA_HOME_PROCESSED"
25992  has_colon=`$ECHO $path | $GREP ^.:`
25993  new_path="$path"
25994  if test "x$has_colon" = x; then
25995    # Not in mixed or Windows style, start by that.
25996    new_path=`cmd //c echo $path`
25997  fi
25998
25999
26000  input_path="$new_path"
26001  # Check if we need to convert this using DOS-style short mode. If the path
26002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26003  # take no chances and rewrite it.
26004  # Note: m4 eats our [], so we need to use [ and ] instead.
26005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26006  if test "x$has_forbidden_chars" != x; then
26007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26008    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26009  fi
26010
26011
26012  windows_path="$new_path"
26013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26014    unix_path=`$CYGPATH -u "$windows_path"`
26015    new_path="$unix_path"
26016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26018    new_path="$unix_path"
26019  fi
26020
26021  if test "x$path" != "x$new_path"; then
26022    JAVA_HOME_PROCESSED="$new_path"
26023    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26024$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26025  fi
26026
26027  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26028  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26029
26030    else
26031      # We're on a unix platform. Hooray! :)
26032      path="$JAVA_HOME_PROCESSED"
26033      has_space=`$ECHO "$path" | $GREP " "`
26034      if test "x$has_space" != x; then
26035        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26036$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26037        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26038      fi
26039
26040      # Use eval to expand a potential ~
26041      eval path="$path"
26042      if test ! -f "$path" && test ! -d "$path"; then
26043        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26044      fi
26045
26046      if test -d "$path"; then
26047        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26048      else
26049        dir="`$DIRNAME "$path"`"
26050        base="`$BASENAME "$path"`"
26051        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26052      fi
26053    fi
26054  fi
26055
26056    if test ! -d "$JAVA_HOME_PROCESSED"; then
26057      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26058$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26059    else
26060      # Aha, the user has set a JAVA_HOME
26061      # let us use that as the Boot JDK.
26062      BOOT_JDK="$JAVA_HOME_PROCESSED"
26063      BOOT_JDK_FOUND=maybe
26064      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26065$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26066    fi
26067  fi
26068
26069
26070    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26071    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26072      # Do we have a bin/java?
26073      if test ! -x "$BOOT_JDK/bin/java"; then
26074        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26075$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26076        BOOT_JDK_FOUND=no
26077      else
26078        # Do we have a bin/javac?
26079        if test ! -x "$BOOT_JDK/bin/javac"; then
26080          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26081$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26082          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26083$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26084          BOOT_JDK_FOUND=no
26085        else
26086          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26087          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26088
26089          # Extra M4 quote needed to protect [] in grep expression.
26090          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26091          if test "x$FOUND_CORRECT_VERSION" = x; then
26092            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26093$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26094            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26095$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26096            BOOT_JDK_FOUND=no
26097          else
26098            # We're done! :-)
26099            BOOT_JDK_FOUND=yes
26100
26101  # Only process if variable expands to non-empty
26102
26103  if test "x$BOOT_JDK" != x; then
26104    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26105
26106  # Input might be given as Windows format, start by converting to
26107  # unix format.
26108  path="$BOOT_JDK"
26109  new_path=`$CYGPATH -u "$path"`
26110
26111  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26112  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26113  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26114  # "foo.exe" is OK but "foo" is an error.
26115  #
26116  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26117  # It is also a way to make sure we got the proper file name for the real test later on.
26118  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26119  if test "x$test_shortpath" = x; then
26120    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26121$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26122    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26123  fi
26124
26125  # Call helper function which possibly converts this using DOS-style short mode.
26126  # If so, the updated path is stored in $new_path.
26127
26128  input_path="$new_path"
26129  # Check if we need to convert this using DOS-style short mode. If the path
26130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26131  # take no chances and rewrite it.
26132  # Note: m4 eats our [], so we need to use [ and ] instead.
26133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26134  if test "x$has_forbidden_chars" != x; then
26135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26136    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26137    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26138    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26139      # Going to short mode and back again did indeed matter. Since short mode is
26140      # case insensitive, let's make it lowercase to improve readability.
26141      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26142      # Now convert it back to Unix-style (cygpath)
26143      input_path=`$CYGPATH -u "$shortmode_path"`
26144      new_path="$input_path"
26145    fi
26146  fi
26147
26148  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26149  if test "x$test_cygdrive_prefix" = x; then
26150    # As a simple fix, exclude /usr/bin since it's not a real path.
26151    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26152      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26153      # a path prefixed by /cygdrive for fixpath to work.
26154      new_path="$CYGWIN_ROOT_PATH$input_path"
26155    fi
26156  fi
26157
26158
26159  if test "x$path" != "x$new_path"; then
26160    BOOT_JDK="$new_path"
26161    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26162$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26163  fi
26164
26165    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26166
26167  path="$BOOT_JDK"
26168  has_colon=`$ECHO $path | $GREP ^.:`
26169  new_path="$path"
26170  if test "x$has_colon" = x; then
26171    # Not in mixed or Windows style, start by that.
26172    new_path=`cmd //c echo $path`
26173  fi
26174
26175
26176  input_path="$new_path"
26177  # Check if we need to convert this using DOS-style short mode. If the path
26178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26179  # take no chances and rewrite it.
26180  # Note: m4 eats our [], so we need to use [ and ] instead.
26181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26182  if test "x$has_forbidden_chars" != x; then
26183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26184    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26185  fi
26186
26187
26188  windows_path="$new_path"
26189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26190    unix_path=`$CYGPATH -u "$windows_path"`
26191    new_path="$unix_path"
26192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26194    new_path="$unix_path"
26195  fi
26196
26197  if test "x$path" != "x$new_path"; then
26198    BOOT_JDK="$new_path"
26199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26200$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26201  fi
26202
26203  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26204  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26205
26206    else
26207      # We're on a unix platform. Hooray! :)
26208      path="$BOOT_JDK"
26209      has_space=`$ECHO "$path" | $GREP " "`
26210      if test "x$has_space" != x; then
26211        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26212$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26213        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26214      fi
26215
26216      # Use eval to expand a potential ~
26217      eval path="$path"
26218      if test ! -f "$path" && test ! -d "$path"; then
26219        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26220      fi
26221
26222      if test -d "$path"; then
26223        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26224      else
26225        dir="`$DIRNAME "$path"`"
26226        base="`$BASENAME "$path"`"
26227        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26228      fi
26229    fi
26230  fi
26231
26232            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26233$as_echo_n "checking for Boot JDK... " >&6; }
26234            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26235$as_echo "$BOOT_JDK" >&6; }
26236            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26237$as_echo_n "checking Boot JDK version... " >&6; }
26238            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26239            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26240$as_echo "$BOOT_JDK_VERSION" >&6; }
26241          fi # end check jdk version
26242        fi # end check javac
26243      fi # end check java
26244    fi # end check boot jdk found
26245  fi
26246
26247
26248  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26249
26250  if test "x$BOOT_JDK_FOUND" = xno; then
26251    # Now execute the test
26252
26253  # Extract the first word of "javac", so it can be a program name with args.
26254set dummy javac; ac_word=$2
26255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26256$as_echo_n "checking for $ac_word... " >&6; }
26257if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26258  $as_echo_n "(cached) " >&6
26259else
26260  case $JAVAC_CHECK in
26261  [\\/]* | ?:[\\/]*)
26262  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26263  ;;
26264  *)
26265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26266for as_dir in $PATH
26267do
26268  IFS=$as_save_IFS
26269  test -z "$as_dir" && as_dir=.
26270    for ac_exec_ext in '' $ac_executable_extensions; do
26271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26272    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26274    break 2
26275  fi
26276done
26277  done
26278IFS=$as_save_IFS
26279
26280  ;;
26281esac
26282fi
26283JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26284if test -n "$JAVAC_CHECK"; then
26285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26286$as_echo "$JAVAC_CHECK" >&6; }
26287else
26288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26289$as_echo "no" >&6; }
26290fi
26291
26292
26293  # Extract the first word of "java", so it can be a program name with args.
26294set dummy java; ac_word=$2
26295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26296$as_echo_n "checking for $ac_word... " >&6; }
26297if ${ac_cv_path_JAVA_CHECK+:} false; then :
26298  $as_echo_n "(cached) " >&6
26299else
26300  case $JAVA_CHECK in
26301  [\\/]* | ?:[\\/]*)
26302  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26303  ;;
26304  *)
26305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26306for as_dir in $PATH
26307do
26308  IFS=$as_save_IFS
26309  test -z "$as_dir" && as_dir=.
26310    for ac_exec_ext in '' $ac_executable_extensions; do
26311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26312    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26314    break 2
26315  fi
26316done
26317  done
26318IFS=$as_save_IFS
26319
26320  ;;
26321esac
26322fi
26323JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26324if test -n "$JAVA_CHECK"; then
26325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26326$as_echo "$JAVA_CHECK" >&6; }
26327else
26328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26329$as_echo "no" >&6; }
26330fi
26331
26332
26333  BINARY="$JAVAC_CHECK"
26334  if test "x$JAVAC_CHECK" = x; then
26335    BINARY="$JAVA_CHECK"
26336  fi
26337  if test "x$BINARY" != x; then
26338    # So there is a java(c) binary, it might be part of a JDK.
26339    # Lets find the JDK/JRE directory by following symbolic links.
26340    # Linux/GNU systems often have links from /usr/bin/java to
26341    # /etc/alternatives/java to the real JDK binary.
26342
26343  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26344    # Follow a chain of symbolic links. Use readlink
26345    # where it exists, else fall back to horribly
26346    # complicated shell code.
26347    if test "x$READLINK_TESTED" != yes; then
26348      # On MacOSX there is a readlink tool with a different
26349      # purpose than the GNU readlink tool. Check the found readlink.
26350      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26351      if test "x$ISGNU" = x; then
26352        # A readlink that we do not know how to use.
26353        # Are there other non-GNU readlinks out there?
26354        READLINK_TESTED=yes
26355        READLINK=
26356      fi
26357    fi
26358
26359    if test "x$READLINK" != x; then
26360      BINARY=`$READLINK -f $BINARY`
26361    else
26362      # Save the current directory for restoring afterwards
26363      STARTDIR=$PWD
26364      COUNTER=0
26365      sym_link_dir=`$DIRNAME $BINARY`
26366      sym_link_file=`$BASENAME $BINARY`
26367      cd $sym_link_dir
26368      # Use -P flag to resolve symlinks in directories.
26369      cd `$THEPWDCMD -P`
26370      sym_link_dir=`$THEPWDCMD -P`
26371      # Resolve file symlinks
26372      while test $COUNTER -lt 20; do
26373        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26374        if test "x$ISLINK" == x; then
26375          # This is not a symbolic link! We are done!
26376          break
26377        fi
26378        # Again resolve directory symlinks since the target of the just found
26379        # link could be in a different directory
26380        cd `$DIRNAME $ISLINK`
26381        sym_link_dir=`$THEPWDCMD -P`
26382        sym_link_file=`$BASENAME $ISLINK`
26383        let COUNTER=COUNTER+1
26384      done
26385      cd $STARTDIR
26386      BINARY=$sym_link_dir/$sym_link_file
26387    fi
26388  fi
26389
26390    BOOT_JDK=`dirname "$BINARY"`
26391    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26392    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26393      # Looks like we found ourselves an JDK
26394      BOOT_JDK_FOUND=maybe
26395      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26396$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26397    fi
26398  fi
26399
26400
26401    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26402    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26403      # Do we have a bin/java?
26404      if test ! -x "$BOOT_JDK/bin/java"; then
26405        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26406$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26407        BOOT_JDK_FOUND=no
26408      else
26409        # Do we have a bin/javac?
26410        if test ! -x "$BOOT_JDK/bin/javac"; then
26411          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26412$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26413          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26414$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26415          BOOT_JDK_FOUND=no
26416        else
26417          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26418          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26419
26420          # Extra M4 quote needed to protect [] in grep expression.
26421          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26422          if test "x$FOUND_CORRECT_VERSION" = x; then
26423            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26424$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26425            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26426$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26427            BOOT_JDK_FOUND=no
26428          else
26429            # We're done! :-)
26430            BOOT_JDK_FOUND=yes
26431
26432  # Only process if variable expands to non-empty
26433
26434  if test "x$BOOT_JDK" != x; then
26435    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26436
26437  # Input might be given as Windows format, start by converting to
26438  # unix format.
26439  path="$BOOT_JDK"
26440  new_path=`$CYGPATH -u "$path"`
26441
26442  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26443  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26444  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26445  # "foo.exe" is OK but "foo" is an error.
26446  #
26447  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26448  # It is also a way to make sure we got the proper file name for the real test later on.
26449  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26450  if test "x$test_shortpath" = x; then
26451    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26452$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26453    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26454  fi
26455
26456  # Call helper function which possibly converts this using DOS-style short mode.
26457  # If so, the updated path is stored in $new_path.
26458
26459  input_path="$new_path"
26460  # Check if we need to convert this using DOS-style short mode. If the path
26461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26462  # take no chances and rewrite it.
26463  # Note: m4 eats our [], so we need to use [ and ] instead.
26464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26465  if test "x$has_forbidden_chars" != x; then
26466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26467    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26468    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26469    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26470      # Going to short mode and back again did indeed matter. Since short mode is
26471      # case insensitive, let's make it lowercase to improve readability.
26472      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26473      # Now convert it back to Unix-style (cygpath)
26474      input_path=`$CYGPATH -u "$shortmode_path"`
26475      new_path="$input_path"
26476    fi
26477  fi
26478
26479  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26480  if test "x$test_cygdrive_prefix" = x; then
26481    # As a simple fix, exclude /usr/bin since it's not a real path.
26482    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26483      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26484      # a path prefixed by /cygdrive for fixpath to work.
26485      new_path="$CYGWIN_ROOT_PATH$input_path"
26486    fi
26487  fi
26488
26489
26490  if test "x$path" != "x$new_path"; then
26491    BOOT_JDK="$new_path"
26492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26493$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26494  fi
26495
26496    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26497
26498  path="$BOOT_JDK"
26499  has_colon=`$ECHO $path | $GREP ^.:`
26500  new_path="$path"
26501  if test "x$has_colon" = x; then
26502    # Not in mixed or Windows style, start by that.
26503    new_path=`cmd //c echo $path`
26504  fi
26505
26506
26507  input_path="$new_path"
26508  # Check if we need to convert this using DOS-style short mode. If the path
26509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26510  # take no chances and rewrite it.
26511  # Note: m4 eats our [], so we need to use [ and ] instead.
26512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26513  if test "x$has_forbidden_chars" != x; then
26514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26515    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26516  fi
26517
26518
26519  windows_path="$new_path"
26520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26521    unix_path=`$CYGPATH -u "$windows_path"`
26522    new_path="$unix_path"
26523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26525    new_path="$unix_path"
26526  fi
26527
26528  if test "x$path" != "x$new_path"; then
26529    BOOT_JDK="$new_path"
26530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26531$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26532  fi
26533
26534  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26535  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26536
26537    else
26538      # We're on a unix platform. Hooray! :)
26539      path="$BOOT_JDK"
26540      has_space=`$ECHO "$path" | $GREP " "`
26541      if test "x$has_space" != x; then
26542        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26543$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26544        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26545      fi
26546
26547      # Use eval to expand a potential ~
26548      eval path="$path"
26549      if test ! -f "$path" && test ! -d "$path"; then
26550        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26551      fi
26552
26553      if test -d "$path"; then
26554        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26555      else
26556        dir="`$DIRNAME "$path"`"
26557        base="`$BASENAME "$path"`"
26558        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26559      fi
26560    fi
26561  fi
26562
26563            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26564$as_echo_n "checking for Boot JDK... " >&6; }
26565            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26566$as_echo "$BOOT_JDK" >&6; }
26567            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26568$as_echo_n "checking Boot JDK version... " >&6; }
26569            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26570            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26571$as_echo "$BOOT_JDK_VERSION" >&6; }
26572          fi # end check jdk version
26573        fi # end check javac
26574      fi # end check java
26575    fi # end check boot jdk found
26576  fi
26577
26578
26579  # Test: Is there a JDK installed in default, well-known locations?
26580
26581  if test "x$BOOT_JDK_FOUND" = xno; then
26582    # Now execute the test
26583
26584  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26585
26586  if test "x$BOOT_JDK_FOUND" = xno; then
26587    # Now execute the test
26588
26589  if test "x$ProgramW6432" != x; then
26590    VIRTUAL_DIR="$ProgramW6432/Java"
26591
26592  windows_path="$VIRTUAL_DIR"
26593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26594    unix_path=`$CYGPATH -u "$windows_path"`
26595    VIRTUAL_DIR="$unix_path"
26596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26598    VIRTUAL_DIR="$unix_path"
26599  fi
26600
26601
26602  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26603  BOOT_JDK_SUFFIX=""
26604  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26605  if test "x$ALL_JDKS_FOUND" != x; then
26606    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26607
26608  if test "x$BOOT_JDK_FOUND" = xno; then
26609    # Now execute the test
26610
26611        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26612        if test -d "$BOOT_JDK"; then
26613          BOOT_JDK_FOUND=maybe
26614          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26615$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26616        fi
26617
26618
26619    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26620    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26621      # Do we have a bin/java?
26622      if test ! -x "$BOOT_JDK/bin/java"; then
26623        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26624$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26625        BOOT_JDK_FOUND=no
26626      else
26627        # Do we have a bin/javac?
26628        if test ! -x "$BOOT_JDK/bin/javac"; then
26629          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26630$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26631          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26632$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26633          BOOT_JDK_FOUND=no
26634        else
26635          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26636          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26637
26638          # Extra M4 quote needed to protect [] in grep expression.
26639          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26640          if test "x$FOUND_CORRECT_VERSION" = x; then
26641            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26642$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26643            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26644$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26645            BOOT_JDK_FOUND=no
26646          else
26647            # We're done! :-)
26648            BOOT_JDK_FOUND=yes
26649
26650  # Only process if variable expands to non-empty
26651
26652  if test "x$BOOT_JDK" != x; then
26653    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26654
26655  # Input might be given as Windows format, start by converting to
26656  # unix format.
26657  path="$BOOT_JDK"
26658  new_path=`$CYGPATH -u "$path"`
26659
26660  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26661  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26662  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26663  # "foo.exe" is OK but "foo" is an error.
26664  #
26665  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26666  # It is also a way to make sure we got the proper file name for the real test later on.
26667  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26668  if test "x$test_shortpath" = x; then
26669    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26670$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26671    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26672  fi
26673
26674  # Call helper function which possibly converts this using DOS-style short mode.
26675  # If so, the updated path is stored in $new_path.
26676
26677  input_path="$new_path"
26678  # Check if we need to convert this using DOS-style short mode. If the path
26679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26680  # take no chances and rewrite it.
26681  # Note: m4 eats our [], so we need to use [ and ] instead.
26682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26683  if test "x$has_forbidden_chars" != x; then
26684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26685    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26686    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26687    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26688      # Going to short mode and back again did indeed matter. Since short mode is
26689      # case insensitive, let's make it lowercase to improve readability.
26690      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26691      # Now convert it back to Unix-style (cygpath)
26692      input_path=`$CYGPATH -u "$shortmode_path"`
26693      new_path="$input_path"
26694    fi
26695  fi
26696
26697  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26698  if test "x$test_cygdrive_prefix" = x; then
26699    # As a simple fix, exclude /usr/bin since it's not a real path.
26700    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26701      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26702      # a path prefixed by /cygdrive for fixpath to work.
26703      new_path="$CYGWIN_ROOT_PATH$input_path"
26704    fi
26705  fi
26706
26707
26708  if test "x$path" != "x$new_path"; then
26709    BOOT_JDK="$new_path"
26710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26711$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26712  fi
26713
26714    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26715
26716  path="$BOOT_JDK"
26717  has_colon=`$ECHO $path | $GREP ^.:`
26718  new_path="$path"
26719  if test "x$has_colon" = x; then
26720    # Not in mixed or Windows style, start by that.
26721    new_path=`cmd //c echo $path`
26722  fi
26723
26724
26725  input_path="$new_path"
26726  # Check if we need to convert this using DOS-style short mode. If the path
26727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26728  # take no chances and rewrite it.
26729  # Note: m4 eats our [], so we need to use [ and ] instead.
26730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26731  if test "x$has_forbidden_chars" != x; then
26732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26733    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26734  fi
26735
26736
26737  windows_path="$new_path"
26738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26739    unix_path=`$CYGPATH -u "$windows_path"`
26740    new_path="$unix_path"
26741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26743    new_path="$unix_path"
26744  fi
26745
26746  if test "x$path" != "x$new_path"; then
26747    BOOT_JDK="$new_path"
26748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26749$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26750  fi
26751
26752  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26753  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26754
26755    else
26756      # We're on a unix platform. Hooray! :)
26757      path="$BOOT_JDK"
26758      has_space=`$ECHO "$path" | $GREP " "`
26759      if test "x$has_space" != x; then
26760        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26761$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26762        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26763      fi
26764
26765      # Use eval to expand a potential ~
26766      eval path="$path"
26767      if test ! -f "$path" && test ! -d "$path"; then
26768        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26769      fi
26770
26771      if test -d "$path"; then
26772        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26773      else
26774        dir="`$DIRNAME "$path"`"
26775        base="`$BASENAME "$path"`"
26776        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26777      fi
26778    fi
26779  fi
26780
26781            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26782$as_echo_n "checking for Boot JDK... " >&6; }
26783            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26784$as_echo "$BOOT_JDK" >&6; }
26785            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26786$as_echo_n "checking Boot JDK version... " >&6; }
26787            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26788            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26789$as_echo "$BOOT_JDK_VERSION" >&6; }
26790          fi # end check jdk version
26791        fi # end check javac
26792      fi # end check java
26793    fi # end check boot jdk found
26794  fi
26795
26796    done
26797  fi
26798
26799  fi
26800
26801
26802    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26803    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26804      # Do we have a bin/java?
26805      if test ! -x "$BOOT_JDK/bin/java"; then
26806        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26807$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26808        BOOT_JDK_FOUND=no
26809      else
26810        # Do we have a bin/javac?
26811        if test ! -x "$BOOT_JDK/bin/javac"; then
26812          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26813$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26814          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26815$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26816          BOOT_JDK_FOUND=no
26817        else
26818          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26819          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26820
26821          # Extra M4 quote needed to protect [] in grep expression.
26822          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26823          if test "x$FOUND_CORRECT_VERSION" = x; then
26824            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26825$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26826            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26827$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26828            BOOT_JDK_FOUND=no
26829          else
26830            # We're done! :-)
26831            BOOT_JDK_FOUND=yes
26832
26833  # Only process if variable expands to non-empty
26834
26835  if test "x$BOOT_JDK" != x; then
26836    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26837
26838  # Input might be given as Windows format, start by converting to
26839  # unix format.
26840  path="$BOOT_JDK"
26841  new_path=`$CYGPATH -u "$path"`
26842
26843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26846  # "foo.exe" is OK but "foo" is an error.
26847  #
26848  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26849  # It is also a way to make sure we got the proper file name for the real test later on.
26850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26851  if test "x$test_shortpath" = x; then
26852    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26853$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26854    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26855  fi
26856
26857  # Call helper function which possibly converts this using DOS-style short mode.
26858  # If so, the updated path is stored in $new_path.
26859
26860  input_path="$new_path"
26861  # Check if we need to convert this using DOS-style short mode. If the path
26862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26863  # take no chances and rewrite it.
26864  # Note: m4 eats our [], so we need to use [ and ] instead.
26865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26866  if test "x$has_forbidden_chars" != x; then
26867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26871      # Going to short mode and back again did indeed matter. Since short mode is
26872      # case insensitive, let's make it lowercase to improve readability.
26873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26874      # Now convert it back to Unix-style (cygpath)
26875      input_path=`$CYGPATH -u "$shortmode_path"`
26876      new_path="$input_path"
26877    fi
26878  fi
26879
26880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26881  if test "x$test_cygdrive_prefix" = x; then
26882    # As a simple fix, exclude /usr/bin since it's not a real path.
26883    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26885      # a path prefixed by /cygdrive for fixpath to work.
26886      new_path="$CYGWIN_ROOT_PATH$input_path"
26887    fi
26888  fi
26889
26890
26891  if test "x$path" != "x$new_path"; then
26892    BOOT_JDK="$new_path"
26893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26894$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26895  fi
26896
26897    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26898
26899  path="$BOOT_JDK"
26900  has_colon=`$ECHO $path | $GREP ^.:`
26901  new_path="$path"
26902  if test "x$has_colon" = x; then
26903    # Not in mixed or Windows style, start by that.
26904    new_path=`cmd //c echo $path`
26905  fi
26906
26907
26908  input_path="$new_path"
26909  # Check if we need to convert this using DOS-style short mode. If the path
26910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26911  # take no chances and rewrite it.
26912  # Note: m4 eats our [], so we need to use [ and ] instead.
26913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26914  if test "x$has_forbidden_chars" != x; then
26915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26917  fi
26918
26919
26920  windows_path="$new_path"
26921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26922    unix_path=`$CYGPATH -u "$windows_path"`
26923    new_path="$unix_path"
26924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26926    new_path="$unix_path"
26927  fi
26928
26929  if test "x$path" != "x$new_path"; then
26930    BOOT_JDK="$new_path"
26931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26932$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26933  fi
26934
26935  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26936  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26937
26938    else
26939      # We're on a unix platform. Hooray! :)
26940      path="$BOOT_JDK"
26941      has_space=`$ECHO "$path" | $GREP " "`
26942      if test "x$has_space" != x; then
26943        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26944$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26945        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26946      fi
26947
26948      # Use eval to expand a potential ~
26949      eval path="$path"
26950      if test ! -f "$path" && test ! -d "$path"; then
26951        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26952      fi
26953
26954      if test -d "$path"; then
26955        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26956      else
26957        dir="`$DIRNAME "$path"`"
26958        base="`$BASENAME "$path"`"
26959        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26960      fi
26961    fi
26962  fi
26963
26964            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26965$as_echo_n "checking for Boot JDK... " >&6; }
26966            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26967$as_echo "$BOOT_JDK" >&6; }
26968            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26969$as_echo_n "checking Boot JDK version... " >&6; }
26970            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26971            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26972$as_echo "$BOOT_JDK_VERSION" >&6; }
26973          fi # end check jdk version
26974        fi # end check javac
26975      fi # end check java
26976    fi # end check boot jdk found
26977  fi
26978
26979
26980  if test "x$BOOT_JDK_FOUND" = xno; then
26981    # Now execute the test
26982
26983  if test "x$PROGRAMW6432" != x; then
26984    VIRTUAL_DIR="$PROGRAMW6432/Java"
26985
26986  windows_path="$VIRTUAL_DIR"
26987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26988    unix_path=`$CYGPATH -u "$windows_path"`
26989    VIRTUAL_DIR="$unix_path"
26990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26992    VIRTUAL_DIR="$unix_path"
26993  fi
26994
26995
26996  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26997  BOOT_JDK_SUFFIX=""
26998  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26999  if test "x$ALL_JDKS_FOUND" != x; then
27000    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27001
27002  if test "x$BOOT_JDK_FOUND" = xno; then
27003    # Now execute the test
27004
27005        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27006        if test -d "$BOOT_JDK"; then
27007          BOOT_JDK_FOUND=maybe
27008          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27009$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27010        fi
27011
27012
27013    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27014    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27015      # Do we have a bin/java?
27016      if test ! -x "$BOOT_JDK/bin/java"; then
27017        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27018$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27019        BOOT_JDK_FOUND=no
27020      else
27021        # Do we have a bin/javac?
27022        if test ! -x "$BOOT_JDK/bin/javac"; then
27023          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27024$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27025          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27026$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27027          BOOT_JDK_FOUND=no
27028        else
27029          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27030          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27031
27032          # Extra M4 quote needed to protect [] in grep expression.
27033          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27034          if test "x$FOUND_CORRECT_VERSION" = x; then
27035            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27036$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27037            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27038$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27039            BOOT_JDK_FOUND=no
27040          else
27041            # We're done! :-)
27042            BOOT_JDK_FOUND=yes
27043
27044  # Only process if variable expands to non-empty
27045
27046  if test "x$BOOT_JDK" != x; then
27047    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27048
27049  # Input might be given as Windows format, start by converting to
27050  # unix format.
27051  path="$BOOT_JDK"
27052  new_path=`$CYGPATH -u "$path"`
27053
27054  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27055  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27056  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27057  # "foo.exe" is OK but "foo" is an error.
27058  #
27059  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27060  # It is also a way to make sure we got the proper file name for the real test later on.
27061  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27062  if test "x$test_shortpath" = x; then
27063    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27064$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27065    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27066  fi
27067
27068  # Call helper function which possibly converts this using DOS-style short mode.
27069  # If so, the updated path is stored in $new_path.
27070
27071  input_path="$new_path"
27072  # Check if we need to convert this using DOS-style short mode. If the path
27073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27074  # take no chances and rewrite it.
27075  # Note: m4 eats our [], so we need to use [ and ] instead.
27076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27077  if test "x$has_forbidden_chars" != x; then
27078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27079    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27080    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27081    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27082      # Going to short mode and back again did indeed matter. Since short mode is
27083      # case insensitive, let's make it lowercase to improve readability.
27084      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27085      # Now convert it back to Unix-style (cygpath)
27086      input_path=`$CYGPATH -u "$shortmode_path"`
27087      new_path="$input_path"
27088    fi
27089  fi
27090
27091  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27092  if test "x$test_cygdrive_prefix" = x; then
27093    # As a simple fix, exclude /usr/bin since it's not a real path.
27094    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27095      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27096      # a path prefixed by /cygdrive for fixpath to work.
27097      new_path="$CYGWIN_ROOT_PATH$input_path"
27098    fi
27099  fi
27100
27101
27102  if test "x$path" != "x$new_path"; then
27103    BOOT_JDK="$new_path"
27104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27105$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27106  fi
27107
27108    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27109
27110  path="$BOOT_JDK"
27111  has_colon=`$ECHO $path | $GREP ^.:`
27112  new_path="$path"
27113  if test "x$has_colon" = x; then
27114    # Not in mixed or Windows style, start by that.
27115    new_path=`cmd //c echo $path`
27116  fi
27117
27118
27119  input_path="$new_path"
27120  # Check if we need to convert this using DOS-style short mode. If the path
27121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27122  # take no chances and rewrite it.
27123  # Note: m4 eats our [], so we need to use [ and ] instead.
27124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27125  if test "x$has_forbidden_chars" != x; then
27126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27127    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27128  fi
27129
27130
27131  windows_path="$new_path"
27132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27133    unix_path=`$CYGPATH -u "$windows_path"`
27134    new_path="$unix_path"
27135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27137    new_path="$unix_path"
27138  fi
27139
27140  if test "x$path" != "x$new_path"; then
27141    BOOT_JDK="$new_path"
27142    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27143$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27144  fi
27145
27146  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27147  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27148
27149    else
27150      # We're on a unix platform. Hooray! :)
27151      path="$BOOT_JDK"
27152      has_space=`$ECHO "$path" | $GREP " "`
27153      if test "x$has_space" != x; then
27154        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27155$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27156        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27157      fi
27158
27159      # Use eval to expand a potential ~
27160      eval path="$path"
27161      if test ! -f "$path" && test ! -d "$path"; then
27162        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27163      fi
27164
27165      if test -d "$path"; then
27166        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27167      else
27168        dir="`$DIRNAME "$path"`"
27169        base="`$BASENAME "$path"`"
27170        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27171      fi
27172    fi
27173  fi
27174
27175            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27176$as_echo_n "checking for Boot JDK... " >&6; }
27177            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27178$as_echo "$BOOT_JDK" >&6; }
27179            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27180$as_echo_n "checking Boot JDK version... " >&6; }
27181            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27182            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27183$as_echo "$BOOT_JDK_VERSION" >&6; }
27184          fi # end check jdk version
27185        fi # end check javac
27186      fi # end check java
27187    fi # end check boot jdk found
27188  fi
27189
27190    done
27191  fi
27192
27193  fi
27194
27195
27196    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27197    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27198      # Do we have a bin/java?
27199      if test ! -x "$BOOT_JDK/bin/java"; then
27200        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27201$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27202        BOOT_JDK_FOUND=no
27203      else
27204        # Do we have a bin/javac?
27205        if test ! -x "$BOOT_JDK/bin/javac"; then
27206          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27207$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27208          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27209$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27210          BOOT_JDK_FOUND=no
27211        else
27212          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27213          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27214
27215          # Extra M4 quote needed to protect [] in grep expression.
27216          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27217          if test "x$FOUND_CORRECT_VERSION" = x; then
27218            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27219$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27220            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27221$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27222            BOOT_JDK_FOUND=no
27223          else
27224            # We're done! :-)
27225            BOOT_JDK_FOUND=yes
27226
27227  # Only process if variable expands to non-empty
27228
27229  if test "x$BOOT_JDK" != x; then
27230    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27231
27232  # Input might be given as Windows format, start by converting to
27233  # unix format.
27234  path="$BOOT_JDK"
27235  new_path=`$CYGPATH -u "$path"`
27236
27237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27240  # "foo.exe" is OK but "foo" is an error.
27241  #
27242  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27243  # It is also a way to make sure we got the proper file name for the real test later on.
27244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27245  if test "x$test_shortpath" = x; then
27246    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27247$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27248    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27249  fi
27250
27251  # Call helper function which possibly converts this using DOS-style short mode.
27252  # If so, the updated path is stored in $new_path.
27253
27254  input_path="$new_path"
27255  # Check if we need to convert this using DOS-style short mode. If the path
27256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27257  # take no chances and rewrite it.
27258  # Note: m4 eats our [], so we need to use [ and ] instead.
27259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27260  if test "x$has_forbidden_chars" != x; then
27261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27262    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27263    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27264    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27265      # Going to short mode and back again did indeed matter. Since short mode is
27266      # case insensitive, let's make it lowercase to improve readability.
27267      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27268      # Now convert it back to Unix-style (cygpath)
27269      input_path=`$CYGPATH -u "$shortmode_path"`
27270      new_path="$input_path"
27271    fi
27272  fi
27273
27274  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27275  if test "x$test_cygdrive_prefix" = x; then
27276    # As a simple fix, exclude /usr/bin since it's not a real path.
27277    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27278      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27279      # a path prefixed by /cygdrive for fixpath to work.
27280      new_path="$CYGWIN_ROOT_PATH$input_path"
27281    fi
27282  fi
27283
27284
27285  if test "x$path" != "x$new_path"; then
27286    BOOT_JDK="$new_path"
27287    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27288$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27289  fi
27290
27291    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27292
27293  path="$BOOT_JDK"
27294  has_colon=`$ECHO $path | $GREP ^.:`
27295  new_path="$path"
27296  if test "x$has_colon" = x; then
27297    # Not in mixed or Windows style, start by that.
27298    new_path=`cmd //c echo $path`
27299  fi
27300
27301
27302  input_path="$new_path"
27303  # Check if we need to convert this using DOS-style short mode. If the path
27304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27305  # take no chances and rewrite it.
27306  # Note: m4 eats our [], so we need to use [ and ] instead.
27307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27308  if test "x$has_forbidden_chars" != x; then
27309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27310    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27311  fi
27312
27313
27314  windows_path="$new_path"
27315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27316    unix_path=`$CYGPATH -u "$windows_path"`
27317    new_path="$unix_path"
27318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27320    new_path="$unix_path"
27321  fi
27322
27323  if test "x$path" != "x$new_path"; then
27324    BOOT_JDK="$new_path"
27325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27326$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27327  fi
27328
27329  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27330  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27331
27332    else
27333      # We're on a unix platform. Hooray! :)
27334      path="$BOOT_JDK"
27335      has_space=`$ECHO "$path" | $GREP " "`
27336      if test "x$has_space" != x; then
27337        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27338$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27339        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27340      fi
27341
27342      # Use eval to expand a potential ~
27343      eval path="$path"
27344      if test ! -f "$path" && test ! -d "$path"; then
27345        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27346      fi
27347
27348      if test -d "$path"; then
27349        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27350      else
27351        dir="`$DIRNAME "$path"`"
27352        base="`$BASENAME "$path"`"
27353        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27354      fi
27355    fi
27356  fi
27357
27358            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27359$as_echo_n "checking for Boot JDK... " >&6; }
27360            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27361$as_echo "$BOOT_JDK" >&6; }
27362            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27363$as_echo_n "checking Boot JDK version... " >&6; }
27364            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27365            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27366$as_echo "$BOOT_JDK_VERSION" >&6; }
27367          fi # end check jdk version
27368        fi # end check javac
27369      fi # end check java
27370    fi # end check boot jdk found
27371  fi
27372
27373
27374  if test "x$BOOT_JDK_FOUND" = xno; then
27375    # Now execute the test
27376
27377  if test "x$PROGRAMFILES" != x; then
27378    VIRTUAL_DIR="$PROGRAMFILES/Java"
27379
27380  windows_path="$VIRTUAL_DIR"
27381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27382    unix_path=`$CYGPATH -u "$windows_path"`
27383    VIRTUAL_DIR="$unix_path"
27384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27386    VIRTUAL_DIR="$unix_path"
27387  fi
27388
27389
27390  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27391  BOOT_JDK_SUFFIX=""
27392  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27393  if test "x$ALL_JDKS_FOUND" != x; then
27394    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27395
27396  if test "x$BOOT_JDK_FOUND" = xno; then
27397    # Now execute the test
27398
27399        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27400        if test -d "$BOOT_JDK"; then
27401          BOOT_JDK_FOUND=maybe
27402          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27403$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27404        fi
27405
27406
27407    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27408    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27409      # Do we have a bin/java?
27410      if test ! -x "$BOOT_JDK/bin/java"; then
27411        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27412$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27413        BOOT_JDK_FOUND=no
27414      else
27415        # Do we have a bin/javac?
27416        if test ! -x "$BOOT_JDK/bin/javac"; then
27417          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27418$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27419          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27420$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27421          BOOT_JDK_FOUND=no
27422        else
27423          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27424          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27425
27426          # Extra M4 quote needed to protect [] in grep expression.
27427          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27428          if test "x$FOUND_CORRECT_VERSION" = x; then
27429            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27430$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27431            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27432$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27433            BOOT_JDK_FOUND=no
27434          else
27435            # We're done! :-)
27436            BOOT_JDK_FOUND=yes
27437
27438  # Only process if variable expands to non-empty
27439
27440  if test "x$BOOT_JDK" != x; then
27441    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27442
27443  # Input might be given as Windows format, start by converting to
27444  # unix format.
27445  path="$BOOT_JDK"
27446  new_path=`$CYGPATH -u "$path"`
27447
27448  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27449  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27450  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27451  # "foo.exe" is OK but "foo" is an error.
27452  #
27453  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27454  # It is also a way to make sure we got the proper file name for the real test later on.
27455  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27456  if test "x$test_shortpath" = x; then
27457    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27458$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27459    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27460  fi
27461
27462  # Call helper function which possibly converts this using DOS-style short mode.
27463  # If so, the updated path is stored in $new_path.
27464
27465  input_path="$new_path"
27466  # Check if we need to convert this using DOS-style short mode. If the path
27467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27468  # take no chances and rewrite it.
27469  # Note: m4 eats our [], so we need to use [ and ] instead.
27470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27471  if test "x$has_forbidden_chars" != x; then
27472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27473    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27474    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27475    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27476      # Going to short mode and back again did indeed matter. Since short mode is
27477      # case insensitive, let's make it lowercase to improve readability.
27478      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27479      # Now convert it back to Unix-style (cygpath)
27480      input_path=`$CYGPATH -u "$shortmode_path"`
27481      new_path="$input_path"
27482    fi
27483  fi
27484
27485  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27486  if test "x$test_cygdrive_prefix" = x; then
27487    # As a simple fix, exclude /usr/bin since it's not a real path.
27488    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27489      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27490      # a path prefixed by /cygdrive for fixpath to work.
27491      new_path="$CYGWIN_ROOT_PATH$input_path"
27492    fi
27493  fi
27494
27495
27496  if test "x$path" != "x$new_path"; then
27497    BOOT_JDK="$new_path"
27498    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27499$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27500  fi
27501
27502    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27503
27504  path="$BOOT_JDK"
27505  has_colon=`$ECHO $path | $GREP ^.:`
27506  new_path="$path"
27507  if test "x$has_colon" = x; then
27508    # Not in mixed or Windows style, start by that.
27509    new_path=`cmd //c echo $path`
27510  fi
27511
27512
27513  input_path="$new_path"
27514  # Check if we need to convert this using DOS-style short mode. If the path
27515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27516  # take no chances and rewrite it.
27517  # Note: m4 eats our [], so we need to use [ and ] instead.
27518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27519  if test "x$has_forbidden_chars" != x; then
27520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27521    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27522  fi
27523
27524
27525  windows_path="$new_path"
27526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27527    unix_path=`$CYGPATH -u "$windows_path"`
27528    new_path="$unix_path"
27529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27531    new_path="$unix_path"
27532  fi
27533
27534  if test "x$path" != "x$new_path"; then
27535    BOOT_JDK="$new_path"
27536    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27537$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27538  fi
27539
27540  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27541  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27542
27543    else
27544      # We're on a unix platform. Hooray! :)
27545      path="$BOOT_JDK"
27546      has_space=`$ECHO "$path" | $GREP " "`
27547      if test "x$has_space" != x; then
27548        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27549$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27550        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27551      fi
27552
27553      # Use eval to expand a potential ~
27554      eval path="$path"
27555      if test ! -f "$path" && test ! -d "$path"; then
27556        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27557      fi
27558
27559      if test -d "$path"; then
27560        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27561      else
27562        dir="`$DIRNAME "$path"`"
27563        base="`$BASENAME "$path"`"
27564        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27565      fi
27566    fi
27567  fi
27568
27569            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27570$as_echo_n "checking for Boot JDK... " >&6; }
27571            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27572$as_echo "$BOOT_JDK" >&6; }
27573            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27574$as_echo_n "checking Boot JDK version... " >&6; }
27575            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27576            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27577$as_echo "$BOOT_JDK_VERSION" >&6; }
27578          fi # end check jdk version
27579        fi # end check javac
27580      fi # end check java
27581    fi # end check boot jdk found
27582  fi
27583
27584    done
27585  fi
27586
27587  fi
27588
27589
27590    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27591    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27592      # Do we have a bin/java?
27593      if test ! -x "$BOOT_JDK/bin/java"; then
27594        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27596        BOOT_JDK_FOUND=no
27597      else
27598        # Do we have a bin/javac?
27599        if test ! -x "$BOOT_JDK/bin/javac"; then
27600          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27601$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27602          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27603$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27604          BOOT_JDK_FOUND=no
27605        else
27606          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27607          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27608
27609          # Extra M4 quote needed to protect [] in grep expression.
27610          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27611          if test "x$FOUND_CORRECT_VERSION" = x; then
27612            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27613$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27614            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27615$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27616            BOOT_JDK_FOUND=no
27617          else
27618            # We're done! :-)
27619            BOOT_JDK_FOUND=yes
27620
27621  # Only process if variable expands to non-empty
27622
27623  if test "x$BOOT_JDK" != x; then
27624    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27625
27626  # Input might be given as Windows format, start by converting to
27627  # unix format.
27628  path="$BOOT_JDK"
27629  new_path=`$CYGPATH -u "$path"`
27630
27631  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27632  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27633  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27634  # "foo.exe" is OK but "foo" is an error.
27635  #
27636  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27637  # It is also a way to make sure we got the proper file name for the real test later on.
27638  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27639  if test "x$test_shortpath" = x; then
27640    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27641$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27642    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27643  fi
27644
27645  # Call helper function which possibly converts this using DOS-style short mode.
27646  # If so, the updated path is stored in $new_path.
27647
27648  input_path="$new_path"
27649  # Check if we need to convert this using DOS-style short mode. If the path
27650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27651  # take no chances and rewrite it.
27652  # Note: m4 eats our [], so we need to use [ and ] instead.
27653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27654  if test "x$has_forbidden_chars" != x; then
27655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27656    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27657    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27658    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27659      # Going to short mode and back again did indeed matter. Since short mode is
27660      # case insensitive, let's make it lowercase to improve readability.
27661      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27662      # Now convert it back to Unix-style (cygpath)
27663      input_path=`$CYGPATH -u "$shortmode_path"`
27664      new_path="$input_path"
27665    fi
27666  fi
27667
27668  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27669  if test "x$test_cygdrive_prefix" = x; then
27670    # As a simple fix, exclude /usr/bin since it's not a real path.
27671    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27672      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27673      # a path prefixed by /cygdrive for fixpath to work.
27674      new_path="$CYGWIN_ROOT_PATH$input_path"
27675    fi
27676  fi
27677
27678
27679  if test "x$path" != "x$new_path"; then
27680    BOOT_JDK="$new_path"
27681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27682$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27683  fi
27684
27685    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27686
27687  path="$BOOT_JDK"
27688  has_colon=`$ECHO $path | $GREP ^.:`
27689  new_path="$path"
27690  if test "x$has_colon" = x; then
27691    # Not in mixed or Windows style, start by that.
27692    new_path=`cmd //c echo $path`
27693  fi
27694
27695
27696  input_path="$new_path"
27697  # Check if we need to convert this using DOS-style short mode. If the path
27698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27699  # take no chances and rewrite it.
27700  # Note: m4 eats our [], so we need to use [ and ] instead.
27701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27702  if test "x$has_forbidden_chars" != x; then
27703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27704    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27705  fi
27706
27707
27708  windows_path="$new_path"
27709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27710    unix_path=`$CYGPATH -u "$windows_path"`
27711    new_path="$unix_path"
27712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27714    new_path="$unix_path"
27715  fi
27716
27717  if test "x$path" != "x$new_path"; then
27718    BOOT_JDK="$new_path"
27719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27720$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27721  fi
27722
27723  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27724  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27725
27726    else
27727      # We're on a unix platform. Hooray! :)
27728      path="$BOOT_JDK"
27729      has_space=`$ECHO "$path" | $GREP " "`
27730      if test "x$has_space" != x; then
27731        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27732$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27733        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27734      fi
27735
27736      # Use eval to expand a potential ~
27737      eval path="$path"
27738      if test ! -f "$path" && test ! -d "$path"; then
27739        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27740      fi
27741
27742      if test -d "$path"; then
27743        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27744      else
27745        dir="`$DIRNAME "$path"`"
27746        base="`$BASENAME "$path"`"
27747        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27748      fi
27749    fi
27750  fi
27751
27752            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27753$as_echo_n "checking for Boot JDK... " >&6; }
27754            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27755$as_echo "$BOOT_JDK" >&6; }
27756            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27757$as_echo_n "checking Boot JDK version... " >&6; }
27758            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27759            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27760$as_echo "$BOOT_JDK_VERSION" >&6; }
27761          fi # end check jdk version
27762        fi # end check javac
27763      fi # end check java
27764    fi # end check boot jdk found
27765  fi
27766
27767
27768  if test "x$BOOT_JDK_FOUND" = xno; then
27769    # Now execute the test
27770
27771  if test "x$ProgramFiles" != x; then
27772    VIRTUAL_DIR="$ProgramFiles/Java"
27773
27774  windows_path="$VIRTUAL_DIR"
27775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27776    unix_path=`$CYGPATH -u "$windows_path"`
27777    VIRTUAL_DIR="$unix_path"
27778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27780    VIRTUAL_DIR="$unix_path"
27781  fi
27782
27783
27784  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27785  BOOT_JDK_SUFFIX=""
27786  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27787  if test "x$ALL_JDKS_FOUND" != x; then
27788    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27789
27790  if test "x$BOOT_JDK_FOUND" = xno; then
27791    # Now execute the test
27792
27793        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27794        if test -d "$BOOT_JDK"; then
27795          BOOT_JDK_FOUND=maybe
27796          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27797$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27798        fi
27799
27800
27801    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27802    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27803      # Do we have a bin/java?
27804      if test ! -x "$BOOT_JDK/bin/java"; then
27805        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27807        BOOT_JDK_FOUND=no
27808      else
27809        # Do we have a bin/javac?
27810        if test ! -x "$BOOT_JDK/bin/javac"; then
27811          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27812$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27813          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27814$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27815          BOOT_JDK_FOUND=no
27816        else
27817          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27818          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27819
27820          # Extra M4 quote needed to protect [] in grep expression.
27821          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27822          if test "x$FOUND_CORRECT_VERSION" = x; then
27823            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27824$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27825            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27826$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27827            BOOT_JDK_FOUND=no
27828          else
27829            # We're done! :-)
27830            BOOT_JDK_FOUND=yes
27831
27832  # Only process if variable expands to non-empty
27833
27834  if test "x$BOOT_JDK" != x; then
27835    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27836
27837  # Input might be given as Windows format, start by converting to
27838  # unix format.
27839  path="$BOOT_JDK"
27840  new_path=`$CYGPATH -u "$path"`
27841
27842  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27843  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27844  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27845  # "foo.exe" is OK but "foo" is an error.
27846  #
27847  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27848  # It is also a way to make sure we got the proper file name for the real test later on.
27849  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27850  if test "x$test_shortpath" = x; then
27851    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27852$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27853    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27854  fi
27855
27856  # Call helper function which possibly converts this using DOS-style short mode.
27857  # If so, the updated path is stored in $new_path.
27858
27859  input_path="$new_path"
27860  # Check if we need to convert this using DOS-style short mode. If the path
27861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27862  # take no chances and rewrite it.
27863  # Note: m4 eats our [], so we need to use [ and ] instead.
27864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27865  if test "x$has_forbidden_chars" != x; then
27866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27867    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27868    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27869    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27870      # Going to short mode and back again did indeed matter. Since short mode is
27871      # case insensitive, let's make it lowercase to improve readability.
27872      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27873      # Now convert it back to Unix-style (cygpath)
27874      input_path=`$CYGPATH -u "$shortmode_path"`
27875      new_path="$input_path"
27876    fi
27877  fi
27878
27879  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27880  if test "x$test_cygdrive_prefix" = x; then
27881    # As a simple fix, exclude /usr/bin since it's not a real path.
27882    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27883      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27884      # a path prefixed by /cygdrive for fixpath to work.
27885      new_path="$CYGWIN_ROOT_PATH$input_path"
27886    fi
27887  fi
27888
27889
27890  if test "x$path" != "x$new_path"; then
27891    BOOT_JDK="$new_path"
27892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27893$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27894  fi
27895
27896    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27897
27898  path="$BOOT_JDK"
27899  has_colon=`$ECHO $path | $GREP ^.:`
27900  new_path="$path"
27901  if test "x$has_colon" = x; then
27902    # Not in mixed or Windows style, start by that.
27903    new_path=`cmd //c echo $path`
27904  fi
27905
27906
27907  input_path="$new_path"
27908  # Check if we need to convert this using DOS-style short mode. If the path
27909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27910  # take no chances and rewrite it.
27911  # Note: m4 eats our [], so we need to use [ and ] instead.
27912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27913  if test "x$has_forbidden_chars" != x; then
27914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27915    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27916  fi
27917
27918
27919  windows_path="$new_path"
27920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27921    unix_path=`$CYGPATH -u "$windows_path"`
27922    new_path="$unix_path"
27923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27925    new_path="$unix_path"
27926  fi
27927
27928  if test "x$path" != "x$new_path"; then
27929    BOOT_JDK="$new_path"
27930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27931$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27932  fi
27933
27934  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27935  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27936
27937    else
27938      # We're on a unix platform. Hooray! :)
27939      path="$BOOT_JDK"
27940      has_space=`$ECHO "$path" | $GREP " "`
27941      if test "x$has_space" != x; then
27942        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27943$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27944        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27945      fi
27946
27947      # Use eval to expand a potential ~
27948      eval path="$path"
27949      if test ! -f "$path" && test ! -d "$path"; then
27950        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27951      fi
27952
27953      if test -d "$path"; then
27954        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27955      else
27956        dir="`$DIRNAME "$path"`"
27957        base="`$BASENAME "$path"`"
27958        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27959      fi
27960    fi
27961  fi
27962
27963            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27964$as_echo_n "checking for Boot JDK... " >&6; }
27965            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27966$as_echo "$BOOT_JDK" >&6; }
27967            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27968$as_echo_n "checking Boot JDK version... " >&6; }
27969            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27970            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27971$as_echo "$BOOT_JDK_VERSION" >&6; }
27972          fi # end check jdk version
27973        fi # end check javac
27974      fi # end check java
27975    fi # end check boot jdk found
27976  fi
27977
27978    done
27979  fi
27980
27981  fi
27982
27983
27984    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27985    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27986      # Do we have a bin/java?
27987      if test ! -x "$BOOT_JDK/bin/java"; then
27988        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27989$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27990        BOOT_JDK_FOUND=no
27991      else
27992        # Do we have a bin/javac?
27993        if test ! -x "$BOOT_JDK/bin/javac"; then
27994          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27996          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27997$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27998          BOOT_JDK_FOUND=no
27999        else
28000          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28001          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28002
28003          # Extra M4 quote needed to protect [] in grep expression.
28004          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28005          if test "x$FOUND_CORRECT_VERSION" = x; then
28006            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28007$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28008            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28009$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28010            BOOT_JDK_FOUND=no
28011          else
28012            # We're done! :-)
28013            BOOT_JDK_FOUND=yes
28014
28015  # Only process if variable expands to non-empty
28016
28017  if test "x$BOOT_JDK" != x; then
28018    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28019
28020  # Input might be given as Windows format, start by converting to
28021  # unix format.
28022  path="$BOOT_JDK"
28023  new_path=`$CYGPATH -u "$path"`
28024
28025  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28026  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28027  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28028  # "foo.exe" is OK but "foo" is an error.
28029  #
28030  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28031  # It is also a way to make sure we got the proper file name for the real test later on.
28032  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28033  if test "x$test_shortpath" = x; then
28034    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28035$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28036    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28037  fi
28038
28039  # Call helper function which possibly converts this using DOS-style short mode.
28040  # If so, the updated path is stored in $new_path.
28041
28042  input_path="$new_path"
28043  # Check if we need to convert this using DOS-style short mode. If the path
28044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28045  # take no chances and rewrite it.
28046  # Note: m4 eats our [], so we need to use [ and ] instead.
28047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28048  if test "x$has_forbidden_chars" != x; then
28049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28050    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28051    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28052    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28053      # Going to short mode and back again did indeed matter. Since short mode is
28054      # case insensitive, let's make it lowercase to improve readability.
28055      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28056      # Now convert it back to Unix-style (cygpath)
28057      input_path=`$CYGPATH -u "$shortmode_path"`
28058      new_path="$input_path"
28059    fi
28060  fi
28061
28062  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28063  if test "x$test_cygdrive_prefix" = x; then
28064    # As a simple fix, exclude /usr/bin since it's not a real path.
28065    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28066      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28067      # a path prefixed by /cygdrive for fixpath to work.
28068      new_path="$CYGWIN_ROOT_PATH$input_path"
28069    fi
28070  fi
28071
28072
28073  if test "x$path" != "x$new_path"; then
28074    BOOT_JDK="$new_path"
28075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28076$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28077  fi
28078
28079    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28080
28081  path="$BOOT_JDK"
28082  has_colon=`$ECHO $path | $GREP ^.:`
28083  new_path="$path"
28084  if test "x$has_colon" = x; then
28085    # Not in mixed or Windows style, start by that.
28086    new_path=`cmd //c echo $path`
28087  fi
28088
28089
28090  input_path="$new_path"
28091  # Check if we need to convert this using DOS-style short mode. If the path
28092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28093  # take no chances and rewrite it.
28094  # Note: m4 eats our [], so we need to use [ and ] instead.
28095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28096  if test "x$has_forbidden_chars" != x; then
28097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28098    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28099  fi
28100
28101
28102  windows_path="$new_path"
28103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28104    unix_path=`$CYGPATH -u "$windows_path"`
28105    new_path="$unix_path"
28106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28108    new_path="$unix_path"
28109  fi
28110
28111  if test "x$path" != "x$new_path"; then
28112    BOOT_JDK="$new_path"
28113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28114$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28115  fi
28116
28117  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28118  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28119
28120    else
28121      # We're on a unix platform. Hooray! :)
28122      path="$BOOT_JDK"
28123      has_space=`$ECHO "$path" | $GREP " "`
28124      if test "x$has_space" != x; then
28125        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28126$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28127        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28128      fi
28129
28130      # Use eval to expand a potential ~
28131      eval path="$path"
28132      if test ! -f "$path" && test ! -d "$path"; then
28133        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28134      fi
28135
28136      if test -d "$path"; then
28137        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28138      else
28139        dir="`$DIRNAME "$path"`"
28140        base="`$BASENAME "$path"`"
28141        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28142      fi
28143    fi
28144  fi
28145
28146            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28147$as_echo_n "checking for Boot JDK... " >&6; }
28148            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28149$as_echo "$BOOT_JDK" >&6; }
28150            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28151$as_echo_n "checking Boot JDK version... " >&6; }
28152            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28153            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28154$as_echo "$BOOT_JDK_VERSION" >&6; }
28155          fi # end check jdk version
28156        fi # end check javac
28157      fi # end check java
28158    fi # end check boot jdk found
28159  fi
28160
28161
28162  if test "x$BOOT_JDK_FOUND" = xno; then
28163    # Now execute the test
28164
28165  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28166  BOOT_JDK_SUFFIX=""
28167  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28168  if test "x$ALL_JDKS_FOUND" != x; then
28169    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28170
28171  if test "x$BOOT_JDK_FOUND" = xno; then
28172    # Now execute the test
28173
28174        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28175        if test -d "$BOOT_JDK"; then
28176          BOOT_JDK_FOUND=maybe
28177          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28178$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28179        fi
28180
28181
28182    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28183    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28184      # Do we have a bin/java?
28185      if test ! -x "$BOOT_JDK/bin/java"; then
28186        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28187$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28188        BOOT_JDK_FOUND=no
28189      else
28190        # Do we have a bin/javac?
28191        if test ! -x "$BOOT_JDK/bin/javac"; then
28192          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28193$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28194          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28195$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28196          BOOT_JDK_FOUND=no
28197        else
28198          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28199          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28200
28201          # Extra M4 quote needed to protect [] in grep expression.
28202          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28203          if test "x$FOUND_CORRECT_VERSION" = x; then
28204            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28206            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28207$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28208            BOOT_JDK_FOUND=no
28209          else
28210            # We're done! :-)
28211            BOOT_JDK_FOUND=yes
28212
28213  # Only process if variable expands to non-empty
28214
28215  if test "x$BOOT_JDK" != x; then
28216    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28217
28218  # Input might be given as Windows format, start by converting to
28219  # unix format.
28220  path="$BOOT_JDK"
28221  new_path=`$CYGPATH -u "$path"`
28222
28223  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28224  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28225  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28226  # "foo.exe" is OK but "foo" is an error.
28227  #
28228  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28229  # It is also a way to make sure we got the proper file name for the real test later on.
28230  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28231  if test "x$test_shortpath" = x; then
28232    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28233$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28234    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28235  fi
28236
28237  # Call helper function which possibly converts this using DOS-style short mode.
28238  # If so, the updated path is stored in $new_path.
28239
28240  input_path="$new_path"
28241  # Check if we need to convert this using DOS-style short mode. If the path
28242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28243  # take no chances and rewrite it.
28244  # Note: m4 eats our [], so we need to use [ and ] instead.
28245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28246  if test "x$has_forbidden_chars" != x; then
28247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28248    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28249    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28250    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28251      # Going to short mode and back again did indeed matter. Since short mode is
28252      # case insensitive, let's make it lowercase to improve readability.
28253      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28254      # Now convert it back to Unix-style (cygpath)
28255      input_path=`$CYGPATH -u "$shortmode_path"`
28256      new_path="$input_path"
28257    fi
28258  fi
28259
28260  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28261  if test "x$test_cygdrive_prefix" = x; then
28262    # As a simple fix, exclude /usr/bin since it's not a real path.
28263    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28264      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28265      # a path prefixed by /cygdrive for fixpath to work.
28266      new_path="$CYGWIN_ROOT_PATH$input_path"
28267    fi
28268  fi
28269
28270
28271  if test "x$path" != "x$new_path"; then
28272    BOOT_JDK="$new_path"
28273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28274$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28275  fi
28276
28277    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28278
28279  path="$BOOT_JDK"
28280  has_colon=`$ECHO $path | $GREP ^.:`
28281  new_path="$path"
28282  if test "x$has_colon" = x; then
28283    # Not in mixed or Windows style, start by that.
28284    new_path=`cmd //c echo $path`
28285  fi
28286
28287
28288  input_path="$new_path"
28289  # Check if we need to convert this using DOS-style short mode. If the path
28290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28291  # take no chances and rewrite it.
28292  # Note: m4 eats our [], so we need to use [ and ] instead.
28293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28294  if test "x$has_forbidden_chars" != x; then
28295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28296    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28297  fi
28298
28299
28300  windows_path="$new_path"
28301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28302    unix_path=`$CYGPATH -u "$windows_path"`
28303    new_path="$unix_path"
28304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28306    new_path="$unix_path"
28307  fi
28308
28309  if test "x$path" != "x$new_path"; then
28310    BOOT_JDK="$new_path"
28311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28312$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28313  fi
28314
28315  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28316  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28317
28318    else
28319      # We're on a unix platform. Hooray! :)
28320      path="$BOOT_JDK"
28321      has_space=`$ECHO "$path" | $GREP " "`
28322      if test "x$has_space" != x; then
28323        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28324$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28325        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28326      fi
28327
28328      # Use eval to expand a potential ~
28329      eval path="$path"
28330      if test ! -f "$path" && test ! -d "$path"; then
28331        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28332      fi
28333
28334      if test -d "$path"; then
28335        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28336      else
28337        dir="`$DIRNAME "$path"`"
28338        base="`$BASENAME "$path"`"
28339        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28340      fi
28341    fi
28342  fi
28343
28344            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28345$as_echo_n "checking for Boot JDK... " >&6; }
28346            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28347$as_echo "$BOOT_JDK" >&6; }
28348            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28349$as_echo_n "checking Boot JDK version... " >&6; }
28350            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28351            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28352$as_echo "$BOOT_JDK_VERSION" >&6; }
28353          fi # end check jdk version
28354        fi # end check javac
28355      fi # end check java
28356    fi # end check boot jdk found
28357  fi
28358
28359    done
28360  fi
28361
28362
28363    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28364    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28365      # Do we have a bin/java?
28366      if test ! -x "$BOOT_JDK/bin/java"; then
28367        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28368$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28369        BOOT_JDK_FOUND=no
28370      else
28371        # Do we have a bin/javac?
28372        if test ! -x "$BOOT_JDK/bin/javac"; then
28373          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28374$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28375          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28376$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28377          BOOT_JDK_FOUND=no
28378        else
28379          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28380          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28381
28382          # Extra M4 quote needed to protect [] in grep expression.
28383          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28384          if test "x$FOUND_CORRECT_VERSION" = x; then
28385            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28386$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28387            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28388$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28389            BOOT_JDK_FOUND=no
28390          else
28391            # We're done! :-)
28392            BOOT_JDK_FOUND=yes
28393
28394  # Only process if variable expands to non-empty
28395
28396  if test "x$BOOT_JDK" != x; then
28397    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28398
28399  # Input might be given as Windows format, start by converting to
28400  # unix format.
28401  path="$BOOT_JDK"
28402  new_path=`$CYGPATH -u "$path"`
28403
28404  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28405  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28406  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28407  # "foo.exe" is OK but "foo" is an error.
28408  #
28409  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28410  # It is also a way to make sure we got the proper file name for the real test later on.
28411  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28412  if test "x$test_shortpath" = x; then
28413    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28414$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28415    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28416  fi
28417
28418  # Call helper function which possibly converts this using DOS-style short mode.
28419  # If so, the updated path is stored in $new_path.
28420
28421  input_path="$new_path"
28422  # Check if we need to convert this using DOS-style short mode. If the path
28423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28424  # take no chances and rewrite it.
28425  # Note: m4 eats our [], so we need to use [ and ] instead.
28426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28427  if test "x$has_forbidden_chars" != x; then
28428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28429    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28430    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28431    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28432      # Going to short mode and back again did indeed matter. Since short mode is
28433      # case insensitive, let's make it lowercase to improve readability.
28434      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28435      # Now convert it back to Unix-style (cygpath)
28436      input_path=`$CYGPATH -u "$shortmode_path"`
28437      new_path="$input_path"
28438    fi
28439  fi
28440
28441  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28442  if test "x$test_cygdrive_prefix" = x; then
28443    # As a simple fix, exclude /usr/bin since it's not a real path.
28444    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28445      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28446      # a path prefixed by /cygdrive for fixpath to work.
28447      new_path="$CYGWIN_ROOT_PATH$input_path"
28448    fi
28449  fi
28450
28451
28452  if test "x$path" != "x$new_path"; then
28453    BOOT_JDK="$new_path"
28454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28455$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28456  fi
28457
28458    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28459
28460  path="$BOOT_JDK"
28461  has_colon=`$ECHO $path | $GREP ^.:`
28462  new_path="$path"
28463  if test "x$has_colon" = x; then
28464    # Not in mixed or Windows style, start by that.
28465    new_path=`cmd //c echo $path`
28466  fi
28467
28468
28469  input_path="$new_path"
28470  # Check if we need to convert this using DOS-style short mode. If the path
28471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28472  # take no chances and rewrite it.
28473  # Note: m4 eats our [], so we need to use [ and ] instead.
28474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28475  if test "x$has_forbidden_chars" != x; then
28476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28478  fi
28479
28480
28481  windows_path="$new_path"
28482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28483    unix_path=`$CYGPATH -u "$windows_path"`
28484    new_path="$unix_path"
28485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28487    new_path="$unix_path"
28488  fi
28489
28490  if test "x$path" != "x$new_path"; then
28491    BOOT_JDK="$new_path"
28492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28493$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28494  fi
28495
28496  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28497  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28498
28499    else
28500      # We're on a unix platform. Hooray! :)
28501      path="$BOOT_JDK"
28502      has_space=`$ECHO "$path" | $GREP " "`
28503      if test "x$has_space" != x; then
28504        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28505$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28506        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28507      fi
28508
28509      # Use eval to expand a potential ~
28510      eval path="$path"
28511      if test ! -f "$path" && test ! -d "$path"; then
28512        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28513      fi
28514
28515      if test -d "$path"; then
28516        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28517      else
28518        dir="`$DIRNAME "$path"`"
28519        base="`$BASENAME "$path"`"
28520        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28521      fi
28522    fi
28523  fi
28524
28525            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28526$as_echo_n "checking for Boot JDK... " >&6; }
28527            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28528$as_echo "$BOOT_JDK" >&6; }
28529            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28530$as_echo_n "checking Boot JDK version... " >&6; }
28531            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28532            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28533$as_echo "$BOOT_JDK_VERSION" >&6; }
28534          fi # end check jdk version
28535        fi # end check javac
28536      fi # end check java
28537    fi # end check boot jdk found
28538  fi
28539
28540  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28541
28542  if test "x$BOOT_JDK_FOUND" = xno; then
28543    # Now execute the test
28544
28545  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28546  BOOT_JDK_SUFFIX="/Contents/Home"
28547  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28548  if test "x$ALL_JDKS_FOUND" != x; then
28549    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28550
28551  if test "x$BOOT_JDK_FOUND" = xno; then
28552    # Now execute the test
28553
28554        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28555        if test -d "$BOOT_JDK"; then
28556          BOOT_JDK_FOUND=maybe
28557          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28558$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28559        fi
28560
28561
28562    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28563    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28564      # Do we have a bin/java?
28565      if test ! -x "$BOOT_JDK/bin/java"; then
28566        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28567$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28568        BOOT_JDK_FOUND=no
28569      else
28570        # Do we have a bin/javac?
28571        if test ! -x "$BOOT_JDK/bin/javac"; then
28572          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28573$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28574          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28575$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28576          BOOT_JDK_FOUND=no
28577        else
28578          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28579          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28580
28581          # Extra M4 quote needed to protect [] in grep expression.
28582          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28583          if test "x$FOUND_CORRECT_VERSION" = x; then
28584            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28586            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28587$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28588            BOOT_JDK_FOUND=no
28589          else
28590            # We're done! :-)
28591            BOOT_JDK_FOUND=yes
28592
28593  # Only process if variable expands to non-empty
28594
28595  if test "x$BOOT_JDK" != x; then
28596    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28597
28598  # Input might be given as Windows format, start by converting to
28599  # unix format.
28600  path="$BOOT_JDK"
28601  new_path=`$CYGPATH -u "$path"`
28602
28603  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28604  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28605  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28606  # "foo.exe" is OK but "foo" is an error.
28607  #
28608  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28609  # It is also a way to make sure we got the proper file name for the real test later on.
28610  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28611  if test "x$test_shortpath" = x; then
28612    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28613$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28614    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28615  fi
28616
28617  # Call helper function which possibly converts this using DOS-style short mode.
28618  # If so, the updated path is stored in $new_path.
28619
28620  input_path="$new_path"
28621  # Check if we need to convert this using DOS-style short mode. If the path
28622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28623  # take no chances and rewrite it.
28624  # Note: m4 eats our [], so we need to use [ and ] instead.
28625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28626  if test "x$has_forbidden_chars" != x; then
28627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28628    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28629    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28630    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28631      # Going to short mode and back again did indeed matter. Since short mode is
28632      # case insensitive, let's make it lowercase to improve readability.
28633      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28634      # Now convert it back to Unix-style (cygpath)
28635      input_path=`$CYGPATH -u "$shortmode_path"`
28636      new_path="$input_path"
28637    fi
28638  fi
28639
28640  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28641  if test "x$test_cygdrive_prefix" = x; then
28642    # As a simple fix, exclude /usr/bin since it's not a real path.
28643    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28644      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28645      # a path prefixed by /cygdrive for fixpath to work.
28646      new_path="$CYGWIN_ROOT_PATH$input_path"
28647    fi
28648  fi
28649
28650
28651  if test "x$path" != "x$new_path"; then
28652    BOOT_JDK="$new_path"
28653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28654$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28655  fi
28656
28657    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28658
28659  path="$BOOT_JDK"
28660  has_colon=`$ECHO $path | $GREP ^.:`
28661  new_path="$path"
28662  if test "x$has_colon" = x; then
28663    # Not in mixed or Windows style, start by that.
28664    new_path=`cmd //c echo $path`
28665  fi
28666
28667
28668  input_path="$new_path"
28669  # Check if we need to convert this using DOS-style short mode. If the path
28670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28671  # take no chances and rewrite it.
28672  # Note: m4 eats our [], so we need to use [ and ] instead.
28673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28674  if test "x$has_forbidden_chars" != x; then
28675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28676    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28677  fi
28678
28679
28680  windows_path="$new_path"
28681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28682    unix_path=`$CYGPATH -u "$windows_path"`
28683    new_path="$unix_path"
28684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28686    new_path="$unix_path"
28687  fi
28688
28689  if test "x$path" != "x$new_path"; then
28690    BOOT_JDK="$new_path"
28691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28692$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28693  fi
28694
28695  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28696  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28697
28698    else
28699      # We're on a unix platform. Hooray! :)
28700      path="$BOOT_JDK"
28701      has_space=`$ECHO "$path" | $GREP " "`
28702      if test "x$has_space" != x; then
28703        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28704$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28705        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28706      fi
28707
28708      # Use eval to expand a potential ~
28709      eval path="$path"
28710      if test ! -f "$path" && test ! -d "$path"; then
28711        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28712      fi
28713
28714      if test -d "$path"; then
28715        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28716      else
28717        dir="`$DIRNAME "$path"`"
28718        base="`$BASENAME "$path"`"
28719        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28720      fi
28721    fi
28722  fi
28723
28724            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28725$as_echo_n "checking for Boot JDK... " >&6; }
28726            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28727$as_echo "$BOOT_JDK" >&6; }
28728            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28729$as_echo_n "checking Boot JDK version... " >&6; }
28730            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28731            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28732$as_echo "$BOOT_JDK_VERSION" >&6; }
28733          fi # end check jdk version
28734        fi # end check javac
28735      fi # end check java
28736    fi # end check boot jdk found
28737  fi
28738
28739    done
28740  fi
28741
28742
28743    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28744    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28745      # Do we have a bin/java?
28746      if test ! -x "$BOOT_JDK/bin/java"; then
28747        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28748$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28749        BOOT_JDK_FOUND=no
28750      else
28751        # Do we have a bin/javac?
28752        if test ! -x "$BOOT_JDK/bin/javac"; then
28753          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28754$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28755          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28756$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28757          BOOT_JDK_FOUND=no
28758        else
28759          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28760          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28761
28762          # Extra M4 quote needed to protect [] in grep expression.
28763          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28764          if test "x$FOUND_CORRECT_VERSION" = x; then
28765            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28766$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28767            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28768$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28769            BOOT_JDK_FOUND=no
28770          else
28771            # We're done! :-)
28772            BOOT_JDK_FOUND=yes
28773
28774  # Only process if variable expands to non-empty
28775
28776  if test "x$BOOT_JDK" != x; then
28777    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28778
28779  # Input might be given as Windows format, start by converting to
28780  # unix format.
28781  path="$BOOT_JDK"
28782  new_path=`$CYGPATH -u "$path"`
28783
28784  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28785  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28786  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28787  # "foo.exe" is OK but "foo" is an error.
28788  #
28789  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28790  # It is also a way to make sure we got the proper file name for the real test later on.
28791  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28792  if test "x$test_shortpath" = x; then
28793    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28794$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28795    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28796  fi
28797
28798  # Call helper function which possibly converts this using DOS-style short mode.
28799  # If so, the updated path is stored in $new_path.
28800
28801  input_path="$new_path"
28802  # Check if we need to convert this using DOS-style short mode. If the path
28803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28804  # take no chances and rewrite it.
28805  # Note: m4 eats our [], so we need to use [ and ] instead.
28806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28807  if test "x$has_forbidden_chars" != x; then
28808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28809    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28810    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28811    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28812      # Going to short mode and back again did indeed matter. Since short mode is
28813      # case insensitive, let's make it lowercase to improve readability.
28814      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28815      # Now convert it back to Unix-style (cygpath)
28816      input_path=`$CYGPATH -u "$shortmode_path"`
28817      new_path="$input_path"
28818    fi
28819  fi
28820
28821  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28822  if test "x$test_cygdrive_prefix" = x; then
28823    # As a simple fix, exclude /usr/bin since it's not a real path.
28824    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28825      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28826      # a path prefixed by /cygdrive for fixpath to work.
28827      new_path="$CYGWIN_ROOT_PATH$input_path"
28828    fi
28829  fi
28830
28831
28832  if test "x$path" != "x$new_path"; then
28833    BOOT_JDK="$new_path"
28834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28835$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28836  fi
28837
28838    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28839
28840  path="$BOOT_JDK"
28841  has_colon=`$ECHO $path | $GREP ^.:`
28842  new_path="$path"
28843  if test "x$has_colon" = x; then
28844    # Not in mixed or Windows style, start by that.
28845    new_path=`cmd //c echo $path`
28846  fi
28847
28848
28849  input_path="$new_path"
28850  # Check if we need to convert this using DOS-style short mode. If the path
28851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28852  # take no chances and rewrite it.
28853  # Note: m4 eats our [], so we need to use [ and ] instead.
28854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28855  if test "x$has_forbidden_chars" != x; then
28856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28857    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28858  fi
28859
28860
28861  windows_path="$new_path"
28862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28863    unix_path=`$CYGPATH -u "$windows_path"`
28864    new_path="$unix_path"
28865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28867    new_path="$unix_path"
28868  fi
28869
28870  if test "x$path" != "x$new_path"; then
28871    BOOT_JDK="$new_path"
28872    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28873$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28874  fi
28875
28876  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28877  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28878
28879    else
28880      # We're on a unix platform. Hooray! :)
28881      path="$BOOT_JDK"
28882      has_space=`$ECHO "$path" | $GREP " "`
28883      if test "x$has_space" != x; then
28884        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28885$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28886        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28887      fi
28888
28889      # Use eval to expand a potential ~
28890      eval path="$path"
28891      if test ! -f "$path" && test ! -d "$path"; then
28892        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28893      fi
28894
28895      if test -d "$path"; then
28896        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28897      else
28898        dir="`$DIRNAME "$path"`"
28899        base="`$BASENAME "$path"`"
28900        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28901      fi
28902    fi
28903  fi
28904
28905            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28906$as_echo_n "checking for Boot JDK... " >&6; }
28907            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28908$as_echo "$BOOT_JDK" >&6; }
28909            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28910$as_echo_n "checking Boot JDK version... " >&6; }
28911            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28912            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28913$as_echo "$BOOT_JDK_VERSION" >&6; }
28914          fi # end check jdk version
28915        fi # end check javac
28916      fi # end check java
28917    fi # end check boot jdk found
28918  fi
28919
28920
28921  if test "x$BOOT_JDK_FOUND" = xno; then
28922    # Now execute the test
28923
28924  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28925  BOOT_JDK_SUFFIX="/Contents/Home"
28926  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28927  if test "x$ALL_JDKS_FOUND" != x; then
28928    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28929
28930  if test "x$BOOT_JDK_FOUND" = xno; then
28931    # Now execute the test
28932
28933        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28934        if test -d "$BOOT_JDK"; then
28935          BOOT_JDK_FOUND=maybe
28936          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28937$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28938        fi
28939
28940
28941    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28942    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28943      # Do we have a bin/java?
28944      if test ! -x "$BOOT_JDK/bin/java"; then
28945        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28946$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28947        BOOT_JDK_FOUND=no
28948      else
28949        # Do we have a bin/javac?
28950        if test ! -x "$BOOT_JDK/bin/javac"; then
28951          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28952$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28953          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28954$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28955          BOOT_JDK_FOUND=no
28956        else
28957          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28958          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28959
28960          # Extra M4 quote needed to protect [] in grep expression.
28961          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28962          if test "x$FOUND_CORRECT_VERSION" = x; then
28963            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28964$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28965            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28966$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28967            BOOT_JDK_FOUND=no
28968          else
28969            # We're done! :-)
28970            BOOT_JDK_FOUND=yes
28971
28972  # Only process if variable expands to non-empty
28973
28974  if test "x$BOOT_JDK" != x; then
28975    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28976
28977  # Input might be given as Windows format, start by converting to
28978  # unix format.
28979  path="$BOOT_JDK"
28980  new_path=`$CYGPATH -u "$path"`
28981
28982  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28983  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28984  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28985  # "foo.exe" is OK but "foo" is an error.
28986  #
28987  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28988  # It is also a way to make sure we got the proper file name for the real test later on.
28989  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28990  if test "x$test_shortpath" = x; then
28991    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28992$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28993    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28994  fi
28995
28996  # Call helper function which possibly converts this using DOS-style short mode.
28997  # If so, the updated path is stored in $new_path.
28998
28999  input_path="$new_path"
29000  # Check if we need to convert this using DOS-style short mode. If the path
29001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29002  # take no chances and rewrite it.
29003  # Note: m4 eats our [], so we need to use [ and ] instead.
29004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29005  if test "x$has_forbidden_chars" != x; then
29006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29007    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29008    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29009    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29010      # Going to short mode and back again did indeed matter. Since short mode is
29011      # case insensitive, let's make it lowercase to improve readability.
29012      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29013      # Now convert it back to Unix-style (cygpath)
29014      input_path=`$CYGPATH -u "$shortmode_path"`
29015      new_path="$input_path"
29016    fi
29017  fi
29018
29019  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29020  if test "x$test_cygdrive_prefix" = x; then
29021    # As a simple fix, exclude /usr/bin since it's not a real path.
29022    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29023      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29024      # a path prefixed by /cygdrive for fixpath to work.
29025      new_path="$CYGWIN_ROOT_PATH$input_path"
29026    fi
29027  fi
29028
29029
29030  if test "x$path" != "x$new_path"; then
29031    BOOT_JDK="$new_path"
29032    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29033$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29034  fi
29035
29036    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29037
29038  path="$BOOT_JDK"
29039  has_colon=`$ECHO $path | $GREP ^.:`
29040  new_path="$path"
29041  if test "x$has_colon" = x; then
29042    # Not in mixed or Windows style, start by that.
29043    new_path=`cmd //c echo $path`
29044  fi
29045
29046
29047  input_path="$new_path"
29048  # Check if we need to convert this using DOS-style short mode. If the path
29049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29050  # take no chances and rewrite it.
29051  # Note: m4 eats our [], so we need to use [ and ] instead.
29052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29053  if test "x$has_forbidden_chars" != x; then
29054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29055    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29056  fi
29057
29058
29059  windows_path="$new_path"
29060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29061    unix_path=`$CYGPATH -u "$windows_path"`
29062    new_path="$unix_path"
29063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29065    new_path="$unix_path"
29066  fi
29067
29068  if test "x$path" != "x$new_path"; then
29069    BOOT_JDK="$new_path"
29070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29071$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29072  fi
29073
29074  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29075  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29076
29077    else
29078      # We're on a unix platform. Hooray! :)
29079      path="$BOOT_JDK"
29080      has_space=`$ECHO "$path" | $GREP " "`
29081      if test "x$has_space" != x; then
29082        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29083$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29084        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29085      fi
29086
29087      # Use eval to expand a potential ~
29088      eval path="$path"
29089      if test ! -f "$path" && test ! -d "$path"; then
29090        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29091      fi
29092
29093      if test -d "$path"; then
29094        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29095      else
29096        dir="`$DIRNAME "$path"`"
29097        base="`$BASENAME "$path"`"
29098        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29099      fi
29100    fi
29101  fi
29102
29103            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29104$as_echo_n "checking for Boot JDK... " >&6; }
29105            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29106$as_echo "$BOOT_JDK" >&6; }
29107            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29108$as_echo_n "checking Boot JDK version... " >&6; }
29109            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29110            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29111$as_echo "$BOOT_JDK_VERSION" >&6; }
29112          fi # end check jdk version
29113        fi # end check javac
29114      fi # end check java
29115    fi # end check boot jdk found
29116  fi
29117
29118    done
29119  fi
29120
29121
29122    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29123    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29124      # Do we have a bin/java?
29125      if test ! -x "$BOOT_JDK/bin/java"; then
29126        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29127$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29128        BOOT_JDK_FOUND=no
29129      else
29130        # Do we have a bin/javac?
29131        if test ! -x "$BOOT_JDK/bin/javac"; then
29132          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29133$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29134          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29135$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29136          BOOT_JDK_FOUND=no
29137        else
29138          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29139          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29140
29141          # Extra M4 quote needed to protect [] in grep expression.
29142          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29143          if test "x$FOUND_CORRECT_VERSION" = x; then
29144            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29145$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29146            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29147$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29148            BOOT_JDK_FOUND=no
29149          else
29150            # We're done! :-)
29151            BOOT_JDK_FOUND=yes
29152
29153  # Only process if variable expands to non-empty
29154
29155  if test "x$BOOT_JDK" != x; then
29156    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29157
29158  # Input might be given as Windows format, start by converting to
29159  # unix format.
29160  path="$BOOT_JDK"
29161  new_path=`$CYGPATH -u "$path"`
29162
29163  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29164  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29165  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29166  # "foo.exe" is OK but "foo" is an error.
29167  #
29168  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29169  # It is also a way to make sure we got the proper file name for the real test later on.
29170  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29171  if test "x$test_shortpath" = x; then
29172    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29173$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29174    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29175  fi
29176
29177  # Call helper function which possibly converts this using DOS-style short mode.
29178  # If so, the updated path is stored in $new_path.
29179
29180  input_path="$new_path"
29181  # Check if we need to convert this using DOS-style short mode. If the path
29182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29183  # take no chances and rewrite it.
29184  # Note: m4 eats our [], so we need to use [ and ] instead.
29185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29186  if test "x$has_forbidden_chars" != x; then
29187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29188    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29189    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29190    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29191      # Going to short mode and back again did indeed matter. Since short mode is
29192      # case insensitive, let's make it lowercase to improve readability.
29193      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29194      # Now convert it back to Unix-style (cygpath)
29195      input_path=`$CYGPATH -u "$shortmode_path"`
29196      new_path="$input_path"
29197    fi
29198  fi
29199
29200  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29201  if test "x$test_cygdrive_prefix" = x; then
29202    # As a simple fix, exclude /usr/bin since it's not a real path.
29203    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29204      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29205      # a path prefixed by /cygdrive for fixpath to work.
29206      new_path="$CYGWIN_ROOT_PATH$input_path"
29207    fi
29208  fi
29209
29210
29211  if test "x$path" != "x$new_path"; then
29212    BOOT_JDK="$new_path"
29213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29214$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29215  fi
29216
29217    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29218
29219  path="$BOOT_JDK"
29220  has_colon=`$ECHO $path | $GREP ^.:`
29221  new_path="$path"
29222  if test "x$has_colon" = x; then
29223    # Not in mixed or Windows style, start by that.
29224    new_path=`cmd //c echo $path`
29225  fi
29226
29227
29228  input_path="$new_path"
29229  # Check if we need to convert this using DOS-style short mode. If the path
29230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29231  # take no chances and rewrite it.
29232  # Note: m4 eats our [], so we need to use [ and ] instead.
29233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29234  if test "x$has_forbidden_chars" != x; then
29235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29236    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29237  fi
29238
29239
29240  windows_path="$new_path"
29241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29242    unix_path=`$CYGPATH -u "$windows_path"`
29243    new_path="$unix_path"
29244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29246    new_path="$unix_path"
29247  fi
29248
29249  if test "x$path" != "x$new_path"; then
29250    BOOT_JDK="$new_path"
29251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29252$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29253  fi
29254
29255  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29256  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29257
29258    else
29259      # We're on a unix platform. Hooray! :)
29260      path="$BOOT_JDK"
29261      has_space=`$ECHO "$path" | $GREP " "`
29262      if test "x$has_space" != x; then
29263        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29264$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29265        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29266      fi
29267
29268      # Use eval to expand a potential ~
29269      eval path="$path"
29270      if test ! -f "$path" && test ! -d "$path"; then
29271        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29272      fi
29273
29274      if test -d "$path"; then
29275        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29276      else
29277        dir="`$DIRNAME "$path"`"
29278        base="`$BASENAME "$path"`"
29279        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29280      fi
29281    fi
29282  fi
29283
29284            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29285$as_echo_n "checking for Boot JDK... " >&6; }
29286            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29287$as_echo "$BOOT_JDK" >&6; }
29288            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29289$as_echo_n "checking Boot JDK version... " >&6; }
29290            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29291            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29292$as_echo "$BOOT_JDK_VERSION" >&6; }
29293          fi # end check jdk version
29294        fi # end check javac
29295      fi # end check java
29296    fi # end check boot jdk found
29297  fi
29298
29299  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29300
29301  if test "x$BOOT_JDK_FOUND" = xno; then
29302    # Now execute the test
29303
29304  BOOT_JDK_PREFIX="/usr/lib/jvm"
29305  BOOT_JDK_SUFFIX=""
29306  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29307  if test "x$ALL_JDKS_FOUND" != x; then
29308    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29309
29310  if test "x$BOOT_JDK_FOUND" = xno; then
29311    # Now execute the test
29312
29313        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29314        if test -d "$BOOT_JDK"; then
29315          BOOT_JDK_FOUND=maybe
29316          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29317$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29318        fi
29319
29320
29321    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29322    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29323      # Do we have a bin/java?
29324      if test ! -x "$BOOT_JDK/bin/java"; then
29325        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29326$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29327        BOOT_JDK_FOUND=no
29328      else
29329        # Do we have a bin/javac?
29330        if test ! -x "$BOOT_JDK/bin/javac"; then
29331          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29332$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29333          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29334$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29335          BOOT_JDK_FOUND=no
29336        else
29337          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29338          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29339
29340          # Extra M4 quote needed to protect [] in grep expression.
29341          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29342          if test "x$FOUND_CORRECT_VERSION" = x; then
29343            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29344$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29345            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29346$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29347            BOOT_JDK_FOUND=no
29348          else
29349            # We're done! :-)
29350            BOOT_JDK_FOUND=yes
29351
29352  # Only process if variable expands to non-empty
29353
29354  if test "x$BOOT_JDK" != x; then
29355    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29356
29357  # Input might be given as Windows format, start by converting to
29358  # unix format.
29359  path="$BOOT_JDK"
29360  new_path=`$CYGPATH -u "$path"`
29361
29362  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29363  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29364  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29365  # "foo.exe" is OK but "foo" is an error.
29366  #
29367  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29368  # It is also a way to make sure we got the proper file name for the real test later on.
29369  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29370  if test "x$test_shortpath" = x; then
29371    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29372$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29373    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29374  fi
29375
29376  # Call helper function which possibly converts this using DOS-style short mode.
29377  # If so, the updated path is stored in $new_path.
29378
29379  input_path="$new_path"
29380  # Check if we need to convert this using DOS-style short mode. If the path
29381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29382  # take no chances and rewrite it.
29383  # Note: m4 eats our [], so we need to use [ and ] instead.
29384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29385  if test "x$has_forbidden_chars" != x; then
29386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29387    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29388    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29389    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29390      # Going to short mode and back again did indeed matter. Since short mode is
29391      # case insensitive, let's make it lowercase to improve readability.
29392      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29393      # Now convert it back to Unix-style (cygpath)
29394      input_path=`$CYGPATH -u "$shortmode_path"`
29395      new_path="$input_path"
29396    fi
29397  fi
29398
29399  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29400  if test "x$test_cygdrive_prefix" = x; then
29401    # As a simple fix, exclude /usr/bin since it's not a real path.
29402    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29403      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29404      # a path prefixed by /cygdrive for fixpath to work.
29405      new_path="$CYGWIN_ROOT_PATH$input_path"
29406    fi
29407  fi
29408
29409
29410  if test "x$path" != "x$new_path"; then
29411    BOOT_JDK="$new_path"
29412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29413$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29414  fi
29415
29416    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29417
29418  path="$BOOT_JDK"
29419  has_colon=`$ECHO $path | $GREP ^.:`
29420  new_path="$path"
29421  if test "x$has_colon" = x; then
29422    # Not in mixed or Windows style, start by that.
29423    new_path=`cmd //c echo $path`
29424  fi
29425
29426
29427  input_path="$new_path"
29428  # Check if we need to convert this using DOS-style short mode. If the path
29429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29430  # take no chances and rewrite it.
29431  # Note: m4 eats our [], so we need to use [ and ] instead.
29432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29433  if test "x$has_forbidden_chars" != x; then
29434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29435    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29436  fi
29437
29438
29439  windows_path="$new_path"
29440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29441    unix_path=`$CYGPATH -u "$windows_path"`
29442    new_path="$unix_path"
29443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29445    new_path="$unix_path"
29446  fi
29447
29448  if test "x$path" != "x$new_path"; then
29449    BOOT_JDK="$new_path"
29450    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29451$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29452  fi
29453
29454  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29455  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29456
29457    else
29458      # We're on a unix platform. Hooray! :)
29459      path="$BOOT_JDK"
29460      has_space=`$ECHO "$path" | $GREP " "`
29461      if test "x$has_space" != x; then
29462        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29463$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29464        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29465      fi
29466
29467      # Use eval to expand a potential ~
29468      eval path="$path"
29469      if test ! -f "$path" && test ! -d "$path"; then
29470        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29471      fi
29472
29473      if test -d "$path"; then
29474        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29475      else
29476        dir="`$DIRNAME "$path"`"
29477        base="`$BASENAME "$path"`"
29478        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29479      fi
29480    fi
29481  fi
29482
29483            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29484$as_echo_n "checking for Boot JDK... " >&6; }
29485            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29486$as_echo "$BOOT_JDK" >&6; }
29487            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29488$as_echo_n "checking Boot JDK version... " >&6; }
29489            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29490            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29491$as_echo "$BOOT_JDK_VERSION" >&6; }
29492          fi # end check jdk version
29493        fi # end check javac
29494      fi # end check java
29495    fi # end check boot jdk found
29496  fi
29497
29498    done
29499  fi
29500
29501
29502    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29503    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29504      # Do we have a bin/java?
29505      if test ! -x "$BOOT_JDK/bin/java"; then
29506        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29507$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29508        BOOT_JDK_FOUND=no
29509      else
29510        # Do we have a bin/javac?
29511        if test ! -x "$BOOT_JDK/bin/javac"; then
29512          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29513$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29514          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29515$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29516          BOOT_JDK_FOUND=no
29517        else
29518          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29519          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29520
29521          # Extra M4 quote needed to protect [] in grep expression.
29522          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29523          if test "x$FOUND_CORRECT_VERSION" = x; then
29524            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29525$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29526            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29527$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29528            BOOT_JDK_FOUND=no
29529          else
29530            # We're done! :-)
29531            BOOT_JDK_FOUND=yes
29532
29533  # Only process if variable expands to non-empty
29534
29535  if test "x$BOOT_JDK" != x; then
29536    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29537
29538  # Input might be given as Windows format, start by converting to
29539  # unix format.
29540  path="$BOOT_JDK"
29541  new_path=`$CYGPATH -u "$path"`
29542
29543  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29544  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29545  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29546  # "foo.exe" is OK but "foo" is an error.
29547  #
29548  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29549  # It is also a way to make sure we got the proper file name for the real test later on.
29550  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29551  if test "x$test_shortpath" = x; then
29552    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29553$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29554    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29555  fi
29556
29557  # Call helper function which possibly converts this using DOS-style short mode.
29558  # If so, the updated path is stored in $new_path.
29559
29560  input_path="$new_path"
29561  # Check if we need to convert this using DOS-style short mode. If the path
29562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29563  # take no chances and rewrite it.
29564  # Note: m4 eats our [], so we need to use [ and ] instead.
29565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29566  if test "x$has_forbidden_chars" != x; then
29567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29568    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29569    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29570    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29571      # Going to short mode and back again did indeed matter. Since short mode is
29572      # case insensitive, let's make it lowercase to improve readability.
29573      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29574      # Now convert it back to Unix-style (cygpath)
29575      input_path=`$CYGPATH -u "$shortmode_path"`
29576      new_path="$input_path"
29577    fi
29578  fi
29579
29580  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29581  if test "x$test_cygdrive_prefix" = x; then
29582    # As a simple fix, exclude /usr/bin since it's not a real path.
29583    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29584      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29585      # a path prefixed by /cygdrive for fixpath to work.
29586      new_path="$CYGWIN_ROOT_PATH$input_path"
29587    fi
29588  fi
29589
29590
29591  if test "x$path" != "x$new_path"; then
29592    BOOT_JDK="$new_path"
29593    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29594$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29595  fi
29596
29597    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29598
29599  path="$BOOT_JDK"
29600  has_colon=`$ECHO $path | $GREP ^.:`
29601  new_path="$path"
29602  if test "x$has_colon" = x; then
29603    # Not in mixed or Windows style, start by that.
29604    new_path=`cmd //c echo $path`
29605  fi
29606
29607
29608  input_path="$new_path"
29609  # Check if we need to convert this using DOS-style short mode. If the path
29610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29611  # take no chances and rewrite it.
29612  # Note: m4 eats our [], so we need to use [ and ] instead.
29613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29614  if test "x$has_forbidden_chars" != x; then
29615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29616    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29617  fi
29618
29619
29620  windows_path="$new_path"
29621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29622    unix_path=`$CYGPATH -u "$windows_path"`
29623    new_path="$unix_path"
29624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29626    new_path="$unix_path"
29627  fi
29628
29629  if test "x$path" != "x$new_path"; then
29630    BOOT_JDK="$new_path"
29631    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29632$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29633  fi
29634
29635  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29636  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29637
29638    else
29639      # We're on a unix platform. Hooray! :)
29640      path="$BOOT_JDK"
29641      has_space=`$ECHO "$path" | $GREP " "`
29642      if test "x$has_space" != x; then
29643        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29644$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29645        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29646      fi
29647
29648      # Use eval to expand a potential ~
29649      eval path="$path"
29650      if test ! -f "$path" && test ! -d "$path"; then
29651        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29652      fi
29653
29654      if test -d "$path"; then
29655        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29656      else
29657        dir="`$DIRNAME "$path"`"
29658        base="`$BASENAME "$path"`"
29659        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29660      fi
29661    fi
29662  fi
29663
29664            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29665$as_echo_n "checking for Boot JDK... " >&6; }
29666            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29667$as_echo "$BOOT_JDK" >&6; }
29668            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29669$as_echo_n "checking Boot JDK version... " >&6; }
29670            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29671            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29672$as_echo "$BOOT_JDK_VERSION" >&6; }
29673          fi # end check jdk version
29674        fi # end check javac
29675      fi # end check java
29676    fi # end check boot jdk found
29677  fi
29678
29679  fi
29680
29681
29682    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29683    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29684      # Do we have a bin/java?
29685      if test ! -x "$BOOT_JDK/bin/java"; then
29686        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29687$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29688        BOOT_JDK_FOUND=no
29689      else
29690        # Do we have a bin/javac?
29691        if test ! -x "$BOOT_JDK/bin/javac"; then
29692          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29693$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29694          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29695$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29696          BOOT_JDK_FOUND=no
29697        else
29698          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29699          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29700
29701          # Extra M4 quote needed to protect [] in grep expression.
29702          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29703          if test "x$FOUND_CORRECT_VERSION" = x; then
29704            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29706            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29707$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29708            BOOT_JDK_FOUND=no
29709          else
29710            # We're done! :-)
29711            BOOT_JDK_FOUND=yes
29712
29713  # Only process if variable expands to non-empty
29714
29715  if test "x$BOOT_JDK" != x; then
29716    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29717
29718  # Input might be given as Windows format, start by converting to
29719  # unix format.
29720  path="$BOOT_JDK"
29721  new_path=`$CYGPATH -u "$path"`
29722
29723  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29724  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29725  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29726  # "foo.exe" is OK but "foo" is an error.
29727  #
29728  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29729  # It is also a way to make sure we got the proper file name for the real test later on.
29730  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29731  if test "x$test_shortpath" = x; then
29732    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29733$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29734    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29735  fi
29736
29737  # Call helper function which possibly converts this using DOS-style short mode.
29738  # If so, the updated path is stored in $new_path.
29739
29740  input_path="$new_path"
29741  # Check if we need to convert this using DOS-style short mode. If the path
29742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29743  # take no chances and rewrite it.
29744  # Note: m4 eats our [], so we need to use [ and ] instead.
29745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29746  if test "x$has_forbidden_chars" != x; then
29747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29748    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29749    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29750    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29751      # Going to short mode and back again did indeed matter. Since short mode is
29752      # case insensitive, let's make it lowercase to improve readability.
29753      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29754      # Now convert it back to Unix-style (cygpath)
29755      input_path=`$CYGPATH -u "$shortmode_path"`
29756      new_path="$input_path"
29757    fi
29758  fi
29759
29760  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29761  if test "x$test_cygdrive_prefix" = x; then
29762    # As a simple fix, exclude /usr/bin since it's not a real path.
29763    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29764      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29765      # a path prefixed by /cygdrive for fixpath to work.
29766      new_path="$CYGWIN_ROOT_PATH$input_path"
29767    fi
29768  fi
29769
29770
29771  if test "x$path" != "x$new_path"; then
29772    BOOT_JDK="$new_path"
29773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29774$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29775  fi
29776
29777    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29778
29779  path="$BOOT_JDK"
29780  has_colon=`$ECHO $path | $GREP ^.:`
29781  new_path="$path"
29782  if test "x$has_colon" = x; then
29783    # Not in mixed or Windows style, start by that.
29784    new_path=`cmd //c echo $path`
29785  fi
29786
29787
29788  input_path="$new_path"
29789  # Check if we need to convert this using DOS-style short mode. If the path
29790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29791  # take no chances and rewrite it.
29792  # Note: m4 eats our [], so we need to use [ and ] instead.
29793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29794  if test "x$has_forbidden_chars" != x; then
29795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29796    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29797  fi
29798
29799
29800  windows_path="$new_path"
29801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29802    unix_path=`$CYGPATH -u "$windows_path"`
29803    new_path="$unix_path"
29804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29806    new_path="$unix_path"
29807  fi
29808
29809  if test "x$path" != "x$new_path"; then
29810    BOOT_JDK="$new_path"
29811    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29812$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29813  fi
29814
29815  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29816  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29817
29818    else
29819      # We're on a unix platform. Hooray! :)
29820      path="$BOOT_JDK"
29821      has_space=`$ECHO "$path" | $GREP " "`
29822      if test "x$has_space" != x; then
29823        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29824$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29825        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29826      fi
29827
29828      # Use eval to expand a potential ~
29829      eval path="$path"
29830      if test ! -f "$path" && test ! -d "$path"; then
29831        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29832      fi
29833
29834      if test -d "$path"; then
29835        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29836      else
29837        dir="`$DIRNAME "$path"`"
29838        base="`$BASENAME "$path"`"
29839        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29840      fi
29841    fi
29842  fi
29843
29844            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29845$as_echo_n "checking for Boot JDK... " >&6; }
29846            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29847$as_echo "$BOOT_JDK" >&6; }
29848            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29849$as_echo_n "checking Boot JDK version... " >&6; }
29850            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29851            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29852$as_echo "$BOOT_JDK_VERSION" >&6; }
29853          fi # end check jdk version
29854        fi # end check javac
29855      fi # end check java
29856    fi # end check boot jdk found
29857  fi
29858
29859
29860  # If we haven't found anything yet, we've truly lost. Give up.
29861  if test "x$BOOT_JDK_FOUND" = xno; then
29862
29863  # Print a helpful message on how to acquire the necessary build dependency.
29864  # openjdk is the help tag: freetype, cups, alsa etc
29865  MISSING_DEPENDENCY=openjdk
29866
29867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29868    cygwin_help $MISSING_DEPENDENCY
29869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29870    msys_help $MISSING_DEPENDENCY
29871  else
29872    PKGHANDLER_COMMAND=
29873
29874    case $PKGHANDLER in
29875      apt-get)
29876        apt_help     $MISSING_DEPENDENCY ;;
29877      yum)
29878        yum_help     $MISSING_DEPENDENCY ;;
29879      port)
29880        port_help    $MISSING_DEPENDENCY ;;
29881      pkgutil)
29882        pkgutil_help $MISSING_DEPENDENCY ;;
29883      pkgadd)
29884        pkgadd_help  $MISSING_DEPENDENCY ;;
29885    esac
29886
29887    if test "x$PKGHANDLER_COMMAND" != x; then
29888      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29889    fi
29890  fi
29891
29892    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29893$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29894    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29895$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29896    as_fn_error $? "Cannot continue" "$LINENO" 5
29897  fi
29898
29899
29900
29901  # Setup tools from the Boot JDK.
29902
29903  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29904
29905  # Publish this variable in the help.
29906
29907
29908  if [ -z "${JAVA+x}" ]; then
29909    # The variable is not set by user, try to locate tool using the code snippet
29910
29911      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29912$as_echo_n "checking for java in Boot JDK... " >&6; }
29913      JAVA=$BOOT_JDK/bin/java
29914      if test ! -x $JAVA; then
29915        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29916$as_echo "not found" >&6; }
29917        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29918$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29919        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29920      fi
29921      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29922$as_echo "ok" >&6; }
29923
29924
29925  else
29926    # The variable is set, but is it from the command line or the environment?
29927
29928    # Try to remove the string !JAVA! from our list.
29929    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29930    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29931      # If it failed, the variable was not from the command line. Ignore it,
29932      # but warn the user (except for BASH, which is always set by the calling BASH).
29933      if test "xJAVA" != xBASH; then
29934        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29935$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29936      fi
29937      # Try to locate tool using the code snippet
29938
29939      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29940$as_echo_n "checking for java in Boot JDK... " >&6; }
29941      JAVA=$BOOT_JDK/bin/java
29942      if test ! -x $JAVA; then
29943        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29944$as_echo "not found" >&6; }
29945        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29946$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29947        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29948      fi
29949      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29950$as_echo "ok" >&6; }
29951
29952
29953    else
29954      # If it succeeded, then it was overridden by the user. We will use it
29955      # for the tool.
29956
29957      # First remove it from the list of overridden variables, so we can test
29958      # for unknown variables in the end.
29959      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29960
29961      # Check if we try to supply an empty value
29962      if test "x$JAVA" = x; then
29963        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29964$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29965        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29966$as_echo_n "checking for JAVA... " >&6; }
29967        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29968$as_echo "disabled" >&6; }
29969      else
29970        # Check if the provided tool contains a complete path.
29971        tool_specified="$JAVA"
29972        tool_basename="${tool_specified##*/}"
29973        if test "x$tool_basename" = "x$tool_specified"; then
29974          # A command without a complete path is provided, search $PATH.
29975          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29976$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29977          # Extract the first word of "$tool_basename", so it can be a program name with args.
29978set dummy $tool_basename; ac_word=$2
29979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29980$as_echo_n "checking for $ac_word... " >&6; }
29981if ${ac_cv_path_JAVA+:} false; then :
29982  $as_echo_n "(cached) " >&6
29983else
29984  case $JAVA in
29985  [\\/]* | ?:[\\/]*)
29986  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29987  ;;
29988  *)
29989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29990for as_dir in $PATH
29991do
29992  IFS=$as_save_IFS
29993  test -z "$as_dir" && as_dir=.
29994    for ac_exec_ext in '' $ac_executable_extensions; do
29995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29996    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29998    break 2
29999  fi
30000done
30001  done
30002IFS=$as_save_IFS
30003
30004  ;;
30005esac
30006fi
30007JAVA=$ac_cv_path_JAVA
30008if test -n "$JAVA"; then
30009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30010$as_echo "$JAVA" >&6; }
30011else
30012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30013$as_echo "no" >&6; }
30014fi
30015
30016
30017          if test "x$JAVA" = x; then
30018            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30019          fi
30020        else
30021          # Otherwise we believe it is a complete path. Use it as it is.
30022          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30023$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30024          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30025$as_echo_n "checking for JAVA... " >&6; }
30026          if test ! -x "$tool_specified"; then
30027            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30028$as_echo "not found" >&6; }
30029            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30030          fi
30031          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30032$as_echo "$tool_specified" >&6; }
30033        fi
30034      fi
30035    fi
30036
30037  fi
30038
30039
30040
30041  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30042
30043  # Publish this variable in the help.
30044
30045
30046  if [ -z "${JAVAC+x}" ]; then
30047    # The variable is not set by user, try to locate tool using the code snippet
30048
30049      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30050$as_echo_n "checking for javac in Boot JDK... " >&6; }
30051      JAVAC=$BOOT_JDK/bin/javac
30052      if test ! -x $JAVAC; then
30053        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30054$as_echo "not found" >&6; }
30055        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30056$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30057        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30058      fi
30059      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30060$as_echo "ok" >&6; }
30061
30062
30063  else
30064    # The variable is set, but is it from the command line or the environment?
30065
30066    # Try to remove the string !JAVAC! from our list.
30067    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30068    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30069      # If it failed, the variable was not from the command line. Ignore it,
30070      # but warn the user (except for BASH, which is always set by the calling BASH).
30071      if test "xJAVAC" != xBASH; then
30072        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30073$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30074      fi
30075      # Try to locate tool using the code snippet
30076
30077      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30078$as_echo_n "checking for javac in Boot JDK... " >&6; }
30079      JAVAC=$BOOT_JDK/bin/javac
30080      if test ! -x $JAVAC; then
30081        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30082$as_echo "not found" >&6; }
30083        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30084$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30085        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30086      fi
30087      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30088$as_echo "ok" >&6; }
30089
30090
30091    else
30092      # If it succeeded, then it was overridden by the user. We will use it
30093      # for the tool.
30094
30095      # First remove it from the list of overridden variables, so we can test
30096      # for unknown variables in the end.
30097      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30098
30099      # Check if we try to supply an empty value
30100      if test "x$JAVAC" = x; then
30101        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30102$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30103        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30104$as_echo_n "checking for JAVAC... " >&6; }
30105        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30106$as_echo "disabled" >&6; }
30107      else
30108        # Check if the provided tool contains a complete path.
30109        tool_specified="$JAVAC"
30110        tool_basename="${tool_specified##*/}"
30111        if test "x$tool_basename" = "x$tool_specified"; then
30112          # A command without a complete path is provided, search $PATH.
30113          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30114$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30115          # Extract the first word of "$tool_basename", so it can be a program name with args.
30116set dummy $tool_basename; ac_word=$2
30117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30118$as_echo_n "checking for $ac_word... " >&6; }
30119if ${ac_cv_path_JAVAC+:} false; then :
30120  $as_echo_n "(cached) " >&6
30121else
30122  case $JAVAC in
30123  [\\/]* | ?:[\\/]*)
30124  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30125  ;;
30126  *)
30127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30128for as_dir in $PATH
30129do
30130  IFS=$as_save_IFS
30131  test -z "$as_dir" && as_dir=.
30132    for ac_exec_ext in '' $ac_executable_extensions; do
30133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30134    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30136    break 2
30137  fi
30138done
30139  done
30140IFS=$as_save_IFS
30141
30142  ;;
30143esac
30144fi
30145JAVAC=$ac_cv_path_JAVAC
30146if test -n "$JAVAC"; then
30147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30148$as_echo "$JAVAC" >&6; }
30149else
30150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30151$as_echo "no" >&6; }
30152fi
30153
30154
30155          if test "x$JAVAC" = x; then
30156            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30157          fi
30158        else
30159          # Otherwise we believe it is a complete path. Use it as it is.
30160          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30161$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30162          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30163$as_echo_n "checking for JAVAC... " >&6; }
30164          if test ! -x "$tool_specified"; then
30165            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30166$as_echo "not found" >&6; }
30167            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30168          fi
30169          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30170$as_echo "$tool_specified" >&6; }
30171        fi
30172      fi
30173    fi
30174
30175  fi
30176
30177
30178
30179  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30180
30181  # Publish this variable in the help.
30182
30183
30184  if [ -z "${JAVAH+x}" ]; then
30185    # The variable is not set by user, try to locate tool using the code snippet
30186
30187      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30188$as_echo_n "checking for javah in Boot JDK... " >&6; }
30189      JAVAH=$BOOT_JDK/bin/javah
30190      if test ! -x $JAVAH; then
30191        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30192$as_echo "not found" >&6; }
30193        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30194$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30195        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30196      fi
30197      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30198$as_echo "ok" >&6; }
30199
30200
30201  else
30202    # The variable is set, but is it from the command line or the environment?
30203
30204    # Try to remove the string !JAVAH! from our list.
30205    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30206    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30207      # If it failed, the variable was not from the command line. Ignore it,
30208      # but warn the user (except for BASH, which is always set by the calling BASH).
30209      if test "xJAVAH" != xBASH; then
30210        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30211$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30212      fi
30213      # Try to locate tool using the code snippet
30214
30215      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30216$as_echo_n "checking for javah in Boot JDK... " >&6; }
30217      JAVAH=$BOOT_JDK/bin/javah
30218      if test ! -x $JAVAH; then
30219        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30220$as_echo "not found" >&6; }
30221        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30222$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30223        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30224      fi
30225      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30226$as_echo "ok" >&6; }
30227
30228
30229    else
30230      # If it succeeded, then it was overridden by the user. We will use it
30231      # for the tool.
30232
30233      # First remove it from the list of overridden variables, so we can test
30234      # for unknown variables in the end.
30235      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30236
30237      # Check if we try to supply an empty value
30238      if test "x$JAVAH" = x; then
30239        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30240$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30241        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30242$as_echo_n "checking for JAVAH... " >&6; }
30243        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30244$as_echo "disabled" >&6; }
30245      else
30246        # Check if the provided tool contains a complete path.
30247        tool_specified="$JAVAH"
30248        tool_basename="${tool_specified##*/}"
30249        if test "x$tool_basename" = "x$tool_specified"; then
30250          # A command without a complete path is provided, search $PATH.
30251          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30252$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30253          # Extract the first word of "$tool_basename", so it can be a program name with args.
30254set dummy $tool_basename; ac_word=$2
30255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30256$as_echo_n "checking for $ac_word... " >&6; }
30257if ${ac_cv_path_JAVAH+:} false; then :
30258  $as_echo_n "(cached) " >&6
30259else
30260  case $JAVAH in
30261  [\\/]* | ?:[\\/]*)
30262  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30263  ;;
30264  *)
30265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30266for as_dir in $PATH
30267do
30268  IFS=$as_save_IFS
30269  test -z "$as_dir" && as_dir=.
30270    for ac_exec_ext in '' $ac_executable_extensions; do
30271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30272    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30274    break 2
30275  fi
30276done
30277  done
30278IFS=$as_save_IFS
30279
30280  ;;
30281esac
30282fi
30283JAVAH=$ac_cv_path_JAVAH
30284if test -n "$JAVAH"; then
30285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30286$as_echo "$JAVAH" >&6; }
30287else
30288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30289$as_echo "no" >&6; }
30290fi
30291
30292
30293          if test "x$JAVAH" = x; then
30294            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30295          fi
30296        else
30297          # Otherwise we believe it is a complete path. Use it as it is.
30298          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30299$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30300          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30301$as_echo_n "checking for JAVAH... " >&6; }
30302          if test ! -x "$tool_specified"; then
30303            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30304$as_echo "not found" >&6; }
30305            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30306          fi
30307          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30308$as_echo "$tool_specified" >&6; }
30309        fi
30310      fi
30311    fi
30312
30313  fi
30314
30315
30316
30317  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30318
30319  # Publish this variable in the help.
30320
30321
30322  if [ -z "${JAR+x}" ]; then
30323    # The variable is not set by user, try to locate tool using the code snippet
30324
30325      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30326$as_echo_n "checking for jar in Boot JDK... " >&6; }
30327      JAR=$BOOT_JDK/bin/jar
30328      if test ! -x $JAR; then
30329        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30330$as_echo "not found" >&6; }
30331        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30332$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30333        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30334      fi
30335      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30336$as_echo "ok" >&6; }
30337
30338
30339  else
30340    # The variable is set, but is it from the command line or the environment?
30341
30342    # Try to remove the string !JAR! from our list.
30343    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30344    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30345      # If it failed, the variable was not from the command line. Ignore it,
30346      # but warn the user (except for BASH, which is always set by the calling BASH).
30347      if test "xJAR" != xBASH; then
30348        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30349$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30350      fi
30351      # Try to locate tool using the code snippet
30352
30353      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30354$as_echo_n "checking for jar in Boot JDK... " >&6; }
30355      JAR=$BOOT_JDK/bin/jar
30356      if test ! -x $JAR; then
30357        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30358$as_echo "not found" >&6; }
30359        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30360$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30361        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30362      fi
30363      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30364$as_echo "ok" >&6; }
30365
30366
30367    else
30368      # If it succeeded, then it was overridden by the user. We will use it
30369      # for the tool.
30370
30371      # First remove it from the list of overridden variables, so we can test
30372      # for unknown variables in the end.
30373      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30374
30375      # Check if we try to supply an empty value
30376      if test "x$JAR" = x; then
30377        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30378$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30379        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30380$as_echo_n "checking for JAR... " >&6; }
30381        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30382$as_echo "disabled" >&6; }
30383      else
30384        # Check if the provided tool contains a complete path.
30385        tool_specified="$JAR"
30386        tool_basename="${tool_specified##*/}"
30387        if test "x$tool_basename" = "x$tool_specified"; then
30388          # A command without a complete path is provided, search $PATH.
30389          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30390$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30391          # Extract the first word of "$tool_basename", so it can be a program name with args.
30392set dummy $tool_basename; ac_word=$2
30393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30394$as_echo_n "checking for $ac_word... " >&6; }
30395if ${ac_cv_path_JAR+:} false; then :
30396  $as_echo_n "(cached) " >&6
30397else
30398  case $JAR in
30399  [\\/]* | ?:[\\/]*)
30400  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30401  ;;
30402  *)
30403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30404for as_dir in $PATH
30405do
30406  IFS=$as_save_IFS
30407  test -z "$as_dir" && as_dir=.
30408    for ac_exec_ext in '' $ac_executable_extensions; do
30409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30410    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30412    break 2
30413  fi
30414done
30415  done
30416IFS=$as_save_IFS
30417
30418  ;;
30419esac
30420fi
30421JAR=$ac_cv_path_JAR
30422if test -n "$JAR"; then
30423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30424$as_echo "$JAR" >&6; }
30425else
30426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30427$as_echo "no" >&6; }
30428fi
30429
30430
30431          if test "x$JAR" = x; then
30432            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30433          fi
30434        else
30435          # Otherwise we believe it is a complete path. Use it as it is.
30436          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30437$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30438          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30439$as_echo_n "checking for JAR... " >&6; }
30440          if test ! -x "$tool_specified"; then
30441            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30442$as_echo "not found" >&6; }
30443            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30444          fi
30445          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30446$as_echo "$tool_specified" >&6; }
30447        fi
30448      fi
30449    fi
30450
30451  fi
30452
30453
30454
30455  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30456
30457  # Publish this variable in the help.
30458
30459
30460  if [ -z "${JARSIGNER+x}" ]; then
30461    # The variable is not set by user, try to locate tool using the code snippet
30462
30463      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30464$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30465      JARSIGNER=$BOOT_JDK/bin/jarsigner
30466      if test ! -x $JARSIGNER; then
30467        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30468$as_echo "not found" >&6; }
30469        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30470$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30471        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30472      fi
30473      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30474$as_echo "ok" >&6; }
30475
30476
30477  else
30478    # The variable is set, but is it from the command line or the environment?
30479
30480    # Try to remove the string !JARSIGNER! from our list.
30481    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30482    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30483      # If it failed, the variable was not from the command line. Ignore it,
30484      # but warn the user (except for BASH, which is always set by the calling BASH).
30485      if test "xJARSIGNER" != xBASH; then
30486        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30487$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30488      fi
30489      # Try to locate tool using the code snippet
30490
30491      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30492$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30493      JARSIGNER=$BOOT_JDK/bin/jarsigner
30494      if test ! -x $JARSIGNER; then
30495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30496$as_echo "not found" >&6; }
30497        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30498$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30499        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30500      fi
30501      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30502$as_echo "ok" >&6; }
30503
30504
30505    else
30506      # If it succeeded, then it was overridden by the user. We will use it
30507      # for the tool.
30508
30509      # First remove it from the list of overridden variables, so we can test
30510      # for unknown variables in the end.
30511      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30512
30513      # Check if we try to supply an empty value
30514      if test "x$JARSIGNER" = x; then
30515        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30516$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30517        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30518$as_echo_n "checking for JARSIGNER... " >&6; }
30519        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30520$as_echo "disabled" >&6; }
30521      else
30522        # Check if the provided tool contains a complete path.
30523        tool_specified="$JARSIGNER"
30524        tool_basename="${tool_specified##*/}"
30525        if test "x$tool_basename" = "x$tool_specified"; then
30526          # A command without a complete path is provided, search $PATH.
30527          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30528$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30529          # Extract the first word of "$tool_basename", so it can be a program name with args.
30530set dummy $tool_basename; ac_word=$2
30531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30532$as_echo_n "checking for $ac_word... " >&6; }
30533if ${ac_cv_path_JARSIGNER+:} false; then :
30534  $as_echo_n "(cached) " >&6
30535else
30536  case $JARSIGNER in
30537  [\\/]* | ?:[\\/]*)
30538  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30539  ;;
30540  *)
30541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30542for as_dir in $PATH
30543do
30544  IFS=$as_save_IFS
30545  test -z "$as_dir" && as_dir=.
30546    for ac_exec_ext in '' $ac_executable_extensions; do
30547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30548    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30550    break 2
30551  fi
30552done
30553  done
30554IFS=$as_save_IFS
30555
30556  ;;
30557esac
30558fi
30559JARSIGNER=$ac_cv_path_JARSIGNER
30560if test -n "$JARSIGNER"; then
30561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30562$as_echo "$JARSIGNER" >&6; }
30563else
30564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30565$as_echo "no" >&6; }
30566fi
30567
30568
30569          if test "x$JARSIGNER" = x; then
30570            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30571          fi
30572        else
30573          # Otherwise we believe it is a complete path. Use it as it is.
30574          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30575$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30576          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30577$as_echo_n "checking for JARSIGNER... " >&6; }
30578          if test ! -x "$tool_specified"; then
30579            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30580$as_echo "not found" >&6; }
30581            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30582          fi
30583          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30584$as_echo "$tool_specified" >&6; }
30585        fi
30586      fi
30587    fi
30588
30589  fi
30590
30591
30592
30593  # Finally, set some other options...
30594
30595  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30596  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30597
30598
30599
30600  $ECHO "Check if jvm arg is ok: --patch-module foo=bar" >&5
30601  $ECHO "Command: $JAVA --patch-module foo=bar -version" >&5
30602  OUTPUT=`$JAVA --patch-module foo=bar -version 2>&1`
30603  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30604  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30605  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30606    dummy="$dummy --patch-module foo=bar"
30607    JVM_ARG_OK=true
30608  else
30609    $ECHO "Arg failed:" >&5
30610    $ECHO "$OUTPUT" >&5
30611    JVM_ARG_OK=false
30612  fi
30613
30614  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30615$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30616  if test "x$JVM_ARG_OK" = "xtrue"; then
30617    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30618$as_echo "yes" >&6; }
30619    BOOT_JDK_MODULAR="true"
30620  else
30621    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30622$as_echo "no" >&6; }
30623    BOOT_JDK_MODULAR="false"
30624  fi
30625
30626
30627
30628
30629  # Check if the boot jdk is 32 or 64 bit
30630  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30631    BOOT_JDK_BITS="64"
30632  else
30633    BOOT_JDK_BITS="32"
30634  fi
30635  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30636$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30638$as_echo "$BOOT_JDK_BITS" >&6; }
30639
30640
30641
30642
30643# Check whether --with-build-jdk was given.
30644if test "${with_build_jdk+set}" = set; then :
30645  withval=$with_build_jdk;
30646fi
30647
30648
30649  CREATE_BUILDJDK=false
30650  EXTERNAL_BUILDJDK=false
30651  BUILD_JDK_FOUND="no"
30652  if test "x$with_build_jdk" != "x"; then
30653
30654  if test "x$BUILD_JDK_FOUND" = xno; then
30655    # Execute the test
30656
30657       if test "x$with_build_jdk" != x; then
30658         BUILD_JDK=$with_build_jdk
30659         BUILD_JDK_FOUND=maybe
30660         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30661$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30662       fi
30663
30664    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30665    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30666      # Do we have a bin/java?
30667      if test ! -x "$BUILD_JDK/bin/java"; then
30668        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30669$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30670        BUILD_JDK_FOUND=no
30671      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30672        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30673$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30674        BUILD_JDK_FOUND=no
30675      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30676        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30677$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30678        BUILD_JDK_FOUND=no
30679      elif test ! -x "$BUILD_JDK/bin/javac"; then
30680        # Do we have a bin/javac?
30681        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30682$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30683        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30684$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30685        BUILD_JDK_FOUND=no
30686      else
30687        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30688        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30689
30690        # Extra M4 quote needed to protect [] in grep expression.
30691        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30692        if test "x$FOUND_CORRECT_VERSION" = x; then
30693          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30694$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30695          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30696$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30697          BUILD_JDK_FOUND=no
30698        else
30699          # We're done!
30700          BUILD_JDK_FOUND=yes
30701
30702  # Only process if variable expands to non-empty
30703
30704  if test "x$BUILD_JDK" != x; then
30705    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30706
30707  # Input might be given as Windows format, start by converting to
30708  # unix format.
30709  path="$BUILD_JDK"
30710  new_path=`$CYGPATH -u "$path"`
30711
30712  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30713  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30714  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30715  # "foo.exe" is OK but "foo" is an error.
30716  #
30717  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30718  # It is also a way to make sure we got the proper file name for the real test later on.
30719  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30720  if test "x$test_shortpath" = x; then
30721    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30722$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30723    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30724  fi
30725
30726  # Call helper function which possibly converts this using DOS-style short mode.
30727  # If so, the updated path is stored in $new_path.
30728
30729  input_path="$new_path"
30730  # Check if we need to convert this using DOS-style short mode. If the path
30731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30732  # take no chances and rewrite it.
30733  # Note: m4 eats our [], so we need to use [ and ] instead.
30734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30735  if test "x$has_forbidden_chars" != x; then
30736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30737    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30738    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30739    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30740      # Going to short mode and back again did indeed matter. Since short mode is
30741      # case insensitive, let's make it lowercase to improve readability.
30742      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30743      # Now convert it back to Unix-style (cygpath)
30744      input_path=`$CYGPATH -u "$shortmode_path"`
30745      new_path="$input_path"
30746    fi
30747  fi
30748
30749  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30750  if test "x$test_cygdrive_prefix" = x; then
30751    # As a simple fix, exclude /usr/bin since it's not a real path.
30752    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30753      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30754      # a path prefixed by /cygdrive for fixpath to work.
30755      new_path="$CYGWIN_ROOT_PATH$input_path"
30756    fi
30757  fi
30758
30759
30760  if test "x$path" != "x$new_path"; then
30761    BUILD_JDK="$new_path"
30762    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30763$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30764  fi
30765
30766    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30767
30768  path="$BUILD_JDK"
30769  has_colon=`$ECHO $path | $GREP ^.:`
30770  new_path="$path"
30771  if test "x$has_colon" = x; then
30772    # Not in mixed or Windows style, start by that.
30773    new_path=`cmd //c echo $path`
30774  fi
30775
30776
30777  input_path="$new_path"
30778  # Check if we need to convert this using DOS-style short mode. If the path
30779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30780  # take no chances and rewrite it.
30781  # Note: m4 eats our [], so we need to use [ and ] instead.
30782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30783  if test "x$has_forbidden_chars" != x; then
30784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30785    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30786  fi
30787
30788
30789  windows_path="$new_path"
30790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30791    unix_path=`$CYGPATH -u "$windows_path"`
30792    new_path="$unix_path"
30793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30795    new_path="$unix_path"
30796  fi
30797
30798  if test "x$path" != "x$new_path"; then
30799    BUILD_JDK="$new_path"
30800    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30801$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30802  fi
30803
30804  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30805  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30806
30807    else
30808      # We're on a unix platform. Hooray! :)
30809      path="$BUILD_JDK"
30810      has_space=`$ECHO "$path" | $GREP " "`
30811      if test "x$has_space" != x; then
30812        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30813$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30814        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30815      fi
30816
30817      # Use eval to expand a potential ~
30818      eval path="$path"
30819      if test ! -f "$path" && test ! -d "$path"; then
30820        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30821      fi
30822
30823      if test -d "$path"; then
30824        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30825      else
30826        dir="`$DIRNAME "$path"`"
30827        base="`$BASENAME "$path"`"
30828        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30829      fi
30830    fi
30831  fi
30832
30833          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30834$as_echo_n "checking for Build JDK... " >&6; }
30835          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30836$as_echo "$BUILD_JDK" >&6; }
30837          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30838$as_echo_n "checking Build JDK version... " >&6; }
30839          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30840          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30841$as_echo "$BUILD_JDK_VERSION" >&6; }
30842        fi # end check jdk version
30843      fi # end check java
30844    fi # end check build jdk found
30845  fi
30846
30847    EXTERNAL_BUILDJDK=true
30848  else
30849    if test "x$COMPILE_TYPE" = "xcross"; then
30850      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30851      BUILD_JDK_FOUND=yes
30852      CREATE_BUILDJDK=true
30853      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30854$as_echo_n "checking for Build JDK... " >&6; }
30855      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30856$as_echo "yes, will build it for the host platform" >&6; }
30857    else
30858      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30859      BUILD_JDK_FOUND=yes
30860      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30861$as_echo_n "checking for Build JDK... " >&6; }
30862      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30863$as_echo "yes, will use output dir" >&6; }
30864    fi
30865  fi
30866
30867  JMOD="$BUILD_JDK/bin/jmod"
30868  JLINK="$BUILD_JDK/bin/jlink"
30869
30870
30871
30872  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30873    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30874$as_echo_n "checking for Build JDK... " >&6; }
30875    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30876$as_echo "no" >&6; }
30877    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30878  fi
30879
30880
30881
30882
30883
30884
30885###############################################################################
30886#
30887# Configure the sources to use. We can add or override individual directories.
30888#
30889###############################################################################
30890
30891
30892  # Where are the sources.
30893  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30894  CORBA_TOPDIR="$SRC_ROOT/corba"
30895  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30896  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30897  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30898  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30899  JDK_TOPDIR="$SRC_ROOT/jdk"
30900
30901
30902
30903
30904
30905
30906
30907
30908
30909  # This feature is no longer supported.
30910
30911
30912
30913# Check whether --with-add-source-root was given.
30914if test "${with_add_source_root+set}" = set; then :
30915  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
30916$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30917fi
30918
30919
30920
30921
30922# Check whether --with-override-source-root was given.
30923if test "${with_override_source_root+set}" = set; then :
30924  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
30925$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30926fi
30927
30928
30929
30930
30931# Check whether --with-adds-and-overrides was given.
30932if test "${with_adds_and_overrides+set}" = set; then :
30933  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
30934$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30935fi
30936
30937
30938
30939
30940# Check whether --with-override-langtools was given.
30941if test "${with_override_langtools+set}" = set; then :
30942  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30943$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30944fi
30945
30946
30947
30948
30949# Check whether --with-override-corba was given.
30950if test "${with_override_corba+set}" = set; then :
30951  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30952$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30953fi
30954
30955
30956
30957
30958# Check whether --with-override-jaxp was given.
30959if test "${with_override_jaxp+set}" = set; then :
30960  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30961$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30962fi
30963
30964
30965
30966
30967# Check whether --with-override-jaxws was given.
30968if test "${with_override_jaxws+set}" = set; then :
30969  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30970$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30971fi
30972
30973
30974
30975
30976# Check whether --with-override-hotspot was given.
30977if test "${with_override_hotspot+set}" = set; then :
30978  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30979$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30980fi
30981
30982
30983
30984
30985# Check whether --with-override-nashorn was given.
30986if test "${with_override_nashorn+set}" = set; then :
30987  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30988$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30989fi
30990
30991
30992
30993
30994# Check whether --with-override-jdk was given.
30995if test "${with_override_jdk+set}" = set; then :
30996  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30997$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30998fi
30999
31000
31001
31002
31003  BUILD_OUTPUT="$OUTPUT_ROOT"
31004
31005
31006  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
31007  BUILD_HOTSPOT=true
31008
31009
31010
31011# Check whether --with-import-hotspot was given.
31012if test "${with_import_hotspot+set}" = set; then :
31013  withval=$with_import_hotspot;
31014fi
31015
31016  if test "x$with_import_hotspot" != x; then
31017    CURDIR="$PWD"
31018    cd "$with_import_hotspot"
31019    HOTSPOT_DIST="`pwd`"
31020    cd "$CURDIR"
31021    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
31022      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
31023    fi
31024    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
31025$as_echo_n "checking if hotspot should be imported... " >&6; }
31026    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
31027$as_echo "yes from $HOTSPOT_DIST" >&6; }
31028    BUILD_HOTSPOT=false
31029  fi
31030
31031  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31032
31033
31034
31035
31036# Check whether --with-import-modules was given.
31037if test "${with_import_modules+set}" = set; then :
31038  withval=$with_import_modules;
31039fi
31040
31041
31042  if test "x$with_import_modules" != x \
31043      && test "x$with_import_modules" != "xno"; then
31044    if test -d "$with_import_modules"; then
31045      IMPORT_MODULES_TOPDIR="$with_import_modules"
31046
31047  # Only process if variable expands to non-empty
31048
31049  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31050    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31051
31052  # Input might be given as Windows format, start by converting to
31053  # unix format.
31054  path="$IMPORT_MODULES_TOPDIR"
31055  new_path=`$CYGPATH -u "$path"`
31056
31057  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31058  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31059  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31060  # "foo.exe" is OK but "foo" is an error.
31061  #
31062  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31063  # It is also a way to make sure we got the proper file name for the real test later on.
31064  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31065  if test "x$test_shortpath" = x; then
31066    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31067$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31068    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31069  fi
31070
31071  # Call helper function which possibly converts this using DOS-style short mode.
31072  # If so, the updated path is stored in $new_path.
31073
31074  input_path="$new_path"
31075  # Check if we need to convert this using DOS-style short mode. If the path
31076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31077  # take no chances and rewrite it.
31078  # Note: m4 eats our [], so we need to use [ and ] instead.
31079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31080  if test "x$has_forbidden_chars" != x; then
31081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31082    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31083    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31084    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31085      # Going to short mode and back again did indeed matter. Since short mode is
31086      # case insensitive, let's make it lowercase to improve readability.
31087      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31088      # Now convert it back to Unix-style (cygpath)
31089      input_path=`$CYGPATH -u "$shortmode_path"`
31090      new_path="$input_path"
31091    fi
31092  fi
31093
31094  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31095  if test "x$test_cygdrive_prefix" = x; then
31096    # As a simple fix, exclude /usr/bin since it's not a real path.
31097    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31098      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31099      # a path prefixed by /cygdrive for fixpath to work.
31100      new_path="$CYGWIN_ROOT_PATH$input_path"
31101    fi
31102  fi
31103
31104
31105  if test "x$path" != "x$new_path"; then
31106    IMPORT_MODULES_TOPDIR="$new_path"
31107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31108$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31109  fi
31110
31111    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31112
31113  path="$IMPORT_MODULES_TOPDIR"
31114  has_colon=`$ECHO $path | $GREP ^.:`
31115  new_path="$path"
31116  if test "x$has_colon" = x; then
31117    # Not in mixed or Windows style, start by that.
31118    new_path=`cmd //c echo $path`
31119  fi
31120
31121
31122  input_path="$new_path"
31123  # Check if we need to convert this using DOS-style short mode. If the path
31124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31125  # take no chances and rewrite it.
31126  # Note: m4 eats our [], so we need to use [ and ] instead.
31127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31128  if test "x$has_forbidden_chars" != x; then
31129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31130    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31131  fi
31132
31133
31134  windows_path="$new_path"
31135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31136    unix_path=`$CYGPATH -u "$windows_path"`
31137    new_path="$unix_path"
31138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31140    new_path="$unix_path"
31141  fi
31142
31143  if test "x$path" != "x$new_path"; then
31144    IMPORT_MODULES_TOPDIR="$new_path"
31145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31146$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31147  fi
31148
31149  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31150  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31151
31152    else
31153      # We're on a unix platform. Hooray! :)
31154      path="$IMPORT_MODULES_TOPDIR"
31155      has_space=`$ECHO "$path" | $GREP " "`
31156      if test "x$has_space" != x; then
31157        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31158$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31159        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31160      fi
31161
31162      # Use eval to expand a potential ~
31163      eval path="$path"
31164      if test ! -f "$path" && test ! -d "$path"; then
31165        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31166      fi
31167
31168      if test -d "$path"; then
31169        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31170      else
31171        dir="`$DIRNAME "$path"`"
31172        base="`$BASENAME "$path"`"
31173        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31174      fi
31175    fi
31176  fi
31177
31178    elif test -e "$with_import_modules"; then
31179      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31180      $RM -rf "$IMPORT_MODULES_TOPDIR"
31181      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31182      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31183        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31184      fi
31185    else
31186      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31187    fi
31188  fi
31189
31190  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31191    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31192  fi
31193  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31194    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31195  fi
31196  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31197    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31198  fi
31199  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31200    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31201  fi
31202  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31203    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31204  fi
31205  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31206    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31207  fi
31208
31209
31210
31211
31212
31213
31214
31215
31216
31217###############################################################################
31218#
31219# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31220# native code.
31221#
31222###############################################################################
31223
31224# See if we are doing a complete static build or not
31225
31226  # Check whether --enable-static-build was given.
31227if test "${enable_static_build+set}" = set; then :
31228  enableval=$enable_static_build;
31229fi
31230
31231  STATIC_BUILD=false
31232  if test "x$enable_static_build" = "xyes"; then
31233    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31234$as_echo_n "checking if static build is enabled... " >&6; }
31235    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31236$as_echo "yes" >&6; }
31237    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31238      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31239    fi
31240    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31241    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31242    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31243    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31244    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31245    STATIC_BUILD=true
31246  elif test "x$enable_static_build" = "xno"; then
31247    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31248$as_echo_n "checking if static build is enabled... " >&6; }
31249    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31250$as_echo "no" >&6; }
31251  elif test "x$enable_static_build" != "x"; then
31252    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31253  fi
31254
31255
31256
31257
31258# First determine the toolchain type (compiler family)
31259
31260
31261# Check whether --with-toolchain-type was given.
31262if test "${with_toolchain_type+set}" = set; then :
31263  withval=$with_toolchain_type;
31264fi
31265
31266
31267  # Use indirect variable referencing
31268  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31269  VALID_TOOLCHAINS=${!toolchain_var_name}
31270
31271  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31272    if test -n "$XCODEBUILD"; then
31273      # On Mac OS X, default toolchain to clang after Xcode 5
31274      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31275      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31276      if test $? -ne 0; then
31277        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31278      fi
31279      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31280          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31281          $CUT -f 1 -d .`
31282      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31283$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31284      if test $XCODE_MAJOR_VERSION -ge 5; then
31285          DEFAULT_TOOLCHAIN="clang"
31286      else
31287          DEFAULT_TOOLCHAIN="gcc"
31288      fi
31289    else
31290      # If Xcode is not installed, but the command line tools are
31291      # then we can't run xcodebuild. On these systems we should
31292      # default to clang
31293      DEFAULT_TOOLCHAIN="clang"
31294    fi
31295  else
31296    # First toolchain type in the list is the default
31297    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31298  fi
31299
31300  if test "x$with_toolchain_type" = xlist; then
31301    # List all toolchains
31302    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31303$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31304    for toolchain in $VALID_TOOLCHAINS; do
31305      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31306      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31307      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31308    done
31309
31310    exit 0
31311  elif test "x$with_toolchain_type" != x; then
31312    # User override; check that it is valid
31313    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31314      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31315$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31316      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31317$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31318      as_fn_error $? "Cannot continue." "$LINENO" 5
31319    fi
31320    TOOLCHAIN_TYPE=$with_toolchain_type
31321  else
31322    # No flag given, use default
31323    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31324  fi
31325
31326
31327  TOOLCHAIN_CC_BINARY_clang="clang"
31328  TOOLCHAIN_CC_BINARY_gcc="gcc"
31329  TOOLCHAIN_CC_BINARY_microsoft="cl"
31330  TOOLCHAIN_CC_BINARY_solstudio="cc"
31331  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31332
31333  TOOLCHAIN_CXX_BINARY_clang="clang++"
31334  TOOLCHAIN_CXX_BINARY_gcc="g++"
31335  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31336  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31337  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31338
31339  # Use indirect variable referencing
31340  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31341  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31342  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31343  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31344  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31345  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31346  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31347  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31348
31349
31350  # Define filename patterns
31351  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31352    LIBRARY_PREFIX=
31353    SHARED_LIBRARY_SUFFIX='.dll'
31354    STATIC_LIBRARY_SUFFIX='.lib'
31355    SHARED_LIBRARY='$1.dll'
31356    STATIC_LIBRARY='$1.lib'
31357    OBJ_SUFFIX='.obj'
31358    EXE_SUFFIX='.exe'
31359  else
31360    LIBRARY_PREFIX=lib
31361    SHARED_LIBRARY_SUFFIX='.so'
31362    STATIC_LIBRARY_SUFFIX='.a'
31363    SHARED_LIBRARY='lib$1.so'
31364    STATIC_LIBRARY='lib$1.a'
31365    OBJ_SUFFIX='.o'
31366    EXE_SUFFIX=''
31367    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31368      # For full static builds, we're overloading the SHARED_LIBRARY
31369      # variables in order to limit the amount of changes required.
31370      # It would be better to remove SHARED and just use LIBRARY and
31371      # LIBRARY_SUFFIX for libraries that can be built either
31372      # shared or static and use STATIC_* for libraries that are
31373      # always built statically.
31374      if test "x$STATIC_BUILD" = xtrue; then
31375        SHARED_LIBRARY='lib$1.a'
31376        SHARED_LIBRARY_SUFFIX='.a'
31377      else
31378        SHARED_LIBRARY='lib$1.dylib'
31379        SHARED_LIBRARY_SUFFIX='.dylib'
31380      fi
31381    fi
31382  fi
31383
31384
31385
31386
31387
31388
31389
31390
31391
31392
31393  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31394    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31395$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31396  else
31397    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31398$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31399  fi
31400
31401
31402# User supplied flags should be used when configure detects compilers
31403
31404  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31405    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31406$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31407  fi
31408
31409  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31410    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31411$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31412  fi
31413
31414  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31415    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31416$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31417  fi
31418
31419
31420# Check whether --with-extra-cflags was given.
31421if test "${with_extra_cflags+set}" = set; then :
31422  withval=$with_extra_cflags;
31423fi
31424
31425
31426
31427# Check whether --with-extra-cxxflags was given.
31428if test "${with_extra_cxxflags+set}" = set; then :
31429  withval=$with_extra_cxxflags;
31430fi
31431
31432
31433
31434# Check whether --with-extra-ldflags was given.
31435if test "${with_extra_ldflags+set}" = set; then :
31436  withval=$with_extra_ldflags;
31437fi
31438
31439
31440  EXTRA_CFLAGS="$with_extra_cflags"
31441  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31442  EXTRA_LDFLAGS="$with_extra_ldflags"
31443
31444  # Hotspot needs these set in their legacy form
31445  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31446  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31447  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31448
31449
31450
31451
31452
31453
31454
31455
31456
31457  # The global CFLAGS and LDLAGS variables are used by configure tests and
31458  # should include the extra parameters
31459  CFLAGS="$EXTRA_CFLAGS"
31460  CXXFLAGS="$EXTRA_CXXFLAGS"
31461  LDFLAGS="$EXTRA_LDFLAGS"
31462  CPPFLAGS=""
31463
31464# The sysroot cflags are needed for configure to be able to run the compilers
31465
31466  if test "x$SYSROOT" != "x"; then
31467    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31468      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31469        # Solaris Studio does not have a concept of sysroot. Instead we must
31470        # make sure the default include and lib dirs are appended to each
31471        # compile and link command line. Must also add -I-xbuiltin to enable
31472        # inlining of system functions and intrinsics.
31473        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31474        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31475            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31476      fi
31477    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31478      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31479      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31480    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31481      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31482      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31483    fi
31484    # Propagate the sysroot args to hotspot
31485    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31486    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31487    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31488    # The global CFLAGS and LDFLAGS variables need these for configure to function
31489    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31490    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31491    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31492    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31493  fi
31494
31495  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31496    # We also need -iframework<path>/System/Library/Frameworks
31497    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31498    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31499    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31500    # set this here so it doesn't have to be peppered throughout the forest
31501    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31502    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31503  fi
31504
31505
31506
31507
31508
31509# Then detect the actual binaries needed
31510
31511  # FIXME: Is this needed?
31512  ac_ext=cpp
31513ac_cpp='$CXXCPP $CPPFLAGS'
31514ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31515ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31516ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31517
31518
31519  # Store the CFLAGS etc passed to the configure script.
31520  ORG_CFLAGS="$CFLAGS"
31521  ORG_CXXFLAGS="$CXXFLAGS"
31522
31523  # autoconf magic only relies on PATH, so update it if tools dir is specified
31524  OLD_PATH="$PATH"
31525
31526  # On Windows, we need to detect the visual studio installation first.
31527  # This will change the PATH, but we need to keep that new PATH even
31528  # after toolchain detection is done, since the compiler (on x86) uses
31529  # it for DLL resolution in runtime.
31530  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31531      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31532
31533  # Store path to cygwin link.exe to help excluding it when searching for
31534  # VS linker. This must be done before changing the PATH when looking for VS.
31535  # Extract the first word of "link", so it can be a program name with args.
31536set dummy link; ac_word=$2
31537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31538$as_echo_n "checking for $ac_word... " >&6; }
31539if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31540  $as_echo_n "(cached) " >&6
31541else
31542  case $CYGWIN_LINK in
31543  [\\/]* | ?:[\\/]*)
31544  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31545  ;;
31546  *)
31547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31548for as_dir in $PATH
31549do
31550  IFS=$as_save_IFS
31551  test -z "$as_dir" && as_dir=.
31552    for ac_exec_ext in '' $ac_executable_extensions; do
31553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31554    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31556    break 2
31557  fi
31558done
31559  done
31560IFS=$as_save_IFS
31561
31562  ;;
31563esac
31564fi
31565CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31566if test -n "$CYGWIN_LINK"; then
31567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31568$as_echo "$CYGWIN_LINK" >&6; }
31569else
31570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31571$as_echo "no" >&6; }
31572fi
31573
31574
31575  if test "x$CYGWIN_LINK" != x; then
31576    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31577$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31578    "$CYGWIN_LINK" --version > /dev/null
31579    if test $? -eq 0 ; then
31580      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31581$as_echo "yes" >&6; }
31582    else
31583      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31584$as_echo "no" >&6; }
31585      # This might be the VS linker. Don't exclude it later on.
31586      CYGWIN_LINK=""
31587    fi
31588  fi
31589
31590  # First-hand choice is to locate and run the vsvars bat file.
31591
31592
31593# Check whether --with-toolchain-version was given.
31594if test "${with_toolchain_version+set}" = set; then :
31595  withval=$with_toolchain_version;
31596fi
31597
31598
31599  if test "x$with_toolchain_version" = xlist; then
31600    # List all toolchains
31601    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31602$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31603    for version in $VALID_VS_VERSIONS; do
31604      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31605      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31606    done
31607
31608    exit 0
31609  elif test "x$DEVKIT_VS_VERSION" != x; then
31610    VS_VERSION=$DEVKIT_VS_VERSION
31611    TOOLCHAIN_VERSION=$VS_VERSION
31612    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31613    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31614    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31615    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31616    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31617    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31618
31619    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31620    # can still be exported as INCLUDE for compiler invocations without
31621    # SYSROOT_CFLAGS
31622    OLDIFS="$IFS"
31623    IFS=";"
31624    for i in $DEVKIT_VS_INCLUDE; do
31625      ipath=$i
31626
31627  unix_path="$ipath"
31628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31629    windows_path=`$CYGPATH -m "$unix_path"`
31630    ipath="$windows_path"
31631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31632    windows_path=`cmd //c echo $unix_path`
31633    ipath="$windows_path"
31634  fi
31635
31636      VS_INCLUDE="$VS_INCLUDE;$ipath"
31637    done
31638    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31639    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31640    for i in $DEVKIT_VS_LIB; do
31641      libpath=$i
31642
31643  unix_path="$libpath"
31644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31645    windows_path=`$CYGPATH -m "$unix_path"`
31646    libpath="$windows_path"
31647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31648    windows_path=`cmd //c echo $unix_path`
31649    libpath="$windows_path"
31650  fi
31651
31652      VS_LIB="$VS_LIB;$libpath"
31653    done
31654    IFS="$OLDIFS"
31655
31656    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31657$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31658
31659  elif test "x$with_toolchain_version" != x; then
31660    # User override; check that it is valid
31661    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31662      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31663$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31664      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31665$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31666      as_fn_error $? "Cannot continue." "$LINENO" 5
31667    fi
31668    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31669  else
31670    # No flag given, use default
31671    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31672  fi
31673
31674  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31675
31676  VS_VERSION="$VS_VERSION"
31677  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31678  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31679  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31680  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31681
31682  # When using --with-tools-dir, assume it points to the correct and default
31683  # version of Visual Studio or that --with-toolchain-version was also set.
31684  if test "x$with_tools_dir" != x; then
31685
31686  if test "x$VS_ENV_CMD" = x; then
31687    VS_VERSION="${VS_VERSION}"
31688    VS_BASE="$with_tools_dir/../.."
31689    METHOD="--with-tools-dir"
31690
31691    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31692      VCVARSFILE="vc/bin/vcvars32.bat"
31693    else
31694      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31695    fi
31696
31697
31698  windows_path="$VS_BASE"
31699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31700    unix_path=`$CYGPATH -u "$windows_path"`
31701    VS_BASE="$unix_path"
31702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31704    VS_BASE="$unix_path"
31705  fi
31706
31707    if test -d "$VS_BASE"; then
31708      if test -f "$VS_BASE/$VCVARSFILE"; then
31709        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31710$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31711        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31712        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31713        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31714        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31715      else
31716        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31717$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31718        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31719$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31720      fi
31721    fi
31722  fi
31723
31724
31725  if test "x$VS_ENV_CMD" = x; then
31726    VS_VERSION="${VS_VERSION}"
31727    VS_BASE="$with_tools_dir/../../.."
31728    METHOD="--with-tools-dir"
31729
31730    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31731      VCVARSFILE="vc/bin/vcvars32.bat"
31732    else
31733      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31734    fi
31735
31736
31737  windows_path="$VS_BASE"
31738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31739    unix_path=`$CYGPATH -u "$windows_path"`
31740    VS_BASE="$unix_path"
31741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31743    VS_BASE="$unix_path"
31744  fi
31745
31746    if test -d "$VS_BASE"; then
31747      if test -f "$VS_BASE/$VCVARSFILE"; then
31748        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31749$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31750        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31751        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31752        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31753        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31754      else
31755        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31756$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31757        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31758$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31759      fi
31760    fi
31761  fi
31762
31763    if test "x$VS_ENV_CMD" = x; then
31764      # Having specified an argument which is incorrect will produce an instant failure;
31765      # we should not go on looking
31766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31767$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31768      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31769$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31770      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31771$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31772      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31773    fi
31774  fi
31775
31776  VS_ENV_CMD=""
31777  VS_ENV_ARGS=""
31778
31779  if test "x$VS_COMNTOOLS" != x; then
31780
31781  if test "x$VS_ENV_CMD" = x; then
31782    VS_VERSION="${VS_VERSION}"
31783    VS_BASE="$VS_COMNTOOLS/../.."
31784    METHOD="$VS_COMNTOOLS_VAR variable"
31785
31786    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31787      VCVARSFILE="vc/bin/vcvars32.bat"
31788    else
31789      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31790    fi
31791
31792
31793  windows_path="$VS_BASE"
31794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31795    unix_path=`$CYGPATH -u "$windows_path"`
31796    VS_BASE="$unix_path"
31797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31799    VS_BASE="$unix_path"
31800  fi
31801
31802    if test -d "$VS_BASE"; then
31803      if test -f "$VS_BASE/$VCVARSFILE"; then
31804        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31805$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31806        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31807        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31808        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31809        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31810      else
31811        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31812$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31813        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31814$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31815      fi
31816    fi
31817  fi
31818
31819  fi
31820  if test "x$PROGRAMFILES" != x; then
31821
31822  if test "x$VS_ENV_CMD" = x; then
31823    VS_VERSION="${VS_VERSION}"
31824    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31825    METHOD="well-known name"
31826
31827    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31828      VCVARSFILE="vc/bin/vcvars32.bat"
31829    else
31830      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31831    fi
31832
31833
31834  windows_path="$VS_BASE"
31835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31836    unix_path=`$CYGPATH -u "$windows_path"`
31837    VS_BASE="$unix_path"
31838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31840    VS_BASE="$unix_path"
31841  fi
31842
31843    if test -d "$VS_BASE"; then
31844      if test -f "$VS_BASE/$VCVARSFILE"; then
31845        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31846$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31847        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31848        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31849        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31850        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31851      else
31852        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31853$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31854        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31855$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31856      fi
31857    fi
31858  fi
31859
31860  fi
31861  # Work around the insanely named ProgramFiles(x86) env variable
31862  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31863  if test "x$PROGRAMFILES_X86" != x; then
31864
31865  if test "x$VS_ENV_CMD" = x; then
31866    VS_VERSION="${VS_VERSION}"
31867    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31868    METHOD="well-known name"
31869
31870    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31871      VCVARSFILE="vc/bin/vcvars32.bat"
31872    else
31873      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31874    fi
31875
31876
31877  windows_path="$VS_BASE"
31878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31879    unix_path=`$CYGPATH -u "$windows_path"`
31880    VS_BASE="$unix_path"
31881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31883    VS_BASE="$unix_path"
31884  fi
31885
31886    if test -d "$VS_BASE"; then
31887      if test -f "$VS_BASE/$VCVARSFILE"; then
31888        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31889$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31890        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31891        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31892        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31893        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31894      else
31895        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31896$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31897        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31898$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31899      fi
31900    fi
31901  fi
31902
31903  fi
31904
31905  if test "x$VS_ENV_CMD" = x; then
31906    VS_VERSION="${VS_VERSION}"
31907    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31908    METHOD="well-known name"
31909
31910    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31911      VCVARSFILE="vc/bin/vcvars32.bat"
31912    else
31913      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31914    fi
31915
31916
31917  windows_path="$VS_BASE"
31918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31919    unix_path=`$CYGPATH -u "$windows_path"`
31920    VS_BASE="$unix_path"
31921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31923    VS_BASE="$unix_path"
31924  fi
31925
31926    if test -d "$VS_BASE"; then
31927      if test -f "$VS_BASE/$VCVARSFILE"; then
31928        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31929$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31930        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31931        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31932        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31933        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31934      else
31935        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31936$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31937        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31938$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31939      fi
31940    fi
31941  fi
31942
31943
31944  if test "x$VS_ENV_CMD" = x; then
31945    VS_VERSION="${VS_VERSION}"
31946    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31947    METHOD="well-known name"
31948
31949    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31950      VCVARSFILE="vc/bin/vcvars32.bat"
31951    else
31952      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31953    fi
31954
31955
31956  windows_path="$VS_BASE"
31957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31958    unix_path=`$CYGPATH -u "$windows_path"`
31959    VS_BASE="$unix_path"
31960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31962    VS_BASE="$unix_path"
31963  fi
31964
31965    if test -d "$VS_BASE"; then
31966      if test -f "$VS_BASE/$VCVARSFILE"; then
31967        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31968$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31969        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31970        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31971        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31972        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31973      else
31974        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31975$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31976        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31977$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31978      fi
31979    fi
31980  fi
31981
31982
31983  if test "x$SDK_INSTALL_DIR" != x; then
31984    if test "x$ProgramW6432" != x; then
31985
31986  if test "x$VS_ENV_CMD" = x; then
31987    VS_VERSION="${VS_VERSION}"
31988    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31989    METHOD="well-known name"
31990
31991  windows_path="$WIN_SDK_BASE"
31992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31993    unix_path=`$CYGPATH -u "$windows_path"`
31994    WIN_SDK_BASE="$unix_path"
31995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31997    WIN_SDK_BASE="$unix_path"
31998  fi
31999
32000    if test -d "$WIN_SDK_BASE"; then
32001      # There have been cases of partial or broken SDK installations. A missing
32002      # lib dir is not going to work.
32003      if test ! -d "$WIN_SDK_BASE/lib"; then
32004        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32005$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32006        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32007$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32008      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32009        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32010$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32011        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32012        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32013          VS_ENV_ARGS="/x86"
32014        else
32015          VS_ENV_ARGS="/x64"
32016        fi
32017        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32018        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32019        # TODO: improve detection for other versions of SDK
32020        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32021      else
32022        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32023$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32024        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32025$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32026      fi
32027    fi
32028  fi
32029
32030    fi
32031    if test "x$PROGRAMW6432" != x; then
32032
32033  if test "x$VS_ENV_CMD" = x; then
32034    VS_VERSION="${VS_VERSION}"
32035    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32036    METHOD="well-known name"
32037
32038  windows_path="$WIN_SDK_BASE"
32039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32040    unix_path=`$CYGPATH -u "$windows_path"`
32041    WIN_SDK_BASE="$unix_path"
32042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32044    WIN_SDK_BASE="$unix_path"
32045  fi
32046
32047    if test -d "$WIN_SDK_BASE"; then
32048      # There have been cases of partial or broken SDK installations. A missing
32049      # lib dir is not going to work.
32050      if test ! -d "$WIN_SDK_BASE/lib"; then
32051        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32052$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32053        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32054$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32055      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32056        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32057$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32058        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32059        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32060          VS_ENV_ARGS="/x86"
32061        else
32062          VS_ENV_ARGS="/x64"
32063        fi
32064        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32065        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32066        # TODO: improve detection for other versions of SDK
32067        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32068      else
32069        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32070$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32071        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32072$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32073      fi
32074    fi
32075  fi
32076
32077    fi
32078    if test "x$PROGRAMFILES" != x; then
32079
32080  if test "x$VS_ENV_CMD" = x; then
32081    VS_VERSION="${VS_VERSION}"
32082    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32083    METHOD="well-known name"
32084
32085  windows_path="$WIN_SDK_BASE"
32086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32087    unix_path=`$CYGPATH -u "$windows_path"`
32088    WIN_SDK_BASE="$unix_path"
32089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32091    WIN_SDK_BASE="$unix_path"
32092  fi
32093
32094    if test -d "$WIN_SDK_BASE"; then
32095      # There have been cases of partial or broken SDK installations. A missing
32096      # lib dir is not going to work.
32097      if test ! -d "$WIN_SDK_BASE/lib"; then
32098        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32099$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32100        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32101$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32102      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32103        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32104$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32105        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32106        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32107          VS_ENV_ARGS="/x86"
32108        else
32109          VS_ENV_ARGS="/x64"
32110        fi
32111        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32112        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32113        # TODO: improve detection for other versions of SDK
32114        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32115      else
32116        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32117$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32118        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32119$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32120      fi
32121    fi
32122  fi
32123
32124    fi
32125
32126  if test "x$VS_ENV_CMD" = x; then
32127    VS_VERSION="${VS_VERSION}"
32128    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32129    METHOD="well-known name"
32130
32131  windows_path="$WIN_SDK_BASE"
32132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32133    unix_path=`$CYGPATH -u "$windows_path"`
32134    WIN_SDK_BASE="$unix_path"
32135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32137    WIN_SDK_BASE="$unix_path"
32138  fi
32139
32140    if test -d "$WIN_SDK_BASE"; then
32141      # There have been cases of partial or broken SDK installations. A missing
32142      # lib dir is not going to work.
32143      if test ! -d "$WIN_SDK_BASE/lib"; then
32144        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32145$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32146        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32147$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32148      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32149        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32150$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32151        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32152        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32153          VS_ENV_ARGS="/x86"
32154        else
32155          VS_ENV_ARGS="/x64"
32156        fi
32157        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32158        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32159        # TODO: improve detection for other versions of SDK
32160        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32161      else
32162        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32163$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32164        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32165$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32166      fi
32167    fi
32168  fi
32169
32170
32171  if test "x$VS_ENV_CMD" = x; then
32172    VS_VERSION="${VS_VERSION}"
32173    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32174    METHOD="well-known name"
32175
32176  windows_path="$WIN_SDK_BASE"
32177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32178    unix_path=`$CYGPATH -u "$windows_path"`
32179    WIN_SDK_BASE="$unix_path"
32180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32182    WIN_SDK_BASE="$unix_path"
32183  fi
32184
32185    if test -d "$WIN_SDK_BASE"; then
32186      # There have been cases of partial or broken SDK installations. A missing
32187      # lib dir is not going to work.
32188      if test ! -d "$WIN_SDK_BASE/lib"; then
32189        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32190$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32191        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32192$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32193      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32194        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32195$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32196        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32197        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32198          VS_ENV_ARGS="/x86"
32199        else
32200          VS_ENV_ARGS="/x64"
32201        fi
32202        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32203        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32204        # TODO: improve detection for other versions of SDK
32205        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32206      else
32207        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32208$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32209        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32210$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32211      fi
32212    fi
32213  fi
32214
32215  fi
32216
32217    if test "x$VS_ENV_CMD" != x; then
32218      TOOLCHAIN_VERSION=$VS_VERSION
32219      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32220      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32221      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32222      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32223      # The rest of the variables are already evaled while probing
32224      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32225$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32226      break
32227    fi
32228  done
32229
32230
32231  # If we have a devkit, skip all of the below.
32232  if test "x$DEVKIT_VS_VERSION" = x; then
32233    if test "x$VS_ENV_CMD" != x; then
32234      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32235
32236  # Only process if variable expands to non-empty
32237
32238  if test "x$VS_ENV_CMD" != x; then
32239    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32240
32241  # First separate the path from the arguments. This will split at the first
32242  # space.
32243  complete="$VS_ENV_CMD"
32244  path="${complete%% *}"
32245  tmp="$complete EOL"
32246  arguments="${tmp#* }"
32247
32248  # Input might be given as Windows format, start by converting to
32249  # unix format.
32250  new_path=`$CYGPATH -u "$path"`
32251
32252  # Now try to locate executable using which
32253  new_path=`$WHICH "$new_path" 2> /dev/null`
32254  # bat and cmd files are not always considered executable in cygwin causing which
32255  # to not find them
32256  if test "x$new_path" = x \
32257      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32258      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32259    new_path=`$CYGPATH -u "$path"`
32260  fi
32261  if test "x$new_path" = x; then
32262    # Oops. Which didn't find the executable.
32263    # The splitting of arguments from the executable at a space might have been incorrect,
32264    # since paths with space are more likely in Windows. Give it another try with the whole
32265    # argument.
32266    path="$complete"
32267    arguments="EOL"
32268    new_path=`$CYGPATH -u "$path"`
32269    new_path=`$WHICH "$new_path" 2> /dev/null`
32270    # bat and cmd files are not always considered executable in cygwin causing which
32271    # to not find them
32272    if test "x$new_path" = x \
32273        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32274        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32275      new_path=`$CYGPATH -u "$path"`
32276    fi
32277    if test "x$new_path" = x; then
32278      # It's still not found. Now this is an unrecoverable error.
32279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32280$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32281      has_space=`$ECHO "$complete" | $GREP " "`
32282      if test "x$has_space" != x; then
32283        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32284$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32285      fi
32286      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32287    fi
32288  fi
32289
32290  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32291  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32292  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32293  # "foo.exe" is OK but "foo" is an error.
32294  #
32295  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32296  # It is also a way to make sure we got the proper file name for the real test later on.
32297  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32298  if test "x$test_shortpath" = x; then
32299    # Short path failed, file does not exist as specified.
32300    # Try adding .exe or .cmd
32301    if test -f "${new_path}.exe"; then
32302      input_to_shortpath="${new_path}.exe"
32303    elif test -f "${new_path}.cmd"; then
32304      input_to_shortpath="${new_path}.cmd"
32305    else
32306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32307$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32308      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32309$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32310      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32311    fi
32312  else
32313    input_to_shortpath="$new_path"
32314  fi
32315
32316  # Call helper function which possibly converts this using DOS-style short mode.
32317  # If so, the updated path is stored in $new_path.
32318  new_path="$input_to_shortpath"
32319
32320  input_path="$input_to_shortpath"
32321  # Check if we need to convert this using DOS-style short mode. If the path
32322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32323  # take no chances and rewrite it.
32324  # Note: m4 eats our [], so we need to use [ and ] instead.
32325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32326  if test "x$has_forbidden_chars" != x; then
32327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32331      # Going to short mode and back again did indeed matter. Since short mode is
32332      # case insensitive, let's make it lowercase to improve readability.
32333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32334      # Now convert it back to Unix-style (cygpath)
32335      input_path=`$CYGPATH -u "$shortmode_path"`
32336      new_path="$input_path"
32337    fi
32338  fi
32339
32340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32341  if test "x$test_cygdrive_prefix" = x; then
32342    # As a simple fix, exclude /usr/bin since it's not a real path.
32343    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32345      # a path prefixed by /cygdrive for fixpath to work.
32346      new_path="$CYGWIN_ROOT_PATH$input_path"
32347    fi
32348  fi
32349
32350  # remove trailing .exe if any
32351  new_path="${new_path/%.exe/}"
32352
32353    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32354
32355  # First separate the path from the arguments. This will split at the first
32356  # space.
32357  complete="$VS_ENV_CMD"
32358  path="${complete%% *}"
32359  tmp="$complete EOL"
32360  arguments="${tmp#* }"
32361
32362  # Input might be given as Windows format, start by converting to
32363  # unix format.
32364  new_path="$path"
32365
32366  windows_path="$new_path"
32367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32368    unix_path=`$CYGPATH -u "$windows_path"`
32369    new_path="$unix_path"
32370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32372    new_path="$unix_path"
32373  fi
32374
32375
32376  # Now try to locate executable using which
32377  new_path=`$WHICH "$new_path" 2> /dev/null`
32378
32379  if test "x$new_path" = x; then
32380    # Oops. Which didn't find the executable.
32381    # The splitting of arguments from the executable at a space might have been incorrect,
32382    # since paths with space are more likely in Windows. Give it another try with the whole
32383    # argument.
32384    path="$complete"
32385    arguments="EOL"
32386    new_path="$path"
32387
32388  windows_path="$new_path"
32389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32390    unix_path=`$CYGPATH -u "$windows_path"`
32391    new_path="$unix_path"
32392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32394    new_path="$unix_path"
32395  fi
32396
32397
32398    new_path=`$WHICH "$new_path" 2> /dev/null`
32399    # bat and cmd files are not always considered executable in MSYS causing which
32400    # to not find them
32401    if test "x$new_path" = x \
32402        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32403        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32404      new_path="$path"
32405
32406  windows_path="$new_path"
32407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32408    unix_path=`$CYGPATH -u "$windows_path"`
32409    new_path="$unix_path"
32410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32412    new_path="$unix_path"
32413  fi
32414
32415    fi
32416
32417    if test "x$new_path" = x; then
32418      # It's still not found. Now this is an unrecoverable error.
32419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32420$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32421      has_space=`$ECHO "$complete" | $GREP " "`
32422      if test "x$has_space" != x; then
32423        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32424$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32425      fi
32426      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32427    fi
32428  fi
32429
32430  # Now new_path has a complete unix path to the binary
32431  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32432    # Keep paths in /bin as-is, but remove trailing .exe if any
32433    new_path="${new_path/%.exe/}"
32434    # Do not save /bin paths to all_fixpath_prefixes!
32435  else
32436    # Not in mixed or Windows style, start by that.
32437    new_path=`cmd //c echo $new_path`
32438
32439  input_path="$new_path"
32440  # Check if we need to convert this using DOS-style short mode. If the path
32441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32442  # take no chances and rewrite it.
32443  # Note: m4 eats our [], so we need to use [ and ] instead.
32444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32445  if test "x$has_forbidden_chars" != x; then
32446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32448  fi
32449
32450    # Output is in $new_path
32451
32452  windows_path="$new_path"
32453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32454    unix_path=`$CYGPATH -u "$windows_path"`
32455    new_path="$unix_path"
32456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32458    new_path="$unix_path"
32459  fi
32460
32461    # remove trailing .exe if any
32462    new_path="${new_path/%.exe/}"
32463
32464    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32465    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32466  fi
32467
32468    else
32469      # We're on a unix platform. Hooray! :)
32470      # First separate the path from the arguments. This will split at the first
32471      # space.
32472      complete="$VS_ENV_CMD"
32473      path="${complete%% *}"
32474      tmp="$complete EOL"
32475      arguments="${tmp#* }"
32476
32477      # Cannot rely on the command "which" here since it doesn't always work.
32478      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32479      if test -z "$is_absolute_path"; then
32480        # Path to executable is not absolute. Find it.
32481        IFS_save="$IFS"
32482        IFS=:
32483        for p in $PATH; do
32484          if test -f "$p/$path" && test -x "$p/$path"; then
32485            new_path="$p/$path"
32486            break
32487          fi
32488        done
32489        IFS="$IFS_save"
32490      else
32491        # This is an absolute path, we can use it without further modifications.
32492        new_path="$path"
32493      fi
32494
32495      if test "x$new_path" = x; then
32496        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32497$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32498        has_space=`$ECHO "$complete" | $GREP " "`
32499        if test "x$has_space" != x; then
32500          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32501$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32502        fi
32503        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32504      fi
32505    fi
32506
32507    # Now join together the path and the arguments once again
32508    if test "x$arguments" != xEOL; then
32509      new_complete="$new_path ${arguments% *}"
32510    else
32511      new_complete="$new_path"
32512    fi
32513
32514    if test "x$complete" != "x$new_complete"; then
32515      VS_ENV_CMD="$new_complete"
32516      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32517$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32518    fi
32519  fi
32520
32521
32522      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32523      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32524$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32525
32526      # We need to create a couple of temporary files.
32527      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32528      $MKDIR -p $VS_ENV_TMP_DIR
32529
32530      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32531      # Instead create a shell script which will set the relevant variables when run.
32532      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32533
32534  unix_path="$WINPATH_VS_ENV_CMD"
32535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32536    windows_path=`$CYGPATH -m "$unix_path"`
32537    WINPATH_VS_ENV_CMD="$windows_path"
32538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32539    windows_path=`cmd //c echo $unix_path`
32540    WINPATH_VS_ENV_CMD="$windows_path"
32541  fi
32542
32543      WINPATH_BASH="$BASH"
32544
32545  unix_path="$WINPATH_BASH"
32546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32547    windows_path=`$CYGPATH -m "$unix_path"`
32548    WINPATH_BASH="$windows_path"
32549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32550    windows_path=`cmd //c echo $unix_path`
32551    WINPATH_BASH="$windows_path"
32552  fi
32553
32554
32555      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32556      # script (executable by bash) that will setup the important variables.
32557      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32558      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32559      # This will end up something like:
32560      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32561      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32562      # These will end up something like:
32563      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32564      # The trailing space for everyone except PATH is no typo, but is needed due
32565      # to trailing \ in the Windows paths. These will be stripped later.
32566      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32567          >> $EXTRACT_VC_ENV_BAT_FILE
32568      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32569          >> $EXTRACT_VC_ENV_BAT_FILE
32570      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32571          >> $EXTRACT_VC_ENV_BAT_FILE
32572      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32573          >> $EXTRACT_VC_ENV_BAT_FILE
32574      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> 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
32579      # Now execute the newly created bat file.
32580      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32581      # Change directory so we don't need to mess with Windows paths in redirects.
32582      cd $VS_ENV_TMP_DIR
32583      cmd /c extract-vs-env.bat | $CAT
32584      cd $CURDIR
32585
32586      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32587        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32588$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32589        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32590$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32591        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32592$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32593        as_fn_error $? "Cannot continue" "$LINENO" 5
32594      fi
32595
32596      # Now set all paths and other env variables. This will allow the rest of
32597      # the configure script to find and run the compiler in the proper way.
32598      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32599$as_echo "$as_me: Setting extracted environment variables" >&6;}
32600      . $VS_ENV_TMP_DIR/set-vs-env.sh
32601      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32602      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32603    else
32604      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32605      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32606$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32607    fi
32608  fi
32609
32610  # At this point, we should have correct variables in the environment, or we can't continue.
32611  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32612$as_echo_n "checking for Visual Studio variables... " >&6; }
32613
32614  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32615      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32616    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32617      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32618$as_echo "present but broken" >&6; }
32619      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32620    else
32621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32622$as_echo "ok" >&6; }
32623      # Remove any trailing "\" ";" and " " from the variables.
32624      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32625      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32626      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32627      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32628      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32629      # Remove any paths containing # (typically F#) as that messes up make. This
32630      # is needed if visual studio was installed with F# support.
32631      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32632
32633
32634
32635
32636
32637      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32638      OLDIFS="$IFS"
32639      IFS=";"
32640      for i in $VS_INCLUDE; do
32641        ipath=$i
32642        # Only process non-empty elements
32643        if test "x$ipath" != x; then
32644          IFS="$OLDIFS"
32645          # Check that directory exists before calling fixup_path
32646          testpath=$ipath
32647
32648  windows_path="$testpath"
32649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32650    unix_path=`$CYGPATH -u "$windows_path"`
32651    testpath="$unix_path"
32652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32654    testpath="$unix_path"
32655  fi
32656
32657          if test -d "$testpath"; then
32658
32659  # Only process if variable expands to non-empty
32660
32661  if test "x$ipath" != x; then
32662    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32663
32664  # Input might be given as Windows format, start by converting to
32665  # unix format.
32666  path="$ipath"
32667  new_path=`$CYGPATH -u "$path"`
32668
32669  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32670  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32671  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32672  # "foo.exe" is OK but "foo" is an error.
32673  #
32674  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32675  # It is also a way to make sure we got the proper file name for the real test later on.
32676  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32677  if test "x$test_shortpath" = x; then
32678    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32679$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32680    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32681  fi
32682
32683  # Call helper function which possibly converts this using DOS-style short mode.
32684  # If so, the updated path is stored in $new_path.
32685
32686  input_path="$new_path"
32687  # Check if we need to convert this using DOS-style short mode. If the path
32688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32689  # take no chances and rewrite it.
32690  # Note: m4 eats our [], so we need to use [ and ] instead.
32691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32692  if test "x$has_forbidden_chars" != x; then
32693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32694    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32695    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32696    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32697      # Going to short mode and back again did indeed matter. Since short mode is
32698      # case insensitive, let's make it lowercase to improve readability.
32699      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32700      # Now convert it back to Unix-style (cygpath)
32701      input_path=`$CYGPATH -u "$shortmode_path"`
32702      new_path="$input_path"
32703    fi
32704  fi
32705
32706  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32707  if test "x$test_cygdrive_prefix" = x; then
32708    # As a simple fix, exclude /usr/bin since it's not a real path.
32709    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32710      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32711      # a path prefixed by /cygdrive for fixpath to work.
32712      new_path="$CYGWIN_ROOT_PATH$input_path"
32713    fi
32714  fi
32715
32716
32717  if test "x$path" != "x$new_path"; then
32718    ipath="$new_path"
32719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32720$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32721  fi
32722
32723    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32724
32725  path="$ipath"
32726  has_colon=`$ECHO $path | $GREP ^.:`
32727  new_path="$path"
32728  if test "x$has_colon" = x; then
32729    # Not in mixed or Windows style, start by that.
32730    new_path=`cmd //c echo $path`
32731  fi
32732
32733
32734  input_path="$new_path"
32735  # Check if we need to convert this using DOS-style short mode. If the path
32736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32737  # take no chances and rewrite it.
32738  # Note: m4 eats our [], so we need to use [ and ] instead.
32739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32740  if test "x$has_forbidden_chars" != x; then
32741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32742    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32743  fi
32744
32745
32746  windows_path="$new_path"
32747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32748    unix_path=`$CYGPATH -u "$windows_path"`
32749    new_path="$unix_path"
32750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32752    new_path="$unix_path"
32753  fi
32754
32755  if test "x$path" != "x$new_path"; then
32756    ipath="$new_path"
32757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32758$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32759  fi
32760
32761  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32762  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32763
32764    else
32765      # We're on a unix platform. Hooray! :)
32766      path="$ipath"
32767      has_space=`$ECHO "$path" | $GREP " "`
32768      if test "x$has_space" != x; then
32769        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32770$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32771        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32772      fi
32773
32774      # Use eval to expand a potential ~
32775      eval path="$path"
32776      if test ! -f "$path" && test ! -d "$path"; then
32777        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32778      fi
32779
32780      if test -d "$path"; then
32781        ipath="`cd "$path"; $THEPWDCMD -L`"
32782      else
32783        dir="`$DIRNAME "$path"`"
32784        base="`$BASENAME "$path"`"
32785        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32786      fi
32787    fi
32788  fi
32789
32790            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32791          fi
32792          IFS=";"
32793        fi
32794      done
32795      # Convert VS_LIB into SYSROOT_LDFLAGS
32796      for i in $VS_LIB; do
32797        libpath=$i
32798        # Only process non-empty elements
32799        if test "x$libpath" != x; then
32800          IFS="$OLDIFS"
32801          # Check that directory exists before calling fixup_path
32802          testpath=$libpath
32803
32804  windows_path="$testpath"
32805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32806    unix_path=`$CYGPATH -u "$windows_path"`
32807    testpath="$unix_path"
32808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32810    testpath="$unix_path"
32811  fi
32812
32813          if test -d "$testpath"; then
32814
32815  # Only process if variable expands to non-empty
32816
32817  if test "x$libpath" != x; then
32818    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32819
32820  # Input might be given as Windows format, start by converting to
32821  # unix format.
32822  path="$libpath"
32823  new_path=`$CYGPATH -u "$path"`
32824
32825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32828  # "foo.exe" is OK but "foo" is an error.
32829  #
32830  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32831  # It is also a way to make sure we got the proper file name for the real test later on.
32832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32833  if test "x$test_shortpath" = x; then
32834    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32835$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32836    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32837  fi
32838
32839  # Call helper function which possibly converts this using DOS-style short mode.
32840  # If so, the updated path is stored in $new_path.
32841
32842  input_path="$new_path"
32843  # Check if we need to convert this using DOS-style short mode. If the path
32844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32845  # take no chances and rewrite it.
32846  # Note: m4 eats our [], so we need to use [ and ] instead.
32847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32848  if test "x$has_forbidden_chars" != x; then
32849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32850    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32851    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32852    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32853      # Going to short mode and back again did indeed matter. Since short mode is
32854      # case insensitive, let's make it lowercase to improve readability.
32855      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32856      # Now convert it back to Unix-style (cygpath)
32857      input_path=`$CYGPATH -u "$shortmode_path"`
32858      new_path="$input_path"
32859    fi
32860  fi
32861
32862  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32863  if test "x$test_cygdrive_prefix" = x; then
32864    # As a simple fix, exclude /usr/bin since it's not a real path.
32865    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32866      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32867      # a path prefixed by /cygdrive for fixpath to work.
32868      new_path="$CYGWIN_ROOT_PATH$input_path"
32869    fi
32870  fi
32871
32872
32873  if test "x$path" != "x$new_path"; then
32874    libpath="$new_path"
32875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32876$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32877  fi
32878
32879    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32880
32881  path="$libpath"
32882  has_colon=`$ECHO $path | $GREP ^.:`
32883  new_path="$path"
32884  if test "x$has_colon" = x; then
32885    # Not in mixed or Windows style, start by that.
32886    new_path=`cmd //c echo $path`
32887  fi
32888
32889
32890  input_path="$new_path"
32891  # Check if we need to convert this using DOS-style short mode. If the path
32892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32893  # take no chances and rewrite it.
32894  # Note: m4 eats our [], so we need to use [ and ] instead.
32895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32896  if test "x$has_forbidden_chars" != x; then
32897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32898    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32899  fi
32900
32901
32902  windows_path="$new_path"
32903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32904    unix_path=`$CYGPATH -u "$windows_path"`
32905    new_path="$unix_path"
32906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32908    new_path="$unix_path"
32909  fi
32910
32911  if test "x$path" != "x$new_path"; then
32912    libpath="$new_path"
32913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32914$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32915  fi
32916
32917  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32918  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32919
32920    else
32921      # We're on a unix platform. Hooray! :)
32922      path="$libpath"
32923      has_space=`$ECHO "$path" | $GREP " "`
32924      if test "x$has_space" != x; then
32925        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32926$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32927        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32928      fi
32929
32930      # Use eval to expand a potential ~
32931      eval path="$path"
32932      if test ! -f "$path" && test ! -d "$path"; then
32933        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32934      fi
32935
32936      if test -d "$path"; then
32937        libpath="`cd "$path"; $THEPWDCMD -L`"
32938      else
32939        dir="`$DIRNAME "$path"`"
32940        base="`$BASENAME "$path"`"
32941        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32942      fi
32943    fi
32944  fi
32945
32946            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32947          fi
32948          IFS=";"
32949        fi
32950      done
32951      IFS="$OLDIFS"
32952    fi
32953  else
32954    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32955$as_echo "not found" >&6; }
32956
32957    if test "x$VS_ENV_CMD" = x; then
32958      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32959$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32960      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32961$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32962    else
32963      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32964$as_echo "$as_me: Running the extraction script failed." >&6;}
32965    fi
32966    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32967$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32968    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32969$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32970    as_fn_error $? "Cannot continue" "$LINENO" 5
32971  fi
32972
32973    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32974    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32975    PATH="$VS_PATH"
32976    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32977    export INCLUDE="$VS_INCLUDE"
32978    export LIB="$VS_LIB"
32979  else
32980    if test "x$XCODE_VERSION_OUTPUT" != x; then
32981      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32982      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32983      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32984    else
32985      # Currently we do not define this for other toolchains. This might change as the need arise.
32986      TOOLCHAIN_VERSION=
32987    fi
32988  fi
32989
32990
32991  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32992  # override all other locations.
32993  if test "x$TOOLCHAIN_PATH" != x; then
32994    PATH=$TOOLCHAIN_PATH:$PATH
32995  fi
32996
32997
32998  #
32999  # Setup the compilers (CC and CXX)
33000  #
33001
33002  COMPILER_NAME=C
33003  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33004
33005  if test "x$CC" != x; then
33006    # User has supplied compiler name already, always let that override.
33007    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33008$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33009    if test "x`basename $CC`" = "x$CC"; then
33010      # A command without a complete path is provided, search $PATH.
33011
33012      for ac_prog in $CC
33013do
33014  # Extract the first word of "$ac_prog", so it can be a program name with args.
33015set dummy $ac_prog; ac_word=$2
33016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33017$as_echo_n "checking for $ac_word... " >&6; }
33018if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33019  $as_echo_n "(cached) " >&6
33020else
33021  case $POTENTIAL_CC in
33022  [\\/]* | ?:[\\/]*)
33023  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33024  ;;
33025  *)
33026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33027for as_dir in $PATH
33028do
33029  IFS=$as_save_IFS
33030  test -z "$as_dir" && as_dir=.
33031    for ac_exec_ext in '' $ac_executable_extensions; do
33032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33033    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33035    break 2
33036  fi
33037done
33038  done
33039IFS=$as_save_IFS
33040
33041  ;;
33042esac
33043fi
33044POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33045if test -n "$POTENTIAL_CC"; then
33046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33047$as_echo "$POTENTIAL_CC" >&6; }
33048else
33049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33050$as_echo "no" >&6; }
33051fi
33052
33053
33054  test -n "$POTENTIAL_CC" && break
33055done
33056
33057      if test "x$POTENTIAL_CC" != x; then
33058        CC=$POTENTIAL_CC
33059      else
33060        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33061      fi
33062    else
33063      # Otherwise it might already be a complete path
33064      if test ! -x "$CC"; then
33065        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33066      fi
33067    fi
33068  else
33069    # No user supplied value. Locate compiler ourselves.
33070
33071    # If we are cross compiling, assume cross compilation tools follows the
33072    # cross compilation standard where they are prefixed with the autoconf
33073    # standard name for the target. For example the binary
33074    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33075    # If we are not cross compiling, then the default compiler name will be
33076    # used.
33077
33078    CC=
33079    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33080    # before checking the rest of the PATH.
33081    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33082    # step, this should not be necessary.
33083    if test -n "$TOOLCHAIN_PATH"; then
33084      PATH_save="$PATH"
33085      PATH="$TOOLCHAIN_PATH"
33086      for ac_prog in $SEARCH_LIST
33087do
33088  # Extract the first word of "$ac_prog", so it can be a program name with args.
33089set dummy $ac_prog; ac_word=$2
33090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33091$as_echo_n "checking for $ac_word... " >&6; }
33092if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33093  $as_echo_n "(cached) " >&6
33094else
33095  case $TOOLCHAIN_PATH_CC in
33096  [\\/]* | ?:[\\/]*)
33097  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33098  ;;
33099  *)
33100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33101for as_dir in $PATH
33102do
33103  IFS=$as_save_IFS
33104  test -z "$as_dir" && as_dir=.
33105    for ac_exec_ext in '' $ac_executable_extensions; do
33106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33107    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33109    break 2
33110  fi
33111done
33112  done
33113IFS=$as_save_IFS
33114
33115  ;;
33116esac
33117fi
33118TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33119if test -n "$TOOLCHAIN_PATH_CC"; then
33120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33121$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33122else
33123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33124$as_echo "no" >&6; }
33125fi
33126
33127
33128  test -n "$TOOLCHAIN_PATH_CC" && break
33129done
33130
33131      CC=$TOOLCHAIN_PATH_CC
33132      PATH="$PATH_save"
33133    fi
33134
33135    # AC_PATH_PROGS can't be run multiple times with the same variable,
33136    # so create a new name for this run.
33137    if test "x$CC" = x; then
33138      for ac_prog in $SEARCH_LIST
33139do
33140  # Extract the first word of "$ac_prog", so it can be a program name with args.
33141set dummy $ac_prog; ac_word=$2
33142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33143$as_echo_n "checking for $ac_word... " >&6; }
33144if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33145  $as_echo_n "(cached) " >&6
33146else
33147  case $POTENTIAL_CC in
33148  [\\/]* | ?:[\\/]*)
33149  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33150  ;;
33151  *)
33152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33153for as_dir in $PATH
33154do
33155  IFS=$as_save_IFS
33156  test -z "$as_dir" && as_dir=.
33157    for ac_exec_ext in '' $ac_executable_extensions; do
33158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33159    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33161    break 2
33162  fi
33163done
33164  done
33165IFS=$as_save_IFS
33166
33167  ;;
33168esac
33169fi
33170POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33171if test -n "$POTENTIAL_CC"; then
33172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33173$as_echo "$POTENTIAL_CC" >&6; }
33174else
33175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33176$as_echo "no" >&6; }
33177fi
33178
33179
33180  test -n "$POTENTIAL_CC" && break
33181done
33182
33183      CC=$POTENTIAL_CC
33184    fi
33185
33186    if test "x$CC" = x; then
33187
33188  # Print a helpful message on how to acquire the necessary build dependency.
33189  # devkit is the help tag: freetype, cups, alsa etc
33190  MISSING_DEPENDENCY=devkit
33191
33192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33193    cygwin_help $MISSING_DEPENDENCY
33194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33195    msys_help $MISSING_DEPENDENCY
33196  else
33197    PKGHANDLER_COMMAND=
33198
33199    case $PKGHANDLER in
33200      apt-get)
33201        apt_help     $MISSING_DEPENDENCY ;;
33202      yum)
33203        yum_help     $MISSING_DEPENDENCY ;;
33204      port)
33205        port_help    $MISSING_DEPENDENCY ;;
33206      pkgutil)
33207        pkgutil_help $MISSING_DEPENDENCY ;;
33208      pkgadd)
33209        pkgadd_help  $MISSING_DEPENDENCY ;;
33210    esac
33211
33212    if test "x$PKGHANDLER_COMMAND" != x; then
33213      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33214    fi
33215  fi
33216
33217      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33218    fi
33219  fi
33220
33221  # Now we have a compiler binary in CC. Make sure it's okay.
33222
33223  # Only process if variable expands to non-empty
33224
33225  if test "x$CC" != x; then
33226    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33227
33228  # First separate the path from the arguments. This will split at the first
33229  # space.
33230  complete="$CC"
33231  path="${complete%% *}"
33232  tmp="$complete EOL"
33233  arguments="${tmp#* }"
33234
33235  # Input might be given as Windows format, start by converting to
33236  # unix format.
33237  new_path=`$CYGPATH -u "$path"`
33238
33239  # Now try to locate executable using which
33240  new_path=`$WHICH "$new_path" 2> /dev/null`
33241  # bat and cmd files are not always considered executable in cygwin causing which
33242  # to not find them
33243  if test "x$new_path" = x \
33244      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33245      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33246    new_path=`$CYGPATH -u "$path"`
33247  fi
33248  if test "x$new_path" = x; then
33249    # Oops. Which didn't find the executable.
33250    # The splitting of arguments from the executable at a space might have been incorrect,
33251    # since paths with space are more likely in Windows. Give it another try with the whole
33252    # argument.
33253    path="$complete"
33254    arguments="EOL"
33255    new_path=`$CYGPATH -u "$path"`
33256    new_path=`$WHICH "$new_path" 2> /dev/null`
33257    # bat and cmd files are not always considered executable in cygwin causing which
33258    # to not find them
33259    if test "x$new_path" = x \
33260        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33261        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33262      new_path=`$CYGPATH -u "$path"`
33263    fi
33264    if test "x$new_path" = x; then
33265      # It's still not found. Now this is an unrecoverable error.
33266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33267$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33268      has_space=`$ECHO "$complete" | $GREP " "`
33269      if test "x$has_space" != x; then
33270        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33271$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33272      fi
33273      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33274    fi
33275  fi
33276
33277  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33278  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33279  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33280  # "foo.exe" is OK but "foo" is an error.
33281  #
33282  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33283  # It is also a way to make sure we got the proper file name for the real test later on.
33284  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33285  if test "x$test_shortpath" = x; then
33286    # Short path failed, file does not exist as specified.
33287    # Try adding .exe or .cmd
33288    if test -f "${new_path}.exe"; then
33289      input_to_shortpath="${new_path}.exe"
33290    elif test -f "${new_path}.cmd"; then
33291      input_to_shortpath="${new_path}.cmd"
33292    else
33293      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33294$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33295      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33296$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33297      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33298    fi
33299  else
33300    input_to_shortpath="$new_path"
33301  fi
33302
33303  # Call helper function which possibly converts this using DOS-style short mode.
33304  # If so, the updated path is stored in $new_path.
33305  new_path="$input_to_shortpath"
33306
33307  input_path="$input_to_shortpath"
33308  # Check if we need to convert this using DOS-style short mode. If the path
33309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33310  # take no chances and rewrite it.
33311  # Note: m4 eats our [], so we need to use [ and ] instead.
33312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33313  if test "x$has_forbidden_chars" != x; then
33314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33315    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33316    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33317    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33318      # Going to short mode and back again did indeed matter. Since short mode is
33319      # case insensitive, let's make it lowercase to improve readability.
33320      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33321      # Now convert it back to Unix-style (cygpath)
33322      input_path=`$CYGPATH -u "$shortmode_path"`
33323      new_path="$input_path"
33324    fi
33325  fi
33326
33327  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33328  if test "x$test_cygdrive_prefix" = x; then
33329    # As a simple fix, exclude /usr/bin since it's not a real path.
33330    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33331      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33332      # a path prefixed by /cygdrive for fixpath to work.
33333      new_path="$CYGWIN_ROOT_PATH$input_path"
33334    fi
33335  fi
33336
33337  # remove trailing .exe if any
33338  new_path="${new_path/%.exe/}"
33339
33340    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33341
33342  # First separate the path from the arguments. This will split at the first
33343  # space.
33344  complete="$CC"
33345  path="${complete%% *}"
33346  tmp="$complete EOL"
33347  arguments="${tmp#* }"
33348
33349  # Input might be given as Windows format, start by converting to
33350  # unix format.
33351  new_path="$path"
33352
33353  windows_path="$new_path"
33354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33355    unix_path=`$CYGPATH -u "$windows_path"`
33356    new_path="$unix_path"
33357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33359    new_path="$unix_path"
33360  fi
33361
33362
33363  # Now try to locate executable using which
33364  new_path=`$WHICH "$new_path" 2> /dev/null`
33365
33366  if test "x$new_path" = x; then
33367    # Oops. Which didn't find the executable.
33368    # The splitting of arguments from the executable at a space might have been incorrect,
33369    # since paths with space are more likely in Windows. Give it another try with the whole
33370    # argument.
33371    path="$complete"
33372    arguments="EOL"
33373    new_path="$path"
33374
33375  windows_path="$new_path"
33376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33377    unix_path=`$CYGPATH -u "$windows_path"`
33378    new_path="$unix_path"
33379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33381    new_path="$unix_path"
33382  fi
33383
33384
33385    new_path=`$WHICH "$new_path" 2> /dev/null`
33386    # bat and cmd files are not always considered executable in MSYS causing which
33387    # to not find them
33388    if test "x$new_path" = x \
33389        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33390        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33391      new_path="$path"
33392
33393  windows_path="$new_path"
33394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33395    unix_path=`$CYGPATH -u "$windows_path"`
33396    new_path="$unix_path"
33397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33399    new_path="$unix_path"
33400  fi
33401
33402    fi
33403
33404    if test "x$new_path" = x; then
33405      # It's still not found. Now this is an unrecoverable error.
33406      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33407$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33408      has_space=`$ECHO "$complete" | $GREP " "`
33409      if test "x$has_space" != x; then
33410        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33411$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33412      fi
33413      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33414    fi
33415  fi
33416
33417  # Now new_path has a complete unix path to the binary
33418  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33419    # Keep paths in /bin as-is, but remove trailing .exe if any
33420    new_path="${new_path/%.exe/}"
33421    # Do not save /bin paths to all_fixpath_prefixes!
33422  else
33423    # Not in mixed or Windows style, start by that.
33424    new_path=`cmd //c echo $new_path`
33425
33426  input_path="$new_path"
33427  # Check if we need to convert this using DOS-style short mode. If the path
33428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33429  # take no chances and rewrite it.
33430  # Note: m4 eats our [], so we need to use [ and ] instead.
33431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33432  if test "x$has_forbidden_chars" != x; then
33433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33434    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33435  fi
33436
33437    # Output is in $new_path
33438
33439  windows_path="$new_path"
33440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33441    unix_path=`$CYGPATH -u "$windows_path"`
33442    new_path="$unix_path"
33443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33445    new_path="$unix_path"
33446  fi
33447
33448    # remove trailing .exe if any
33449    new_path="${new_path/%.exe/}"
33450
33451    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33452    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33453  fi
33454
33455    else
33456      # We're on a unix platform. Hooray! :)
33457      # First separate the path from the arguments. This will split at the first
33458      # space.
33459      complete="$CC"
33460      path="${complete%% *}"
33461      tmp="$complete EOL"
33462      arguments="${tmp#* }"
33463
33464      # Cannot rely on the command "which" here since it doesn't always work.
33465      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33466      if test -z "$is_absolute_path"; then
33467        # Path to executable is not absolute. Find it.
33468        IFS_save="$IFS"
33469        IFS=:
33470        for p in $PATH; do
33471          if test -f "$p/$path" && test -x "$p/$path"; then
33472            new_path="$p/$path"
33473            break
33474          fi
33475        done
33476        IFS="$IFS_save"
33477      else
33478        # This is an absolute path, we can use it without further modifications.
33479        new_path="$path"
33480      fi
33481
33482      if test "x$new_path" = x; then
33483        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33484$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33485        has_space=`$ECHO "$complete" | $GREP " "`
33486        if test "x$has_space" != x; then
33487          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33488$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33489        fi
33490        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33491      fi
33492    fi
33493
33494    # Now join together the path and the arguments once again
33495    if test "x$arguments" != xEOL; then
33496      new_complete="$new_path ${arguments% *}"
33497    else
33498      new_complete="$new_path"
33499    fi
33500
33501    if test "x$complete" != "x$new_complete"; then
33502      CC="$new_complete"
33503      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33504$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33505    fi
33506  fi
33507
33508  TEST_COMPILER="$CC"
33509
33510  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33511$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33512  SYMLINK_ORIGINAL="$TEST_COMPILER"
33513
33514  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33515    # Follow a chain of symbolic links. Use readlink
33516    # where it exists, else fall back to horribly
33517    # complicated shell code.
33518    if test "x$READLINK_TESTED" != yes; then
33519      # On MacOSX there is a readlink tool with a different
33520      # purpose than the GNU readlink tool. Check the found readlink.
33521      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33522      if test "x$ISGNU" = x; then
33523        # A readlink that we do not know how to use.
33524        # Are there other non-GNU readlinks out there?
33525        READLINK_TESTED=yes
33526        READLINK=
33527      fi
33528    fi
33529
33530    if test "x$READLINK" != x; then
33531      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33532    else
33533      # Save the current directory for restoring afterwards
33534      STARTDIR=$PWD
33535      COUNTER=0
33536      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33537      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33538      cd $sym_link_dir
33539      # Use -P flag to resolve symlinks in directories.
33540      cd `$THEPWDCMD -P`
33541      sym_link_dir=`$THEPWDCMD -P`
33542      # Resolve file symlinks
33543      while test $COUNTER -lt 20; do
33544        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33545        if test "x$ISLINK" == x; then
33546          # This is not a symbolic link! We are done!
33547          break
33548        fi
33549        # Again resolve directory symlinks since the target of the just found
33550        # link could be in a different directory
33551        cd `$DIRNAME $ISLINK`
33552        sym_link_dir=`$THEPWDCMD -P`
33553        sym_link_file=`$BASENAME $ISLINK`
33554        let COUNTER=COUNTER+1
33555      done
33556      cd $STARTDIR
33557      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33558    fi
33559  fi
33560
33561  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33562    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33563$as_echo "no symlink" >&6; }
33564  else
33565    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33566$as_echo "$SYMLINK_ORIGINAL" >&6; }
33567
33568    # We can't handle ccache by gcc wrappers, since we need to know if we're
33569    # using ccache. Instead ccache usage must be controlled by a configure option.
33570    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33571    if test "x$COMPILER_BASENAME" = "xccache"; then
33572      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33573$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33574      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33575    fi
33576  fi
33577
33578
33579  COMPILER=$CC
33580  COMPILER_NAME=$COMPILER_NAME
33581
33582  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33583    # cc -V output typically looks like
33584    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33585    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33586    # Check that this is likely to be the Solaris Studio cc.
33587    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33588    if test $? -ne 0; then
33589      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33590      { $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
33591$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33592      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33593$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33594      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33595$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33596      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33597    fi
33598    # Remove usage instructions (if present), and
33599    # collapse compiler output into a single line
33600    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33601        $SED -e 's/ *[Uu]sage:.*//'`
33602    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33603        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33604  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33605    # xlc -qversion output typically looks like
33606    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33607    #     Version: 11.01.0000.0015
33608    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33609    # Check that this is likely to be the IBM XL C compiler.
33610    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33611    if test $? -ne 0; then
33612      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33613      { $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
33614$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33615      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33616$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33617      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33618$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33619      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33620    fi
33621    # Collapse compiler output into a single line
33622    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33623    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33624        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33625  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33626    # There is no specific version flag, but all output starts with a version string.
33627    # First line typically looks something like:
33628    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33629    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33630    # Check that this is likely to be Microsoft CL.EXE.
33631    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33632    if test $? -ne 0; then
33633      { $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
33634$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33635      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33636$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33637      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33638    fi
33639    # Collapse compiler output into a single line
33640    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33641    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33642        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33643  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33644    # gcc --version output typically looks like
33645    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33646    #     Copyright (C) 2013 Free Software Foundation, Inc.
33647    #     This is free software; see the source for copying conditions.  There is NO
33648    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33649    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33650    # Check that this is likely to be GCC.
33651    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33652    if test $? -ne 0; then
33653      { $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
33654$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33655      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33656$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33657      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33658    fi
33659    # Remove Copyright and legalese from version string, and
33660    # collapse into a single line
33661    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33662        $SED -e 's/ *Copyright .*//'`
33663    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33664        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33665  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33666    # clang --version output typically looks like
33667    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33668    #    clang version 3.3 (tags/RELEASE_33/final)
33669    # or
33670    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33671    #    Target: x86_64-pc-linux-gnu
33672    #    Thread model: posix
33673    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33674    # Check that this is likely to be clang
33675    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33676    if test $? -ne 0; then
33677      { $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
33678$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33679      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33680$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33681      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33682    fi
33683    # Collapse compiler output into a single line
33684    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33685    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33686        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33687  else
33688      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33689  fi
33690  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33691  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33692  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33693  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33694
33695  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33696$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33697
33698
33699  # Now that we have resolved CC ourself, let autoconf have its go at it
33700  ac_ext=c
33701ac_cpp='$CPP $CPPFLAGS'
33702ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33703ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33704ac_compiler_gnu=$ac_cv_c_compiler_gnu
33705if test -n "$ac_tool_prefix"; then
33706  for ac_prog in $CC
33707  do
33708    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33709set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33711$as_echo_n "checking for $ac_word... " >&6; }
33712if ${ac_cv_prog_CC+:} false; then :
33713  $as_echo_n "(cached) " >&6
33714else
33715  if test -n "$CC"; then
33716  ac_cv_prog_CC="$CC" # Let the user override the test.
33717else
33718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33719for as_dir in $PATH
33720do
33721  IFS=$as_save_IFS
33722  test -z "$as_dir" && as_dir=.
33723    for ac_exec_ext in '' $ac_executable_extensions; do
33724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33725    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33727    break 2
33728  fi
33729done
33730  done
33731IFS=$as_save_IFS
33732
33733fi
33734fi
33735CC=$ac_cv_prog_CC
33736if test -n "$CC"; then
33737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33738$as_echo "$CC" >&6; }
33739else
33740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33741$as_echo "no" >&6; }
33742fi
33743
33744
33745    test -n "$CC" && break
33746  done
33747fi
33748if test -z "$CC"; then
33749  ac_ct_CC=$CC
33750  for ac_prog in $CC
33751do
33752  # Extract the first word of "$ac_prog", so it can be a program name with args.
33753set dummy $ac_prog; ac_word=$2
33754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33755$as_echo_n "checking for $ac_word... " >&6; }
33756if ${ac_cv_prog_ac_ct_CC+:} false; then :
33757  $as_echo_n "(cached) " >&6
33758else
33759  if test -n "$ac_ct_CC"; then
33760  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33761else
33762as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33763for as_dir in $PATH
33764do
33765  IFS=$as_save_IFS
33766  test -z "$as_dir" && as_dir=.
33767    for ac_exec_ext in '' $ac_executable_extensions; do
33768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33769    ac_cv_prog_ac_ct_CC="$ac_prog"
33770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33771    break 2
33772  fi
33773done
33774  done
33775IFS=$as_save_IFS
33776
33777fi
33778fi
33779ac_ct_CC=$ac_cv_prog_ac_ct_CC
33780if test -n "$ac_ct_CC"; then
33781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33782$as_echo "$ac_ct_CC" >&6; }
33783else
33784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33785$as_echo "no" >&6; }
33786fi
33787
33788
33789  test -n "$ac_ct_CC" && break
33790done
33791
33792  if test "x$ac_ct_CC" = x; then
33793    CC=""
33794  else
33795    case $cross_compiling:$ac_tool_warned in
33796yes:)
33797{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33798$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33799ac_tool_warned=yes ;;
33800esac
33801    CC=$ac_ct_CC
33802  fi
33803fi
33804
33805
33806test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33807$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33808as_fn_error $? "no acceptable C compiler found in \$PATH
33809See \`config.log' for more details" "$LINENO" 5; }
33810
33811# Provide some information about the compiler.
33812$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33813set X $ac_compile
33814ac_compiler=$2
33815for ac_option in --version -v -V -qversion; do
33816  { { ac_try="$ac_compiler $ac_option >&5"
33817case "(($ac_try" in
33818  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33819  *) ac_try_echo=$ac_try;;
33820esac
33821eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33822$as_echo "$ac_try_echo"; } >&5
33823  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33824  ac_status=$?
33825  if test -s conftest.err; then
33826    sed '10a\
33827... rest of stderr output deleted ...
33828         10q' conftest.err >conftest.er1
33829    cat conftest.er1 >&5
33830  fi
33831  rm -f conftest.er1 conftest.err
33832  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33833  test $ac_status = 0; }
33834done
33835
33836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33837/* end confdefs.h.  */
33838
33839int
33840main ()
33841{
33842
33843  ;
33844  return 0;
33845}
33846_ACEOF
33847ac_clean_files_save=$ac_clean_files
33848ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33849# Try to create an executable without -o first, disregard a.out.
33850# It will help us diagnose broken compilers, and finding out an intuition
33851# of exeext.
33852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33853$as_echo_n "checking whether the C compiler works... " >&6; }
33854ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33855
33856# The possible output files:
33857ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33858
33859ac_rmfiles=
33860for ac_file in $ac_files
33861do
33862  case $ac_file in
33863    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33864    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33865  esac
33866done
33867rm -f $ac_rmfiles
33868
33869if { { ac_try="$ac_link_default"
33870case "(($ac_try" in
33871  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33872  *) ac_try_echo=$ac_try;;
33873esac
33874eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33875$as_echo "$ac_try_echo"; } >&5
33876  (eval "$ac_link_default") 2>&5
33877  ac_status=$?
33878  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33879  test $ac_status = 0; }; then :
33880  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33881# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33882# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33883# so that the user can short-circuit this test for compilers unknown to
33884# Autoconf.
33885for ac_file in $ac_files ''
33886do
33887  test -f "$ac_file" || continue
33888  case $ac_file in
33889    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33890	;;
33891    [ab].out )
33892	# We found the default executable, but exeext='' is most
33893	# certainly right.
33894	break;;
33895    *.* )
33896	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33897	then :; else
33898	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33899	fi
33900	# We set ac_cv_exeext here because the later test for it is not
33901	# safe: cross compilers may not add the suffix if given an `-o'
33902	# argument, so we may need to know it at that point already.
33903	# Even if this section looks crufty: it has the advantage of
33904	# actually working.
33905	break;;
33906    * )
33907	break;;
33908  esac
33909done
33910test "$ac_cv_exeext" = no && ac_cv_exeext=
33911
33912else
33913  ac_file=''
33914fi
33915if test -z "$ac_file"; then :
33916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33917$as_echo "no" >&6; }
33918$as_echo "$as_me: failed program was:" >&5
33919sed 's/^/| /' conftest.$ac_ext >&5
33920
33921{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33922$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33923as_fn_error 77 "C compiler cannot create executables
33924See \`config.log' for more details" "$LINENO" 5; }
33925else
33926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33927$as_echo "yes" >&6; }
33928fi
33929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33930$as_echo_n "checking for C compiler default output file name... " >&6; }
33931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33932$as_echo "$ac_file" >&6; }
33933ac_exeext=$ac_cv_exeext
33934
33935rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33936ac_clean_files=$ac_clean_files_save
33937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33938$as_echo_n "checking for suffix of executables... " >&6; }
33939if { { ac_try="$ac_link"
33940case "(($ac_try" in
33941  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33942  *) ac_try_echo=$ac_try;;
33943esac
33944eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33945$as_echo "$ac_try_echo"; } >&5
33946  (eval "$ac_link") 2>&5
33947  ac_status=$?
33948  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33949  test $ac_status = 0; }; then :
33950  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33951# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33952# work properly (i.e., refer to `conftest.exe'), while it won't with
33953# `rm'.
33954for ac_file in conftest.exe conftest conftest.*; do
33955  test -f "$ac_file" || continue
33956  case $ac_file in
33957    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33958    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33959	  break;;
33960    * ) break;;
33961  esac
33962done
33963else
33964  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33965$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33966as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33967See \`config.log' for more details" "$LINENO" 5; }
33968fi
33969rm -f conftest conftest$ac_cv_exeext
33970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33971$as_echo "$ac_cv_exeext" >&6; }
33972
33973rm -f conftest.$ac_ext
33974EXEEXT=$ac_cv_exeext
33975ac_exeext=$EXEEXT
33976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33977/* end confdefs.h.  */
33978#include <stdio.h>
33979int
33980main ()
33981{
33982FILE *f = fopen ("conftest.out", "w");
33983 return ferror (f) || fclose (f) != 0;
33984
33985  ;
33986  return 0;
33987}
33988_ACEOF
33989ac_clean_files="$ac_clean_files conftest.out"
33990# Check that the compiler produces executables we can run.  If not, either
33991# the compiler is broken, or we cross compile.
33992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33993$as_echo_n "checking whether we are cross compiling... " >&6; }
33994if test "$cross_compiling" != yes; then
33995  { { ac_try="$ac_link"
33996case "(($ac_try" in
33997  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33998  *) ac_try_echo=$ac_try;;
33999esac
34000eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34001$as_echo "$ac_try_echo"; } >&5
34002  (eval "$ac_link") 2>&5
34003  ac_status=$?
34004  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34005  test $ac_status = 0; }
34006  if { ac_try='./conftest$ac_cv_exeext'
34007  { { case "(($ac_try" in
34008  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34009  *) ac_try_echo=$ac_try;;
34010esac
34011eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34012$as_echo "$ac_try_echo"; } >&5
34013  (eval "$ac_try") 2>&5
34014  ac_status=$?
34015  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34016  test $ac_status = 0; }; }; then
34017    cross_compiling=no
34018  else
34019    if test "$cross_compiling" = maybe; then
34020	cross_compiling=yes
34021    else
34022	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34023$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34024as_fn_error $? "cannot run C compiled programs.
34025If you meant to cross compile, use \`--host'.
34026See \`config.log' for more details" "$LINENO" 5; }
34027    fi
34028  fi
34029fi
34030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34031$as_echo "$cross_compiling" >&6; }
34032
34033rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34034ac_clean_files=$ac_clean_files_save
34035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34036$as_echo_n "checking for suffix of object files... " >&6; }
34037if ${ac_cv_objext+:} false; then :
34038  $as_echo_n "(cached) " >&6
34039else
34040  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34041/* end confdefs.h.  */
34042
34043int
34044main ()
34045{
34046
34047  ;
34048  return 0;
34049}
34050_ACEOF
34051rm -f conftest.o conftest.obj
34052if { { ac_try="$ac_compile"
34053case "(($ac_try" in
34054  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34055  *) ac_try_echo=$ac_try;;
34056esac
34057eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34058$as_echo "$ac_try_echo"; } >&5
34059  (eval "$ac_compile") 2>&5
34060  ac_status=$?
34061  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34062  test $ac_status = 0; }; then :
34063  for ac_file in conftest.o conftest.obj conftest.*; do
34064  test -f "$ac_file" || continue;
34065  case $ac_file in
34066    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34067    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34068       break;;
34069  esac
34070done
34071else
34072  $as_echo "$as_me: failed program was:" >&5
34073sed 's/^/| /' conftest.$ac_ext >&5
34074
34075{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34076$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34077as_fn_error $? "cannot compute suffix of object files: cannot compile
34078See \`config.log' for more details" "$LINENO" 5; }
34079fi
34080rm -f conftest.$ac_cv_objext conftest.$ac_ext
34081fi
34082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34083$as_echo "$ac_cv_objext" >&6; }
34084OBJEXT=$ac_cv_objext
34085ac_objext=$OBJEXT
34086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34087$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34088if ${ac_cv_c_compiler_gnu+:} false; then :
34089  $as_echo_n "(cached) " >&6
34090else
34091  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34092/* end confdefs.h.  */
34093
34094int
34095main ()
34096{
34097#ifndef __GNUC__
34098       choke me
34099#endif
34100
34101  ;
34102  return 0;
34103}
34104_ACEOF
34105if ac_fn_c_try_compile "$LINENO"; then :
34106  ac_compiler_gnu=yes
34107else
34108  ac_compiler_gnu=no
34109fi
34110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34111ac_cv_c_compiler_gnu=$ac_compiler_gnu
34112
34113fi
34114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34115$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34116if test $ac_compiler_gnu = yes; then
34117  GCC=yes
34118else
34119  GCC=
34120fi
34121ac_test_CFLAGS=${CFLAGS+set}
34122ac_save_CFLAGS=$CFLAGS
34123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34124$as_echo_n "checking whether $CC accepts -g... " >&6; }
34125if ${ac_cv_prog_cc_g+:} false; then :
34126  $as_echo_n "(cached) " >&6
34127else
34128  ac_save_c_werror_flag=$ac_c_werror_flag
34129   ac_c_werror_flag=yes
34130   ac_cv_prog_cc_g=no
34131   CFLAGS="-g"
34132   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34133/* end confdefs.h.  */
34134
34135int
34136main ()
34137{
34138
34139  ;
34140  return 0;
34141}
34142_ACEOF
34143if ac_fn_c_try_compile "$LINENO"; then :
34144  ac_cv_prog_cc_g=yes
34145else
34146  CFLAGS=""
34147      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34148/* end confdefs.h.  */
34149
34150int
34151main ()
34152{
34153
34154  ;
34155  return 0;
34156}
34157_ACEOF
34158if ac_fn_c_try_compile "$LINENO"; then :
34159
34160else
34161  ac_c_werror_flag=$ac_save_c_werror_flag
34162	 CFLAGS="-g"
34163	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34164/* end confdefs.h.  */
34165
34166int
34167main ()
34168{
34169
34170  ;
34171  return 0;
34172}
34173_ACEOF
34174if ac_fn_c_try_compile "$LINENO"; then :
34175  ac_cv_prog_cc_g=yes
34176fi
34177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34178fi
34179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34180fi
34181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34182   ac_c_werror_flag=$ac_save_c_werror_flag
34183fi
34184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34185$as_echo "$ac_cv_prog_cc_g" >&6; }
34186if test "$ac_test_CFLAGS" = set; then
34187  CFLAGS=$ac_save_CFLAGS
34188elif test $ac_cv_prog_cc_g = yes; then
34189  if test "$GCC" = yes; then
34190    CFLAGS="-g -O2"
34191  else
34192    CFLAGS="-g"
34193  fi
34194else
34195  if test "$GCC" = yes; then
34196    CFLAGS="-O2"
34197  else
34198    CFLAGS=
34199  fi
34200fi
34201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34202$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34203if ${ac_cv_prog_cc_c89+:} false; then :
34204  $as_echo_n "(cached) " >&6
34205else
34206  ac_cv_prog_cc_c89=no
34207ac_save_CC=$CC
34208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34209/* end confdefs.h.  */
34210#include <stdarg.h>
34211#include <stdio.h>
34212struct stat;
34213/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34214struct buf { int x; };
34215FILE * (*rcsopen) (struct buf *, struct stat *, int);
34216static char *e (p, i)
34217     char **p;
34218     int i;
34219{
34220  return p[i];
34221}
34222static char *f (char * (*g) (char **, int), char **p, ...)
34223{
34224  char *s;
34225  va_list v;
34226  va_start (v,p);
34227  s = g (p, va_arg (v,int));
34228  va_end (v);
34229  return s;
34230}
34231
34232/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34233   function prototypes and stuff, but not '\xHH' hex character constants.
34234   These don't provoke an error unfortunately, instead are silently treated
34235   as 'x'.  The following induces an error, until -std is added to get
34236   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34237   array size at least.  It's necessary to write '\x00'==0 to get something
34238   that's true only with -std.  */
34239int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34240
34241/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34242   inside strings and character constants.  */
34243#define FOO(x) 'x'
34244int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34245
34246int test (int i, double x);
34247struct s1 {int (*f) (int a);};
34248struct s2 {int (*f) (double a);};
34249int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34250int argc;
34251char **argv;
34252int
34253main ()
34254{
34255return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34256  ;
34257  return 0;
34258}
34259_ACEOF
34260for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34261	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34262do
34263  CC="$ac_save_CC $ac_arg"
34264  if ac_fn_c_try_compile "$LINENO"; then :
34265  ac_cv_prog_cc_c89=$ac_arg
34266fi
34267rm -f core conftest.err conftest.$ac_objext
34268  test "x$ac_cv_prog_cc_c89" != "xno" && break
34269done
34270rm -f conftest.$ac_ext
34271CC=$ac_save_CC
34272
34273fi
34274# AC_CACHE_VAL
34275case "x$ac_cv_prog_cc_c89" in
34276  x)
34277    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34278$as_echo "none needed" >&6; } ;;
34279  xno)
34280    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34281$as_echo "unsupported" >&6; } ;;
34282  *)
34283    CC="$CC $ac_cv_prog_cc_c89"
34284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34285$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34286esac
34287if test "x$ac_cv_prog_cc_c89" != xno; then :
34288
34289fi
34290
34291ac_ext=cpp
34292ac_cpp='$CXXCPP $CPPFLAGS'
34293ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34294ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34295ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34296
34297
34298
34299  COMPILER_NAME=C++
34300  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34301
34302  if test "x$CXX" != x; then
34303    # User has supplied compiler name already, always let that override.
34304    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34305$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34306    if test "x`basename $CXX`" = "x$CXX"; then
34307      # A command without a complete path is provided, search $PATH.
34308
34309      for ac_prog in $CXX
34310do
34311  # Extract the first word of "$ac_prog", so it can be a program name with args.
34312set dummy $ac_prog; ac_word=$2
34313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34314$as_echo_n "checking for $ac_word... " >&6; }
34315if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34316  $as_echo_n "(cached) " >&6
34317else
34318  case $POTENTIAL_CXX in
34319  [\\/]* | ?:[\\/]*)
34320  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34321  ;;
34322  *)
34323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34324for as_dir in $PATH
34325do
34326  IFS=$as_save_IFS
34327  test -z "$as_dir" && as_dir=.
34328    for ac_exec_ext in '' $ac_executable_extensions; do
34329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34330    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34332    break 2
34333  fi
34334done
34335  done
34336IFS=$as_save_IFS
34337
34338  ;;
34339esac
34340fi
34341POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34342if test -n "$POTENTIAL_CXX"; then
34343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34344$as_echo "$POTENTIAL_CXX" >&6; }
34345else
34346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34347$as_echo "no" >&6; }
34348fi
34349
34350
34351  test -n "$POTENTIAL_CXX" && break
34352done
34353
34354      if test "x$POTENTIAL_CXX" != x; then
34355        CXX=$POTENTIAL_CXX
34356      else
34357        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34358      fi
34359    else
34360      # Otherwise it might already be a complete path
34361      if test ! -x "$CXX"; then
34362        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34363      fi
34364    fi
34365  else
34366    # No user supplied value. Locate compiler ourselves.
34367
34368    # If we are cross compiling, assume cross compilation tools follows the
34369    # cross compilation standard where they are prefixed with the autoconf
34370    # standard name for the target. For example the binary
34371    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34372    # If we are not cross compiling, then the default compiler name will be
34373    # used.
34374
34375    CXX=
34376    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34377    # before checking the rest of the PATH.
34378    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34379    # step, this should not be necessary.
34380    if test -n "$TOOLCHAIN_PATH"; then
34381      PATH_save="$PATH"
34382      PATH="$TOOLCHAIN_PATH"
34383      for ac_prog in $SEARCH_LIST
34384do
34385  # Extract the first word of "$ac_prog", so it can be a program name with args.
34386set dummy $ac_prog; ac_word=$2
34387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34388$as_echo_n "checking for $ac_word... " >&6; }
34389if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34390  $as_echo_n "(cached) " >&6
34391else
34392  case $TOOLCHAIN_PATH_CXX in
34393  [\\/]* | ?:[\\/]*)
34394  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34395  ;;
34396  *)
34397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34398for as_dir in $PATH
34399do
34400  IFS=$as_save_IFS
34401  test -z "$as_dir" && as_dir=.
34402    for ac_exec_ext in '' $ac_executable_extensions; do
34403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34404    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34406    break 2
34407  fi
34408done
34409  done
34410IFS=$as_save_IFS
34411
34412  ;;
34413esac
34414fi
34415TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34416if test -n "$TOOLCHAIN_PATH_CXX"; then
34417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34418$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34419else
34420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34421$as_echo "no" >&6; }
34422fi
34423
34424
34425  test -n "$TOOLCHAIN_PATH_CXX" && break
34426done
34427
34428      CXX=$TOOLCHAIN_PATH_CXX
34429      PATH="$PATH_save"
34430    fi
34431
34432    # AC_PATH_PROGS can't be run multiple times with the same variable,
34433    # so create a new name for this run.
34434    if test "x$CXX" = x; then
34435      for ac_prog in $SEARCH_LIST
34436do
34437  # Extract the first word of "$ac_prog", so it can be a program name with args.
34438set dummy $ac_prog; ac_word=$2
34439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34440$as_echo_n "checking for $ac_word... " >&6; }
34441if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34442  $as_echo_n "(cached) " >&6
34443else
34444  case $POTENTIAL_CXX in
34445  [\\/]* | ?:[\\/]*)
34446  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34447  ;;
34448  *)
34449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34450for as_dir in $PATH
34451do
34452  IFS=$as_save_IFS
34453  test -z "$as_dir" && as_dir=.
34454    for ac_exec_ext in '' $ac_executable_extensions; do
34455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34456    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34458    break 2
34459  fi
34460done
34461  done
34462IFS=$as_save_IFS
34463
34464  ;;
34465esac
34466fi
34467POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34468if test -n "$POTENTIAL_CXX"; then
34469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34470$as_echo "$POTENTIAL_CXX" >&6; }
34471else
34472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34473$as_echo "no" >&6; }
34474fi
34475
34476
34477  test -n "$POTENTIAL_CXX" && break
34478done
34479
34480      CXX=$POTENTIAL_CXX
34481    fi
34482
34483    if test "x$CXX" = x; then
34484
34485  # Print a helpful message on how to acquire the necessary build dependency.
34486  # devkit is the help tag: freetype, cups, alsa etc
34487  MISSING_DEPENDENCY=devkit
34488
34489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34490    cygwin_help $MISSING_DEPENDENCY
34491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34492    msys_help $MISSING_DEPENDENCY
34493  else
34494    PKGHANDLER_COMMAND=
34495
34496    case $PKGHANDLER in
34497      apt-get)
34498        apt_help     $MISSING_DEPENDENCY ;;
34499      yum)
34500        yum_help     $MISSING_DEPENDENCY ;;
34501      port)
34502        port_help    $MISSING_DEPENDENCY ;;
34503      pkgutil)
34504        pkgutil_help $MISSING_DEPENDENCY ;;
34505      pkgadd)
34506        pkgadd_help  $MISSING_DEPENDENCY ;;
34507    esac
34508
34509    if test "x$PKGHANDLER_COMMAND" != x; then
34510      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34511    fi
34512  fi
34513
34514      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34515    fi
34516  fi
34517
34518  # Now we have a compiler binary in CXX. Make sure it's okay.
34519
34520  # Only process if variable expands to non-empty
34521
34522  if test "x$CXX" != x; then
34523    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34524
34525  # First separate the path from the arguments. This will split at the first
34526  # space.
34527  complete="$CXX"
34528  path="${complete%% *}"
34529  tmp="$complete EOL"
34530  arguments="${tmp#* }"
34531
34532  # Input might be given as Windows format, start by converting to
34533  # unix format.
34534  new_path=`$CYGPATH -u "$path"`
34535
34536  # Now try to locate executable using which
34537  new_path=`$WHICH "$new_path" 2> /dev/null`
34538  # bat and cmd files are not always considered executable in cygwin causing which
34539  # to not find them
34540  if test "x$new_path" = x \
34541      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34542      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34543    new_path=`$CYGPATH -u "$path"`
34544  fi
34545  if test "x$new_path" = x; then
34546    # Oops. Which didn't find the executable.
34547    # The splitting of arguments from the executable at a space might have been incorrect,
34548    # since paths with space are more likely in Windows. Give it another try with the whole
34549    # argument.
34550    path="$complete"
34551    arguments="EOL"
34552    new_path=`$CYGPATH -u "$path"`
34553    new_path=`$WHICH "$new_path" 2> /dev/null`
34554    # bat and cmd files are not always considered executable in cygwin causing which
34555    # to not find them
34556    if test "x$new_path" = x \
34557        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34558        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34559      new_path=`$CYGPATH -u "$path"`
34560    fi
34561    if test "x$new_path" = x; then
34562      # It's still not found. Now this is an unrecoverable error.
34563      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34564$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34565      has_space=`$ECHO "$complete" | $GREP " "`
34566      if test "x$has_space" != x; then
34567        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34568$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34569      fi
34570      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34571    fi
34572  fi
34573
34574  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34575  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34576  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34577  # "foo.exe" is OK but "foo" is an error.
34578  #
34579  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34580  # It is also a way to make sure we got the proper file name for the real test later on.
34581  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34582  if test "x$test_shortpath" = x; then
34583    # Short path failed, file does not exist as specified.
34584    # Try adding .exe or .cmd
34585    if test -f "${new_path}.exe"; then
34586      input_to_shortpath="${new_path}.exe"
34587    elif test -f "${new_path}.cmd"; then
34588      input_to_shortpath="${new_path}.cmd"
34589    else
34590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34591$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34592      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34593$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34594      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34595    fi
34596  else
34597    input_to_shortpath="$new_path"
34598  fi
34599
34600  # Call helper function which possibly converts this using DOS-style short mode.
34601  # If so, the updated path is stored in $new_path.
34602  new_path="$input_to_shortpath"
34603
34604  input_path="$input_to_shortpath"
34605  # Check if we need to convert this using DOS-style short mode. If the path
34606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34607  # take no chances and rewrite it.
34608  # Note: m4 eats our [], so we need to use [ and ] instead.
34609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34610  if test "x$has_forbidden_chars" != x; then
34611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34612    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34613    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34614    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34615      # Going to short mode and back again did indeed matter. Since short mode is
34616      # case insensitive, let's make it lowercase to improve readability.
34617      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34618      # Now convert it back to Unix-style (cygpath)
34619      input_path=`$CYGPATH -u "$shortmode_path"`
34620      new_path="$input_path"
34621    fi
34622  fi
34623
34624  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34625  if test "x$test_cygdrive_prefix" = x; then
34626    # As a simple fix, exclude /usr/bin since it's not a real path.
34627    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34628      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34629      # a path prefixed by /cygdrive for fixpath to work.
34630      new_path="$CYGWIN_ROOT_PATH$input_path"
34631    fi
34632  fi
34633
34634  # remove trailing .exe if any
34635  new_path="${new_path/%.exe/}"
34636
34637    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34638
34639  # First separate the path from the arguments. This will split at the first
34640  # space.
34641  complete="$CXX"
34642  path="${complete%% *}"
34643  tmp="$complete EOL"
34644  arguments="${tmp#* }"
34645
34646  # Input might be given as Windows format, start by converting to
34647  # unix format.
34648  new_path="$path"
34649
34650  windows_path="$new_path"
34651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34652    unix_path=`$CYGPATH -u "$windows_path"`
34653    new_path="$unix_path"
34654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34656    new_path="$unix_path"
34657  fi
34658
34659
34660  # Now try to locate executable using which
34661  new_path=`$WHICH "$new_path" 2> /dev/null`
34662
34663  if test "x$new_path" = x; then
34664    # Oops. Which didn't find the executable.
34665    # The splitting of arguments from the executable at a space might have been incorrect,
34666    # since paths with space are more likely in Windows. Give it another try with the whole
34667    # argument.
34668    path="$complete"
34669    arguments="EOL"
34670    new_path="$path"
34671
34672  windows_path="$new_path"
34673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34674    unix_path=`$CYGPATH -u "$windows_path"`
34675    new_path="$unix_path"
34676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34678    new_path="$unix_path"
34679  fi
34680
34681
34682    new_path=`$WHICH "$new_path" 2> /dev/null`
34683    # bat and cmd files are not always considered executable in MSYS causing which
34684    # to not find them
34685    if test "x$new_path" = x \
34686        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34687        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34688      new_path="$path"
34689
34690  windows_path="$new_path"
34691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34692    unix_path=`$CYGPATH -u "$windows_path"`
34693    new_path="$unix_path"
34694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34696    new_path="$unix_path"
34697  fi
34698
34699    fi
34700
34701    if test "x$new_path" = x; then
34702      # It's still not found. Now this is an unrecoverable error.
34703      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34704$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34705      has_space=`$ECHO "$complete" | $GREP " "`
34706      if test "x$has_space" != x; then
34707        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34708$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34709      fi
34710      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34711    fi
34712  fi
34713
34714  # Now new_path has a complete unix path to the binary
34715  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34716    # Keep paths in /bin as-is, but remove trailing .exe if any
34717    new_path="${new_path/%.exe/}"
34718    # Do not save /bin paths to all_fixpath_prefixes!
34719  else
34720    # Not in mixed or Windows style, start by that.
34721    new_path=`cmd //c echo $new_path`
34722
34723  input_path="$new_path"
34724  # Check if we need to convert this using DOS-style short mode. If the path
34725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34726  # take no chances and rewrite it.
34727  # Note: m4 eats our [], so we need to use [ and ] instead.
34728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34729  if test "x$has_forbidden_chars" != x; then
34730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34731    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34732  fi
34733
34734    # Output is in $new_path
34735
34736  windows_path="$new_path"
34737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34738    unix_path=`$CYGPATH -u "$windows_path"`
34739    new_path="$unix_path"
34740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34742    new_path="$unix_path"
34743  fi
34744
34745    # remove trailing .exe if any
34746    new_path="${new_path/%.exe/}"
34747
34748    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34749    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34750  fi
34751
34752    else
34753      # We're on a unix platform. Hooray! :)
34754      # First separate the path from the arguments. This will split at the first
34755      # space.
34756      complete="$CXX"
34757      path="${complete%% *}"
34758      tmp="$complete EOL"
34759      arguments="${tmp#* }"
34760
34761      # Cannot rely on the command "which" here since it doesn't always work.
34762      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34763      if test -z "$is_absolute_path"; then
34764        # Path to executable is not absolute. Find it.
34765        IFS_save="$IFS"
34766        IFS=:
34767        for p in $PATH; do
34768          if test -f "$p/$path" && test -x "$p/$path"; then
34769            new_path="$p/$path"
34770            break
34771          fi
34772        done
34773        IFS="$IFS_save"
34774      else
34775        # This is an absolute path, we can use it without further modifications.
34776        new_path="$path"
34777      fi
34778
34779      if test "x$new_path" = x; then
34780        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34781$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34782        has_space=`$ECHO "$complete" | $GREP " "`
34783        if test "x$has_space" != x; then
34784          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34785$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34786        fi
34787        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34788      fi
34789    fi
34790
34791    # Now join together the path and the arguments once again
34792    if test "x$arguments" != xEOL; then
34793      new_complete="$new_path ${arguments% *}"
34794    else
34795      new_complete="$new_path"
34796    fi
34797
34798    if test "x$complete" != "x$new_complete"; then
34799      CXX="$new_complete"
34800      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34801$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34802    fi
34803  fi
34804
34805  TEST_COMPILER="$CXX"
34806
34807  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34808$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34809  SYMLINK_ORIGINAL="$TEST_COMPILER"
34810
34811  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34812    # Follow a chain of symbolic links. Use readlink
34813    # where it exists, else fall back to horribly
34814    # complicated shell code.
34815    if test "x$READLINK_TESTED" != yes; then
34816      # On MacOSX there is a readlink tool with a different
34817      # purpose than the GNU readlink tool. Check the found readlink.
34818      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34819      if test "x$ISGNU" = x; then
34820        # A readlink that we do not know how to use.
34821        # Are there other non-GNU readlinks out there?
34822        READLINK_TESTED=yes
34823        READLINK=
34824      fi
34825    fi
34826
34827    if test "x$READLINK" != x; then
34828      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34829    else
34830      # Save the current directory for restoring afterwards
34831      STARTDIR=$PWD
34832      COUNTER=0
34833      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34834      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34835      cd $sym_link_dir
34836      # Use -P flag to resolve symlinks in directories.
34837      cd `$THEPWDCMD -P`
34838      sym_link_dir=`$THEPWDCMD -P`
34839      # Resolve file symlinks
34840      while test $COUNTER -lt 20; do
34841        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34842        if test "x$ISLINK" == x; then
34843          # This is not a symbolic link! We are done!
34844          break
34845        fi
34846        # Again resolve directory symlinks since the target of the just found
34847        # link could be in a different directory
34848        cd `$DIRNAME $ISLINK`
34849        sym_link_dir=`$THEPWDCMD -P`
34850        sym_link_file=`$BASENAME $ISLINK`
34851        let COUNTER=COUNTER+1
34852      done
34853      cd $STARTDIR
34854      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34855    fi
34856  fi
34857
34858  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34859    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34860$as_echo "no symlink" >&6; }
34861  else
34862    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34863$as_echo "$SYMLINK_ORIGINAL" >&6; }
34864
34865    # We can't handle ccache by gcc wrappers, since we need to know if we're
34866    # using ccache. Instead ccache usage must be controlled by a configure option.
34867    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34868    if test "x$COMPILER_BASENAME" = "xccache"; then
34869      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34870$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34871      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34872    fi
34873  fi
34874
34875
34876  COMPILER=$CXX
34877  COMPILER_NAME=$COMPILER_NAME
34878
34879  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34880    # cc -V output typically looks like
34881    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34882    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34883    # Check that this is likely to be the Solaris Studio cc.
34884    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34885    if test $? -ne 0; then
34886      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34887      { $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
34888$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34889      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34890$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34891      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34892$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34893      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34894    fi
34895    # Remove usage instructions (if present), and
34896    # collapse compiler output into a single line
34897    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34898        $SED -e 's/ *[Uu]sage:.*//'`
34899    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34900        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34901  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34902    # xlc -qversion output typically looks like
34903    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34904    #     Version: 11.01.0000.0015
34905    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34906    # Check that this is likely to be the IBM XL C compiler.
34907    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34908    if test $? -ne 0; then
34909      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34910      { $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
34911$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34912      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34913$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34914      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34915$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34916      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34917    fi
34918    # Collapse compiler output into a single line
34919    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34920    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34921        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34922  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34923    # There is no specific version flag, but all output starts with a version string.
34924    # First line typically looks something like:
34925    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34926    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34927    # Check that this is likely to be Microsoft CL.EXE.
34928    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34929    if test $? -ne 0; then
34930      { $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
34931$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34932      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34933$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34934      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34935    fi
34936    # Collapse compiler output into a single line
34937    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34938    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34939        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34940  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34941    # gcc --version output typically looks like
34942    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34943    #     Copyright (C) 2013 Free Software Foundation, Inc.
34944    #     This is free software; see the source for copying conditions.  There is NO
34945    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34946    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34947    # Check that this is likely to be GCC.
34948    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34949    if test $? -ne 0; then
34950      { $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
34951$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34952      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34953$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34954      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34955    fi
34956    # Remove Copyright and legalese from version string, and
34957    # collapse into a single line
34958    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34959        $SED -e 's/ *Copyright .*//'`
34960    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34961        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34962  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34963    # clang --version output typically looks like
34964    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34965    #    clang version 3.3 (tags/RELEASE_33/final)
34966    # or
34967    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34968    #    Target: x86_64-pc-linux-gnu
34969    #    Thread model: posix
34970    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34971    # Check that this is likely to be clang
34972    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34973    if test $? -ne 0; then
34974      { $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
34975$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34976      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34977$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34978      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34979    fi
34980    # Collapse compiler output into a single line
34981    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34982    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34983        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34984  else
34985      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34986  fi
34987  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34988  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34989  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34990  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34991
34992  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34993$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34994
34995
34996  # Now that we have resolved CXX ourself, let autoconf have its go at it
34997  ac_ext=cpp
34998ac_cpp='$CXXCPP $CPPFLAGS'
34999ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35000ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35001ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35002if test -z "$CXX"; then
35003  if test -n "$CCC"; then
35004    CXX=$CCC
35005  else
35006    if test -n "$ac_tool_prefix"; then
35007  for ac_prog in $CXX
35008  do
35009    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35010set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35012$as_echo_n "checking for $ac_word... " >&6; }
35013if ${ac_cv_prog_CXX+:} false; then :
35014  $as_echo_n "(cached) " >&6
35015else
35016  if test -n "$CXX"; then
35017  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35018else
35019as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35020for as_dir in $PATH
35021do
35022  IFS=$as_save_IFS
35023  test -z "$as_dir" && as_dir=.
35024    for ac_exec_ext in '' $ac_executable_extensions; do
35025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35026    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35028    break 2
35029  fi
35030done
35031  done
35032IFS=$as_save_IFS
35033
35034fi
35035fi
35036CXX=$ac_cv_prog_CXX
35037if test -n "$CXX"; then
35038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35039$as_echo "$CXX" >&6; }
35040else
35041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35042$as_echo "no" >&6; }
35043fi
35044
35045
35046    test -n "$CXX" && break
35047  done
35048fi
35049if test -z "$CXX"; then
35050  ac_ct_CXX=$CXX
35051  for ac_prog in $CXX
35052do
35053  # Extract the first word of "$ac_prog", so it can be a program name with args.
35054set dummy $ac_prog; ac_word=$2
35055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35056$as_echo_n "checking for $ac_word... " >&6; }
35057if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35058  $as_echo_n "(cached) " >&6
35059else
35060  if test -n "$ac_ct_CXX"; then
35061  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35062else
35063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35064for as_dir in $PATH
35065do
35066  IFS=$as_save_IFS
35067  test -z "$as_dir" && as_dir=.
35068    for ac_exec_ext in '' $ac_executable_extensions; do
35069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35070    ac_cv_prog_ac_ct_CXX="$ac_prog"
35071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35072    break 2
35073  fi
35074done
35075  done
35076IFS=$as_save_IFS
35077
35078fi
35079fi
35080ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35081if test -n "$ac_ct_CXX"; then
35082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35083$as_echo "$ac_ct_CXX" >&6; }
35084else
35085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35086$as_echo "no" >&6; }
35087fi
35088
35089
35090  test -n "$ac_ct_CXX" && break
35091done
35092
35093  if test "x$ac_ct_CXX" = x; then
35094    CXX="g++"
35095  else
35096    case $cross_compiling:$ac_tool_warned in
35097yes:)
35098{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35099$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35100ac_tool_warned=yes ;;
35101esac
35102    CXX=$ac_ct_CXX
35103  fi
35104fi
35105
35106  fi
35107fi
35108# Provide some information about the compiler.
35109$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35110set X $ac_compile
35111ac_compiler=$2
35112for ac_option in --version -v -V -qversion; do
35113  { { ac_try="$ac_compiler $ac_option >&5"
35114case "(($ac_try" in
35115  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35116  *) ac_try_echo=$ac_try;;
35117esac
35118eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35119$as_echo "$ac_try_echo"; } >&5
35120  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35121  ac_status=$?
35122  if test -s conftest.err; then
35123    sed '10a\
35124... rest of stderr output deleted ...
35125         10q' conftest.err >conftest.er1
35126    cat conftest.er1 >&5
35127  fi
35128  rm -f conftest.er1 conftest.err
35129  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35130  test $ac_status = 0; }
35131done
35132
35133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35134$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35135if ${ac_cv_cxx_compiler_gnu+:} false; then :
35136  $as_echo_n "(cached) " >&6
35137else
35138  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35139/* end confdefs.h.  */
35140
35141int
35142main ()
35143{
35144#ifndef __GNUC__
35145       choke me
35146#endif
35147
35148  ;
35149  return 0;
35150}
35151_ACEOF
35152if ac_fn_cxx_try_compile "$LINENO"; then :
35153  ac_compiler_gnu=yes
35154else
35155  ac_compiler_gnu=no
35156fi
35157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35158ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35159
35160fi
35161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35162$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35163if test $ac_compiler_gnu = yes; then
35164  GXX=yes
35165else
35166  GXX=
35167fi
35168ac_test_CXXFLAGS=${CXXFLAGS+set}
35169ac_save_CXXFLAGS=$CXXFLAGS
35170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35171$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35172if ${ac_cv_prog_cxx_g+:} false; then :
35173  $as_echo_n "(cached) " >&6
35174else
35175  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35176   ac_cxx_werror_flag=yes
35177   ac_cv_prog_cxx_g=no
35178   CXXFLAGS="-g"
35179   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35180/* end confdefs.h.  */
35181
35182int
35183main ()
35184{
35185
35186  ;
35187  return 0;
35188}
35189_ACEOF
35190if ac_fn_cxx_try_compile "$LINENO"; then :
35191  ac_cv_prog_cxx_g=yes
35192else
35193  CXXFLAGS=""
35194      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35195/* end confdefs.h.  */
35196
35197int
35198main ()
35199{
35200
35201  ;
35202  return 0;
35203}
35204_ACEOF
35205if ac_fn_cxx_try_compile "$LINENO"; then :
35206
35207else
35208  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35209	 CXXFLAGS="-g"
35210	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35211/* end confdefs.h.  */
35212
35213int
35214main ()
35215{
35216
35217  ;
35218  return 0;
35219}
35220_ACEOF
35221if ac_fn_cxx_try_compile "$LINENO"; then :
35222  ac_cv_prog_cxx_g=yes
35223fi
35224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35225fi
35226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35227fi
35228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35229   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35230fi
35231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35232$as_echo "$ac_cv_prog_cxx_g" >&6; }
35233if test "$ac_test_CXXFLAGS" = set; then
35234  CXXFLAGS=$ac_save_CXXFLAGS
35235elif test $ac_cv_prog_cxx_g = yes; then
35236  if test "$GXX" = yes; then
35237    CXXFLAGS="-g -O2"
35238  else
35239    CXXFLAGS="-g"
35240  fi
35241else
35242  if test "$GXX" = yes; then
35243    CXXFLAGS="-O2"
35244  else
35245    CXXFLAGS=
35246  fi
35247fi
35248ac_ext=cpp
35249ac_cpp='$CXXCPP $CPPFLAGS'
35250ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35251ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35252ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35253
35254
35255  # This is the compiler version number on the form X.Y[.Z]
35256
35257
35258
35259
35260  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35261    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35262$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35263    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35264$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35265  fi
35266
35267  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35268  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
35269    { $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
35270$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;}
35271  fi
35272
35273  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35274    { $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
35275$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35276  fi
35277
35278  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
35279
35280
35281  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35282
35283
35284
35285
35286
35287
35288
35289
35290
35291
35292
35293
35294
35295
35296
35297
35298
35299
35300
35301
35302
35303
35304
35305
35306
35307
35308
35309
35310
35311
35312
35313
35314
35315
35316
35317
35318
35319
35320
35321
35322
35323
35324
35325
35326
35327
35328
35329
35330
35331    # Execute function body
35332
35333  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35334  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35335
35336  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
35337    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
35338  fi
35339
35340  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35341    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35342  fi
35343
35344  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35345  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
35346
35347  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35348    :
35349
35350  else
35351    :
35352
35353          { $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
35354$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35355
35356
35357  fi
35358
35359
35360
35361
35362
35363
35364
35365
35366
35367
35368
35369
35370
35371
35372  fi
35373
35374  #
35375  # Setup the preprocessor (CPP and CXXCPP)
35376  #
35377  ac_ext=c
35378ac_cpp='$CPP $CPPFLAGS'
35379ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35380ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35381ac_compiler_gnu=$ac_cv_c_compiler_gnu
35382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35383$as_echo_n "checking how to run the C preprocessor... " >&6; }
35384# On Suns, sometimes $CPP names a directory.
35385if test -n "$CPP" && test -d "$CPP"; then
35386  CPP=
35387fi
35388if test -z "$CPP"; then
35389  if ${ac_cv_prog_CPP+:} false; then :
35390  $as_echo_n "(cached) " >&6
35391else
35392      # Double quotes because CPP needs to be expanded
35393    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35394    do
35395      ac_preproc_ok=false
35396for ac_c_preproc_warn_flag in '' yes
35397do
35398  # Use a header file that comes with gcc, so configuring glibc
35399  # with a fresh cross-compiler works.
35400  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35401  # <limits.h> exists even on freestanding compilers.
35402  # On the NeXT, cc -E runs the code through the compiler's parser,
35403  # not just through cpp. "Syntax error" is here to catch this case.
35404  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35405/* end confdefs.h.  */
35406#ifdef __STDC__
35407# include <limits.h>
35408#else
35409# include <assert.h>
35410#endif
35411		     Syntax error
35412_ACEOF
35413if ac_fn_c_try_cpp "$LINENO"; then :
35414
35415else
35416  # Broken: fails on valid input.
35417continue
35418fi
35419rm -f conftest.err conftest.i conftest.$ac_ext
35420
35421  # OK, works on sane cases.  Now check whether nonexistent headers
35422  # can be detected and how.
35423  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35424/* end confdefs.h.  */
35425#include <ac_nonexistent.h>
35426_ACEOF
35427if ac_fn_c_try_cpp "$LINENO"; then :
35428  # Broken: success on invalid input.
35429continue
35430else
35431  # Passes both tests.
35432ac_preproc_ok=:
35433break
35434fi
35435rm -f conftest.err conftest.i conftest.$ac_ext
35436
35437done
35438# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35439rm -f conftest.i conftest.err conftest.$ac_ext
35440if $ac_preproc_ok; then :
35441  break
35442fi
35443
35444    done
35445    ac_cv_prog_CPP=$CPP
35446
35447fi
35448  CPP=$ac_cv_prog_CPP
35449else
35450  ac_cv_prog_CPP=$CPP
35451fi
35452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35453$as_echo "$CPP" >&6; }
35454ac_preproc_ok=false
35455for ac_c_preproc_warn_flag in '' yes
35456do
35457  # Use a header file that comes with gcc, so configuring glibc
35458  # with a fresh cross-compiler works.
35459  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35460  # <limits.h> exists even on freestanding compilers.
35461  # On the NeXT, cc -E runs the code through the compiler's parser,
35462  # not just through cpp. "Syntax error" is here to catch this case.
35463  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35464/* end confdefs.h.  */
35465#ifdef __STDC__
35466# include <limits.h>
35467#else
35468# include <assert.h>
35469#endif
35470		     Syntax error
35471_ACEOF
35472if ac_fn_c_try_cpp "$LINENO"; then :
35473
35474else
35475  # Broken: fails on valid input.
35476continue
35477fi
35478rm -f conftest.err conftest.i conftest.$ac_ext
35479
35480  # OK, works on sane cases.  Now check whether nonexistent headers
35481  # can be detected and how.
35482  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35483/* end confdefs.h.  */
35484#include <ac_nonexistent.h>
35485_ACEOF
35486if ac_fn_c_try_cpp "$LINENO"; then :
35487  # Broken: success on invalid input.
35488continue
35489else
35490  # Passes both tests.
35491ac_preproc_ok=:
35492break
35493fi
35494rm -f conftest.err conftest.i conftest.$ac_ext
35495
35496done
35497# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35498rm -f conftest.i conftest.err conftest.$ac_ext
35499if $ac_preproc_ok; then :
35500
35501else
35502  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35503$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35504as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35505See \`config.log' for more details" "$LINENO" 5; }
35506fi
35507
35508ac_ext=cpp
35509ac_cpp='$CXXCPP $CPPFLAGS'
35510ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35511ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35512ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35513
35514
35515  # Only process if variable expands to non-empty
35516
35517  if test "x$CPP" != x; then
35518    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35519
35520  # First separate the path from the arguments. This will split at the first
35521  # space.
35522  complete="$CPP"
35523  path="${complete%% *}"
35524  tmp="$complete EOL"
35525  arguments="${tmp#* }"
35526
35527  # Input might be given as Windows format, start by converting to
35528  # unix format.
35529  new_path=`$CYGPATH -u "$path"`
35530
35531  # Now try to locate executable using which
35532  new_path=`$WHICH "$new_path" 2> /dev/null`
35533  # bat and cmd files are not always considered executable in cygwin causing which
35534  # to not find them
35535  if test "x$new_path" = x \
35536      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35537      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35538    new_path=`$CYGPATH -u "$path"`
35539  fi
35540  if test "x$new_path" = x; then
35541    # Oops. Which didn't find the executable.
35542    # The splitting of arguments from the executable at a space might have been incorrect,
35543    # since paths with space are more likely in Windows. Give it another try with the whole
35544    # argument.
35545    path="$complete"
35546    arguments="EOL"
35547    new_path=`$CYGPATH -u "$path"`
35548    new_path=`$WHICH "$new_path" 2> /dev/null`
35549    # bat and cmd files are not always considered executable in cygwin causing which
35550    # to not find them
35551    if test "x$new_path" = x \
35552        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35553        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35554      new_path=`$CYGPATH -u "$path"`
35555    fi
35556    if test "x$new_path" = x; then
35557      # It's still not found. Now this is an unrecoverable error.
35558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35559$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35560      has_space=`$ECHO "$complete" | $GREP " "`
35561      if test "x$has_space" != x; then
35562        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35563$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35564      fi
35565      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35566    fi
35567  fi
35568
35569  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35570  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35571  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35572  # "foo.exe" is OK but "foo" is an error.
35573  #
35574  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35575  # It is also a way to make sure we got the proper file name for the real test later on.
35576  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35577  if test "x$test_shortpath" = x; then
35578    # Short path failed, file does not exist as specified.
35579    # Try adding .exe or .cmd
35580    if test -f "${new_path}.exe"; then
35581      input_to_shortpath="${new_path}.exe"
35582    elif test -f "${new_path}.cmd"; then
35583      input_to_shortpath="${new_path}.cmd"
35584    else
35585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35586$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35587      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35588$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35589      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35590    fi
35591  else
35592    input_to_shortpath="$new_path"
35593  fi
35594
35595  # Call helper function which possibly converts this using DOS-style short mode.
35596  # If so, the updated path is stored in $new_path.
35597  new_path="$input_to_shortpath"
35598
35599  input_path="$input_to_shortpath"
35600  # Check if we need to convert this using DOS-style short mode. If the path
35601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35602  # take no chances and rewrite it.
35603  # Note: m4 eats our [], so we need to use [ and ] instead.
35604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35605  if test "x$has_forbidden_chars" != x; then
35606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35607    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35608    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35609    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35610      # Going to short mode and back again did indeed matter. Since short mode is
35611      # case insensitive, let's make it lowercase to improve readability.
35612      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35613      # Now convert it back to Unix-style (cygpath)
35614      input_path=`$CYGPATH -u "$shortmode_path"`
35615      new_path="$input_path"
35616    fi
35617  fi
35618
35619  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35620  if test "x$test_cygdrive_prefix" = x; then
35621    # As a simple fix, exclude /usr/bin since it's not a real path.
35622    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35623      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35624      # a path prefixed by /cygdrive for fixpath to work.
35625      new_path="$CYGWIN_ROOT_PATH$input_path"
35626    fi
35627  fi
35628
35629  # remove trailing .exe if any
35630  new_path="${new_path/%.exe/}"
35631
35632    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35633
35634  # First separate the path from the arguments. This will split at the first
35635  # space.
35636  complete="$CPP"
35637  path="${complete%% *}"
35638  tmp="$complete EOL"
35639  arguments="${tmp#* }"
35640
35641  # Input might be given as Windows format, start by converting to
35642  # unix format.
35643  new_path="$path"
35644
35645  windows_path="$new_path"
35646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35647    unix_path=`$CYGPATH -u "$windows_path"`
35648    new_path="$unix_path"
35649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35651    new_path="$unix_path"
35652  fi
35653
35654
35655  # Now try to locate executable using which
35656  new_path=`$WHICH "$new_path" 2> /dev/null`
35657
35658  if test "x$new_path" = x; then
35659    # Oops. Which didn't find the executable.
35660    # The splitting of arguments from the executable at a space might have been incorrect,
35661    # since paths with space are more likely in Windows. Give it another try with the whole
35662    # argument.
35663    path="$complete"
35664    arguments="EOL"
35665    new_path="$path"
35666
35667  windows_path="$new_path"
35668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35669    unix_path=`$CYGPATH -u "$windows_path"`
35670    new_path="$unix_path"
35671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35673    new_path="$unix_path"
35674  fi
35675
35676
35677    new_path=`$WHICH "$new_path" 2> /dev/null`
35678    # bat and cmd files are not always considered executable in MSYS causing which
35679    # to not find them
35680    if test "x$new_path" = x \
35681        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35682        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35683      new_path="$path"
35684
35685  windows_path="$new_path"
35686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35687    unix_path=`$CYGPATH -u "$windows_path"`
35688    new_path="$unix_path"
35689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35691    new_path="$unix_path"
35692  fi
35693
35694    fi
35695
35696    if test "x$new_path" = x; then
35697      # It's still not found. Now this is an unrecoverable error.
35698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35699$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35700      has_space=`$ECHO "$complete" | $GREP " "`
35701      if test "x$has_space" != x; then
35702        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35703$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35704      fi
35705      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35706    fi
35707  fi
35708
35709  # Now new_path has a complete unix path to the binary
35710  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35711    # Keep paths in /bin as-is, but remove trailing .exe if any
35712    new_path="${new_path/%.exe/}"
35713    # Do not save /bin paths to all_fixpath_prefixes!
35714  else
35715    # Not in mixed or Windows style, start by that.
35716    new_path=`cmd //c echo $new_path`
35717
35718  input_path="$new_path"
35719  # Check if we need to convert this using DOS-style short mode. If the path
35720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35721  # take no chances and rewrite it.
35722  # Note: m4 eats our [], so we need to use [ and ] instead.
35723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35724  if test "x$has_forbidden_chars" != x; then
35725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35726    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35727  fi
35728
35729    # Output is in $new_path
35730
35731  windows_path="$new_path"
35732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35733    unix_path=`$CYGPATH -u "$windows_path"`
35734    new_path="$unix_path"
35735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35737    new_path="$unix_path"
35738  fi
35739
35740    # remove trailing .exe if any
35741    new_path="${new_path/%.exe/}"
35742
35743    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35744    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35745  fi
35746
35747    else
35748      # We're on a unix platform. Hooray! :)
35749      # First separate the path from the arguments. This will split at the first
35750      # space.
35751      complete="$CPP"
35752      path="${complete%% *}"
35753      tmp="$complete EOL"
35754      arguments="${tmp#* }"
35755
35756      # Cannot rely on the command "which" here since it doesn't always work.
35757      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35758      if test -z "$is_absolute_path"; then
35759        # Path to executable is not absolute. Find it.
35760        IFS_save="$IFS"
35761        IFS=:
35762        for p in $PATH; do
35763          if test -f "$p/$path" && test -x "$p/$path"; then
35764            new_path="$p/$path"
35765            break
35766          fi
35767        done
35768        IFS="$IFS_save"
35769      else
35770        # This is an absolute path, we can use it without further modifications.
35771        new_path="$path"
35772      fi
35773
35774      if test "x$new_path" = x; then
35775        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35776$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35777        has_space=`$ECHO "$complete" | $GREP " "`
35778        if test "x$has_space" != x; then
35779          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35780$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35781        fi
35782        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35783      fi
35784    fi
35785
35786    # Now join together the path and the arguments once again
35787    if test "x$arguments" != xEOL; then
35788      new_complete="$new_path ${arguments% *}"
35789    else
35790      new_complete="$new_path"
35791    fi
35792
35793    if test "x$complete" != "x$new_complete"; then
35794      CPP="$new_complete"
35795      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35796$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35797    fi
35798  fi
35799
35800  ac_ext=cpp
35801ac_cpp='$CXXCPP $CPPFLAGS'
35802ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35803ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35804ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35806$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35807if test -z "$CXXCPP"; then
35808  if ${ac_cv_prog_CXXCPP+:} false; then :
35809  $as_echo_n "(cached) " >&6
35810else
35811      # Double quotes because CXXCPP needs to be expanded
35812    for CXXCPP in "$CXX -E" "/lib/cpp"
35813    do
35814      ac_preproc_ok=false
35815for ac_cxx_preproc_warn_flag in '' yes
35816do
35817  # Use a header file that comes with gcc, so configuring glibc
35818  # with a fresh cross-compiler works.
35819  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35820  # <limits.h> exists even on freestanding compilers.
35821  # On the NeXT, cc -E runs the code through the compiler's parser,
35822  # not just through cpp. "Syntax error" is here to catch this case.
35823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35824/* end confdefs.h.  */
35825#ifdef __STDC__
35826# include <limits.h>
35827#else
35828# include <assert.h>
35829#endif
35830		     Syntax error
35831_ACEOF
35832if ac_fn_cxx_try_cpp "$LINENO"; then :
35833
35834else
35835  # Broken: fails on valid input.
35836continue
35837fi
35838rm -f conftest.err conftest.i conftest.$ac_ext
35839
35840  # OK, works on sane cases.  Now check whether nonexistent headers
35841  # can be detected and how.
35842  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35843/* end confdefs.h.  */
35844#include <ac_nonexistent.h>
35845_ACEOF
35846if ac_fn_cxx_try_cpp "$LINENO"; then :
35847  # Broken: success on invalid input.
35848continue
35849else
35850  # Passes both tests.
35851ac_preproc_ok=:
35852break
35853fi
35854rm -f conftest.err conftest.i conftest.$ac_ext
35855
35856done
35857# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35858rm -f conftest.i conftest.err conftest.$ac_ext
35859if $ac_preproc_ok; then :
35860  break
35861fi
35862
35863    done
35864    ac_cv_prog_CXXCPP=$CXXCPP
35865
35866fi
35867  CXXCPP=$ac_cv_prog_CXXCPP
35868else
35869  ac_cv_prog_CXXCPP=$CXXCPP
35870fi
35871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35872$as_echo "$CXXCPP" >&6; }
35873ac_preproc_ok=false
35874for ac_cxx_preproc_warn_flag in '' yes
35875do
35876  # Use a header file that comes with gcc, so configuring glibc
35877  # with a fresh cross-compiler works.
35878  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35879  # <limits.h> exists even on freestanding compilers.
35880  # On the NeXT, cc -E runs the code through the compiler's parser,
35881  # not just through cpp. "Syntax error" is here to catch this case.
35882  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35883/* end confdefs.h.  */
35884#ifdef __STDC__
35885# include <limits.h>
35886#else
35887# include <assert.h>
35888#endif
35889		     Syntax error
35890_ACEOF
35891if ac_fn_cxx_try_cpp "$LINENO"; then :
35892
35893else
35894  # Broken: fails on valid input.
35895continue
35896fi
35897rm -f conftest.err conftest.i conftest.$ac_ext
35898
35899  # OK, works on sane cases.  Now check whether nonexistent headers
35900  # can be detected and how.
35901  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35902/* end confdefs.h.  */
35903#include <ac_nonexistent.h>
35904_ACEOF
35905if ac_fn_cxx_try_cpp "$LINENO"; then :
35906  # Broken: success on invalid input.
35907continue
35908else
35909  # Passes both tests.
35910ac_preproc_ok=:
35911break
35912fi
35913rm -f conftest.err conftest.i conftest.$ac_ext
35914
35915done
35916# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35917rm -f conftest.i conftest.err conftest.$ac_ext
35918if $ac_preproc_ok; then :
35919
35920else
35921  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35922$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35923as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35924See \`config.log' for more details" "$LINENO" 5; }
35925fi
35926
35927ac_ext=cpp
35928ac_cpp='$CXXCPP $CPPFLAGS'
35929ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35930ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35931ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35932
35933
35934  # Only process if variable expands to non-empty
35935
35936  if test "x$CXXCPP" != x; then
35937    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35938
35939  # First separate the path from the arguments. This will split at the first
35940  # space.
35941  complete="$CXXCPP"
35942  path="${complete%% *}"
35943  tmp="$complete EOL"
35944  arguments="${tmp#* }"
35945
35946  # Input might be given as Windows format, start by converting to
35947  # unix format.
35948  new_path=`$CYGPATH -u "$path"`
35949
35950  # Now try to locate executable using which
35951  new_path=`$WHICH "$new_path" 2> /dev/null`
35952  # bat and cmd files are not always considered executable in cygwin causing which
35953  # to not find them
35954  if test "x$new_path" = x \
35955      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35956      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35957    new_path=`$CYGPATH -u "$path"`
35958  fi
35959  if test "x$new_path" = x; then
35960    # Oops. Which didn't find the executable.
35961    # The splitting of arguments from the executable at a space might have been incorrect,
35962    # since paths with space are more likely in Windows. Give it another try with the whole
35963    # argument.
35964    path="$complete"
35965    arguments="EOL"
35966    new_path=`$CYGPATH -u "$path"`
35967    new_path=`$WHICH "$new_path" 2> /dev/null`
35968    # bat and cmd files are not always considered executable in cygwin causing which
35969    # to not find them
35970    if test "x$new_path" = x \
35971        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35972        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35973      new_path=`$CYGPATH -u "$path"`
35974    fi
35975    if test "x$new_path" = x; then
35976      # It's still not found. Now this is an unrecoverable error.
35977      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35978$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35979      has_space=`$ECHO "$complete" | $GREP " "`
35980      if test "x$has_space" != x; then
35981        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35982$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35983      fi
35984      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35985    fi
35986  fi
35987
35988  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35989  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35990  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35991  # "foo.exe" is OK but "foo" is an error.
35992  #
35993  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35994  # It is also a way to make sure we got the proper file name for the real test later on.
35995  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35996  if test "x$test_shortpath" = x; then
35997    # Short path failed, file does not exist as specified.
35998    # Try adding .exe or .cmd
35999    if test -f "${new_path}.exe"; then
36000      input_to_shortpath="${new_path}.exe"
36001    elif test -f "${new_path}.cmd"; then
36002      input_to_shortpath="${new_path}.cmd"
36003    else
36004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36005$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36006      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36007$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36008      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36009    fi
36010  else
36011    input_to_shortpath="$new_path"
36012  fi
36013
36014  # Call helper function which possibly converts this using DOS-style short mode.
36015  # If so, the updated path is stored in $new_path.
36016  new_path="$input_to_shortpath"
36017
36018  input_path="$input_to_shortpath"
36019  # Check if we need to convert this using DOS-style short mode. If the path
36020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36021  # take no chances and rewrite it.
36022  # Note: m4 eats our [], so we need to use [ and ] instead.
36023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36024  if test "x$has_forbidden_chars" != x; then
36025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36026    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36027    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36028    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36029      # Going to short mode and back again did indeed matter. Since short mode is
36030      # case insensitive, let's make it lowercase to improve readability.
36031      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36032      # Now convert it back to Unix-style (cygpath)
36033      input_path=`$CYGPATH -u "$shortmode_path"`
36034      new_path="$input_path"
36035    fi
36036  fi
36037
36038  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36039  if test "x$test_cygdrive_prefix" = x; then
36040    # As a simple fix, exclude /usr/bin since it's not a real path.
36041    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36042      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36043      # a path prefixed by /cygdrive for fixpath to work.
36044      new_path="$CYGWIN_ROOT_PATH$input_path"
36045    fi
36046  fi
36047
36048  # remove trailing .exe if any
36049  new_path="${new_path/%.exe/}"
36050
36051    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36052
36053  # First separate the path from the arguments. This will split at the first
36054  # space.
36055  complete="$CXXCPP"
36056  path="${complete%% *}"
36057  tmp="$complete EOL"
36058  arguments="${tmp#* }"
36059
36060  # Input might be given as Windows format, start by converting to
36061  # unix format.
36062  new_path="$path"
36063
36064  windows_path="$new_path"
36065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36066    unix_path=`$CYGPATH -u "$windows_path"`
36067    new_path="$unix_path"
36068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36070    new_path="$unix_path"
36071  fi
36072
36073
36074  # Now try to locate executable using which
36075  new_path=`$WHICH "$new_path" 2> /dev/null`
36076
36077  if test "x$new_path" = x; then
36078    # Oops. Which didn't find the executable.
36079    # The splitting of arguments from the executable at a space might have been incorrect,
36080    # since paths with space are more likely in Windows. Give it another try with the whole
36081    # argument.
36082    path="$complete"
36083    arguments="EOL"
36084    new_path="$path"
36085
36086  windows_path="$new_path"
36087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36088    unix_path=`$CYGPATH -u "$windows_path"`
36089    new_path="$unix_path"
36090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36092    new_path="$unix_path"
36093  fi
36094
36095
36096    new_path=`$WHICH "$new_path" 2> /dev/null`
36097    # bat and cmd files are not always considered executable in MSYS causing which
36098    # to not find them
36099    if test "x$new_path" = x \
36100        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36101        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36102      new_path="$path"
36103
36104  windows_path="$new_path"
36105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36106    unix_path=`$CYGPATH -u "$windows_path"`
36107    new_path="$unix_path"
36108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36110    new_path="$unix_path"
36111  fi
36112
36113    fi
36114
36115    if test "x$new_path" = x; then
36116      # It's still not found. Now this is an unrecoverable error.
36117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36118$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36119      has_space=`$ECHO "$complete" | $GREP " "`
36120      if test "x$has_space" != x; then
36121        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36122$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36123      fi
36124      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36125    fi
36126  fi
36127
36128  # Now new_path has a complete unix path to the binary
36129  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36130    # Keep paths in /bin as-is, but remove trailing .exe if any
36131    new_path="${new_path/%.exe/}"
36132    # Do not save /bin paths to all_fixpath_prefixes!
36133  else
36134    # Not in mixed or Windows style, start by that.
36135    new_path=`cmd //c echo $new_path`
36136
36137  input_path="$new_path"
36138  # Check if we need to convert this using DOS-style short mode. If the path
36139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36140  # take no chances and rewrite it.
36141  # Note: m4 eats our [], so we need to use [ and ] instead.
36142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36143  if test "x$has_forbidden_chars" != x; then
36144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36146  fi
36147
36148    # Output is in $new_path
36149
36150  windows_path="$new_path"
36151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36152    unix_path=`$CYGPATH -u "$windows_path"`
36153    new_path="$unix_path"
36154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36156    new_path="$unix_path"
36157  fi
36158
36159    # remove trailing .exe if any
36160    new_path="${new_path/%.exe/}"
36161
36162    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36163    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36164  fi
36165
36166    else
36167      # We're on a unix platform. Hooray! :)
36168      # First separate the path from the arguments. This will split at the first
36169      # space.
36170      complete="$CXXCPP"
36171      path="${complete%% *}"
36172      tmp="$complete EOL"
36173      arguments="${tmp#* }"
36174
36175      # Cannot rely on the command "which" here since it doesn't always work.
36176      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36177      if test -z "$is_absolute_path"; then
36178        # Path to executable is not absolute. Find it.
36179        IFS_save="$IFS"
36180        IFS=:
36181        for p in $PATH; do
36182          if test -f "$p/$path" && test -x "$p/$path"; then
36183            new_path="$p/$path"
36184            break
36185          fi
36186        done
36187        IFS="$IFS_save"
36188      else
36189        # This is an absolute path, we can use it without further modifications.
36190        new_path="$path"
36191      fi
36192
36193      if test "x$new_path" = x; then
36194        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36195$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36196        has_space=`$ECHO "$complete" | $GREP " "`
36197        if test "x$has_space" != x; then
36198          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36199$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36200        fi
36201        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36202      fi
36203    fi
36204
36205    # Now join together the path and the arguments once again
36206    if test "x$arguments" != xEOL; then
36207      new_complete="$new_path ${arguments% *}"
36208    else
36209      new_complete="$new_path"
36210    fi
36211
36212    if test "x$complete" != "x$new_complete"; then
36213      CXXCPP="$new_complete"
36214      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36215$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36216    fi
36217  fi
36218
36219
36220  #
36221  # Setup the linker (LD)
36222  #
36223  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36224    # In the Microsoft toolchain we have a separate LD command "link".
36225    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36226    # a cygwin program for something completely different.
36227    # Extract the first word of "link", so it can be a program name with args.
36228set dummy link; ac_word=$2
36229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36230$as_echo_n "checking for $ac_word... " >&6; }
36231if ${ac_cv_prog_LD+:} false; then :
36232  $as_echo_n "(cached) " >&6
36233else
36234  if test -n "$LD"; then
36235  ac_cv_prog_LD="$LD" # Let the user override the test.
36236else
36237  ac_prog_rejected=no
36238as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36239for as_dir in $PATH
36240do
36241  IFS=$as_save_IFS
36242  test -z "$as_dir" && as_dir=.
36243    for ac_exec_ext in '' $ac_executable_extensions; do
36244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36245    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36246       ac_prog_rejected=yes
36247       continue
36248     fi
36249    ac_cv_prog_LD="link"
36250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36251    break 2
36252  fi
36253done
36254  done
36255IFS=$as_save_IFS
36256
36257if test $ac_prog_rejected = yes; then
36258  # We found a bogon in the path, so make sure we never use it.
36259  set dummy $ac_cv_prog_LD
36260  shift
36261  if test $# != 0; then
36262    # We chose a different compiler from the bogus one.
36263    # However, it has the same basename, so the bogon will be chosen
36264    # first if we set LD to just the basename; use the full file name.
36265    shift
36266    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36267  fi
36268fi
36269fi
36270fi
36271LD=$ac_cv_prog_LD
36272if test -n "$LD"; then
36273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36274$as_echo "$LD" >&6; }
36275else
36276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36277$as_echo "no" >&6; }
36278fi
36279
36280
36281
36282  # Only process if variable expands to non-empty
36283
36284  if test "x$LD" != x; then
36285    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36286
36287  # First separate the path from the arguments. This will split at the first
36288  # space.
36289  complete="$LD"
36290  path="${complete%% *}"
36291  tmp="$complete EOL"
36292  arguments="${tmp#* }"
36293
36294  # Input might be given as Windows format, start by converting to
36295  # unix format.
36296  new_path=`$CYGPATH -u "$path"`
36297
36298  # Now try to locate executable using which
36299  new_path=`$WHICH "$new_path" 2> /dev/null`
36300  # bat and cmd files are not always considered executable in cygwin causing which
36301  # to not find them
36302  if test "x$new_path" = x \
36303      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36304      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36305    new_path=`$CYGPATH -u "$path"`
36306  fi
36307  if test "x$new_path" = x; then
36308    # Oops. Which didn't find the executable.
36309    # The splitting of arguments from the executable at a space might have been incorrect,
36310    # since paths with space are more likely in Windows. Give it another try with the whole
36311    # argument.
36312    path="$complete"
36313    arguments="EOL"
36314    new_path=`$CYGPATH -u "$path"`
36315    new_path=`$WHICH "$new_path" 2> /dev/null`
36316    # bat and cmd files are not always considered executable in cygwin causing which
36317    # to not find them
36318    if test "x$new_path" = x \
36319        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36320        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36321      new_path=`$CYGPATH -u "$path"`
36322    fi
36323    if test "x$new_path" = x; then
36324      # It's still not found. Now this is an unrecoverable error.
36325      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36326$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36327      has_space=`$ECHO "$complete" | $GREP " "`
36328      if test "x$has_space" != x; then
36329        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36330$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36331      fi
36332      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36333    fi
36334  fi
36335
36336  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36337  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36338  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36339  # "foo.exe" is OK but "foo" is an error.
36340  #
36341  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36342  # It is also a way to make sure we got the proper file name for the real test later on.
36343  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36344  if test "x$test_shortpath" = x; then
36345    # Short path failed, file does not exist as specified.
36346    # Try adding .exe or .cmd
36347    if test -f "${new_path}.exe"; then
36348      input_to_shortpath="${new_path}.exe"
36349    elif test -f "${new_path}.cmd"; then
36350      input_to_shortpath="${new_path}.cmd"
36351    else
36352      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36353$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36354      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36355$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36356      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36357    fi
36358  else
36359    input_to_shortpath="$new_path"
36360  fi
36361
36362  # Call helper function which possibly converts this using DOS-style short mode.
36363  # If so, the updated path is stored in $new_path.
36364  new_path="$input_to_shortpath"
36365
36366  input_path="$input_to_shortpath"
36367  # Check if we need to convert this using DOS-style short mode. If the path
36368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36369  # take no chances and rewrite it.
36370  # Note: m4 eats our [], so we need to use [ and ] instead.
36371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36372  if test "x$has_forbidden_chars" != x; then
36373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36374    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36375    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36376    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36377      # Going to short mode and back again did indeed matter. Since short mode is
36378      # case insensitive, let's make it lowercase to improve readability.
36379      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36380      # Now convert it back to Unix-style (cygpath)
36381      input_path=`$CYGPATH -u "$shortmode_path"`
36382      new_path="$input_path"
36383    fi
36384  fi
36385
36386  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36387  if test "x$test_cygdrive_prefix" = x; then
36388    # As a simple fix, exclude /usr/bin since it's not a real path.
36389    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36390      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36391      # a path prefixed by /cygdrive for fixpath to work.
36392      new_path="$CYGWIN_ROOT_PATH$input_path"
36393    fi
36394  fi
36395
36396  # remove trailing .exe if any
36397  new_path="${new_path/%.exe/}"
36398
36399    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36400
36401  # First separate the path from the arguments. This will split at the first
36402  # space.
36403  complete="$LD"
36404  path="${complete%% *}"
36405  tmp="$complete EOL"
36406  arguments="${tmp#* }"
36407
36408  # Input might be given as Windows format, start by converting to
36409  # unix format.
36410  new_path="$path"
36411
36412  windows_path="$new_path"
36413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36414    unix_path=`$CYGPATH -u "$windows_path"`
36415    new_path="$unix_path"
36416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36418    new_path="$unix_path"
36419  fi
36420
36421
36422  # Now try to locate executable using which
36423  new_path=`$WHICH "$new_path" 2> /dev/null`
36424
36425  if test "x$new_path" = x; then
36426    # Oops. Which didn't find the executable.
36427    # The splitting of arguments from the executable at a space might have been incorrect,
36428    # since paths with space are more likely in Windows. Give it another try with the whole
36429    # argument.
36430    path="$complete"
36431    arguments="EOL"
36432    new_path="$path"
36433
36434  windows_path="$new_path"
36435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36436    unix_path=`$CYGPATH -u "$windows_path"`
36437    new_path="$unix_path"
36438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36440    new_path="$unix_path"
36441  fi
36442
36443
36444    new_path=`$WHICH "$new_path" 2> /dev/null`
36445    # bat and cmd files are not always considered executable in MSYS causing which
36446    # to not find them
36447    if test "x$new_path" = x \
36448        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36449        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36450      new_path="$path"
36451
36452  windows_path="$new_path"
36453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36454    unix_path=`$CYGPATH -u "$windows_path"`
36455    new_path="$unix_path"
36456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36458    new_path="$unix_path"
36459  fi
36460
36461    fi
36462
36463    if test "x$new_path" = x; then
36464      # It's still not found. Now this is an unrecoverable error.
36465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36466$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36467      has_space=`$ECHO "$complete" | $GREP " "`
36468      if test "x$has_space" != x; then
36469        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36470$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36471      fi
36472      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36473    fi
36474  fi
36475
36476  # Now new_path has a complete unix path to the binary
36477  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36478    # Keep paths in /bin as-is, but remove trailing .exe if any
36479    new_path="${new_path/%.exe/}"
36480    # Do not save /bin paths to all_fixpath_prefixes!
36481  else
36482    # Not in mixed or Windows style, start by that.
36483    new_path=`cmd //c echo $new_path`
36484
36485  input_path="$new_path"
36486  # Check if we need to convert this using DOS-style short mode. If the path
36487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36488  # take no chances and rewrite it.
36489  # Note: m4 eats our [], so we need to use [ and ] instead.
36490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36491  if test "x$has_forbidden_chars" != x; then
36492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36493    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36494  fi
36495
36496    # Output is in $new_path
36497
36498  windows_path="$new_path"
36499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36500    unix_path=`$CYGPATH -u "$windows_path"`
36501    new_path="$unix_path"
36502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36504    new_path="$unix_path"
36505  fi
36506
36507    # remove trailing .exe if any
36508    new_path="${new_path/%.exe/}"
36509
36510    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36511    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36512  fi
36513
36514    else
36515      # We're on a unix platform. Hooray! :)
36516      # First separate the path from the arguments. This will split at the first
36517      # space.
36518      complete="$LD"
36519      path="${complete%% *}"
36520      tmp="$complete EOL"
36521      arguments="${tmp#* }"
36522
36523      # Cannot rely on the command "which" here since it doesn't always work.
36524      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36525      if test -z "$is_absolute_path"; then
36526        # Path to executable is not absolute. Find it.
36527        IFS_save="$IFS"
36528        IFS=:
36529        for p in $PATH; do
36530          if test -f "$p/$path" && test -x "$p/$path"; then
36531            new_path="$p/$path"
36532            break
36533          fi
36534        done
36535        IFS="$IFS_save"
36536      else
36537        # This is an absolute path, we can use it without further modifications.
36538        new_path="$path"
36539      fi
36540
36541      if test "x$new_path" = x; then
36542        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36543$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36544        has_space=`$ECHO "$complete" | $GREP " "`
36545        if test "x$has_space" != x; then
36546          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36547$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36548        fi
36549        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36550      fi
36551    fi
36552
36553    # Now join together the path and the arguments once again
36554    if test "x$arguments" != xEOL; then
36555      new_complete="$new_path ${arguments% *}"
36556    else
36557      new_complete="$new_path"
36558    fi
36559
36560    if test "x$complete" != "x$new_complete"; then
36561      LD="$new_complete"
36562      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36563$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36564    fi
36565  fi
36566
36567    # Verify that we indeed succeeded with this trick.
36568    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36569$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36570    "$LD" --version > /dev/null
36571    if test $? -eq 0 ; then
36572      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36573$as_echo "no" >&6; }
36574      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36575    else
36576      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36577$as_echo "yes" >&6; }
36578    fi
36579    LDCXX="$LD"
36580  else
36581    # All other toolchains use the compiler to link.
36582    LD="$CC"
36583    LDCXX="$CXX"
36584  fi
36585
36586  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36587
36588
36589  #
36590  # Setup the assembler (AS)
36591  #
36592  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36593
36594
36595  # Publish this variable in the help.
36596
36597
36598  if [ -z "${AS+x}" ]; then
36599    # The variable is not set by user, try to locate tool using the code snippet
36600    for ac_prog in as
36601do
36602  # Extract the first word of "$ac_prog", so it can be a program name with args.
36603set dummy $ac_prog; ac_word=$2
36604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36605$as_echo_n "checking for $ac_word... " >&6; }
36606if ${ac_cv_path_AS+:} false; then :
36607  $as_echo_n "(cached) " >&6
36608else
36609  case $AS in
36610  [\\/]* | ?:[\\/]*)
36611  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36612  ;;
36613  *)
36614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36615for as_dir in $PATH
36616do
36617  IFS=$as_save_IFS
36618  test -z "$as_dir" && as_dir=.
36619    for ac_exec_ext in '' $ac_executable_extensions; do
36620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36621    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36623    break 2
36624  fi
36625done
36626  done
36627IFS=$as_save_IFS
36628
36629  ;;
36630esac
36631fi
36632AS=$ac_cv_path_AS
36633if test -n "$AS"; then
36634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36635$as_echo "$AS" >&6; }
36636else
36637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36638$as_echo "no" >&6; }
36639fi
36640
36641
36642  test -n "$AS" && break
36643done
36644
36645  else
36646    # The variable is set, but is it from the command line or the environment?
36647
36648    # Try to remove the string !AS! from our list.
36649    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36650    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36651      # If it failed, the variable was not from the command line. Ignore it,
36652      # but warn the user (except for BASH, which is always set by the calling BASH).
36653      if test "xAS" != xBASH; then
36654        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36655$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36656      fi
36657      # Try to locate tool using the code snippet
36658      for ac_prog in as
36659do
36660  # Extract the first word of "$ac_prog", so it can be a program name with args.
36661set dummy $ac_prog; ac_word=$2
36662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36663$as_echo_n "checking for $ac_word... " >&6; }
36664if ${ac_cv_path_AS+:} false; then :
36665  $as_echo_n "(cached) " >&6
36666else
36667  case $AS in
36668  [\\/]* | ?:[\\/]*)
36669  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36670  ;;
36671  *)
36672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36673for as_dir in $PATH
36674do
36675  IFS=$as_save_IFS
36676  test -z "$as_dir" && as_dir=.
36677    for ac_exec_ext in '' $ac_executable_extensions; do
36678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36679    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36681    break 2
36682  fi
36683done
36684  done
36685IFS=$as_save_IFS
36686
36687  ;;
36688esac
36689fi
36690AS=$ac_cv_path_AS
36691if test -n "$AS"; then
36692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36693$as_echo "$AS" >&6; }
36694else
36695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36696$as_echo "no" >&6; }
36697fi
36698
36699
36700  test -n "$AS" && break
36701done
36702
36703    else
36704      # If it succeeded, then it was overridden by the user. We will use it
36705      # for the tool.
36706
36707      # First remove it from the list of overridden variables, so we can test
36708      # for unknown variables in the end.
36709      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36710
36711      # Check if we try to supply an empty value
36712      if test "x$AS" = x; then
36713        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36714$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36715        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36716$as_echo_n "checking for AS... " >&6; }
36717        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36718$as_echo "disabled" >&6; }
36719      else
36720        # Check if the provided tool contains a complete path.
36721        tool_specified="$AS"
36722        tool_basename="${tool_specified##*/}"
36723        if test "x$tool_basename" = "x$tool_specified"; then
36724          # A command without a complete path is provided, search $PATH.
36725          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36726$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36727          # Extract the first word of "$tool_basename", so it can be a program name with args.
36728set dummy $tool_basename; ac_word=$2
36729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36730$as_echo_n "checking for $ac_word... " >&6; }
36731if ${ac_cv_path_AS+:} false; then :
36732  $as_echo_n "(cached) " >&6
36733else
36734  case $AS in
36735  [\\/]* | ?:[\\/]*)
36736  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36737  ;;
36738  *)
36739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36740for as_dir in $PATH
36741do
36742  IFS=$as_save_IFS
36743  test -z "$as_dir" && as_dir=.
36744    for ac_exec_ext in '' $ac_executable_extensions; do
36745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36746    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36748    break 2
36749  fi
36750done
36751  done
36752IFS=$as_save_IFS
36753
36754  ;;
36755esac
36756fi
36757AS=$ac_cv_path_AS
36758if test -n "$AS"; then
36759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36760$as_echo "$AS" >&6; }
36761else
36762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36763$as_echo "no" >&6; }
36764fi
36765
36766
36767          if test "x$AS" = x; then
36768            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36769          fi
36770        else
36771          # Otherwise we believe it is a complete path. Use it as it is.
36772          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36773$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36774          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36775$as_echo_n "checking for AS... " >&6; }
36776          if test ! -x "$tool_specified"; then
36777            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36778$as_echo "not found" >&6; }
36779            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36780          fi
36781          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36782$as_echo "$tool_specified" >&6; }
36783        fi
36784      fi
36785    fi
36786
36787  fi
36788
36789
36790
36791  # Only process if variable expands to non-empty
36792
36793  if test "x$AS" != x; then
36794    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36795
36796  # First separate the path from the arguments. This will split at the first
36797  # space.
36798  complete="$AS"
36799  path="${complete%% *}"
36800  tmp="$complete EOL"
36801  arguments="${tmp#* }"
36802
36803  # Input might be given as Windows format, start by converting to
36804  # unix format.
36805  new_path=`$CYGPATH -u "$path"`
36806
36807  # Now try to locate executable using which
36808  new_path=`$WHICH "$new_path" 2> /dev/null`
36809  # bat and cmd files are not always considered executable in cygwin causing which
36810  # to not find them
36811  if test "x$new_path" = x \
36812      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36813      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36814    new_path=`$CYGPATH -u "$path"`
36815  fi
36816  if test "x$new_path" = x; then
36817    # Oops. Which didn't find the executable.
36818    # The splitting of arguments from the executable at a space might have been incorrect,
36819    # since paths with space are more likely in Windows. Give it another try with the whole
36820    # argument.
36821    path="$complete"
36822    arguments="EOL"
36823    new_path=`$CYGPATH -u "$path"`
36824    new_path=`$WHICH "$new_path" 2> /dev/null`
36825    # bat and cmd files are not always considered executable in cygwin causing which
36826    # to not find them
36827    if test "x$new_path" = x \
36828        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36829        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36830      new_path=`$CYGPATH -u "$path"`
36831    fi
36832    if test "x$new_path" = x; then
36833      # It's still not found. Now this is an unrecoverable error.
36834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36835$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36836      has_space=`$ECHO "$complete" | $GREP " "`
36837      if test "x$has_space" != x; then
36838        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36839$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36840      fi
36841      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36842    fi
36843  fi
36844
36845  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36846  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36847  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36848  # "foo.exe" is OK but "foo" is an error.
36849  #
36850  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36851  # It is also a way to make sure we got the proper file name for the real test later on.
36852  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36853  if test "x$test_shortpath" = x; then
36854    # Short path failed, file does not exist as specified.
36855    # Try adding .exe or .cmd
36856    if test -f "${new_path}.exe"; then
36857      input_to_shortpath="${new_path}.exe"
36858    elif test -f "${new_path}.cmd"; then
36859      input_to_shortpath="${new_path}.cmd"
36860    else
36861      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36862$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36863      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36864$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36865      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36866    fi
36867  else
36868    input_to_shortpath="$new_path"
36869  fi
36870
36871  # Call helper function which possibly converts this using DOS-style short mode.
36872  # If so, the updated path is stored in $new_path.
36873  new_path="$input_to_shortpath"
36874
36875  input_path="$input_to_shortpath"
36876  # Check if we need to convert this using DOS-style short mode. If the path
36877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36878  # take no chances and rewrite it.
36879  # Note: m4 eats our [], so we need to use [ and ] instead.
36880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36881  if test "x$has_forbidden_chars" != x; then
36882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36883    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36884    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36885    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36886      # Going to short mode and back again did indeed matter. Since short mode is
36887      # case insensitive, let's make it lowercase to improve readability.
36888      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36889      # Now convert it back to Unix-style (cygpath)
36890      input_path=`$CYGPATH -u "$shortmode_path"`
36891      new_path="$input_path"
36892    fi
36893  fi
36894
36895  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36896  if test "x$test_cygdrive_prefix" = x; then
36897    # As a simple fix, exclude /usr/bin since it's not a real path.
36898    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36899      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36900      # a path prefixed by /cygdrive for fixpath to work.
36901      new_path="$CYGWIN_ROOT_PATH$input_path"
36902    fi
36903  fi
36904
36905  # remove trailing .exe if any
36906  new_path="${new_path/%.exe/}"
36907
36908    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36909
36910  # First separate the path from the arguments. This will split at the first
36911  # space.
36912  complete="$AS"
36913  path="${complete%% *}"
36914  tmp="$complete EOL"
36915  arguments="${tmp#* }"
36916
36917  # Input might be given as Windows format, start by converting to
36918  # unix format.
36919  new_path="$path"
36920
36921  windows_path="$new_path"
36922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36923    unix_path=`$CYGPATH -u "$windows_path"`
36924    new_path="$unix_path"
36925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36927    new_path="$unix_path"
36928  fi
36929
36930
36931  # Now try to locate executable using which
36932  new_path=`$WHICH "$new_path" 2> /dev/null`
36933
36934  if test "x$new_path" = x; then
36935    # Oops. Which didn't find the executable.
36936    # The splitting of arguments from the executable at a space might have been incorrect,
36937    # since paths with space are more likely in Windows. Give it another try with the whole
36938    # argument.
36939    path="$complete"
36940    arguments="EOL"
36941    new_path="$path"
36942
36943  windows_path="$new_path"
36944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36945    unix_path=`$CYGPATH -u "$windows_path"`
36946    new_path="$unix_path"
36947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36949    new_path="$unix_path"
36950  fi
36951
36952
36953    new_path=`$WHICH "$new_path" 2> /dev/null`
36954    # bat and cmd files are not always considered executable in MSYS causing which
36955    # to not find them
36956    if test "x$new_path" = x \
36957        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36958        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36959      new_path="$path"
36960
36961  windows_path="$new_path"
36962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36963    unix_path=`$CYGPATH -u "$windows_path"`
36964    new_path="$unix_path"
36965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36967    new_path="$unix_path"
36968  fi
36969
36970    fi
36971
36972    if test "x$new_path" = x; then
36973      # It's still not found. Now this is an unrecoverable error.
36974      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36975$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36976      has_space=`$ECHO "$complete" | $GREP " "`
36977      if test "x$has_space" != x; then
36978        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36979$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36980      fi
36981      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36982    fi
36983  fi
36984
36985  # Now new_path has a complete unix path to the binary
36986  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36987    # Keep paths in /bin as-is, but remove trailing .exe if any
36988    new_path="${new_path/%.exe/}"
36989    # Do not save /bin paths to all_fixpath_prefixes!
36990  else
36991    # Not in mixed or Windows style, start by that.
36992    new_path=`cmd //c echo $new_path`
36993
36994  input_path="$new_path"
36995  # Check if we need to convert this using DOS-style short mode. If the path
36996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36997  # take no chances and rewrite it.
36998  # Note: m4 eats our [], so we need to use [ and ] instead.
36999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37000  if test "x$has_forbidden_chars" != x; then
37001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37002    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37003  fi
37004
37005    # Output is in $new_path
37006
37007  windows_path="$new_path"
37008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37009    unix_path=`$CYGPATH -u "$windows_path"`
37010    new_path="$unix_path"
37011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37013    new_path="$unix_path"
37014  fi
37015
37016    # remove trailing .exe if any
37017    new_path="${new_path/%.exe/}"
37018
37019    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37020    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37021  fi
37022
37023    else
37024      # We're on a unix platform. Hooray! :)
37025      # First separate the path from the arguments. This will split at the first
37026      # space.
37027      complete="$AS"
37028      path="${complete%% *}"
37029      tmp="$complete EOL"
37030      arguments="${tmp#* }"
37031
37032      # Cannot rely on the command "which" here since it doesn't always work.
37033      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37034      if test -z "$is_absolute_path"; then
37035        # Path to executable is not absolute. Find it.
37036        IFS_save="$IFS"
37037        IFS=:
37038        for p in $PATH; do
37039          if test -f "$p/$path" && test -x "$p/$path"; then
37040            new_path="$p/$path"
37041            break
37042          fi
37043        done
37044        IFS="$IFS_save"
37045      else
37046        # This is an absolute path, we can use it without further modifications.
37047        new_path="$path"
37048      fi
37049
37050      if test "x$new_path" = x; then
37051        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37052$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37053        has_space=`$ECHO "$complete" | $GREP " "`
37054        if test "x$has_space" != x; then
37055          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37056$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37057        fi
37058        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37059      fi
37060    fi
37061
37062    # Now join together the path and the arguments once again
37063    if test "x$arguments" != xEOL; then
37064      new_complete="$new_path ${arguments% *}"
37065    else
37066      new_complete="$new_path"
37067    fi
37068
37069    if test "x$complete" != "x$new_complete"; then
37070      AS="$new_complete"
37071      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37072$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37073    fi
37074  fi
37075
37076    if test "x$AS" = x; then
37077      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37078    fi
37079  else
37080    # FIXME: is this correct for microsoft?
37081    AS="$CC -c"
37082  fi
37083
37084
37085  #
37086  # Setup the archiver (AR)
37087  #
37088  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37089    # The corresponding ar tool is lib.exe (used to create static libraries)
37090    # Extract the first word of "lib", so it can be a program name with args.
37091set dummy lib; ac_word=$2
37092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37093$as_echo_n "checking for $ac_word... " >&6; }
37094if ${ac_cv_prog_AR+:} false; then :
37095  $as_echo_n "(cached) " >&6
37096else
37097  if test -n "$AR"; then
37098  ac_cv_prog_AR="$AR" # Let the user override the test.
37099else
37100as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37101for as_dir in $PATH
37102do
37103  IFS=$as_save_IFS
37104  test -z "$as_dir" && as_dir=.
37105    for ac_exec_ext in '' $ac_executable_extensions; do
37106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37107    ac_cv_prog_AR="lib"
37108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37109    break 2
37110  fi
37111done
37112  done
37113IFS=$as_save_IFS
37114
37115fi
37116fi
37117AR=$ac_cv_prog_AR
37118if test -n "$AR"; then
37119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37120$as_echo "$AR" >&6; }
37121else
37122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37123$as_echo "no" >&6; }
37124fi
37125
37126
37127  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37128
37129
37130  # Publish this variable in the help.
37131
37132
37133  if [ -z "${AR+x}" ]; then
37134    # The variable is not set by user, try to locate tool using the code snippet
37135    if test -n "$ac_tool_prefix"; then
37136  for ac_prog in ar gcc-ar
37137  do
37138    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37139set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37141$as_echo_n "checking for $ac_word... " >&6; }
37142if ${ac_cv_prog_AR+:} false; then :
37143  $as_echo_n "(cached) " >&6
37144else
37145  if test -n "$AR"; then
37146  ac_cv_prog_AR="$AR" # Let the user override the test.
37147else
37148as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37149for as_dir in $PATH
37150do
37151  IFS=$as_save_IFS
37152  test -z "$as_dir" && as_dir=.
37153    for ac_exec_ext in '' $ac_executable_extensions; do
37154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37155    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37157    break 2
37158  fi
37159done
37160  done
37161IFS=$as_save_IFS
37162
37163fi
37164fi
37165AR=$ac_cv_prog_AR
37166if test -n "$AR"; then
37167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37168$as_echo "$AR" >&6; }
37169else
37170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37171$as_echo "no" >&6; }
37172fi
37173
37174
37175    test -n "$AR" && break
37176  done
37177fi
37178if test -z "$AR"; then
37179  ac_ct_AR=$AR
37180  for ac_prog in ar gcc-ar
37181do
37182  # Extract the first word of "$ac_prog", so it can be a program name with args.
37183set dummy $ac_prog; ac_word=$2
37184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37185$as_echo_n "checking for $ac_word... " >&6; }
37186if ${ac_cv_prog_ac_ct_AR+:} false; then :
37187  $as_echo_n "(cached) " >&6
37188else
37189  if test -n "$ac_ct_AR"; then
37190  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37191else
37192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37193for as_dir in $PATH
37194do
37195  IFS=$as_save_IFS
37196  test -z "$as_dir" && as_dir=.
37197    for ac_exec_ext in '' $ac_executable_extensions; do
37198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37199    ac_cv_prog_ac_ct_AR="$ac_prog"
37200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37201    break 2
37202  fi
37203done
37204  done
37205IFS=$as_save_IFS
37206
37207fi
37208fi
37209ac_ct_AR=$ac_cv_prog_ac_ct_AR
37210if test -n "$ac_ct_AR"; then
37211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37212$as_echo "$ac_ct_AR" >&6; }
37213else
37214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37215$as_echo "no" >&6; }
37216fi
37217
37218
37219  test -n "$ac_ct_AR" && break
37220done
37221
37222  if test "x$ac_ct_AR" = x; then
37223    AR=""
37224  else
37225    case $cross_compiling:$ac_tool_warned in
37226yes:)
37227{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37228$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37229ac_tool_warned=yes ;;
37230esac
37231    AR=$ac_ct_AR
37232  fi
37233fi
37234
37235  else
37236    # The variable is set, but is it from the command line or the environment?
37237
37238    # Try to remove the string !AR! from our list.
37239    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37240    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37241      # If it failed, the variable was not from the command line. Ignore it,
37242      # but warn the user (except for BASH, which is always set by the calling BASH).
37243      if test "xAR" != xBASH; then
37244        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37245$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37246      fi
37247      # Try to locate tool using the code snippet
37248      if test -n "$ac_tool_prefix"; then
37249  for ac_prog in ar gcc-ar
37250  do
37251    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37252set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37254$as_echo_n "checking for $ac_word... " >&6; }
37255if ${ac_cv_prog_AR+:} false; then :
37256  $as_echo_n "(cached) " >&6
37257else
37258  if test -n "$AR"; then
37259  ac_cv_prog_AR="$AR" # Let the user override the test.
37260else
37261as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37262for as_dir in $PATH
37263do
37264  IFS=$as_save_IFS
37265  test -z "$as_dir" && as_dir=.
37266    for ac_exec_ext in '' $ac_executable_extensions; do
37267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37268    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37270    break 2
37271  fi
37272done
37273  done
37274IFS=$as_save_IFS
37275
37276fi
37277fi
37278AR=$ac_cv_prog_AR
37279if test -n "$AR"; then
37280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37281$as_echo "$AR" >&6; }
37282else
37283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37284$as_echo "no" >&6; }
37285fi
37286
37287
37288    test -n "$AR" && break
37289  done
37290fi
37291if test -z "$AR"; then
37292  ac_ct_AR=$AR
37293  for ac_prog in ar gcc-ar
37294do
37295  # Extract the first word of "$ac_prog", so it can be a program name with args.
37296set dummy $ac_prog; ac_word=$2
37297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37298$as_echo_n "checking for $ac_word... " >&6; }
37299if ${ac_cv_prog_ac_ct_AR+:} false; then :
37300  $as_echo_n "(cached) " >&6
37301else
37302  if test -n "$ac_ct_AR"; then
37303  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37304else
37305as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37306for as_dir in $PATH
37307do
37308  IFS=$as_save_IFS
37309  test -z "$as_dir" && as_dir=.
37310    for ac_exec_ext in '' $ac_executable_extensions; do
37311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37312    ac_cv_prog_ac_ct_AR="$ac_prog"
37313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37314    break 2
37315  fi
37316done
37317  done
37318IFS=$as_save_IFS
37319
37320fi
37321fi
37322ac_ct_AR=$ac_cv_prog_ac_ct_AR
37323if test -n "$ac_ct_AR"; then
37324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37325$as_echo "$ac_ct_AR" >&6; }
37326else
37327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37328$as_echo "no" >&6; }
37329fi
37330
37331
37332  test -n "$ac_ct_AR" && break
37333done
37334
37335  if test "x$ac_ct_AR" = x; then
37336    AR=""
37337  else
37338    case $cross_compiling:$ac_tool_warned in
37339yes:)
37340{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37341$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37342ac_tool_warned=yes ;;
37343esac
37344    AR=$ac_ct_AR
37345  fi
37346fi
37347
37348    else
37349      # If it succeeded, then it was overridden by the user. We will use it
37350      # for the tool.
37351
37352      # First remove it from the list of overridden variables, so we can test
37353      # for unknown variables in the end.
37354      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37355
37356      # Check if we try to supply an empty value
37357      if test "x$AR" = x; then
37358        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37359$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37360        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37361$as_echo_n "checking for AR... " >&6; }
37362        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37363$as_echo "disabled" >&6; }
37364      else
37365        # Check if the provided tool contains a complete path.
37366        tool_specified="$AR"
37367        tool_basename="${tool_specified##*/}"
37368        if test "x$tool_basename" = "x$tool_specified"; then
37369          # A command without a complete path is provided, search $PATH.
37370          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37371$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37372          # Extract the first word of "$tool_basename", so it can be a program name with args.
37373set dummy $tool_basename; ac_word=$2
37374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37375$as_echo_n "checking for $ac_word... " >&6; }
37376if ${ac_cv_path_AR+:} false; then :
37377  $as_echo_n "(cached) " >&6
37378else
37379  case $AR in
37380  [\\/]* | ?:[\\/]*)
37381  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37382  ;;
37383  *)
37384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37385for as_dir in $PATH
37386do
37387  IFS=$as_save_IFS
37388  test -z "$as_dir" && as_dir=.
37389    for ac_exec_ext in '' $ac_executable_extensions; do
37390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37391    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37393    break 2
37394  fi
37395done
37396  done
37397IFS=$as_save_IFS
37398
37399  ;;
37400esac
37401fi
37402AR=$ac_cv_path_AR
37403if test -n "$AR"; then
37404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37405$as_echo "$AR" >&6; }
37406else
37407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37408$as_echo "no" >&6; }
37409fi
37410
37411
37412          if test "x$AR" = x; then
37413            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37414          fi
37415        else
37416          # Otherwise we believe it is a complete path. Use it as it is.
37417          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37418$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37419          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37420$as_echo_n "checking for AR... " >&6; }
37421          if test ! -x "$tool_specified"; then
37422            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37423$as_echo "not found" >&6; }
37424            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37425          fi
37426          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37427$as_echo "$tool_specified" >&6; }
37428        fi
37429      fi
37430    fi
37431
37432  fi
37433
37434
37435  else
37436
37437
37438  # Publish this variable in the help.
37439
37440
37441  if [ -z "${AR+x}" ]; then
37442    # The variable is not set by user, try to locate tool using the code snippet
37443    if test -n "$ac_tool_prefix"; then
37444  for ac_prog in ar
37445  do
37446    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37447set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37449$as_echo_n "checking for $ac_word... " >&6; }
37450if ${ac_cv_prog_AR+:} false; then :
37451  $as_echo_n "(cached) " >&6
37452else
37453  if test -n "$AR"; then
37454  ac_cv_prog_AR="$AR" # Let the user override the test.
37455else
37456as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37457for as_dir in $PATH
37458do
37459  IFS=$as_save_IFS
37460  test -z "$as_dir" && as_dir=.
37461    for ac_exec_ext in '' $ac_executable_extensions; do
37462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37463    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37465    break 2
37466  fi
37467done
37468  done
37469IFS=$as_save_IFS
37470
37471fi
37472fi
37473AR=$ac_cv_prog_AR
37474if test -n "$AR"; then
37475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37476$as_echo "$AR" >&6; }
37477else
37478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37479$as_echo "no" >&6; }
37480fi
37481
37482
37483    test -n "$AR" && break
37484  done
37485fi
37486if test -z "$AR"; then
37487  ac_ct_AR=$AR
37488  for ac_prog in ar
37489do
37490  # Extract the first word of "$ac_prog", so it can be a program name with args.
37491set dummy $ac_prog; ac_word=$2
37492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37493$as_echo_n "checking for $ac_word... " >&6; }
37494if ${ac_cv_prog_ac_ct_AR+:} false; then :
37495  $as_echo_n "(cached) " >&6
37496else
37497  if test -n "$ac_ct_AR"; then
37498  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37499else
37500as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37501for as_dir in $PATH
37502do
37503  IFS=$as_save_IFS
37504  test -z "$as_dir" && as_dir=.
37505    for ac_exec_ext in '' $ac_executable_extensions; do
37506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37507    ac_cv_prog_ac_ct_AR="$ac_prog"
37508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37509    break 2
37510  fi
37511done
37512  done
37513IFS=$as_save_IFS
37514
37515fi
37516fi
37517ac_ct_AR=$ac_cv_prog_ac_ct_AR
37518if test -n "$ac_ct_AR"; then
37519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37520$as_echo "$ac_ct_AR" >&6; }
37521else
37522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37523$as_echo "no" >&6; }
37524fi
37525
37526
37527  test -n "$ac_ct_AR" && break
37528done
37529
37530  if test "x$ac_ct_AR" = x; then
37531    AR=""
37532  else
37533    case $cross_compiling:$ac_tool_warned in
37534yes:)
37535{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37536$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37537ac_tool_warned=yes ;;
37538esac
37539    AR=$ac_ct_AR
37540  fi
37541fi
37542
37543  else
37544    # The variable is set, but is it from the command line or the environment?
37545
37546    # Try to remove the string !AR! from our list.
37547    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37548    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37549      # If it failed, the variable was not from the command line. Ignore it,
37550      # but warn the user (except for BASH, which is always set by the calling BASH).
37551      if test "xAR" != xBASH; then
37552        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37553$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37554      fi
37555      # Try to locate tool using the code snippet
37556      if test -n "$ac_tool_prefix"; then
37557  for ac_prog in ar
37558  do
37559    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37560set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37562$as_echo_n "checking for $ac_word... " >&6; }
37563if ${ac_cv_prog_AR+:} false; then :
37564  $as_echo_n "(cached) " >&6
37565else
37566  if test -n "$AR"; then
37567  ac_cv_prog_AR="$AR" # Let the user override the test.
37568else
37569as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37570for as_dir in $PATH
37571do
37572  IFS=$as_save_IFS
37573  test -z "$as_dir" && as_dir=.
37574    for ac_exec_ext in '' $ac_executable_extensions; do
37575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37576    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37578    break 2
37579  fi
37580done
37581  done
37582IFS=$as_save_IFS
37583
37584fi
37585fi
37586AR=$ac_cv_prog_AR
37587if test -n "$AR"; then
37588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37589$as_echo "$AR" >&6; }
37590else
37591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37592$as_echo "no" >&6; }
37593fi
37594
37595
37596    test -n "$AR" && break
37597  done
37598fi
37599if test -z "$AR"; then
37600  ac_ct_AR=$AR
37601  for ac_prog in ar
37602do
37603  # Extract the first word of "$ac_prog", so it can be a program name with args.
37604set dummy $ac_prog; ac_word=$2
37605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37606$as_echo_n "checking for $ac_word... " >&6; }
37607if ${ac_cv_prog_ac_ct_AR+:} false; then :
37608  $as_echo_n "(cached) " >&6
37609else
37610  if test -n "$ac_ct_AR"; then
37611  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37612else
37613as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37614for as_dir in $PATH
37615do
37616  IFS=$as_save_IFS
37617  test -z "$as_dir" && as_dir=.
37618    for ac_exec_ext in '' $ac_executable_extensions; do
37619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37620    ac_cv_prog_ac_ct_AR="$ac_prog"
37621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37622    break 2
37623  fi
37624done
37625  done
37626IFS=$as_save_IFS
37627
37628fi
37629fi
37630ac_ct_AR=$ac_cv_prog_ac_ct_AR
37631if test -n "$ac_ct_AR"; then
37632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37633$as_echo "$ac_ct_AR" >&6; }
37634else
37635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37636$as_echo "no" >&6; }
37637fi
37638
37639
37640  test -n "$ac_ct_AR" && break
37641done
37642
37643  if test "x$ac_ct_AR" = x; then
37644    AR=""
37645  else
37646    case $cross_compiling:$ac_tool_warned in
37647yes:)
37648{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37649$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37650ac_tool_warned=yes ;;
37651esac
37652    AR=$ac_ct_AR
37653  fi
37654fi
37655
37656    else
37657      # If it succeeded, then it was overridden by the user. We will use it
37658      # for the tool.
37659
37660      # First remove it from the list of overridden variables, so we can test
37661      # for unknown variables in the end.
37662      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37663
37664      # Check if we try to supply an empty value
37665      if test "x$AR" = x; then
37666        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37667$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37669$as_echo_n "checking for AR... " >&6; }
37670        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37671$as_echo "disabled" >&6; }
37672      else
37673        # Check if the provided tool contains a complete path.
37674        tool_specified="$AR"
37675        tool_basename="${tool_specified##*/}"
37676        if test "x$tool_basename" = "x$tool_specified"; then
37677          # A command without a complete path is provided, search $PATH.
37678          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37679$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37680          # Extract the first word of "$tool_basename", so it can be a program name with args.
37681set dummy $tool_basename; ac_word=$2
37682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37683$as_echo_n "checking for $ac_word... " >&6; }
37684if ${ac_cv_path_AR+:} false; then :
37685  $as_echo_n "(cached) " >&6
37686else
37687  case $AR in
37688  [\\/]* | ?:[\\/]*)
37689  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37690  ;;
37691  *)
37692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37693for as_dir in $PATH
37694do
37695  IFS=$as_save_IFS
37696  test -z "$as_dir" && as_dir=.
37697    for ac_exec_ext in '' $ac_executable_extensions; do
37698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37699    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37701    break 2
37702  fi
37703done
37704  done
37705IFS=$as_save_IFS
37706
37707  ;;
37708esac
37709fi
37710AR=$ac_cv_path_AR
37711if test -n "$AR"; then
37712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37713$as_echo "$AR" >&6; }
37714else
37715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37716$as_echo "no" >&6; }
37717fi
37718
37719
37720          if test "x$AR" = x; then
37721            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37722          fi
37723        else
37724          # Otherwise we believe it is a complete path. Use it as it is.
37725          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37726$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37727          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37728$as_echo_n "checking for AR... " >&6; }
37729          if test ! -x "$tool_specified"; then
37730            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37731$as_echo "not found" >&6; }
37732            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37733          fi
37734          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37735$as_echo "$tool_specified" >&6; }
37736        fi
37737      fi
37738    fi
37739
37740  fi
37741
37742
37743  fi
37744
37745  # Only process if variable expands to non-empty
37746
37747  if test "x$AR" != x; then
37748    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37749
37750  # First separate the path from the arguments. This will split at the first
37751  # space.
37752  complete="$AR"
37753  path="${complete%% *}"
37754  tmp="$complete EOL"
37755  arguments="${tmp#* }"
37756
37757  # Input might be given as Windows format, start by converting to
37758  # unix format.
37759  new_path=`$CYGPATH -u "$path"`
37760
37761  # Now try to locate executable using which
37762  new_path=`$WHICH "$new_path" 2> /dev/null`
37763  # bat and cmd files are not always considered executable in cygwin causing which
37764  # to not find them
37765  if test "x$new_path" = x \
37766      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37767      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37768    new_path=`$CYGPATH -u "$path"`
37769  fi
37770  if test "x$new_path" = x; then
37771    # Oops. Which didn't find the executable.
37772    # The splitting of arguments from the executable at a space might have been incorrect,
37773    # since paths with space are more likely in Windows. Give it another try with the whole
37774    # argument.
37775    path="$complete"
37776    arguments="EOL"
37777    new_path=`$CYGPATH -u "$path"`
37778    new_path=`$WHICH "$new_path" 2> /dev/null`
37779    # bat and cmd files are not always considered executable in cygwin causing which
37780    # to not find them
37781    if test "x$new_path" = x \
37782        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37783        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37784      new_path=`$CYGPATH -u "$path"`
37785    fi
37786    if test "x$new_path" = x; then
37787      # It's still not found. Now this is an unrecoverable error.
37788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37789$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37790      has_space=`$ECHO "$complete" | $GREP " "`
37791      if test "x$has_space" != x; then
37792        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37793$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37794      fi
37795      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37796    fi
37797  fi
37798
37799  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37800  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37801  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37802  # "foo.exe" is OK but "foo" is an error.
37803  #
37804  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37805  # It is also a way to make sure we got the proper file name for the real test later on.
37806  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37807  if test "x$test_shortpath" = x; then
37808    # Short path failed, file does not exist as specified.
37809    # Try adding .exe or .cmd
37810    if test -f "${new_path}.exe"; then
37811      input_to_shortpath="${new_path}.exe"
37812    elif test -f "${new_path}.cmd"; then
37813      input_to_shortpath="${new_path}.cmd"
37814    else
37815      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37816$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37817      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37818$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37819      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37820    fi
37821  else
37822    input_to_shortpath="$new_path"
37823  fi
37824
37825  # Call helper function which possibly converts this using DOS-style short mode.
37826  # If so, the updated path is stored in $new_path.
37827  new_path="$input_to_shortpath"
37828
37829  input_path="$input_to_shortpath"
37830  # Check if we need to convert this using DOS-style short mode. If the path
37831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37832  # take no chances and rewrite it.
37833  # Note: m4 eats our [], so we need to use [ and ] instead.
37834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37835  if test "x$has_forbidden_chars" != x; then
37836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37837    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37838    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37839    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37840      # Going to short mode and back again did indeed matter. Since short mode is
37841      # case insensitive, let's make it lowercase to improve readability.
37842      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37843      # Now convert it back to Unix-style (cygpath)
37844      input_path=`$CYGPATH -u "$shortmode_path"`
37845      new_path="$input_path"
37846    fi
37847  fi
37848
37849  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37850  if test "x$test_cygdrive_prefix" = x; then
37851    # As a simple fix, exclude /usr/bin since it's not a real path.
37852    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37853      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37854      # a path prefixed by /cygdrive for fixpath to work.
37855      new_path="$CYGWIN_ROOT_PATH$input_path"
37856    fi
37857  fi
37858
37859  # remove trailing .exe if any
37860  new_path="${new_path/%.exe/}"
37861
37862    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37863
37864  # First separate the path from the arguments. This will split at the first
37865  # space.
37866  complete="$AR"
37867  path="${complete%% *}"
37868  tmp="$complete EOL"
37869  arguments="${tmp#* }"
37870
37871  # Input might be given as Windows format, start by converting to
37872  # unix format.
37873  new_path="$path"
37874
37875  windows_path="$new_path"
37876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37877    unix_path=`$CYGPATH -u "$windows_path"`
37878    new_path="$unix_path"
37879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37881    new_path="$unix_path"
37882  fi
37883
37884
37885  # Now try to locate executable using which
37886  new_path=`$WHICH "$new_path" 2> /dev/null`
37887
37888  if test "x$new_path" = x; then
37889    # Oops. Which didn't find the executable.
37890    # The splitting of arguments from the executable at a space might have been incorrect,
37891    # since paths with space are more likely in Windows. Give it another try with the whole
37892    # argument.
37893    path="$complete"
37894    arguments="EOL"
37895    new_path="$path"
37896
37897  windows_path="$new_path"
37898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37899    unix_path=`$CYGPATH -u "$windows_path"`
37900    new_path="$unix_path"
37901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37903    new_path="$unix_path"
37904  fi
37905
37906
37907    new_path=`$WHICH "$new_path" 2> /dev/null`
37908    # bat and cmd files are not always considered executable in MSYS causing which
37909    # to not find them
37910    if test "x$new_path" = x \
37911        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37912        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37913      new_path="$path"
37914
37915  windows_path="$new_path"
37916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37917    unix_path=`$CYGPATH -u "$windows_path"`
37918    new_path="$unix_path"
37919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37921    new_path="$unix_path"
37922  fi
37923
37924    fi
37925
37926    if test "x$new_path" = x; then
37927      # It's still not found. Now this is an unrecoverable error.
37928      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37929$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37930      has_space=`$ECHO "$complete" | $GREP " "`
37931      if test "x$has_space" != x; then
37932        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37933$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37934      fi
37935      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37936    fi
37937  fi
37938
37939  # Now new_path has a complete unix path to the binary
37940  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37941    # Keep paths in /bin as-is, but remove trailing .exe if any
37942    new_path="${new_path/%.exe/}"
37943    # Do not save /bin paths to all_fixpath_prefixes!
37944  else
37945    # Not in mixed or Windows style, start by that.
37946    new_path=`cmd //c echo $new_path`
37947
37948  input_path="$new_path"
37949  # Check if we need to convert this using DOS-style short mode. If the path
37950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37951  # take no chances and rewrite it.
37952  # Note: m4 eats our [], so we need to use [ and ] instead.
37953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37954  if test "x$has_forbidden_chars" != x; then
37955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37956    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37957  fi
37958
37959    # Output is in $new_path
37960
37961  windows_path="$new_path"
37962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37963    unix_path=`$CYGPATH -u "$windows_path"`
37964    new_path="$unix_path"
37965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37967    new_path="$unix_path"
37968  fi
37969
37970    # remove trailing .exe if any
37971    new_path="${new_path/%.exe/}"
37972
37973    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37974    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37975  fi
37976
37977    else
37978      # We're on a unix platform. Hooray! :)
37979      # First separate the path from the arguments. This will split at the first
37980      # space.
37981      complete="$AR"
37982      path="${complete%% *}"
37983      tmp="$complete EOL"
37984      arguments="${tmp#* }"
37985
37986      # Cannot rely on the command "which" here since it doesn't always work.
37987      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37988      if test -z "$is_absolute_path"; then
37989        # Path to executable is not absolute. Find it.
37990        IFS_save="$IFS"
37991        IFS=:
37992        for p in $PATH; do
37993          if test -f "$p/$path" && test -x "$p/$path"; then
37994            new_path="$p/$path"
37995            break
37996          fi
37997        done
37998        IFS="$IFS_save"
37999      else
38000        # This is an absolute path, we can use it without further modifications.
38001        new_path="$path"
38002      fi
38003
38004      if test "x$new_path" = x; then
38005        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38006$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38007        has_space=`$ECHO "$complete" | $GREP " "`
38008        if test "x$has_space" != x; then
38009          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38010$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38011        fi
38012        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38013      fi
38014    fi
38015
38016    # Now join together the path and the arguments once again
38017    if test "x$arguments" != xEOL; then
38018      new_complete="$new_path ${arguments% *}"
38019    else
38020      new_complete="$new_path"
38021    fi
38022
38023    if test "x$complete" != "x$new_complete"; then
38024      AR="$new_complete"
38025      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38026$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38027    fi
38028  fi
38029
38030
38031
38032  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38033
38034
38035  # Publish this variable in the help.
38036
38037
38038  if [ -z "${LIPO+x}" ]; then
38039    # The variable is not set by user, try to locate tool using the code snippet
38040    for ac_prog in lipo
38041do
38042  # Extract the first word of "$ac_prog", so it can be a program name with args.
38043set dummy $ac_prog; ac_word=$2
38044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38045$as_echo_n "checking for $ac_word... " >&6; }
38046if ${ac_cv_path_LIPO+:} false; then :
38047  $as_echo_n "(cached) " >&6
38048else
38049  case $LIPO in
38050  [\\/]* | ?:[\\/]*)
38051  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38052  ;;
38053  *)
38054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38055for as_dir in $PATH
38056do
38057  IFS=$as_save_IFS
38058  test -z "$as_dir" && as_dir=.
38059    for ac_exec_ext in '' $ac_executable_extensions; do
38060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38061    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38063    break 2
38064  fi
38065done
38066  done
38067IFS=$as_save_IFS
38068
38069  ;;
38070esac
38071fi
38072LIPO=$ac_cv_path_LIPO
38073if test -n "$LIPO"; then
38074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38075$as_echo "$LIPO" >&6; }
38076else
38077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38078$as_echo "no" >&6; }
38079fi
38080
38081
38082  test -n "$LIPO" && break
38083done
38084
38085  else
38086    # The variable is set, but is it from the command line or the environment?
38087
38088    # Try to remove the string !LIPO! from our list.
38089    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38090    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38091      # If it failed, the variable was not from the command line. Ignore it,
38092      # but warn the user (except for BASH, which is always set by the calling BASH).
38093      if test "xLIPO" != xBASH; then
38094        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38095$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38096      fi
38097      # Try to locate tool using the code snippet
38098      for ac_prog in lipo
38099do
38100  # Extract the first word of "$ac_prog", so it can be a program name with args.
38101set dummy $ac_prog; ac_word=$2
38102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38103$as_echo_n "checking for $ac_word... " >&6; }
38104if ${ac_cv_path_LIPO+:} false; then :
38105  $as_echo_n "(cached) " >&6
38106else
38107  case $LIPO in
38108  [\\/]* | ?:[\\/]*)
38109  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38110  ;;
38111  *)
38112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38113for as_dir in $PATH
38114do
38115  IFS=$as_save_IFS
38116  test -z "$as_dir" && as_dir=.
38117    for ac_exec_ext in '' $ac_executable_extensions; do
38118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38119    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38121    break 2
38122  fi
38123done
38124  done
38125IFS=$as_save_IFS
38126
38127  ;;
38128esac
38129fi
38130LIPO=$ac_cv_path_LIPO
38131if test -n "$LIPO"; then
38132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38133$as_echo "$LIPO" >&6; }
38134else
38135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38136$as_echo "no" >&6; }
38137fi
38138
38139
38140  test -n "$LIPO" && break
38141done
38142
38143    else
38144      # If it succeeded, then it was overridden by the user. We will use it
38145      # for the tool.
38146
38147      # First remove it from the list of overridden variables, so we can test
38148      # for unknown variables in the end.
38149      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38150
38151      # Check if we try to supply an empty value
38152      if test "x$LIPO" = x; then
38153        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38154$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38155        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38156$as_echo_n "checking for LIPO... " >&6; }
38157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38158$as_echo "disabled" >&6; }
38159      else
38160        # Check if the provided tool contains a complete path.
38161        tool_specified="$LIPO"
38162        tool_basename="${tool_specified##*/}"
38163        if test "x$tool_basename" = "x$tool_specified"; then
38164          # A command without a complete path is provided, search $PATH.
38165          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38166$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38167          # Extract the first word of "$tool_basename", so it can be a program name with args.
38168set dummy $tool_basename; ac_word=$2
38169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38170$as_echo_n "checking for $ac_word... " >&6; }
38171if ${ac_cv_path_LIPO+:} false; then :
38172  $as_echo_n "(cached) " >&6
38173else
38174  case $LIPO in
38175  [\\/]* | ?:[\\/]*)
38176  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38177  ;;
38178  *)
38179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38180for as_dir in $PATH
38181do
38182  IFS=$as_save_IFS
38183  test -z "$as_dir" && as_dir=.
38184    for ac_exec_ext in '' $ac_executable_extensions; do
38185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38186    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38188    break 2
38189  fi
38190done
38191  done
38192IFS=$as_save_IFS
38193
38194  ;;
38195esac
38196fi
38197LIPO=$ac_cv_path_LIPO
38198if test -n "$LIPO"; then
38199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38200$as_echo "$LIPO" >&6; }
38201else
38202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38203$as_echo "no" >&6; }
38204fi
38205
38206
38207          if test "x$LIPO" = x; then
38208            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38209          fi
38210        else
38211          # Otherwise we believe it is a complete path. Use it as it is.
38212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38213$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38214          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38215$as_echo_n "checking for LIPO... " >&6; }
38216          if test ! -x "$tool_specified"; then
38217            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38218$as_echo "not found" >&6; }
38219            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38220          fi
38221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38222$as_echo "$tool_specified" >&6; }
38223        fi
38224      fi
38225    fi
38226
38227  fi
38228
38229
38230
38231  # Only process if variable expands to non-empty
38232
38233  if test "x$LIPO" != x; then
38234    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38235
38236  # First separate the path from the arguments. This will split at the first
38237  # space.
38238  complete="$LIPO"
38239  path="${complete%% *}"
38240  tmp="$complete EOL"
38241  arguments="${tmp#* }"
38242
38243  # Input might be given as Windows format, start by converting to
38244  # unix format.
38245  new_path=`$CYGPATH -u "$path"`
38246
38247  # Now try to locate executable using which
38248  new_path=`$WHICH "$new_path" 2> /dev/null`
38249  # bat and cmd files are not always considered executable in cygwin causing which
38250  # to not find them
38251  if test "x$new_path" = x \
38252      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38253      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38254    new_path=`$CYGPATH -u "$path"`
38255  fi
38256  if test "x$new_path" = x; then
38257    # Oops. Which didn't find the executable.
38258    # The splitting of arguments from the executable at a space might have been incorrect,
38259    # since paths with space are more likely in Windows. Give it another try with the whole
38260    # argument.
38261    path="$complete"
38262    arguments="EOL"
38263    new_path=`$CYGPATH -u "$path"`
38264    new_path=`$WHICH "$new_path" 2> /dev/null`
38265    # bat and cmd files are not always considered executable in cygwin causing which
38266    # to not find them
38267    if test "x$new_path" = x \
38268        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38269        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38270      new_path=`$CYGPATH -u "$path"`
38271    fi
38272    if test "x$new_path" = x; then
38273      # It's still not found. Now this is an unrecoverable error.
38274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38275$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38276      has_space=`$ECHO "$complete" | $GREP " "`
38277      if test "x$has_space" != x; then
38278        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38279$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38280      fi
38281      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38282    fi
38283  fi
38284
38285  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38286  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38287  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38288  # "foo.exe" is OK but "foo" is an error.
38289  #
38290  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38291  # It is also a way to make sure we got the proper file name for the real test later on.
38292  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38293  if test "x$test_shortpath" = x; then
38294    # Short path failed, file does not exist as specified.
38295    # Try adding .exe or .cmd
38296    if test -f "${new_path}.exe"; then
38297      input_to_shortpath="${new_path}.exe"
38298    elif test -f "${new_path}.cmd"; then
38299      input_to_shortpath="${new_path}.cmd"
38300    else
38301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38302$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38303      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38304$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38305      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38306    fi
38307  else
38308    input_to_shortpath="$new_path"
38309  fi
38310
38311  # Call helper function which possibly converts this using DOS-style short mode.
38312  # If so, the updated path is stored in $new_path.
38313  new_path="$input_to_shortpath"
38314
38315  input_path="$input_to_shortpath"
38316  # Check if we need to convert this using DOS-style short mode. If the path
38317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38318  # take no chances and rewrite it.
38319  # Note: m4 eats our [], so we need to use [ and ] instead.
38320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38321  if test "x$has_forbidden_chars" != x; then
38322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38323    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38324    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38325    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38326      # Going to short mode and back again did indeed matter. Since short mode is
38327      # case insensitive, let's make it lowercase to improve readability.
38328      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38329      # Now convert it back to Unix-style (cygpath)
38330      input_path=`$CYGPATH -u "$shortmode_path"`
38331      new_path="$input_path"
38332    fi
38333  fi
38334
38335  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38336  if test "x$test_cygdrive_prefix" = x; then
38337    # As a simple fix, exclude /usr/bin since it's not a real path.
38338    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38339      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38340      # a path prefixed by /cygdrive for fixpath to work.
38341      new_path="$CYGWIN_ROOT_PATH$input_path"
38342    fi
38343  fi
38344
38345  # remove trailing .exe if any
38346  new_path="${new_path/%.exe/}"
38347
38348    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38349
38350  # First separate the path from the arguments. This will split at the first
38351  # space.
38352  complete="$LIPO"
38353  path="${complete%% *}"
38354  tmp="$complete EOL"
38355  arguments="${tmp#* }"
38356
38357  # Input might be given as Windows format, start by converting to
38358  # unix format.
38359  new_path="$path"
38360
38361  windows_path="$new_path"
38362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38363    unix_path=`$CYGPATH -u "$windows_path"`
38364    new_path="$unix_path"
38365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38367    new_path="$unix_path"
38368  fi
38369
38370
38371  # Now try to locate executable using which
38372  new_path=`$WHICH "$new_path" 2> /dev/null`
38373
38374  if test "x$new_path" = x; then
38375    # Oops. Which didn't find the executable.
38376    # The splitting of arguments from the executable at a space might have been incorrect,
38377    # since paths with space are more likely in Windows. Give it another try with the whole
38378    # argument.
38379    path="$complete"
38380    arguments="EOL"
38381    new_path="$path"
38382
38383  windows_path="$new_path"
38384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38385    unix_path=`$CYGPATH -u "$windows_path"`
38386    new_path="$unix_path"
38387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38389    new_path="$unix_path"
38390  fi
38391
38392
38393    new_path=`$WHICH "$new_path" 2> /dev/null`
38394    # bat and cmd files are not always considered executable in MSYS causing which
38395    # to not find them
38396    if test "x$new_path" = x \
38397        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38398        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38399      new_path="$path"
38400
38401  windows_path="$new_path"
38402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38403    unix_path=`$CYGPATH -u "$windows_path"`
38404    new_path="$unix_path"
38405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38407    new_path="$unix_path"
38408  fi
38409
38410    fi
38411
38412    if test "x$new_path" = x; then
38413      # It's still not found. Now this is an unrecoverable error.
38414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38415$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38416      has_space=`$ECHO "$complete" | $GREP " "`
38417      if test "x$has_space" != x; then
38418        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38419$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38420      fi
38421      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38422    fi
38423  fi
38424
38425  # Now new_path has a complete unix path to the binary
38426  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38427    # Keep paths in /bin as-is, but remove trailing .exe if any
38428    new_path="${new_path/%.exe/}"
38429    # Do not save /bin paths to all_fixpath_prefixes!
38430  else
38431    # Not in mixed or Windows style, start by that.
38432    new_path=`cmd //c echo $new_path`
38433
38434  input_path="$new_path"
38435  # Check if we need to convert this using DOS-style short mode. If the path
38436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38437  # take no chances and rewrite it.
38438  # Note: m4 eats our [], so we need to use [ and ] instead.
38439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38440  if test "x$has_forbidden_chars" != x; then
38441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38443  fi
38444
38445    # Output is in $new_path
38446
38447  windows_path="$new_path"
38448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38449    unix_path=`$CYGPATH -u "$windows_path"`
38450    new_path="$unix_path"
38451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38453    new_path="$unix_path"
38454  fi
38455
38456    # remove trailing .exe if any
38457    new_path="${new_path/%.exe/}"
38458
38459    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38460    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38461  fi
38462
38463    else
38464      # We're on a unix platform. Hooray! :)
38465      # First separate the path from the arguments. This will split at the first
38466      # space.
38467      complete="$LIPO"
38468      path="${complete%% *}"
38469      tmp="$complete EOL"
38470      arguments="${tmp#* }"
38471
38472      # Cannot rely on the command "which" here since it doesn't always work.
38473      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38474      if test -z "$is_absolute_path"; then
38475        # Path to executable is not absolute. Find it.
38476        IFS_save="$IFS"
38477        IFS=:
38478        for p in $PATH; do
38479          if test -f "$p/$path" && test -x "$p/$path"; then
38480            new_path="$p/$path"
38481            break
38482          fi
38483        done
38484        IFS="$IFS_save"
38485      else
38486        # This is an absolute path, we can use it without further modifications.
38487        new_path="$path"
38488      fi
38489
38490      if test "x$new_path" = x; then
38491        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38492$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38493        has_space=`$ECHO "$complete" | $GREP " "`
38494        if test "x$has_space" != x; then
38495          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38496$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38497        fi
38498        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38499      fi
38500    fi
38501
38502    # Now join together the path and the arguments once again
38503    if test "x$arguments" != xEOL; then
38504      new_complete="$new_path ${arguments% *}"
38505    else
38506      new_complete="$new_path"
38507    fi
38508
38509    if test "x$complete" != "x$new_complete"; then
38510      LIPO="$new_complete"
38511      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38512$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38513    fi
38514  fi
38515
38516  fi
38517
38518  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38519    # Extract the first word of "mt", so it can be a program name with args.
38520set dummy mt; ac_word=$2
38521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38522$as_echo_n "checking for $ac_word... " >&6; }
38523if ${ac_cv_prog_MT+:} false; then :
38524  $as_echo_n "(cached) " >&6
38525else
38526  if test -n "$MT"; then
38527  ac_cv_prog_MT="$MT" # Let the user override the test.
38528else
38529  ac_prog_rejected=no
38530as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38531for as_dir in $PATH
38532do
38533  IFS=$as_save_IFS
38534  test -z "$as_dir" && as_dir=.
38535    for ac_exec_ext in '' $ac_executable_extensions; do
38536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38537    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38538       ac_prog_rejected=yes
38539       continue
38540     fi
38541    ac_cv_prog_MT="mt"
38542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38543    break 2
38544  fi
38545done
38546  done
38547IFS=$as_save_IFS
38548
38549if test $ac_prog_rejected = yes; then
38550  # We found a bogon in the path, so make sure we never use it.
38551  set dummy $ac_cv_prog_MT
38552  shift
38553  if test $# != 0; then
38554    # We chose a different compiler from the bogus one.
38555    # However, it has the same basename, so the bogon will be chosen
38556    # first if we set MT to just the basename; use the full file name.
38557    shift
38558    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38559  fi
38560fi
38561fi
38562fi
38563MT=$ac_cv_prog_MT
38564if test -n "$MT"; then
38565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38566$as_echo "$MT" >&6; }
38567else
38568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38569$as_echo "no" >&6; }
38570fi
38571
38572
38573
38574  # Only process if variable expands to non-empty
38575
38576  if test "x$MT" != x; then
38577    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38578
38579  # First separate the path from the arguments. This will split at the first
38580  # space.
38581  complete="$MT"
38582  path="${complete%% *}"
38583  tmp="$complete EOL"
38584  arguments="${tmp#* }"
38585
38586  # Input might be given as Windows format, start by converting to
38587  # unix format.
38588  new_path=`$CYGPATH -u "$path"`
38589
38590  # Now try to locate executable using which
38591  new_path=`$WHICH "$new_path" 2> /dev/null`
38592  # bat and cmd files are not always considered executable in cygwin causing which
38593  # to not find them
38594  if test "x$new_path" = x \
38595      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38596      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38597    new_path=`$CYGPATH -u "$path"`
38598  fi
38599  if test "x$new_path" = x; then
38600    # Oops. Which didn't find the executable.
38601    # The splitting of arguments from the executable at a space might have been incorrect,
38602    # since paths with space are more likely in Windows. Give it another try with the whole
38603    # argument.
38604    path="$complete"
38605    arguments="EOL"
38606    new_path=`$CYGPATH -u "$path"`
38607    new_path=`$WHICH "$new_path" 2> /dev/null`
38608    # bat and cmd files are not always considered executable in cygwin causing which
38609    # to not find them
38610    if test "x$new_path" = x \
38611        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38612        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38613      new_path=`$CYGPATH -u "$path"`
38614    fi
38615    if test "x$new_path" = x; then
38616      # It's still not found. Now this is an unrecoverable error.
38617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38618$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38619      has_space=`$ECHO "$complete" | $GREP " "`
38620      if test "x$has_space" != x; then
38621        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38622$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38623      fi
38624      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38625    fi
38626  fi
38627
38628  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38629  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38630  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38631  # "foo.exe" is OK but "foo" is an error.
38632  #
38633  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38634  # It is also a way to make sure we got the proper file name for the real test later on.
38635  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38636  if test "x$test_shortpath" = x; then
38637    # Short path failed, file does not exist as specified.
38638    # Try adding .exe or .cmd
38639    if test -f "${new_path}.exe"; then
38640      input_to_shortpath="${new_path}.exe"
38641    elif test -f "${new_path}.cmd"; then
38642      input_to_shortpath="${new_path}.cmd"
38643    else
38644      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38645$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38646      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38647$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38648      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38649    fi
38650  else
38651    input_to_shortpath="$new_path"
38652  fi
38653
38654  # Call helper function which possibly converts this using DOS-style short mode.
38655  # If so, the updated path is stored in $new_path.
38656  new_path="$input_to_shortpath"
38657
38658  input_path="$input_to_shortpath"
38659  # Check if we need to convert this using DOS-style short mode. If the path
38660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38661  # take no chances and rewrite it.
38662  # Note: m4 eats our [], so we need to use [ and ] instead.
38663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38664  if test "x$has_forbidden_chars" != x; then
38665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38666    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38667    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38668    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38669      # Going to short mode and back again did indeed matter. Since short mode is
38670      # case insensitive, let's make it lowercase to improve readability.
38671      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38672      # Now convert it back to Unix-style (cygpath)
38673      input_path=`$CYGPATH -u "$shortmode_path"`
38674      new_path="$input_path"
38675    fi
38676  fi
38677
38678  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38679  if test "x$test_cygdrive_prefix" = x; then
38680    # As a simple fix, exclude /usr/bin since it's not a real path.
38681    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38682      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38683      # a path prefixed by /cygdrive for fixpath to work.
38684      new_path="$CYGWIN_ROOT_PATH$input_path"
38685    fi
38686  fi
38687
38688  # remove trailing .exe if any
38689  new_path="${new_path/%.exe/}"
38690
38691    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38692
38693  # First separate the path from the arguments. This will split at the first
38694  # space.
38695  complete="$MT"
38696  path="${complete%% *}"
38697  tmp="$complete EOL"
38698  arguments="${tmp#* }"
38699
38700  # Input might be given as Windows format, start by converting to
38701  # unix format.
38702  new_path="$path"
38703
38704  windows_path="$new_path"
38705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38706    unix_path=`$CYGPATH -u "$windows_path"`
38707    new_path="$unix_path"
38708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38710    new_path="$unix_path"
38711  fi
38712
38713
38714  # Now try to locate executable using which
38715  new_path=`$WHICH "$new_path" 2> /dev/null`
38716
38717  if test "x$new_path" = x; then
38718    # Oops. Which didn't find the executable.
38719    # The splitting of arguments from the executable at a space might have been incorrect,
38720    # since paths with space are more likely in Windows. Give it another try with the whole
38721    # argument.
38722    path="$complete"
38723    arguments="EOL"
38724    new_path="$path"
38725
38726  windows_path="$new_path"
38727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38728    unix_path=`$CYGPATH -u "$windows_path"`
38729    new_path="$unix_path"
38730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38732    new_path="$unix_path"
38733  fi
38734
38735
38736    new_path=`$WHICH "$new_path" 2> /dev/null`
38737    # bat and cmd files are not always considered executable in MSYS causing which
38738    # to not find them
38739    if test "x$new_path" = x \
38740        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38741        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38742      new_path="$path"
38743
38744  windows_path="$new_path"
38745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38746    unix_path=`$CYGPATH -u "$windows_path"`
38747    new_path="$unix_path"
38748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38750    new_path="$unix_path"
38751  fi
38752
38753    fi
38754
38755    if test "x$new_path" = x; then
38756      # It's still not found. Now this is an unrecoverable error.
38757      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38758$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38759      has_space=`$ECHO "$complete" | $GREP " "`
38760      if test "x$has_space" != x; then
38761        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38762$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38763      fi
38764      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38765    fi
38766  fi
38767
38768  # Now new_path has a complete unix path to the binary
38769  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38770    # Keep paths in /bin as-is, but remove trailing .exe if any
38771    new_path="${new_path/%.exe/}"
38772    # Do not save /bin paths to all_fixpath_prefixes!
38773  else
38774    # Not in mixed or Windows style, start by that.
38775    new_path=`cmd //c echo $new_path`
38776
38777  input_path="$new_path"
38778  # Check if we need to convert this using DOS-style short mode. If the path
38779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38780  # take no chances and rewrite it.
38781  # Note: m4 eats our [], so we need to use [ and ] instead.
38782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38783  if test "x$has_forbidden_chars" != x; then
38784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38785    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38786  fi
38787
38788    # Output is in $new_path
38789
38790  windows_path="$new_path"
38791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38792    unix_path=`$CYGPATH -u "$windows_path"`
38793    new_path="$unix_path"
38794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38796    new_path="$unix_path"
38797  fi
38798
38799    # remove trailing .exe if any
38800    new_path="${new_path/%.exe/}"
38801
38802    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38803    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38804  fi
38805
38806    else
38807      # We're on a unix platform. Hooray! :)
38808      # First separate the path from the arguments. This will split at the first
38809      # space.
38810      complete="$MT"
38811      path="${complete%% *}"
38812      tmp="$complete EOL"
38813      arguments="${tmp#* }"
38814
38815      # Cannot rely on the command "which" here since it doesn't always work.
38816      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38817      if test -z "$is_absolute_path"; then
38818        # Path to executable is not absolute. Find it.
38819        IFS_save="$IFS"
38820        IFS=:
38821        for p in $PATH; do
38822          if test -f "$p/$path" && test -x "$p/$path"; then
38823            new_path="$p/$path"
38824            break
38825          fi
38826        done
38827        IFS="$IFS_save"
38828      else
38829        # This is an absolute path, we can use it without further modifications.
38830        new_path="$path"
38831      fi
38832
38833      if test "x$new_path" = x; then
38834        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38835$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38836        has_space=`$ECHO "$complete" | $GREP " "`
38837        if test "x$has_space" != x; then
38838          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38839$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38840        fi
38841        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38842      fi
38843    fi
38844
38845    # Now join together the path and the arguments once again
38846    if test "x$arguments" != xEOL; then
38847      new_complete="$new_path ${arguments% *}"
38848    else
38849      new_complete="$new_path"
38850    fi
38851
38852    if test "x$complete" != "x$new_complete"; then
38853      MT="$new_complete"
38854      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38855$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38856    fi
38857  fi
38858
38859    # Setup the resource compiler (RC)
38860    # Extract the first word of "rc", so it can be a program name with args.
38861set dummy rc; ac_word=$2
38862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38863$as_echo_n "checking for $ac_word... " >&6; }
38864if ${ac_cv_prog_RC+:} false; then :
38865  $as_echo_n "(cached) " >&6
38866else
38867  if test -n "$RC"; then
38868  ac_cv_prog_RC="$RC" # Let the user override the test.
38869else
38870  ac_prog_rejected=no
38871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38872for as_dir in $PATH
38873do
38874  IFS=$as_save_IFS
38875  test -z "$as_dir" && as_dir=.
38876    for ac_exec_ext in '' $ac_executable_extensions; do
38877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38878    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38879       ac_prog_rejected=yes
38880       continue
38881     fi
38882    ac_cv_prog_RC="rc"
38883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38884    break 2
38885  fi
38886done
38887  done
38888IFS=$as_save_IFS
38889
38890if test $ac_prog_rejected = yes; then
38891  # We found a bogon in the path, so make sure we never use it.
38892  set dummy $ac_cv_prog_RC
38893  shift
38894  if test $# != 0; then
38895    # We chose a different compiler from the bogus one.
38896    # However, it has the same basename, so the bogon will be chosen
38897    # first if we set RC to just the basename; use the full file name.
38898    shift
38899    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38900  fi
38901fi
38902fi
38903fi
38904RC=$ac_cv_prog_RC
38905if test -n "$RC"; then
38906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38907$as_echo "$RC" >&6; }
38908else
38909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38910$as_echo "no" >&6; }
38911fi
38912
38913
38914
38915  # Only process if variable expands to non-empty
38916
38917  if test "x$RC" != x; then
38918    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38919
38920  # First separate the path from the arguments. This will split at the first
38921  # space.
38922  complete="$RC"
38923  path="${complete%% *}"
38924  tmp="$complete EOL"
38925  arguments="${tmp#* }"
38926
38927  # Input might be given as Windows format, start by converting to
38928  # unix format.
38929  new_path=`$CYGPATH -u "$path"`
38930
38931  # Now try to locate executable using which
38932  new_path=`$WHICH "$new_path" 2> /dev/null`
38933  # bat and cmd files are not always considered executable in cygwin causing which
38934  # to not find them
38935  if test "x$new_path" = x \
38936      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38937      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38938    new_path=`$CYGPATH -u "$path"`
38939  fi
38940  if test "x$new_path" = x; then
38941    # Oops. Which didn't find the executable.
38942    # The splitting of arguments from the executable at a space might have been incorrect,
38943    # since paths with space are more likely in Windows. Give it another try with the whole
38944    # argument.
38945    path="$complete"
38946    arguments="EOL"
38947    new_path=`$CYGPATH -u "$path"`
38948    new_path=`$WHICH "$new_path" 2> /dev/null`
38949    # bat and cmd files are not always considered executable in cygwin causing which
38950    # to not find them
38951    if test "x$new_path" = x \
38952        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38953        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38954      new_path=`$CYGPATH -u "$path"`
38955    fi
38956    if test "x$new_path" = x; then
38957      # It's still not found. Now this is an unrecoverable error.
38958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38959$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38960      has_space=`$ECHO "$complete" | $GREP " "`
38961      if test "x$has_space" != x; then
38962        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38963$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38964      fi
38965      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38966    fi
38967  fi
38968
38969  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38970  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38971  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38972  # "foo.exe" is OK but "foo" is an error.
38973  #
38974  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38975  # It is also a way to make sure we got the proper file name for the real test later on.
38976  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38977  if test "x$test_shortpath" = x; then
38978    # Short path failed, file does not exist as specified.
38979    # Try adding .exe or .cmd
38980    if test -f "${new_path}.exe"; then
38981      input_to_shortpath="${new_path}.exe"
38982    elif test -f "${new_path}.cmd"; then
38983      input_to_shortpath="${new_path}.cmd"
38984    else
38985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38986$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38987      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38988$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38989      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38990    fi
38991  else
38992    input_to_shortpath="$new_path"
38993  fi
38994
38995  # Call helper function which possibly converts this using DOS-style short mode.
38996  # If so, the updated path is stored in $new_path.
38997  new_path="$input_to_shortpath"
38998
38999  input_path="$input_to_shortpath"
39000  # Check if we need to convert this using DOS-style short mode. If the path
39001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39002  # take no chances and rewrite it.
39003  # Note: m4 eats our [], so we need to use [ and ] instead.
39004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39005  if test "x$has_forbidden_chars" != x; then
39006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39007    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39008    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39009    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39010      # Going to short mode and back again did indeed matter. Since short mode is
39011      # case insensitive, let's make it lowercase to improve readability.
39012      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39013      # Now convert it back to Unix-style (cygpath)
39014      input_path=`$CYGPATH -u "$shortmode_path"`
39015      new_path="$input_path"
39016    fi
39017  fi
39018
39019  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39020  if test "x$test_cygdrive_prefix" = x; then
39021    # As a simple fix, exclude /usr/bin since it's not a real path.
39022    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39023      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39024      # a path prefixed by /cygdrive for fixpath to work.
39025      new_path="$CYGWIN_ROOT_PATH$input_path"
39026    fi
39027  fi
39028
39029  # remove trailing .exe if any
39030  new_path="${new_path/%.exe/}"
39031
39032    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39033
39034  # First separate the path from the arguments. This will split at the first
39035  # space.
39036  complete="$RC"
39037  path="${complete%% *}"
39038  tmp="$complete EOL"
39039  arguments="${tmp#* }"
39040
39041  # Input might be given as Windows format, start by converting to
39042  # unix format.
39043  new_path="$path"
39044
39045  windows_path="$new_path"
39046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39047    unix_path=`$CYGPATH -u "$windows_path"`
39048    new_path="$unix_path"
39049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39051    new_path="$unix_path"
39052  fi
39053
39054
39055  # Now try to locate executable using which
39056  new_path=`$WHICH "$new_path" 2> /dev/null`
39057
39058  if test "x$new_path" = x; then
39059    # Oops. Which didn't find the executable.
39060    # The splitting of arguments from the executable at a space might have been incorrect,
39061    # since paths with space are more likely in Windows. Give it another try with the whole
39062    # argument.
39063    path="$complete"
39064    arguments="EOL"
39065    new_path="$path"
39066
39067  windows_path="$new_path"
39068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39069    unix_path=`$CYGPATH -u "$windows_path"`
39070    new_path="$unix_path"
39071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39073    new_path="$unix_path"
39074  fi
39075
39076
39077    new_path=`$WHICH "$new_path" 2> /dev/null`
39078    # bat and cmd files are not always considered executable in MSYS causing which
39079    # to not find them
39080    if test "x$new_path" = x \
39081        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39082        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39083      new_path="$path"
39084
39085  windows_path="$new_path"
39086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39087    unix_path=`$CYGPATH -u "$windows_path"`
39088    new_path="$unix_path"
39089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39091    new_path="$unix_path"
39092  fi
39093
39094    fi
39095
39096    if test "x$new_path" = x; then
39097      # It's still not found. Now this is an unrecoverable error.
39098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39099$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39100      has_space=`$ECHO "$complete" | $GREP " "`
39101      if test "x$has_space" != x; then
39102        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39103$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39104      fi
39105      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39106    fi
39107  fi
39108
39109  # Now new_path has a complete unix path to the binary
39110  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39111    # Keep paths in /bin as-is, but remove trailing .exe if any
39112    new_path="${new_path/%.exe/}"
39113    # Do not save /bin paths to all_fixpath_prefixes!
39114  else
39115    # Not in mixed or Windows style, start by that.
39116    new_path=`cmd //c echo $new_path`
39117
39118  input_path="$new_path"
39119  # Check if we need to convert this using DOS-style short mode. If the path
39120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39121  # take no chances and rewrite it.
39122  # Note: m4 eats our [], so we need to use [ and ] instead.
39123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39124  if test "x$has_forbidden_chars" != x; then
39125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39126    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39127  fi
39128
39129    # Output is in $new_path
39130
39131  windows_path="$new_path"
39132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39133    unix_path=`$CYGPATH -u "$windows_path"`
39134    new_path="$unix_path"
39135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39137    new_path="$unix_path"
39138  fi
39139
39140    # remove trailing .exe if any
39141    new_path="${new_path/%.exe/}"
39142
39143    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39144    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39145  fi
39146
39147    else
39148      # We're on a unix platform. Hooray! :)
39149      # First separate the path from the arguments. This will split at the first
39150      # space.
39151      complete="$RC"
39152      path="${complete%% *}"
39153      tmp="$complete EOL"
39154      arguments="${tmp#* }"
39155
39156      # Cannot rely on the command "which" here since it doesn't always work.
39157      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39158      if test -z "$is_absolute_path"; then
39159        # Path to executable is not absolute. Find it.
39160        IFS_save="$IFS"
39161        IFS=:
39162        for p in $PATH; do
39163          if test -f "$p/$path" && test -x "$p/$path"; then
39164            new_path="$p/$path"
39165            break
39166          fi
39167        done
39168        IFS="$IFS_save"
39169      else
39170        # This is an absolute path, we can use it without further modifications.
39171        new_path="$path"
39172      fi
39173
39174      if test "x$new_path" = x; then
39175        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39176$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39177        has_space=`$ECHO "$complete" | $GREP " "`
39178        if test "x$has_space" != x; then
39179          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39180$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39181        fi
39182        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39183      fi
39184    fi
39185
39186    # Now join together the path and the arguments once again
39187    if test "x$arguments" != xEOL; then
39188      new_complete="$new_path ${arguments% *}"
39189    else
39190      new_complete="$new_path"
39191    fi
39192
39193    if test "x$complete" != "x$new_complete"; then
39194      RC="$new_complete"
39195      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39196$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39197    fi
39198  fi
39199
39200    # Extract the first word of "dumpbin", so it can be a program name with args.
39201set dummy dumpbin; ac_word=$2
39202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39203$as_echo_n "checking for $ac_word... " >&6; }
39204if ${ac_cv_prog_DUMPBIN+:} false; then :
39205  $as_echo_n "(cached) " >&6
39206else
39207  if test -n "$DUMPBIN"; then
39208  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39209else
39210as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39211for as_dir in $PATH
39212do
39213  IFS=$as_save_IFS
39214  test -z "$as_dir" && as_dir=.
39215    for ac_exec_ext in '' $ac_executable_extensions; do
39216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39217    ac_cv_prog_DUMPBIN="dumpbin"
39218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39219    break 2
39220  fi
39221done
39222  done
39223IFS=$as_save_IFS
39224
39225fi
39226fi
39227DUMPBIN=$ac_cv_prog_DUMPBIN
39228if test -n "$DUMPBIN"; then
39229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39230$as_echo "$DUMPBIN" >&6; }
39231else
39232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39233$as_echo "no" >&6; }
39234fi
39235
39236
39237
39238  # Only process if variable expands to non-empty
39239
39240  if test "x$DUMPBIN" != x; then
39241    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39242
39243  # First separate the path from the arguments. This will split at the first
39244  # space.
39245  complete="$DUMPBIN"
39246  path="${complete%% *}"
39247  tmp="$complete EOL"
39248  arguments="${tmp#* }"
39249
39250  # Input might be given as Windows format, start by converting to
39251  # unix format.
39252  new_path=`$CYGPATH -u "$path"`
39253
39254  # Now try to locate executable using which
39255  new_path=`$WHICH "$new_path" 2> /dev/null`
39256  # bat and cmd files are not always considered executable in cygwin causing which
39257  # to not find them
39258  if test "x$new_path" = x \
39259      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39260      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39261    new_path=`$CYGPATH -u "$path"`
39262  fi
39263  if test "x$new_path" = x; then
39264    # Oops. Which didn't find the executable.
39265    # The splitting of arguments from the executable at a space might have been incorrect,
39266    # since paths with space are more likely in Windows. Give it another try with the whole
39267    # argument.
39268    path="$complete"
39269    arguments="EOL"
39270    new_path=`$CYGPATH -u "$path"`
39271    new_path=`$WHICH "$new_path" 2> /dev/null`
39272    # bat and cmd files are not always considered executable in cygwin causing which
39273    # to not find them
39274    if test "x$new_path" = x \
39275        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39276        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39277      new_path=`$CYGPATH -u "$path"`
39278    fi
39279    if test "x$new_path" = x; then
39280      # It's still not found. Now this is an unrecoverable error.
39281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39282$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39283      has_space=`$ECHO "$complete" | $GREP " "`
39284      if test "x$has_space" != x; then
39285        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39286$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39287      fi
39288      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39289    fi
39290  fi
39291
39292  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39293  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39294  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39295  # "foo.exe" is OK but "foo" is an error.
39296  #
39297  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39298  # It is also a way to make sure we got the proper file name for the real test later on.
39299  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39300  if test "x$test_shortpath" = x; then
39301    # Short path failed, file does not exist as specified.
39302    # Try adding .exe or .cmd
39303    if test -f "${new_path}.exe"; then
39304      input_to_shortpath="${new_path}.exe"
39305    elif test -f "${new_path}.cmd"; then
39306      input_to_shortpath="${new_path}.cmd"
39307    else
39308      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39309$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39310      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39311$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39312      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39313    fi
39314  else
39315    input_to_shortpath="$new_path"
39316  fi
39317
39318  # Call helper function which possibly converts this using DOS-style short mode.
39319  # If so, the updated path is stored in $new_path.
39320  new_path="$input_to_shortpath"
39321
39322  input_path="$input_to_shortpath"
39323  # Check if we need to convert this using DOS-style short mode. If the path
39324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39325  # take no chances and rewrite it.
39326  # Note: m4 eats our [], so we need to use [ and ] instead.
39327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39328  if test "x$has_forbidden_chars" != x; then
39329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39330    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39331    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39332    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39333      # Going to short mode and back again did indeed matter. Since short mode is
39334      # case insensitive, let's make it lowercase to improve readability.
39335      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39336      # Now convert it back to Unix-style (cygpath)
39337      input_path=`$CYGPATH -u "$shortmode_path"`
39338      new_path="$input_path"
39339    fi
39340  fi
39341
39342  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39343  if test "x$test_cygdrive_prefix" = x; then
39344    # As a simple fix, exclude /usr/bin since it's not a real path.
39345    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39346      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39347      # a path prefixed by /cygdrive for fixpath to work.
39348      new_path="$CYGWIN_ROOT_PATH$input_path"
39349    fi
39350  fi
39351
39352  # remove trailing .exe if any
39353  new_path="${new_path/%.exe/}"
39354
39355    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39356
39357  # First separate the path from the arguments. This will split at the first
39358  # space.
39359  complete="$DUMPBIN"
39360  path="${complete%% *}"
39361  tmp="$complete EOL"
39362  arguments="${tmp#* }"
39363
39364  # Input might be given as Windows format, start by converting to
39365  # unix format.
39366  new_path="$path"
39367
39368  windows_path="$new_path"
39369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39370    unix_path=`$CYGPATH -u "$windows_path"`
39371    new_path="$unix_path"
39372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39374    new_path="$unix_path"
39375  fi
39376
39377
39378  # Now try to locate executable using which
39379  new_path=`$WHICH "$new_path" 2> /dev/null`
39380
39381  if test "x$new_path" = x; then
39382    # Oops. Which didn't find the executable.
39383    # The splitting of arguments from the executable at a space might have been incorrect,
39384    # since paths with space are more likely in Windows. Give it another try with the whole
39385    # argument.
39386    path="$complete"
39387    arguments="EOL"
39388    new_path="$path"
39389
39390  windows_path="$new_path"
39391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39392    unix_path=`$CYGPATH -u "$windows_path"`
39393    new_path="$unix_path"
39394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39396    new_path="$unix_path"
39397  fi
39398
39399
39400    new_path=`$WHICH "$new_path" 2> /dev/null`
39401    # bat and cmd files are not always considered executable in MSYS causing which
39402    # to not find them
39403    if test "x$new_path" = x \
39404        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39405        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39406      new_path="$path"
39407
39408  windows_path="$new_path"
39409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39410    unix_path=`$CYGPATH -u "$windows_path"`
39411    new_path="$unix_path"
39412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39414    new_path="$unix_path"
39415  fi
39416
39417    fi
39418
39419    if test "x$new_path" = x; then
39420      # It's still not found. Now this is an unrecoverable error.
39421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39422$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39423      has_space=`$ECHO "$complete" | $GREP " "`
39424      if test "x$has_space" != x; then
39425        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39426$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39427      fi
39428      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39429    fi
39430  fi
39431
39432  # Now new_path has a complete unix path to the binary
39433  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39434    # Keep paths in /bin as-is, but remove trailing .exe if any
39435    new_path="${new_path/%.exe/}"
39436    # Do not save /bin paths to all_fixpath_prefixes!
39437  else
39438    # Not in mixed or Windows style, start by that.
39439    new_path=`cmd //c echo $new_path`
39440
39441  input_path="$new_path"
39442  # Check if we need to convert this using DOS-style short mode. If the path
39443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39444  # take no chances and rewrite it.
39445  # Note: m4 eats our [], so we need to use [ and ] instead.
39446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39447  if test "x$has_forbidden_chars" != x; then
39448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39449    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39450  fi
39451
39452    # Output is in $new_path
39453
39454  windows_path="$new_path"
39455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39456    unix_path=`$CYGPATH -u "$windows_path"`
39457    new_path="$unix_path"
39458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39460    new_path="$unix_path"
39461  fi
39462
39463    # remove trailing .exe if any
39464    new_path="${new_path/%.exe/}"
39465
39466    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39467    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39468  fi
39469
39470    else
39471      # We're on a unix platform. Hooray! :)
39472      # First separate the path from the arguments. This will split at the first
39473      # space.
39474      complete="$DUMPBIN"
39475      path="${complete%% *}"
39476      tmp="$complete EOL"
39477      arguments="${tmp#* }"
39478
39479      # Cannot rely on the command "which" here since it doesn't always work.
39480      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39481      if test -z "$is_absolute_path"; then
39482        # Path to executable is not absolute. Find it.
39483        IFS_save="$IFS"
39484        IFS=:
39485        for p in $PATH; do
39486          if test -f "$p/$path" && test -x "$p/$path"; then
39487            new_path="$p/$path"
39488            break
39489          fi
39490        done
39491        IFS="$IFS_save"
39492      else
39493        # This is an absolute path, we can use it without further modifications.
39494        new_path="$path"
39495      fi
39496
39497      if test "x$new_path" = x; then
39498        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39499$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39500        has_space=`$ECHO "$complete" | $GREP " "`
39501        if test "x$has_space" != x; then
39502          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39503$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39504        fi
39505        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39506      fi
39507    fi
39508
39509    # Now join together the path and the arguments once again
39510    if test "x$arguments" != xEOL; then
39511      new_complete="$new_path ${arguments% *}"
39512    else
39513      new_complete="$new_path"
39514    fi
39515
39516    if test "x$complete" != "x$new_complete"; then
39517      DUMPBIN="$new_complete"
39518      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39519$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39520    fi
39521  fi
39522
39523    # We need to check for 'msbuild.exe' because at the place where we expect to
39524    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39525    # won't find the 'msbuild.exe' executable in that case (and the
39526    # 'ac_executable_extensions' is unusable due to performance reasons).
39527    # Notice that we intentionally don't fix up the path to MSBUILD because we
39528    # will call it in a DOS shell during freetype detection on Windows (see
39529    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39530    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39531set dummy msbuild.exe; ac_word=$2
39532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39533$as_echo_n "checking for $ac_word... " >&6; }
39534if ${ac_cv_prog_MSBUILD+:} false; then :
39535  $as_echo_n "(cached) " >&6
39536else
39537  if test -n "$MSBUILD"; then
39538  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39539else
39540as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39541for as_dir in $PATH
39542do
39543  IFS=$as_save_IFS
39544  test -z "$as_dir" && as_dir=.
39545    for ac_exec_ext in '' $ac_executable_extensions; do
39546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39547    ac_cv_prog_MSBUILD="msbuild.exe"
39548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39549    break 2
39550  fi
39551done
39552  done
39553IFS=$as_save_IFS
39554
39555fi
39556fi
39557MSBUILD=$ac_cv_prog_MSBUILD
39558if test -n "$MSBUILD"; then
39559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39560$as_echo "$MSBUILD" >&6; }
39561else
39562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39563$as_echo "no" >&6; }
39564fi
39565
39566
39567  fi
39568
39569  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39570
39571
39572  # Publish this variable in the help.
39573
39574
39575  if [ -z "${STRIP+x}" ]; then
39576    # The variable is not set by user, try to locate tool using the code snippet
39577    for ac_prog in strip
39578do
39579  # Extract the first word of "$ac_prog", so it can be a program name with args.
39580set dummy $ac_prog; ac_word=$2
39581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39582$as_echo_n "checking for $ac_word... " >&6; }
39583if ${ac_cv_path_STRIP+:} false; then :
39584  $as_echo_n "(cached) " >&6
39585else
39586  case $STRIP in
39587  [\\/]* | ?:[\\/]*)
39588  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39589  ;;
39590  *)
39591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39592for as_dir in $PATH
39593do
39594  IFS=$as_save_IFS
39595  test -z "$as_dir" && as_dir=.
39596    for ac_exec_ext in '' $ac_executable_extensions; do
39597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39598    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39600    break 2
39601  fi
39602done
39603  done
39604IFS=$as_save_IFS
39605
39606  ;;
39607esac
39608fi
39609STRIP=$ac_cv_path_STRIP
39610if test -n "$STRIP"; then
39611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39612$as_echo "$STRIP" >&6; }
39613else
39614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39615$as_echo "no" >&6; }
39616fi
39617
39618
39619  test -n "$STRIP" && break
39620done
39621
39622  else
39623    # The variable is set, but is it from the command line or the environment?
39624
39625    # Try to remove the string !STRIP! from our list.
39626    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39627    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39628      # If it failed, the variable was not from the command line. Ignore it,
39629      # but warn the user (except for BASH, which is always set by the calling BASH).
39630      if test "xSTRIP" != xBASH; then
39631        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39632$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39633      fi
39634      # Try to locate tool using the code snippet
39635      for ac_prog in strip
39636do
39637  # Extract the first word of "$ac_prog", so it can be a program name with args.
39638set dummy $ac_prog; ac_word=$2
39639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39640$as_echo_n "checking for $ac_word... " >&6; }
39641if ${ac_cv_path_STRIP+:} false; then :
39642  $as_echo_n "(cached) " >&6
39643else
39644  case $STRIP in
39645  [\\/]* | ?:[\\/]*)
39646  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39647  ;;
39648  *)
39649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39650for as_dir in $PATH
39651do
39652  IFS=$as_save_IFS
39653  test -z "$as_dir" && as_dir=.
39654    for ac_exec_ext in '' $ac_executable_extensions; do
39655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39656    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39658    break 2
39659  fi
39660done
39661  done
39662IFS=$as_save_IFS
39663
39664  ;;
39665esac
39666fi
39667STRIP=$ac_cv_path_STRIP
39668if test -n "$STRIP"; then
39669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39670$as_echo "$STRIP" >&6; }
39671else
39672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39673$as_echo "no" >&6; }
39674fi
39675
39676
39677  test -n "$STRIP" && break
39678done
39679
39680    else
39681      # If it succeeded, then it was overridden by the user. We will use it
39682      # for the tool.
39683
39684      # First remove it from the list of overridden variables, so we can test
39685      # for unknown variables in the end.
39686      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39687
39688      # Check if we try to supply an empty value
39689      if test "x$STRIP" = x; then
39690        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39691$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39692        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39693$as_echo_n "checking for STRIP... " >&6; }
39694        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39695$as_echo "disabled" >&6; }
39696      else
39697        # Check if the provided tool contains a complete path.
39698        tool_specified="$STRIP"
39699        tool_basename="${tool_specified##*/}"
39700        if test "x$tool_basename" = "x$tool_specified"; then
39701          # A command without a complete path is provided, search $PATH.
39702          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39703$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39704          # Extract the first word of "$tool_basename", so it can be a program name with args.
39705set dummy $tool_basename; ac_word=$2
39706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39707$as_echo_n "checking for $ac_word... " >&6; }
39708if ${ac_cv_path_STRIP+:} false; then :
39709  $as_echo_n "(cached) " >&6
39710else
39711  case $STRIP in
39712  [\\/]* | ?:[\\/]*)
39713  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39714  ;;
39715  *)
39716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39717for as_dir in $PATH
39718do
39719  IFS=$as_save_IFS
39720  test -z "$as_dir" && as_dir=.
39721    for ac_exec_ext in '' $ac_executable_extensions; do
39722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39723    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39725    break 2
39726  fi
39727done
39728  done
39729IFS=$as_save_IFS
39730
39731  ;;
39732esac
39733fi
39734STRIP=$ac_cv_path_STRIP
39735if test -n "$STRIP"; then
39736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39737$as_echo "$STRIP" >&6; }
39738else
39739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39740$as_echo "no" >&6; }
39741fi
39742
39743
39744          if test "x$STRIP" = x; then
39745            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39746          fi
39747        else
39748          # Otherwise we believe it is a complete path. Use it as it is.
39749          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39750$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39751          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39752$as_echo_n "checking for STRIP... " >&6; }
39753          if test ! -x "$tool_specified"; then
39754            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39755$as_echo "not found" >&6; }
39756            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39757          fi
39758          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39759$as_echo "$tool_specified" >&6; }
39760        fi
39761      fi
39762    fi
39763
39764  fi
39765
39766
39767
39768  # Only process if variable expands to non-empty
39769
39770  if test "x$STRIP" != x; then
39771    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39772
39773  # First separate the path from the arguments. This will split at the first
39774  # space.
39775  complete="$STRIP"
39776  path="${complete%% *}"
39777  tmp="$complete EOL"
39778  arguments="${tmp#* }"
39779
39780  # Input might be given as Windows format, start by converting to
39781  # unix format.
39782  new_path=`$CYGPATH -u "$path"`
39783
39784  # Now try to locate executable using which
39785  new_path=`$WHICH "$new_path" 2> /dev/null`
39786  # bat and cmd files are not always considered executable in cygwin causing which
39787  # to not find them
39788  if test "x$new_path" = x \
39789      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39790      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39791    new_path=`$CYGPATH -u "$path"`
39792  fi
39793  if test "x$new_path" = x; then
39794    # Oops. Which didn't find the executable.
39795    # The splitting of arguments from the executable at a space might have been incorrect,
39796    # since paths with space are more likely in Windows. Give it another try with the whole
39797    # argument.
39798    path="$complete"
39799    arguments="EOL"
39800    new_path=`$CYGPATH -u "$path"`
39801    new_path=`$WHICH "$new_path" 2> /dev/null`
39802    # bat and cmd files are not always considered executable in cygwin causing which
39803    # to not find them
39804    if test "x$new_path" = x \
39805        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39806        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39807      new_path=`$CYGPATH -u "$path"`
39808    fi
39809    if test "x$new_path" = x; then
39810      # It's still not found. Now this is an unrecoverable error.
39811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39812$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39813      has_space=`$ECHO "$complete" | $GREP " "`
39814      if test "x$has_space" != x; then
39815        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39816$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39817      fi
39818      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39819    fi
39820  fi
39821
39822  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39823  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39824  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39825  # "foo.exe" is OK but "foo" is an error.
39826  #
39827  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39828  # It is also a way to make sure we got the proper file name for the real test later on.
39829  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39830  if test "x$test_shortpath" = x; then
39831    # Short path failed, file does not exist as specified.
39832    # Try adding .exe or .cmd
39833    if test -f "${new_path}.exe"; then
39834      input_to_shortpath="${new_path}.exe"
39835    elif test -f "${new_path}.cmd"; then
39836      input_to_shortpath="${new_path}.cmd"
39837    else
39838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39839$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39840      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39841$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39842      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39843    fi
39844  else
39845    input_to_shortpath="$new_path"
39846  fi
39847
39848  # Call helper function which possibly converts this using DOS-style short mode.
39849  # If so, the updated path is stored in $new_path.
39850  new_path="$input_to_shortpath"
39851
39852  input_path="$input_to_shortpath"
39853  # Check if we need to convert this using DOS-style short mode. If the path
39854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39855  # take no chances and rewrite it.
39856  # Note: m4 eats our [], so we need to use [ and ] instead.
39857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39858  if test "x$has_forbidden_chars" != x; then
39859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39863      # Going to short mode and back again did indeed matter. Since short mode is
39864      # case insensitive, let's make it lowercase to improve readability.
39865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39866      # Now convert it back to Unix-style (cygpath)
39867      input_path=`$CYGPATH -u "$shortmode_path"`
39868      new_path="$input_path"
39869    fi
39870  fi
39871
39872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39873  if test "x$test_cygdrive_prefix" = x; then
39874    # As a simple fix, exclude /usr/bin since it's not a real path.
39875    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39877      # a path prefixed by /cygdrive for fixpath to work.
39878      new_path="$CYGWIN_ROOT_PATH$input_path"
39879    fi
39880  fi
39881
39882  # remove trailing .exe if any
39883  new_path="${new_path/%.exe/}"
39884
39885    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39886
39887  # First separate the path from the arguments. This will split at the first
39888  # space.
39889  complete="$STRIP"
39890  path="${complete%% *}"
39891  tmp="$complete EOL"
39892  arguments="${tmp#* }"
39893
39894  # Input might be given as Windows format, start by converting to
39895  # unix format.
39896  new_path="$path"
39897
39898  windows_path="$new_path"
39899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39900    unix_path=`$CYGPATH -u "$windows_path"`
39901    new_path="$unix_path"
39902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39904    new_path="$unix_path"
39905  fi
39906
39907
39908  # Now try to locate executable using which
39909  new_path=`$WHICH "$new_path" 2> /dev/null`
39910
39911  if test "x$new_path" = x; then
39912    # Oops. Which didn't find the executable.
39913    # The splitting of arguments from the executable at a space might have been incorrect,
39914    # since paths with space are more likely in Windows. Give it another try with the whole
39915    # argument.
39916    path="$complete"
39917    arguments="EOL"
39918    new_path="$path"
39919
39920  windows_path="$new_path"
39921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39922    unix_path=`$CYGPATH -u "$windows_path"`
39923    new_path="$unix_path"
39924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39926    new_path="$unix_path"
39927  fi
39928
39929
39930    new_path=`$WHICH "$new_path" 2> /dev/null`
39931    # bat and cmd files are not always considered executable in MSYS causing which
39932    # to not find them
39933    if test "x$new_path" = x \
39934        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39935        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39936      new_path="$path"
39937
39938  windows_path="$new_path"
39939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39940    unix_path=`$CYGPATH -u "$windows_path"`
39941    new_path="$unix_path"
39942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39944    new_path="$unix_path"
39945  fi
39946
39947    fi
39948
39949    if test "x$new_path" = x; then
39950      # It's still not found. Now this is an unrecoverable error.
39951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39952$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39953      has_space=`$ECHO "$complete" | $GREP " "`
39954      if test "x$has_space" != x; then
39955        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39956$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39957      fi
39958      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39959    fi
39960  fi
39961
39962  # Now new_path has a complete unix path to the binary
39963  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39964    # Keep paths in /bin as-is, but remove trailing .exe if any
39965    new_path="${new_path/%.exe/}"
39966    # Do not save /bin paths to all_fixpath_prefixes!
39967  else
39968    # Not in mixed or Windows style, start by that.
39969    new_path=`cmd //c echo $new_path`
39970
39971  input_path="$new_path"
39972  # Check if we need to convert this using DOS-style short mode. If the path
39973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39974  # take no chances and rewrite it.
39975  # Note: m4 eats our [], so we need to use [ and ] instead.
39976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39977  if test "x$has_forbidden_chars" != x; then
39978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39979    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39980  fi
39981
39982    # Output is in $new_path
39983
39984  windows_path="$new_path"
39985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39986    unix_path=`$CYGPATH -u "$windows_path"`
39987    new_path="$unix_path"
39988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39990    new_path="$unix_path"
39991  fi
39992
39993    # remove trailing .exe if any
39994    new_path="${new_path/%.exe/}"
39995
39996    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39997    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39998  fi
39999
40000    else
40001      # We're on a unix platform. Hooray! :)
40002      # First separate the path from the arguments. This will split at the first
40003      # space.
40004      complete="$STRIP"
40005      path="${complete%% *}"
40006      tmp="$complete EOL"
40007      arguments="${tmp#* }"
40008
40009      # Cannot rely on the command "which" here since it doesn't always work.
40010      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40011      if test -z "$is_absolute_path"; then
40012        # Path to executable is not absolute. Find it.
40013        IFS_save="$IFS"
40014        IFS=:
40015        for p in $PATH; do
40016          if test -f "$p/$path" && test -x "$p/$path"; then
40017            new_path="$p/$path"
40018            break
40019          fi
40020        done
40021        IFS="$IFS_save"
40022      else
40023        # This is an absolute path, we can use it without further modifications.
40024        new_path="$path"
40025      fi
40026
40027      if test "x$new_path" = x; then
40028        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40029$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40030        has_space=`$ECHO "$complete" | $GREP " "`
40031        if test "x$has_space" != x; then
40032          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40033$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40034        fi
40035        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40036      fi
40037    fi
40038
40039    # Now join together the path and the arguments once again
40040    if test "x$arguments" != xEOL; then
40041      new_complete="$new_path ${arguments% *}"
40042    else
40043      new_complete="$new_path"
40044    fi
40045
40046    if test "x$complete" != "x$new_complete"; then
40047      STRIP="$new_complete"
40048      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40049$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40050    fi
40051  fi
40052
40053
40054
40055  # Publish this variable in the help.
40056
40057
40058  if [ -z "${NM+x}" ]; then
40059    # The variable is not set by user, try to locate tool using the code snippet
40060    for ac_prog in nm
40061do
40062  # Extract the first word of "$ac_prog", so it can be a program name with args.
40063set dummy $ac_prog; ac_word=$2
40064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40065$as_echo_n "checking for $ac_word... " >&6; }
40066if ${ac_cv_path_NM+:} false; then :
40067  $as_echo_n "(cached) " >&6
40068else
40069  case $NM in
40070  [\\/]* | ?:[\\/]*)
40071  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40072  ;;
40073  *)
40074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40075for as_dir in $PATH
40076do
40077  IFS=$as_save_IFS
40078  test -z "$as_dir" && as_dir=.
40079    for ac_exec_ext in '' $ac_executable_extensions; do
40080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40081    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40083    break 2
40084  fi
40085done
40086  done
40087IFS=$as_save_IFS
40088
40089  ;;
40090esac
40091fi
40092NM=$ac_cv_path_NM
40093if test -n "$NM"; then
40094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40095$as_echo "$NM" >&6; }
40096else
40097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40098$as_echo "no" >&6; }
40099fi
40100
40101
40102  test -n "$NM" && break
40103done
40104
40105  else
40106    # The variable is set, but is it from the command line or the environment?
40107
40108    # Try to remove the string !NM! from our list.
40109    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40110    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40111      # If it failed, the variable was not from the command line. Ignore it,
40112      # but warn the user (except for BASH, which is always set by the calling BASH).
40113      if test "xNM" != xBASH; then
40114        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40115$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40116      fi
40117      # Try to locate tool using the code snippet
40118      for ac_prog in nm
40119do
40120  # Extract the first word of "$ac_prog", so it can be a program name with args.
40121set dummy $ac_prog; ac_word=$2
40122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40123$as_echo_n "checking for $ac_word... " >&6; }
40124if ${ac_cv_path_NM+:} false; then :
40125  $as_echo_n "(cached) " >&6
40126else
40127  case $NM in
40128  [\\/]* | ?:[\\/]*)
40129  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40130  ;;
40131  *)
40132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40133for as_dir in $PATH
40134do
40135  IFS=$as_save_IFS
40136  test -z "$as_dir" && as_dir=.
40137    for ac_exec_ext in '' $ac_executable_extensions; do
40138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40139    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40141    break 2
40142  fi
40143done
40144  done
40145IFS=$as_save_IFS
40146
40147  ;;
40148esac
40149fi
40150NM=$ac_cv_path_NM
40151if test -n "$NM"; then
40152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40153$as_echo "$NM" >&6; }
40154else
40155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40156$as_echo "no" >&6; }
40157fi
40158
40159
40160  test -n "$NM" && break
40161done
40162
40163    else
40164      # If it succeeded, then it was overridden by the user. We will use it
40165      # for the tool.
40166
40167      # First remove it from the list of overridden variables, so we can test
40168      # for unknown variables in the end.
40169      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40170
40171      # Check if we try to supply an empty value
40172      if test "x$NM" = x; then
40173        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40174$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40175        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40176$as_echo_n "checking for NM... " >&6; }
40177        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40178$as_echo "disabled" >&6; }
40179      else
40180        # Check if the provided tool contains a complete path.
40181        tool_specified="$NM"
40182        tool_basename="${tool_specified##*/}"
40183        if test "x$tool_basename" = "x$tool_specified"; then
40184          # A command without a complete path is provided, search $PATH.
40185          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40186$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40187          # Extract the first word of "$tool_basename", so it can be a program name with args.
40188set dummy $tool_basename; ac_word=$2
40189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40190$as_echo_n "checking for $ac_word... " >&6; }
40191if ${ac_cv_path_NM+:} false; then :
40192  $as_echo_n "(cached) " >&6
40193else
40194  case $NM in
40195  [\\/]* | ?:[\\/]*)
40196  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40197  ;;
40198  *)
40199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40200for as_dir in $PATH
40201do
40202  IFS=$as_save_IFS
40203  test -z "$as_dir" && as_dir=.
40204    for ac_exec_ext in '' $ac_executable_extensions; do
40205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40206    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40208    break 2
40209  fi
40210done
40211  done
40212IFS=$as_save_IFS
40213
40214  ;;
40215esac
40216fi
40217NM=$ac_cv_path_NM
40218if test -n "$NM"; then
40219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40220$as_echo "$NM" >&6; }
40221else
40222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40223$as_echo "no" >&6; }
40224fi
40225
40226
40227          if test "x$NM" = x; then
40228            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40229          fi
40230        else
40231          # Otherwise we believe it is a complete path. Use it as it is.
40232          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40233$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40234          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40235$as_echo_n "checking for NM... " >&6; }
40236          if test ! -x "$tool_specified"; then
40237            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40238$as_echo "not found" >&6; }
40239            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40240          fi
40241          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40242$as_echo "$tool_specified" >&6; }
40243        fi
40244      fi
40245    fi
40246
40247  fi
40248
40249
40250
40251  # Only process if variable expands to non-empty
40252
40253  if test "x$NM" != x; then
40254    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40255
40256  # First separate the path from the arguments. This will split at the first
40257  # space.
40258  complete="$NM"
40259  path="${complete%% *}"
40260  tmp="$complete EOL"
40261  arguments="${tmp#* }"
40262
40263  # Input might be given as Windows format, start by converting to
40264  # unix format.
40265  new_path=`$CYGPATH -u "$path"`
40266
40267  # Now try to locate executable using which
40268  new_path=`$WHICH "$new_path" 2> /dev/null`
40269  # bat and cmd files are not always considered executable in cygwin causing which
40270  # to not find them
40271  if test "x$new_path" = x \
40272      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40273      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40274    new_path=`$CYGPATH -u "$path"`
40275  fi
40276  if test "x$new_path" = x; then
40277    # Oops. Which didn't find the executable.
40278    # The splitting of arguments from the executable at a space might have been incorrect,
40279    # since paths with space are more likely in Windows. Give it another try with the whole
40280    # argument.
40281    path="$complete"
40282    arguments="EOL"
40283    new_path=`$CYGPATH -u "$path"`
40284    new_path=`$WHICH "$new_path" 2> /dev/null`
40285    # bat and cmd files are not always considered executable in cygwin causing which
40286    # to not find them
40287    if test "x$new_path" = x \
40288        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40289        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40290      new_path=`$CYGPATH -u "$path"`
40291    fi
40292    if test "x$new_path" = x; then
40293      # It's still not found. Now this is an unrecoverable error.
40294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40295$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40296      has_space=`$ECHO "$complete" | $GREP " "`
40297      if test "x$has_space" != x; then
40298        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40299$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40300      fi
40301      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40302    fi
40303  fi
40304
40305  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40306  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40307  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40308  # "foo.exe" is OK but "foo" is an error.
40309  #
40310  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40311  # It is also a way to make sure we got the proper file name for the real test later on.
40312  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40313  if test "x$test_shortpath" = x; then
40314    # Short path failed, file does not exist as specified.
40315    # Try adding .exe or .cmd
40316    if test -f "${new_path}.exe"; then
40317      input_to_shortpath="${new_path}.exe"
40318    elif test -f "${new_path}.cmd"; then
40319      input_to_shortpath="${new_path}.cmd"
40320    else
40321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40322$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40323      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40324$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40325      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40326    fi
40327  else
40328    input_to_shortpath="$new_path"
40329  fi
40330
40331  # Call helper function which possibly converts this using DOS-style short mode.
40332  # If so, the updated path is stored in $new_path.
40333  new_path="$input_to_shortpath"
40334
40335  input_path="$input_to_shortpath"
40336  # Check if we need to convert this using DOS-style short mode. If the path
40337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40338  # take no chances and rewrite it.
40339  # Note: m4 eats our [], so we need to use [ and ] instead.
40340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40341  if test "x$has_forbidden_chars" != x; then
40342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40343    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40344    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40345    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40346      # Going to short mode and back again did indeed matter. Since short mode is
40347      # case insensitive, let's make it lowercase to improve readability.
40348      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40349      # Now convert it back to Unix-style (cygpath)
40350      input_path=`$CYGPATH -u "$shortmode_path"`
40351      new_path="$input_path"
40352    fi
40353  fi
40354
40355  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40356  if test "x$test_cygdrive_prefix" = x; then
40357    # As a simple fix, exclude /usr/bin since it's not a real path.
40358    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40359      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40360      # a path prefixed by /cygdrive for fixpath to work.
40361      new_path="$CYGWIN_ROOT_PATH$input_path"
40362    fi
40363  fi
40364
40365  # remove trailing .exe if any
40366  new_path="${new_path/%.exe/}"
40367
40368    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40369
40370  # First separate the path from the arguments. This will split at the first
40371  # space.
40372  complete="$NM"
40373  path="${complete%% *}"
40374  tmp="$complete EOL"
40375  arguments="${tmp#* }"
40376
40377  # Input might be given as Windows format, start by converting to
40378  # unix format.
40379  new_path="$path"
40380
40381  windows_path="$new_path"
40382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40383    unix_path=`$CYGPATH -u "$windows_path"`
40384    new_path="$unix_path"
40385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40387    new_path="$unix_path"
40388  fi
40389
40390
40391  # Now try to locate executable using which
40392  new_path=`$WHICH "$new_path" 2> /dev/null`
40393
40394  if test "x$new_path" = x; then
40395    # Oops. Which didn't find the executable.
40396    # The splitting of arguments from the executable at a space might have been incorrect,
40397    # since paths with space are more likely in Windows. Give it another try with the whole
40398    # argument.
40399    path="$complete"
40400    arguments="EOL"
40401    new_path="$path"
40402
40403  windows_path="$new_path"
40404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40405    unix_path=`$CYGPATH -u "$windows_path"`
40406    new_path="$unix_path"
40407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40409    new_path="$unix_path"
40410  fi
40411
40412
40413    new_path=`$WHICH "$new_path" 2> /dev/null`
40414    # bat and cmd files are not always considered executable in MSYS causing which
40415    # to not find them
40416    if test "x$new_path" = x \
40417        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40418        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40419      new_path="$path"
40420
40421  windows_path="$new_path"
40422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40423    unix_path=`$CYGPATH -u "$windows_path"`
40424    new_path="$unix_path"
40425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40427    new_path="$unix_path"
40428  fi
40429
40430    fi
40431
40432    if test "x$new_path" = x; then
40433      # It's still not found. Now this is an unrecoverable error.
40434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40435$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40436      has_space=`$ECHO "$complete" | $GREP " "`
40437      if test "x$has_space" != x; then
40438        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40440      fi
40441      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40442    fi
40443  fi
40444
40445  # Now new_path has a complete unix path to the binary
40446  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40447    # Keep paths in /bin as-is, but remove trailing .exe if any
40448    new_path="${new_path/%.exe/}"
40449    # Do not save /bin paths to all_fixpath_prefixes!
40450  else
40451    # Not in mixed or Windows style, start by that.
40452    new_path=`cmd //c echo $new_path`
40453
40454  input_path="$new_path"
40455  # Check if we need to convert this using DOS-style short mode. If the path
40456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40457  # take no chances and rewrite it.
40458  # Note: m4 eats our [], so we need to use [ and ] instead.
40459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40460  if test "x$has_forbidden_chars" != x; then
40461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40463  fi
40464
40465    # Output is in $new_path
40466
40467  windows_path="$new_path"
40468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40469    unix_path=`$CYGPATH -u "$windows_path"`
40470    new_path="$unix_path"
40471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40473    new_path="$unix_path"
40474  fi
40475
40476    # remove trailing .exe if any
40477    new_path="${new_path/%.exe/}"
40478
40479    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40480    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40481  fi
40482
40483    else
40484      # We're on a unix platform. Hooray! :)
40485      # First separate the path from the arguments. This will split at the first
40486      # space.
40487      complete="$NM"
40488      path="${complete%% *}"
40489      tmp="$complete EOL"
40490      arguments="${tmp#* }"
40491
40492      # Cannot rely on the command "which" here since it doesn't always work.
40493      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40494      if test -z "$is_absolute_path"; then
40495        # Path to executable is not absolute. Find it.
40496        IFS_save="$IFS"
40497        IFS=:
40498        for p in $PATH; do
40499          if test -f "$p/$path" && test -x "$p/$path"; then
40500            new_path="$p/$path"
40501            break
40502          fi
40503        done
40504        IFS="$IFS_save"
40505      else
40506        # This is an absolute path, we can use it without further modifications.
40507        new_path="$path"
40508      fi
40509
40510      if test "x$new_path" = x; then
40511        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40512$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40513        has_space=`$ECHO "$complete" | $GREP " "`
40514        if test "x$has_space" != x; then
40515          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40516$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40517        fi
40518        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40519      fi
40520    fi
40521
40522    # Now join together the path and the arguments once again
40523    if test "x$arguments" != xEOL; then
40524      new_complete="$new_path ${arguments% *}"
40525    else
40526      new_complete="$new_path"
40527    fi
40528
40529    if test "x$complete" != "x$new_complete"; then
40530      NM="$new_complete"
40531      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40532$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40533    fi
40534  fi
40535
40536
40537
40538  # Publish this variable in the help.
40539
40540
40541  if [ -z "${GNM+x}" ]; then
40542    # The variable is not set by user, try to locate tool using the code snippet
40543    for ac_prog in gnm
40544do
40545  # Extract the first word of "$ac_prog", so it can be a program name with args.
40546set dummy $ac_prog; ac_word=$2
40547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40548$as_echo_n "checking for $ac_word... " >&6; }
40549if ${ac_cv_path_GNM+:} false; then :
40550  $as_echo_n "(cached) " >&6
40551else
40552  case $GNM in
40553  [\\/]* | ?:[\\/]*)
40554  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40555  ;;
40556  *)
40557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40558for as_dir in $PATH
40559do
40560  IFS=$as_save_IFS
40561  test -z "$as_dir" && as_dir=.
40562    for ac_exec_ext in '' $ac_executable_extensions; do
40563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40564    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40566    break 2
40567  fi
40568done
40569  done
40570IFS=$as_save_IFS
40571
40572  ;;
40573esac
40574fi
40575GNM=$ac_cv_path_GNM
40576if test -n "$GNM"; then
40577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40578$as_echo "$GNM" >&6; }
40579else
40580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40581$as_echo "no" >&6; }
40582fi
40583
40584
40585  test -n "$GNM" && break
40586done
40587
40588  else
40589    # The variable is set, but is it from the command line or the environment?
40590
40591    # Try to remove the string !GNM! from our list.
40592    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40593    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40594      # If it failed, the variable was not from the command line. Ignore it,
40595      # but warn the user (except for BASH, which is always set by the calling BASH).
40596      if test "xGNM" != xBASH; then
40597        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40598$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40599      fi
40600      # Try to locate tool using the code snippet
40601      for ac_prog in gnm
40602do
40603  # Extract the first word of "$ac_prog", so it can be a program name with args.
40604set dummy $ac_prog; ac_word=$2
40605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40606$as_echo_n "checking for $ac_word... " >&6; }
40607if ${ac_cv_path_GNM+:} false; then :
40608  $as_echo_n "(cached) " >&6
40609else
40610  case $GNM in
40611  [\\/]* | ?:[\\/]*)
40612  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40613  ;;
40614  *)
40615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40616for as_dir in $PATH
40617do
40618  IFS=$as_save_IFS
40619  test -z "$as_dir" && as_dir=.
40620    for ac_exec_ext in '' $ac_executable_extensions; do
40621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40622    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40624    break 2
40625  fi
40626done
40627  done
40628IFS=$as_save_IFS
40629
40630  ;;
40631esac
40632fi
40633GNM=$ac_cv_path_GNM
40634if test -n "$GNM"; then
40635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40636$as_echo "$GNM" >&6; }
40637else
40638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40639$as_echo "no" >&6; }
40640fi
40641
40642
40643  test -n "$GNM" && break
40644done
40645
40646    else
40647      # If it succeeded, then it was overridden by the user. We will use it
40648      # for the tool.
40649
40650      # First remove it from the list of overridden variables, so we can test
40651      # for unknown variables in the end.
40652      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40653
40654      # Check if we try to supply an empty value
40655      if test "x$GNM" = x; then
40656        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40657$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40658        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40659$as_echo_n "checking for GNM... " >&6; }
40660        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40661$as_echo "disabled" >&6; }
40662      else
40663        # Check if the provided tool contains a complete path.
40664        tool_specified="$GNM"
40665        tool_basename="${tool_specified##*/}"
40666        if test "x$tool_basename" = "x$tool_specified"; then
40667          # A command without a complete path is provided, search $PATH.
40668          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40669$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40670          # Extract the first word of "$tool_basename", so it can be a program name with args.
40671set dummy $tool_basename; ac_word=$2
40672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40673$as_echo_n "checking for $ac_word... " >&6; }
40674if ${ac_cv_path_GNM+:} false; then :
40675  $as_echo_n "(cached) " >&6
40676else
40677  case $GNM in
40678  [\\/]* | ?:[\\/]*)
40679  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40680  ;;
40681  *)
40682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40683for as_dir in $PATH
40684do
40685  IFS=$as_save_IFS
40686  test -z "$as_dir" && as_dir=.
40687    for ac_exec_ext in '' $ac_executable_extensions; do
40688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40689    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40691    break 2
40692  fi
40693done
40694  done
40695IFS=$as_save_IFS
40696
40697  ;;
40698esac
40699fi
40700GNM=$ac_cv_path_GNM
40701if test -n "$GNM"; then
40702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40703$as_echo "$GNM" >&6; }
40704else
40705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40706$as_echo "no" >&6; }
40707fi
40708
40709
40710          if test "x$GNM" = x; then
40711            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40712          fi
40713        else
40714          # Otherwise we believe it is a complete path. Use it as it is.
40715          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40716$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40717          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40718$as_echo_n "checking for GNM... " >&6; }
40719          if test ! -x "$tool_specified"; then
40720            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40721$as_echo "not found" >&6; }
40722            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40723          fi
40724          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40725$as_echo "$tool_specified" >&6; }
40726        fi
40727      fi
40728    fi
40729
40730  fi
40731
40732
40733
40734  # Only process if variable expands to non-empty
40735
40736  if test "x$GNM" != x; then
40737    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40738
40739  # First separate the path from the arguments. This will split at the first
40740  # space.
40741  complete="$GNM"
40742  path="${complete%% *}"
40743  tmp="$complete EOL"
40744  arguments="${tmp#* }"
40745
40746  # Input might be given as Windows format, start by converting to
40747  # unix format.
40748  new_path=`$CYGPATH -u "$path"`
40749
40750  # Now try to locate executable using which
40751  new_path=`$WHICH "$new_path" 2> /dev/null`
40752  # bat and cmd files are not always considered executable in cygwin causing which
40753  # to not find them
40754  if test "x$new_path" = x \
40755      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40756      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40757    new_path=`$CYGPATH -u "$path"`
40758  fi
40759  if test "x$new_path" = x; then
40760    # Oops. Which didn't find the executable.
40761    # The splitting of arguments from the executable at a space might have been incorrect,
40762    # since paths with space are more likely in Windows. Give it another try with the whole
40763    # argument.
40764    path="$complete"
40765    arguments="EOL"
40766    new_path=`$CYGPATH -u "$path"`
40767    new_path=`$WHICH "$new_path" 2> /dev/null`
40768    # bat and cmd files are not always considered executable in cygwin causing which
40769    # to not find them
40770    if test "x$new_path" = x \
40771        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40772        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40773      new_path=`$CYGPATH -u "$path"`
40774    fi
40775    if test "x$new_path" = x; then
40776      # It's still not found. Now this is an unrecoverable error.
40777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40778$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40779      has_space=`$ECHO "$complete" | $GREP " "`
40780      if test "x$has_space" != x; then
40781        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40782$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40783      fi
40784      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40785    fi
40786  fi
40787
40788  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40789  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40790  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40791  # "foo.exe" is OK but "foo" is an error.
40792  #
40793  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40794  # It is also a way to make sure we got the proper file name for the real test later on.
40795  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40796  if test "x$test_shortpath" = x; then
40797    # Short path failed, file does not exist as specified.
40798    # Try adding .exe or .cmd
40799    if test -f "${new_path}.exe"; then
40800      input_to_shortpath="${new_path}.exe"
40801    elif test -f "${new_path}.cmd"; then
40802      input_to_shortpath="${new_path}.cmd"
40803    else
40804      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40805$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40806      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40807$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40808      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40809    fi
40810  else
40811    input_to_shortpath="$new_path"
40812  fi
40813
40814  # Call helper function which possibly converts this using DOS-style short mode.
40815  # If so, the updated path is stored in $new_path.
40816  new_path="$input_to_shortpath"
40817
40818  input_path="$input_to_shortpath"
40819  # Check if we need to convert this using DOS-style short mode. If the path
40820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40821  # take no chances and rewrite it.
40822  # Note: m4 eats our [], so we need to use [ and ] instead.
40823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40824  if test "x$has_forbidden_chars" != x; then
40825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40829      # Going to short mode and back again did indeed matter. Since short mode is
40830      # case insensitive, let's make it lowercase to improve readability.
40831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40832      # Now convert it back to Unix-style (cygpath)
40833      input_path=`$CYGPATH -u "$shortmode_path"`
40834      new_path="$input_path"
40835    fi
40836  fi
40837
40838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40839  if test "x$test_cygdrive_prefix" = x; then
40840    # As a simple fix, exclude /usr/bin since it's not a real path.
40841    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40843      # a path prefixed by /cygdrive for fixpath to work.
40844      new_path="$CYGWIN_ROOT_PATH$input_path"
40845    fi
40846  fi
40847
40848  # remove trailing .exe if any
40849  new_path="${new_path/%.exe/}"
40850
40851    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40852
40853  # First separate the path from the arguments. This will split at the first
40854  # space.
40855  complete="$GNM"
40856  path="${complete%% *}"
40857  tmp="$complete EOL"
40858  arguments="${tmp#* }"
40859
40860  # Input might be given as Windows format, start by converting to
40861  # unix format.
40862  new_path="$path"
40863
40864  windows_path="$new_path"
40865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40866    unix_path=`$CYGPATH -u "$windows_path"`
40867    new_path="$unix_path"
40868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40870    new_path="$unix_path"
40871  fi
40872
40873
40874  # Now try to locate executable using which
40875  new_path=`$WHICH "$new_path" 2> /dev/null`
40876
40877  if test "x$new_path" = x; then
40878    # Oops. Which didn't find the executable.
40879    # The splitting of arguments from the executable at a space might have been incorrect,
40880    # since paths with space are more likely in Windows. Give it another try with the whole
40881    # argument.
40882    path="$complete"
40883    arguments="EOL"
40884    new_path="$path"
40885
40886  windows_path="$new_path"
40887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40888    unix_path=`$CYGPATH -u "$windows_path"`
40889    new_path="$unix_path"
40890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40892    new_path="$unix_path"
40893  fi
40894
40895
40896    new_path=`$WHICH "$new_path" 2> /dev/null`
40897    # bat and cmd files are not always considered executable in MSYS causing which
40898    # to not find them
40899    if test "x$new_path" = x \
40900        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40901        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40902      new_path="$path"
40903
40904  windows_path="$new_path"
40905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40906    unix_path=`$CYGPATH -u "$windows_path"`
40907    new_path="$unix_path"
40908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40910    new_path="$unix_path"
40911  fi
40912
40913    fi
40914
40915    if test "x$new_path" = x; then
40916      # It's still not found. Now this is an unrecoverable error.
40917      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40918$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40919      has_space=`$ECHO "$complete" | $GREP " "`
40920      if test "x$has_space" != x; then
40921        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40922$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40923      fi
40924      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40925    fi
40926  fi
40927
40928  # Now new_path has a complete unix path to the binary
40929  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40930    # Keep paths in /bin as-is, but remove trailing .exe if any
40931    new_path="${new_path/%.exe/}"
40932    # Do not save /bin paths to all_fixpath_prefixes!
40933  else
40934    # Not in mixed or Windows style, start by that.
40935    new_path=`cmd //c echo $new_path`
40936
40937  input_path="$new_path"
40938  # Check if we need to convert this using DOS-style short mode. If the path
40939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40940  # take no chances and rewrite it.
40941  # Note: m4 eats our [], so we need to use [ and ] instead.
40942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40943  if test "x$has_forbidden_chars" != x; then
40944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40945    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40946  fi
40947
40948    # Output is in $new_path
40949
40950  windows_path="$new_path"
40951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40952    unix_path=`$CYGPATH -u "$windows_path"`
40953    new_path="$unix_path"
40954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40956    new_path="$unix_path"
40957  fi
40958
40959    # remove trailing .exe if any
40960    new_path="${new_path/%.exe/}"
40961
40962    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40963    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40964  fi
40965
40966    else
40967      # We're on a unix platform. Hooray! :)
40968      # First separate the path from the arguments. This will split at the first
40969      # space.
40970      complete="$GNM"
40971      path="${complete%% *}"
40972      tmp="$complete EOL"
40973      arguments="${tmp#* }"
40974
40975      # Cannot rely on the command "which" here since it doesn't always work.
40976      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40977      if test -z "$is_absolute_path"; then
40978        # Path to executable is not absolute. Find it.
40979        IFS_save="$IFS"
40980        IFS=:
40981        for p in $PATH; do
40982          if test -f "$p/$path" && test -x "$p/$path"; then
40983            new_path="$p/$path"
40984            break
40985          fi
40986        done
40987        IFS="$IFS_save"
40988      else
40989        # This is an absolute path, we can use it without further modifications.
40990        new_path="$path"
40991      fi
40992
40993      if test "x$new_path" = x; then
40994        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40995$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40996        has_space=`$ECHO "$complete" | $GREP " "`
40997        if test "x$has_space" != x; then
40998          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40999$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41000        fi
41001        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41002      fi
41003    fi
41004
41005    # Now join together the path and the arguments once again
41006    if test "x$arguments" != xEOL; then
41007      new_complete="$new_path ${arguments% *}"
41008    else
41009      new_complete="$new_path"
41010    fi
41011
41012    if test "x$complete" != "x$new_complete"; then
41013      GNM="$new_complete"
41014      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41015$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41016    fi
41017  fi
41018
41019  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41020    # FIXME: we should unify this with the solaris case above.
41021
41022
41023  # Publish this variable in the help.
41024
41025
41026  if [ -z "${STRIP+x}" ]; then
41027    # The variable is not set by user, try to locate tool using the code snippet
41028    if test -n "$ac_tool_prefix"; then
41029  for ac_prog in strip
41030  do
41031    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41032set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41034$as_echo_n "checking for $ac_word... " >&6; }
41035if ${ac_cv_prog_STRIP+:} false; then :
41036  $as_echo_n "(cached) " >&6
41037else
41038  if test -n "$STRIP"; then
41039  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41040else
41041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41042for as_dir in $PATH
41043do
41044  IFS=$as_save_IFS
41045  test -z "$as_dir" && as_dir=.
41046    for ac_exec_ext in '' $ac_executable_extensions; do
41047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41048    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41050    break 2
41051  fi
41052done
41053  done
41054IFS=$as_save_IFS
41055
41056fi
41057fi
41058STRIP=$ac_cv_prog_STRIP
41059if test -n "$STRIP"; then
41060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41061$as_echo "$STRIP" >&6; }
41062else
41063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41064$as_echo "no" >&6; }
41065fi
41066
41067
41068    test -n "$STRIP" && break
41069  done
41070fi
41071if test -z "$STRIP"; then
41072  ac_ct_STRIP=$STRIP
41073  for ac_prog in strip
41074do
41075  # Extract the first word of "$ac_prog", so it can be a program name with args.
41076set dummy $ac_prog; ac_word=$2
41077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41078$as_echo_n "checking for $ac_word... " >&6; }
41079if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41080  $as_echo_n "(cached) " >&6
41081else
41082  if test -n "$ac_ct_STRIP"; then
41083  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41084else
41085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41086for as_dir in $PATH
41087do
41088  IFS=$as_save_IFS
41089  test -z "$as_dir" && as_dir=.
41090    for ac_exec_ext in '' $ac_executable_extensions; do
41091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41092    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41094    break 2
41095  fi
41096done
41097  done
41098IFS=$as_save_IFS
41099
41100fi
41101fi
41102ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41103if test -n "$ac_ct_STRIP"; then
41104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41105$as_echo "$ac_ct_STRIP" >&6; }
41106else
41107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41108$as_echo "no" >&6; }
41109fi
41110
41111
41112  test -n "$ac_ct_STRIP" && break
41113done
41114
41115  if test "x$ac_ct_STRIP" = x; then
41116    STRIP=""
41117  else
41118    case $cross_compiling:$ac_tool_warned in
41119yes:)
41120{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41121$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41122ac_tool_warned=yes ;;
41123esac
41124    STRIP=$ac_ct_STRIP
41125  fi
41126fi
41127
41128  else
41129    # The variable is set, but is it from the command line or the environment?
41130
41131    # Try to remove the string !STRIP! from our list.
41132    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41133    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41134      # If it failed, the variable was not from the command line. Ignore it,
41135      # but warn the user (except for BASH, which is always set by the calling BASH).
41136      if test "xSTRIP" != xBASH; then
41137        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41138$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41139      fi
41140      # Try to locate tool using the code snippet
41141      if test -n "$ac_tool_prefix"; then
41142  for ac_prog in strip
41143  do
41144    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41145set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41147$as_echo_n "checking for $ac_word... " >&6; }
41148if ${ac_cv_prog_STRIP+:} false; then :
41149  $as_echo_n "(cached) " >&6
41150else
41151  if test -n "$STRIP"; then
41152  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41153else
41154as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41155for as_dir in $PATH
41156do
41157  IFS=$as_save_IFS
41158  test -z "$as_dir" && as_dir=.
41159    for ac_exec_ext in '' $ac_executable_extensions; do
41160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41161    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41163    break 2
41164  fi
41165done
41166  done
41167IFS=$as_save_IFS
41168
41169fi
41170fi
41171STRIP=$ac_cv_prog_STRIP
41172if test -n "$STRIP"; then
41173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41174$as_echo "$STRIP" >&6; }
41175else
41176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41177$as_echo "no" >&6; }
41178fi
41179
41180
41181    test -n "$STRIP" && break
41182  done
41183fi
41184if test -z "$STRIP"; then
41185  ac_ct_STRIP=$STRIP
41186  for ac_prog in strip
41187do
41188  # Extract the first word of "$ac_prog", so it can be a program name with args.
41189set dummy $ac_prog; ac_word=$2
41190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41191$as_echo_n "checking for $ac_word... " >&6; }
41192if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41193  $as_echo_n "(cached) " >&6
41194else
41195  if test -n "$ac_ct_STRIP"; then
41196  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41197else
41198as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41199for as_dir in $PATH
41200do
41201  IFS=$as_save_IFS
41202  test -z "$as_dir" && as_dir=.
41203    for ac_exec_ext in '' $ac_executable_extensions; do
41204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41205    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41207    break 2
41208  fi
41209done
41210  done
41211IFS=$as_save_IFS
41212
41213fi
41214fi
41215ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41216if test -n "$ac_ct_STRIP"; then
41217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41218$as_echo "$ac_ct_STRIP" >&6; }
41219else
41220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41221$as_echo "no" >&6; }
41222fi
41223
41224
41225  test -n "$ac_ct_STRIP" && break
41226done
41227
41228  if test "x$ac_ct_STRIP" = x; then
41229    STRIP=""
41230  else
41231    case $cross_compiling:$ac_tool_warned in
41232yes:)
41233{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41234$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41235ac_tool_warned=yes ;;
41236esac
41237    STRIP=$ac_ct_STRIP
41238  fi
41239fi
41240
41241    else
41242      # If it succeeded, then it was overridden by the user. We will use it
41243      # for the tool.
41244
41245      # First remove it from the list of overridden variables, so we can test
41246      # for unknown variables in the end.
41247      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41248
41249      # Check if we try to supply an empty value
41250      if test "x$STRIP" = x; then
41251        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41252$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41253        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41254$as_echo_n "checking for STRIP... " >&6; }
41255        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41256$as_echo "disabled" >&6; }
41257      else
41258        # Check if the provided tool contains a complete path.
41259        tool_specified="$STRIP"
41260        tool_basename="${tool_specified##*/}"
41261        if test "x$tool_basename" = "x$tool_specified"; then
41262          # A command without a complete path is provided, search $PATH.
41263          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41264$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41265          # Extract the first word of "$tool_basename", so it can be a program name with args.
41266set dummy $tool_basename; ac_word=$2
41267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41268$as_echo_n "checking for $ac_word... " >&6; }
41269if ${ac_cv_path_STRIP+:} false; then :
41270  $as_echo_n "(cached) " >&6
41271else
41272  case $STRIP in
41273  [\\/]* | ?:[\\/]*)
41274  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41275  ;;
41276  *)
41277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41278for as_dir in $PATH
41279do
41280  IFS=$as_save_IFS
41281  test -z "$as_dir" && as_dir=.
41282    for ac_exec_ext in '' $ac_executable_extensions; do
41283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41284    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41286    break 2
41287  fi
41288done
41289  done
41290IFS=$as_save_IFS
41291
41292  ;;
41293esac
41294fi
41295STRIP=$ac_cv_path_STRIP
41296if test -n "$STRIP"; then
41297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41298$as_echo "$STRIP" >&6; }
41299else
41300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41301$as_echo "no" >&6; }
41302fi
41303
41304
41305          if test "x$STRIP" = x; then
41306            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41307          fi
41308        else
41309          # Otherwise we believe it is a complete path. Use it as it is.
41310          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41311$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41312          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41313$as_echo_n "checking for STRIP... " >&6; }
41314          if test ! -x "$tool_specified"; then
41315            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41316$as_echo "not found" >&6; }
41317            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41318          fi
41319          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41320$as_echo "$tool_specified" >&6; }
41321        fi
41322      fi
41323    fi
41324
41325  fi
41326
41327
41328
41329  # Only process if variable expands to non-empty
41330
41331  if test "x$STRIP" != x; then
41332    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41333
41334  # First separate the path from the arguments. This will split at the first
41335  # space.
41336  complete="$STRIP"
41337  path="${complete%% *}"
41338  tmp="$complete EOL"
41339  arguments="${tmp#* }"
41340
41341  # Input might be given as Windows format, start by converting to
41342  # unix format.
41343  new_path=`$CYGPATH -u "$path"`
41344
41345  # Now try to locate executable using which
41346  new_path=`$WHICH "$new_path" 2> /dev/null`
41347  # bat and cmd files are not always considered executable in cygwin causing which
41348  # to not find them
41349  if test "x$new_path" = x \
41350      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41351      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41352    new_path=`$CYGPATH -u "$path"`
41353  fi
41354  if test "x$new_path" = x; then
41355    # Oops. Which didn't find the executable.
41356    # The splitting of arguments from the executable at a space might have been incorrect,
41357    # since paths with space are more likely in Windows. Give it another try with the whole
41358    # argument.
41359    path="$complete"
41360    arguments="EOL"
41361    new_path=`$CYGPATH -u "$path"`
41362    new_path=`$WHICH "$new_path" 2> /dev/null`
41363    # bat and cmd files are not always considered executable in cygwin causing which
41364    # to not find them
41365    if test "x$new_path" = x \
41366        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41367        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41368      new_path=`$CYGPATH -u "$path"`
41369    fi
41370    if test "x$new_path" = x; then
41371      # It's still not found. Now this is an unrecoverable error.
41372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41373$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41374      has_space=`$ECHO "$complete" | $GREP " "`
41375      if test "x$has_space" != x; then
41376        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41377$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41378      fi
41379      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41380    fi
41381  fi
41382
41383  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41384  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41385  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41386  # "foo.exe" is OK but "foo" is an error.
41387  #
41388  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41389  # It is also a way to make sure we got the proper file name for the real test later on.
41390  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41391  if test "x$test_shortpath" = x; then
41392    # Short path failed, file does not exist as specified.
41393    # Try adding .exe or .cmd
41394    if test -f "${new_path}.exe"; then
41395      input_to_shortpath="${new_path}.exe"
41396    elif test -f "${new_path}.cmd"; then
41397      input_to_shortpath="${new_path}.cmd"
41398    else
41399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41400$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41401      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41402$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41403      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41404    fi
41405  else
41406    input_to_shortpath="$new_path"
41407  fi
41408
41409  # Call helper function which possibly converts this using DOS-style short mode.
41410  # If so, the updated path is stored in $new_path.
41411  new_path="$input_to_shortpath"
41412
41413  input_path="$input_to_shortpath"
41414  # Check if we need to convert this using DOS-style short mode. If the path
41415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41416  # take no chances and rewrite it.
41417  # Note: m4 eats our [], so we need to use [ and ] instead.
41418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41419  if test "x$has_forbidden_chars" != x; then
41420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41424      # Going to short mode and back again did indeed matter. Since short mode is
41425      # case insensitive, let's make it lowercase to improve readability.
41426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41427      # Now convert it back to Unix-style (cygpath)
41428      input_path=`$CYGPATH -u "$shortmode_path"`
41429      new_path="$input_path"
41430    fi
41431  fi
41432
41433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41434  if test "x$test_cygdrive_prefix" = x; then
41435    # As a simple fix, exclude /usr/bin since it's not a real path.
41436    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41438      # a path prefixed by /cygdrive for fixpath to work.
41439      new_path="$CYGWIN_ROOT_PATH$input_path"
41440    fi
41441  fi
41442
41443  # remove trailing .exe if any
41444  new_path="${new_path/%.exe/}"
41445
41446    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41447
41448  # First separate the path from the arguments. This will split at the first
41449  # space.
41450  complete="$STRIP"
41451  path="${complete%% *}"
41452  tmp="$complete EOL"
41453  arguments="${tmp#* }"
41454
41455  # Input might be given as Windows format, start by converting to
41456  # unix format.
41457  new_path="$path"
41458
41459  windows_path="$new_path"
41460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41461    unix_path=`$CYGPATH -u "$windows_path"`
41462    new_path="$unix_path"
41463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41465    new_path="$unix_path"
41466  fi
41467
41468
41469  # Now try to locate executable using which
41470  new_path=`$WHICH "$new_path" 2> /dev/null`
41471
41472  if test "x$new_path" = x; then
41473    # Oops. Which didn't find the executable.
41474    # The splitting of arguments from the executable at a space might have been incorrect,
41475    # since paths with space are more likely in Windows. Give it another try with the whole
41476    # argument.
41477    path="$complete"
41478    arguments="EOL"
41479    new_path="$path"
41480
41481  windows_path="$new_path"
41482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41483    unix_path=`$CYGPATH -u "$windows_path"`
41484    new_path="$unix_path"
41485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41487    new_path="$unix_path"
41488  fi
41489
41490
41491    new_path=`$WHICH "$new_path" 2> /dev/null`
41492    # bat and cmd files are not always considered executable in MSYS causing which
41493    # to not find them
41494    if test "x$new_path" = x \
41495        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41496        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41497      new_path="$path"
41498
41499  windows_path="$new_path"
41500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41501    unix_path=`$CYGPATH -u "$windows_path"`
41502    new_path="$unix_path"
41503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41505    new_path="$unix_path"
41506  fi
41507
41508    fi
41509
41510    if test "x$new_path" = x; then
41511      # It's still not found. Now this is an unrecoverable error.
41512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41513$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41514      has_space=`$ECHO "$complete" | $GREP " "`
41515      if test "x$has_space" != x; then
41516        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41517$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41518      fi
41519      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41520    fi
41521  fi
41522
41523  # Now new_path has a complete unix path to the binary
41524  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41525    # Keep paths in /bin as-is, but remove trailing .exe if any
41526    new_path="${new_path/%.exe/}"
41527    # Do not save /bin paths to all_fixpath_prefixes!
41528  else
41529    # Not in mixed or Windows style, start by that.
41530    new_path=`cmd //c echo $new_path`
41531
41532  input_path="$new_path"
41533  # Check if we need to convert this using DOS-style short mode. If the path
41534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41535  # take no chances and rewrite it.
41536  # Note: m4 eats our [], so we need to use [ and ] instead.
41537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41538  if test "x$has_forbidden_chars" != x; then
41539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41540    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41541  fi
41542
41543    # Output is in $new_path
41544
41545  windows_path="$new_path"
41546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41547    unix_path=`$CYGPATH -u "$windows_path"`
41548    new_path="$unix_path"
41549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41551    new_path="$unix_path"
41552  fi
41553
41554    # remove trailing .exe if any
41555    new_path="${new_path/%.exe/}"
41556
41557    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41558    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41559  fi
41560
41561    else
41562      # We're on a unix platform. Hooray! :)
41563      # First separate the path from the arguments. This will split at the first
41564      # space.
41565      complete="$STRIP"
41566      path="${complete%% *}"
41567      tmp="$complete EOL"
41568      arguments="${tmp#* }"
41569
41570      # Cannot rely on the command "which" here since it doesn't always work.
41571      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41572      if test -z "$is_absolute_path"; then
41573        # Path to executable is not absolute. Find it.
41574        IFS_save="$IFS"
41575        IFS=:
41576        for p in $PATH; do
41577          if test -f "$p/$path" && test -x "$p/$path"; then
41578            new_path="$p/$path"
41579            break
41580          fi
41581        done
41582        IFS="$IFS_save"
41583      else
41584        # This is an absolute path, we can use it without further modifications.
41585        new_path="$path"
41586      fi
41587
41588      if test "x$new_path" = x; then
41589        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41590$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41591        has_space=`$ECHO "$complete" | $GREP " "`
41592        if test "x$has_space" != x; then
41593          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41594$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41595        fi
41596        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41597      fi
41598    fi
41599
41600    # Now join together the path and the arguments once again
41601    if test "x$arguments" != xEOL; then
41602      new_complete="$new_path ${arguments% *}"
41603    else
41604      new_complete="$new_path"
41605    fi
41606
41607    if test "x$complete" != "x$new_complete"; then
41608      STRIP="$new_complete"
41609      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41610$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41611    fi
41612  fi
41613
41614    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41615
41616
41617  # Publish this variable in the help.
41618
41619
41620  if [ -z "${NM+x}" ]; then
41621    # The variable is not set by user, try to locate tool using the code snippet
41622    if test -n "$ac_tool_prefix"; then
41623  for ac_prog in nm gcc-nm
41624  do
41625    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41626set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41628$as_echo_n "checking for $ac_word... " >&6; }
41629if ${ac_cv_prog_NM+:} false; then :
41630  $as_echo_n "(cached) " >&6
41631else
41632  if test -n "$NM"; then
41633  ac_cv_prog_NM="$NM" # Let the user override the test.
41634else
41635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41636for as_dir in $PATH
41637do
41638  IFS=$as_save_IFS
41639  test -z "$as_dir" && as_dir=.
41640    for ac_exec_ext in '' $ac_executable_extensions; do
41641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41642    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41644    break 2
41645  fi
41646done
41647  done
41648IFS=$as_save_IFS
41649
41650fi
41651fi
41652NM=$ac_cv_prog_NM
41653if test -n "$NM"; then
41654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41655$as_echo "$NM" >&6; }
41656else
41657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41658$as_echo "no" >&6; }
41659fi
41660
41661
41662    test -n "$NM" && break
41663  done
41664fi
41665if test -z "$NM"; then
41666  ac_ct_NM=$NM
41667  for ac_prog in nm gcc-nm
41668do
41669  # Extract the first word of "$ac_prog", so it can be a program name with args.
41670set dummy $ac_prog; ac_word=$2
41671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41672$as_echo_n "checking for $ac_word... " >&6; }
41673if ${ac_cv_prog_ac_ct_NM+:} false; then :
41674  $as_echo_n "(cached) " >&6
41675else
41676  if test -n "$ac_ct_NM"; then
41677  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41678else
41679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41680for as_dir in $PATH
41681do
41682  IFS=$as_save_IFS
41683  test -z "$as_dir" && as_dir=.
41684    for ac_exec_ext in '' $ac_executable_extensions; do
41685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41686    ac_cv_prog_ac_ct_NM="$ac_prog"
41687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41688    break 2
41689  fi
41690done
41691  done
41692IFS=$as_save_IFS
41693
41694fi
41695fi
41696ac_ct_NM=$ac_cv_prog_ac_ct_NM
41697if test -n "$ac_ct_NM"; then
41698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41699$as_echo "$ac_ct_NM" >&6; }
41700else
41701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41702$as_echo "no" >&6; }
41703fi
41704
41705
41706  test -n "$ac_ct_NM" && break
41707done
41708
41709  if test "x$ac_ct_NM" = x; then
41710    NM=""
41711  else
41712    case $cross_compiling:$ac_tool_warned in
41713yes:)
41714{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41715$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41716ac_tool_warned=yes ;;
41717esac
41718    NM=$ac_ct_NM
41719  fi
41720fi
41721
41722  else
41723    # The variable is set, but is it from the command line or the environment?
41724
41725    # Try to remove the string !NM! from our list.
41726    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41727    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41728      # If it failed, the variable was not from the command line. Ignore it,
41729      # but warn the user (except for BASH, which is always set by the calling BASH).
41730      if test "xNM" != xBASH; then
41731        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41732$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41733      fi
41734      # Try to locate tool using the code snippet
41735      if test -n "$ac_tool_prefix"; then
41736  for ac_prog in nm gcc-nm
41737  do
41738    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41739set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41741$as_echo_n "checking for $ac_word... " >&6; }
41742if ${ac_cv_prog_NM+:} false; then :
41743  $as_echo_n "(cached) " >&6
41744else
41745  if test -n "$NM"; then
41746  ac_cv_prog_NM="$NM" # Let the user override the test.
41747else
41748as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41749for as_dir in $PATH
41750do
41751  IFS=$as_save_IFS
41752  test -z "$as_dir" && as_dir=.
41753    for ac_exec_ext in '' $ac_executable_extensions; do
41754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41755    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41757    break 2
41758  fi
41759done
41760  done
41761IFS=$as_save_IFS
41762
41763fi
41764fi
41765NM=$ac_cv_prog_NM
41766if test -n "$NM"; then
41767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41768$as_echo "$NM" >&6; }
41769else
41770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41771$as_echo "no" >&6; }
41772fi
41773
41774
41775    test -n "$NM" && break
41776  done
41777fi
41778if test -z "$NM"; then
41779  ac_ct_NM=$NM
41780  for ac_prog in nm gcc-nm
41781do
41782  # Extract the first word of "$ac_prog", so it can be a program name with args.
41783set dummy $ac_prog; ac_word=$2
41784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41785$as_echo_n "checking for $ac_word... " >&6; }
41786if ${ac_cv_prog_ac_ct_NM+:} false; then :
41787  $as_echo_n "(cached) " >&6
41788else
41789  if test -n "$ac_ct_NM"; then
41790  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41791else
41792as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41793for as_dir in $PATH
41794do
41795  IFS=$as_save_IFS
41796  test -z "$as_dir" && as_dir=.
41797    for ac_exec_ext in '' $ac_executable_extensions; do
41798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41799    ac_cv_prog_ac_ct_NM="$ac_prog"
41800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41801    break 2
41802  fi
41803done
41804  done
41805IFS=$as_save_IFS
41806
41807fi
41808fi
41809ac_ct_NM=$ac_cv_prog_ac_ct_NM
41810if test -n "$ac_ct_NM"; then
41811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41812$as_echo "$ac_ct_NM" >&6; }
41813else
41814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41815$as_echo "no" >&6; }
41816fi
41817
41818
41819  test -n "$ac_ct_NM" && break
41820done
41821
41822  if test "x$ac_ct_NM" = x; then
41823    NM=""
41824  else
41825    case $cross_compiling:$ac_tool_warned in
41826yes:)
41827{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41828$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41829ac_tool_warned=yes ;;
41830esac
41831    NM=$ac_ct_NM
41832  fi
41833fi
41834
41835    else
41836      # If it succeeded, then it was overridden by the user. We will use it
41837      # for the tool.
41838
41839      # First remove it from the list of overridden variables, so we can test
41840      # for unknown variables in the end.
41841      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41842
41843      # Check if we try to supply an empty value
41844      if test "x$NM" = x; then
41845        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41846$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41847        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41848$as_echo_n "checking for NM... " >&6; }
41849        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41850$as_echo "disabled" >&6; }
41851      else
41852        # Check if the provided tool contains a complete path.
41853        tool_specified="$NM"
41854        tool_basename="${tool_specified##*/}"
41855        if test "x$tool_basename" = "x$tool_specified"; then
41856          # A command without a complete path is provided, search $PATH.
41857          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41858$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41859          # Extract the first word of "$tool_basename", so it can be a program name with args.
41860set dummy $tool_basename; ac_word=$2
41861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41862$as_echo_n "checking for $ac_word... " >&6; }
41863if ${ac_cv_path_NM+:} false; then :
41864  $as_echo_n "(cached) " >&6
41865else
41866  case $NM in
41867  [\\/]* | ?:[\\/]*)
41868  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41869  ;;
41870  *)
41871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41872for as_dir in $PATH
41873do
41874  IFS=$as_save_IFS
41875  test -z "$as_dir" && as_dir=.
41876    for ac_exec_ext in '' $ac_executable_extensions; do
41877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41878    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41880    break 2
41881  fi
41882done
41883  done
41884IFS=$as_save_IFS
41885
41886  ;;
41887esac
41888fi
41889NM=$ac_cv_path_NM
41890if test -n "$NM"; then
41891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41892$as_echo "$NM" >&6; }
41893else
41894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41895$as_echo "no" >&6; }
41896fi
41897
41898
41899          if test "x$NM" = x; then
41900            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41901          fi
41902        else
41903          # Otherwise we believe it is a complete path. Use it as it is.
41904          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41905$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41906          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41907$as_echo_n "checking for NM... " >&6; }
41908          if test ! -x "$tool_specified"; then
41909            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41910$as_echo "not found" >&6; }
41911            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41912          fi
41913          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41914$as_echo "$tool_specified" >&6; }
41915        fi
41916      fi
41917    fi
41918
41919  fi
41920
41921
41922    else
41923
41924
41925  # Publish this variable in the help.
41926
41927
41928  if [ -z "${NM+x}" ]; then
41929    # The variable is not set by user, try to locate tool using the code snippet
41930    if test -n "$ac_tool_prefix"; then
41931  for ac_prog in nm
41932  do
41933    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41934set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41936$as_echo_n "checking for $ac_word... " >&6; }
41937if ${ac_cv_prog_NM+:} false; then :
41938  $as_echo_n "(cached) " >&6
41939else
41940  if test -n "$NM"; then
41941  ac_cv_prog_NM="$NM" # Let the user override the test.
41942else
41943as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41944for as_dir in $PATH
41945do
41946  IFS=$as_save_IFS
41947  test -z "$as_dir" && as_dir=.
41948    for ac_exec_ext in '' $ac_executable_extensions; do
41949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41950    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41952    break 2
41953  fi
41954done
41955  done
41956IFS=$as_save_IFS
41957
41958fi
41959fi
41960NM=$ac_cv_prog_NM
41961if test -n "$NM"; then
41962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41963$as_echo "$NM" >&6; }
41964else
41965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41966$as_echo "no" >&6; }
41967fi
41968
41969
41970    test -n "$NM" && break
41971  done
41972fi
41973if test -z "$NM"; then
41974  ac_ct_NM=$NM
41975  for ac_prog in nm
41976do
41977  # Extract the first word of "$ac_prog", so it can be a program name with args.
41978set dummy $ac_prog; ac_word=$2
41979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41980$as_echo_n "checking for $ac_word... " >&6; }
41981if ${ac_cv_prog_ac_ct_NM+:} false; then :
41982  $as_echo_n "(cached) " >&6
41983else
41984  if test -n "$ac_ct_NM"; then
41985  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41986else
41987as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41988for as_dir in $PATH
41989do
41990  IFS=$as_save_IFS
41991  test -z "$as_dir" && as_dir=.
41992    for ac_exec_ext in '' $ac_executable_extensions; do
41993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41994    ac_cv_prog_ac_ct_NM="$ac_prog"
41995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41996    break 2
41997  fi
41998done
41999  done
42000IFS=$as_save_IFS
42001
42002fi
42003fi
42004ac_ct_NM=$ac_cv_prog_ac_ct_NM
42005if test -n "$ac_ct_NM"; then
42006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42007$as_echo "$ac_ct_NM" >&6; }
42008else
42009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42010$as_echo "no" >&6; }
42011fi
42012
42013
42014  test -n "$ac_ct_NM" && break
42015done
42016
42017  if test "x$ac_ct_NM" = x; then
42018    NM=""
42019  else
42020    case $cross_compiling:$ac_tool_warned in
42021yes:)
42022{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42023$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42024ac_tool_warned=yes ;;
42025esac
42026    NM=$ac_ct_NM
42027  fi
42028fi
42029
42030  else
42031    # The variable is set, but is it from the command line or the environment?
42032
42033    # Try to remove the string !NM! from our list.
42034    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42035    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42036      # If it failed, the variable was not from the command line. Ignore it,
42037      # but warn the user (except for BASH, which is always set by the calling BASH).
42038      if test "xNM" != xBASH; then
42039        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42040$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42041      fi
42042      # Try to locate tool using the code snippet
42043      if test -n "$ac_tool_prefix"; then
42044  for ac_prog in nm
42045  do
42046    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42047set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42049$as_echo_n "checking for $ac_word... " >&6; }
42050if ${ac_cv_prog_NM+:} false; then :
42051  $as_echo_n "(cached) " >&6
42052else
42053  if test -n "$NM"; then
42054  ac_cv_prog_NM="$NM" # Let the user override the test.
42055else
42056as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42057for as_dir in $PATH
42058do
42059  IFS=$as_save_IFS
42060  test -z "$as_dir" && as_dir=.
42061    for ac_exec_ext in '' $ac_executable_extensions; do
42062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42063    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42065    break 2
42066  fi
42067done
42068  done
42069IFS=$as_save_IFS
42070
42071fi
42072fi
42073NM=$ac_cv_prog_NM
42074if test -n "$NM"; then
42075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42076$as_echo "$NM" >&6; }
42077else
42078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42079$as_echo "no" >&6; }
42080fi
42081
42082
42083    test -n "$NM" && break
42084  done
42085fi
42086if test -z "$NM"; then
42087  ac_ct_NM=$NM
42088  for ac_prog in nm
42089do
42090  # Extract the first word of "$ac_prog", so it can be a program name with args.
42091set dummy $ac_prog; ac_word=$2
42092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42093$as_echo_n "checking for $ac_word... " >&6; }
42094if ${ac_cv_prog_ac_ct_NM+:} false; then :
42095  $as_echo_n "(cached) " >&6
42096else
42097  if test -n "$ac_ct_NM"; then
42098  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42099else
42100as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42101for as_dir in $PATH
42102do
42103  IFS=$as_save_IFS
42104  test -z "$as_dir" && as_dir=.
42105    for ac_exec_ext in '' $ac_executable_extensions; do
42106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42107    ac_cv_prog_ac_ct_NM="$ac_prog"
42108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42109    break 2
42110  fi
42111done
42112  done
42113IFS=$as_save_IFS
42114
42115fi
42116fi
42117ac_ct_NM=$ac_cv_prog_ac_ct_NM
42118if test -n "$ac_ct_NM"; then
42119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42120$as_echo "$ac_ct_NM" >&6; }
42121else
42122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42123$as_echo "no" >&6; }
42124fi
42125
42126
42127  test -n "$ac_ct_NM" && break
42128done
42129
42130  if test "x$ac_ct_NM" = x; then
42131    NM=""
42132  else
42133    case $cross_compiling:$ac_tool_warned in
42134yes:)
42135{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42136$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42137ac_tool_warned=yes ;;
42138esac
42139    NM=$ac_ct_NM
42140  fi
42141fi
42142
42143    else
42144      # If it succeeded, then it was overridden by the user. We will use it
42145      # for the tool.
42146
42147      # First remove it from the list of overridden variables, so we can test
42148      # for unknown variables in the end.
42149      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42150
42151      # Check if we try to supply an empty value
42152      if test "x$NM" = x; then
42153        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42154$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42155        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42156$as_echo_n "checking for NM... " >&6; }
42157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42158$as_echo "disabled" >&6; }
42159      else
42160        # Check if the provided tool contains a complete path.
42161        tool_specified="$NM"
42162        tool_basename="${tool_specified##*/}"
42163        if test "x$tool_basename" = "x$tool_specified"; then
42164          # A command without a complete path is provided, search $PATH.
42165          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42166$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42167          # Extract the first word of "$tool_basename", so it can be a program name with args.
42168set dummy $tool_basename; ac_word=$2
42169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42170$as_echo_n "checking for $ac_word... " >&6; }
42171if ${ac_cv_path_NM+:} false; then :
42172  $as_echo_n "(cached) " >&6
42173else
42174  case $NM in
42175  [\\/]* | ?:[\\/]*)
42176  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42177  ;;
42178  *)
42179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42180for as_dir in $PATH
42181do
42182  IFS=$as_save_IFS
42183  test -z "$as_dir" && as_dir=.
42184    for ac_exec_ext in '' $ac_executable_extensions; do
42185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42186    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42188    break 2
42189  fi
42190done
42191  done
42192IFS=$as_save_IFS
42193
42194  ;;
42195esac
42196fi
42197NM=$ac_cv_path_NM
42198if test -n "$NM"; then
42199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42200$as_echo "$NM" >&6; }
42201else
42202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42203$as_echo "no" >&6; }
42204fi
42205
42206
42207          if test "x$NM" = x; then
42208            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42209          fi
42210        else
42211          # Otherwise we believe it is a complete path. Use it as it is.
42212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42213$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42214          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42215$as_echo_n "checking for NM... " >&6; }
42216          if test ! -x "$tool_specified"; then
42217            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42218$as_echo "not found" >&6; }
42219            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42220          fi
42221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42222$as_echo "$tool_specified" >&6; }
42223        fi
42224      fi
42225    fi
42226
42227  fi
42228
42229
42230    fi
42231
42232  # Only process if variable expands to non-empty
42233
42234  if test "x$NM" != x; then
42235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42236
42237  # First separate the path from the arguments. This will split at the first
42238  # space.
42239  complete="$NM"
42240  path="${complete%% *}"
42241  tmp="$complete EOL"
42242  arguments="${tmp#* }"
42243
42244  # Input might be given as Windows format, start by converting to
42245  # unix format.
42246  new_path=`$CYGPATH -u "$path"`
42247
42248  # Now try to locate executable using which
42249  new_path=`$WHICH "$new_path" 2> /dev/null`
42250  # bat and cmd files are not always considered executable in cygwin causing which
42251  # to not find them
42252  if test "x$new_path" = x \
42253      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42254      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42255    new_path=`$CYGPATH -u "$path"`
42256  fi
42257  if test "x$new_path" = x; then
42258    # Oops. Which didn't find the executable.
42259    # The splitting of arguments from the executable at a space might have been incorrect,
42260    # since paths with space are more likely in Windows. Give it another try with the whole
42261    # argument.
42262    path="$complete"
42263    arguments="EOL"
42264    new_path=`$CYGPATH -u "$path"`
42265    new_path=`$WHICH "$new_path" 2> /dev/null`
42266    # bat and cmd files are not always considered executable in cygwin causing which
42267    # to not find them
42268    if test "x$new_path" = x \
42269        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42270        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42271      new_path=`$CYGPATH -u "$path"`
42272    fi
42273    if test "x$new_path" = x; then
42274      # It's still not found. Now this is an unrecoverable error.
42275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42276$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42277      has_space=`$ECHO "$complete" | $GREP " "`
42278      if test "x$has_space" != x; then
42279        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42280$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42281      fi
42282      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42283    fi
42284  fi
42285
42286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42289  # "foo.exe" is OK but "foo" is an error.
42290  #
42291  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42292  # It is also a way to make sure we got the proper file name for the real test later on.
42293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42294  if test "x$test_shortpath" = x; then
42295    # Short path failed, file does not exist as specified.
42296    # Try adding .exe or .cmd
42297    if test -f "${new_path}.exe"; then
42298      input_to_shortpath="${new_path}.exe"
42299    elif test -f "${new_path}.cmd"; then
42300      input_to_shortpath="${new_path}.cmd"
42301    else
42302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42303$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42304      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42305$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42306      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42307    fi
42308  else
42309    input_to_shortpath="$new_path"
42310  fi
42311
42312  # Call helper function which possibly converts this using DOS-style short mode.
42313  # If so, the updated path is stored in $new_path.
42314  new_path="$input_to_shortpath"
42315
42316  input_path="$input_to_shortpath"
42317  # Check if we need to convert this using DOS-style short mode. If the path
42318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42319  # take no chances and rewrite it.
42320  # Note: m4 eats our [], so we need to use [ and ] instead.
42321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42322  if test "x$has_forbidden_chars" != x; then
42323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42327      # Going to short mode and back again did indeed matter. Since short mode is
42328      # case insensitive, let's make it lowercase to improve readability.
42329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42330      # Now convert it back to Unix-style (cygpath)
42331      input_path=`$CYGPATH -u "$shortmode_path"`
42332      new_path="$input_path"
42333    fi
42334  fi
42335
42336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42337  if test "x$test_cygdrive_prefix" = x; then
42338    # As a simple fix, exclude /usr/bin since it's not a real path.
42339    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42341      # a path prefixed by /cygdrive for fixpath to work.
42342      new_path="$CYGWIN_ROOT_PATH$input_path"
42343    fi
42344  fi
42345
42346  # remove trailing .exe if any
42347  new_path="${new_path/%.exe/}"
42348
42349    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42350
42351  # First separate the path from the arguments. This will split at the first
42352  # space.
42353  complete="$NM"
42354  path="${complete%% *}"
42355  tmp="$complete EOL"
42356  arguments="${tmp#* }"
42357
42358  # Input might be given as Windows format, start by converting to
42359  # unix format.
42360  new_path="$path"
42361
42362  windows_path="$new_path"
42363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42364    unix_path=`$CYGPATH -u "$windows_path"`
42365    new_path="$unix_path"
42366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42368    new_path="$unix_path"
42369  fi
42370
42371
42372  # Now try to locate executable using which
42373  new_path=`$WHICH "$new_path" 2> /dev/null`
42374
42375  if test "x$new_path" = x; then
42376    # Oops. Which didn't find the executable.
42377    # The splitting of arguments from the executable at a space might have been incorrect,
42378    # since paths with space are more likely in Windows. Give it another try with the whole
42379    # argument.
42380    path="$complete"
42381    arguments="EOL"
42382    new_path="$path"
42383
42384  windows_path="$new_path"
42385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42386    unix_path=`$CYGPATH -u "$windows_path"`
42387    new_path="$unix_path"
42388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42390    new_path="$unix_path"
42391  fi
42392
42393
42394    new_path=`$WHICH "$new_path" 2> /dev/null`
42395    # bat and cmd files are not always considered executable in MSYS causing which
42396    # to not find them
42397    if test "x$new_path" = x \
42398        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42399        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42400      new_path="$path"
42401
42402  windows_path="$new_path"
42403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42404    unix_path=`$CYGPATH -u "$windows_path"`
42405    new_path="$unix_path"
42406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42408    new_path="$unix_path"
42409  fi
42410
42411    fi
42412
42413    if test "x$new_path" = x; then
42414      # It's still not found. Now this is an unrecoverable error.
42415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42416$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42417      has_space=`$ECHO "$complete" | $GREP " "`
42418      if test "x$has_space" != x; then
42419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42421      fi
42422      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42423    fi
42424  fi
42425
42426  # Now new_path has a complete unix path to the binary
42427  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42428    # Keep paths in /bin as-is, but remove trailing .exe if any
42429    new_path="${new_path/%.exe/}"
42430    # Do not save /bin paths to all_fixpath_prefixes!
42431  else
42432    # Not in mixed or Windows style, start by that.
42433    new_path=`cmd //c echo $new_path`
42434
42435  input_path="$new_path"
42436  # Check if we need to convert this using DOS-style short mode. If the path
42437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42438  # take no chances and rewrite it.
42439  # Note: m4 eats our [], so we need to use [ and ] instead.
42440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42441  if test "x$has_forbidden_chars" != x; then
42442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42444  fi
42445
42446    # Output is in $new_path
42447
42448  windows_path="$new_path"
42449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42450    unix_path=`$CYGPATH -u "$windows_path"`
42451    new_path="$unix_path"
42452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42454    new_path="$unix_path"
42455  fi
42456
42457    # remove trailing .exe if any
42458    new_path="${new_path/%.exe/}"
42459
42460    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42461    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42462  fi
42463
42464    else
42465      # We're on a unix platform. Hooray! :)
42466      # First separate the path from the arguments. This will split at the first
42467      # space.
42468      complete="$NM"
42469      path="${complete%% *}"
42470      tmp="$complete EOL"
42471      arguments="${tmp#* }"
42472
42473      # Cannot rely on the command "which" here since it doesn't always work.
42474      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42475      if test -z "$is_absolute_path"; then
42476        # Path to executable is not absolute. Find it.
42477        IFS_save="$IFS"
42478        IFS=:
42479        for p in $PATH; do
42480          if test -f "$p/$path" && test -x "$p/$path"; then
42481            new_path="$p/$path"
42482            break
42483          fi
42484        done
42485        IFS="$IFS_save"
42486      else
42487        # This is an absolute path, we can use it without further modifications.
42488        new_path="$path"
42489      fi
42490
42491      if test "x$new_path" = x; then
42492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42493$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42494        has_space=`$ECHO "$complete" | $GREP " "`
42495        if test "x$has_space" != x; then
42496          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42497$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42498        fi
42499        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42500      fi
42501    fi
42502
42503    # Now join together the path and the arguments once again
42504    if test "x$arguments" != xEOL; then
42505      new_complete="$new_path ${arguments% *}"
42506    else
42507      new_complete="$new_path"
42508    fi
42509
42510    if test "x$complete" != "x$new_complete"; then
42511      NM="$new_complete"
42512      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42513$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42514    fi
42515  fi
42516
42517    GNM="$NM"
42518
42519  fi
42520
42521  # objcopy is used for moving debug symbols to separate files when
42522  # full debug symbols are enabled.
42523  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42524
42525
42526  # Publish this variable in the help.
42527
42528
42529  if [ -z "${OBJCOPY+x}" ]; then
42530    # The variable is not set by user, try to locate tool using the code snippet
42531    if test -n "$ac_tool_prefix"; then
42532  for ac_prog in gobjcopy objcopy
42533  do
42534    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42535set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42537$as_echo_n "checking for $ac_word... " >&6; }
42538if ${ac_cv_prog_OBJCOPY+:} false; then :
42539  $as_echo_n "(cached) " >&6
42540else
42541  if test -n "$OBJCOPY"; then
42542  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42543else
42544as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42545for as_dir in $PATH
42546do
42547  IFS=$as_save_IFS
42548  test -z "$as_dir" && as_dir=.
42549    for ac_exec_ext in '' $ac_executable_extensions; do
42550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42551    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42553    break 2
42554  fi
42555done
42556  done
42557IFS=$as_save_IFS
42558
42559fi
42560fi
42561OBJCOPY=$ac_cv_prog_OBJCOPY
42562if test -n "$OBJCOPY"; then
42563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42564$as_echo "$OBJCOPY" >&6; }
42565else
42566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42567$as_echo "no" >&6; }
42568fi
42569
42570
42571    test -n "$OBJCOPY" && break
42572  done
42573fi
42574if test -z "$OBJCOPY"; then
42575  ac_ct_OBJCOPY=$OBJCOPY
42576  for ac_prog in gobjcopy objcopy
42577do
42578  # Extract the first word of "$ac_prog", so it can be a program name with args.
42579set dummy $ac_prog; ac_word=$2
42580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42581$as_echo_n "checking for $ac_word... " >&6; }
42582if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42583  $as_echo_n "(cached) " >&6
42584else
42585  if test -n "$ac_ct_OBJCOPY"; then
42586  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42587else
42588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42589for as_dir in $PATH
42590do
42591  IFS=$as_save_IFS
42592  test -z "$as_dir" && as_dir=.
42593    for ac_exec_ext in '' $ac_executable_extensions; do
42594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42595    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42597    break 2
42598  fi
42599done
42600  done
42601IFS=$as_save_IFS
42602
42603fi
42604fi
42605ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42606if test -n "$ac_ct_OBJCOPY"; then
42607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42608$as_echo "$ac_ct_OBJCOPY" >&6; }
42609else
42610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42611$as_echo "no" >&6; }
42612fi
42613
42614
42615  test -n "$ac_ct_OBJCOPY" && break
42616done
42617
42618  if test "x$ac_ct_OBJCOPY" = x; then
42619    OBJCOPY=""
42620  else
42621    case $cross_compiling:$ac_tool_warned in
42622yes:)
42623{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42624$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42625ac_tool_warned=yes ;;
42626esac
42627    OBJCOPY=$ac_ct_OBJCOPY
42628  fi
42629fi
42630
42631  else
42632    # The variable is set, but is it from the command line or the environment?
42633
42634    # Try to remove the string !OBJCOPY! from our list.
42635    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42636    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42637      # If it failed, the variable was not from the command line. Ignore it,
42638      # but warn the user (except for BASH, which is always set by the calling BASH).
42639      if test "xOBJCOPY" != xBASH; then
42640        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42641$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42642      fi
42643      # Try to locate tool using the code snippet
42644      if test -n "$ac_tool_prefix"; then
42645  for ac_prog in gobjcopy objcopy
42646  do
42647    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42648set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42650$as_echo_n "checking for $ac_word... " >&6; }
42651if ${ac_cv_prog_OBJCOPY+:} false; then :
42652  $as_echo_n "(cached) " >&6
42653else
42654  if test -n "$OBJCOPY"; then
42655  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42656else
42657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42658for as_dir in $PATH
42659do
42660  IFS=$as_save_IFS
42661  test -z "$as_dir" && as_dir=.
42662    for ac_exec_ext in '' $ac_executable_extensions; do
42663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42664    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42666    break 2
42667  fi
42668done
42669  done
42670IFS=$as_save_IFS
42671
42672fi
42673fi
42674OBJCOPY=$ac_cv_prog_OBJCOPY
42675if test -n "$OBJCOPY"; then
42676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42677$as_echo "$OBJCOPY" >&6; }
42678else
42679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42680$as_echo "no" >&6; }
42681fi
42682
42683
42684    test -n "$OBJCOPY" && break
42685  done
42686fi
42687if test -z "$OBJCOPY"; then
42688  ac_ct_OBJCOPY=$OBJCOPY
42689  for ac_prog in gobjcopy objcopy
42690do
42691  # Extract the first word of "$ac_prog", so it can be a program name with args.
42692set dummy $ac_prog; ac_word=$2
42693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42694$as_echo_n "checking for $ac_word... " >&6; }
42695if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42696  $as_echo_n "(cached) " >&6
42697else
42698  if test -n "$ac_ct_OBJCOPY"; then
42699  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42700else
42701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42702for as_dir in $PATH
42703do
42704  IFS=$as_save_IFS
42705  test -z "$as_dir" && as_dir=.
42706    for ac_exec_ext in '' $ac_executable_extensions; do
42707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42708    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42710    break 2
42711  fi
42712done
42713  done
42714IFS=$as_save_IFS
42715
42716fi
42717fi
42718ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42719if test -n "$ac_ct_OBJCOPY"; then
42720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42721$as_echo "$ac_ct_OBJCOPY" >&6; }
42722else
42723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42724$as_echo "no" >&6; }
42725fi
42726
42727
42728  test -n "$ac_ct_OBJCOPY" && break
42729done
42730
42731  if test "x$ac_ct_OBJCOPY" = x; then
42732    OBJCOPY=""
42733  else
42734    case $cross_compiling:$ac_tool_warned in
42735yes:)
42736{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42737$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42738ac_tool_warned=yes ;;
42739esac
42740    OBJCOPY=$ac_ct_OBJCOPY
42741  fi
42742fi
42743
42744    else
42745      # If it succeeded, then it was overridden by the user. We will use it
42746      # for the tool.
42747
42748      # First remove it from the list of overridden variables, so we can test
42749      # for unknown variables in the end.
42750      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42751
42752      # Check if we try to supply an empty value
42753      if test "x$OBJCOPY" = x; then
42754        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42755$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42756        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42757$as_echo_n "checking for OBJCOPY... " >&6; }
42758        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42759$as_echo "disabled" >&6; }
42760      else
42761        # Check if the provided tool contains a complete path.
42762        tool_specified="$OBJCOPY"
42763        tool_basename="${tool_specified##*/}"
42764        if test "x$tool_basename" = "x$tool_specified"; then
42765          # A command without a complete path is provided, search $PATH.
42766          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42767$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42768          # Extract the first word of "$tool_basename", so it can be a program name with args.
42769set dummy $tool_basename; ac_word=$2
42770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42771$as_echo_n "checking for $ac_word... " >&6; }
42772if ${ac_cv_path_OBJCOPY+:} false; then :
42773  $as_echo_n "(cached) " >&6
42774else
42775  case $OBJCOPY in
42776  [\\/]* | ?:[\\/]*)
42777  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42778  ;;
42779  *)
42780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42781for as_dir in $PATH
42782do
42783  IFS=$as_save_IFS
42784  test -z "$as_dir" && as_dir=.
42785    for ac_exec_ext in '' $ac_executable_extensions; do
42786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42787    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42789    break 2
42790  fi
42791done
42792  done
42793IFS=$as_save_IFS
42794
42795  ;;
42796esac
42797fi
42798OBJCOPY=$ac_cv_path_OBJCOPY
42799if test -n "$OBJCOPY"; then
42800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42801$as_echo "$OBJCOPY" >&6; }
42802else
42803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42804$as_echo "no" >&6; }
42805fi
42806
42807
42808          if test "x$OBJCOPY" = x; then
42809            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42810          fi
42811        else
42812          # Otherwise we believe it is a complete path. Use it as it is.
42813          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42814$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42815          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42816$as_echo_n "checking for OBJCOPY... " >&6; }
42817          if test ! -x "$tool_specified"; then
42818            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42819$as_echo "not found" >&6; }
42820            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42821          fi
42822          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42823$as_echo "$tool_specified" >&6; }
42824        fi
42825      fi
42826    fi
42827
42828  fi
42829
42830
42831    # Only call fixup if objcopy was found.
42832    if test -n "$OBJCOPY"; then
42833
42834  # Only process if variable expands to non-empty
42835
42836  if test "x$OBJCOPY" != x; then
42837    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42838
42839  # First separate the path from the arguments. This will split at the first
42840  # space.
42841  complete="$OBJCOPY"
42842  path="${complete%% *}"
42843  tmp="$complete EOL"
42844  arguments="${tmp#* }"
42845
42846  # Input might be given as Windows format, start by converting to
42847  # unix format.
42848  new_path=`$CYGPATH -u "$path"`
42849
42850  # Now try to locate executable using which
42851  new_path=`$WHICH "$new_path" 2> /dev/null`
42852  # bat and cmd files are not always considered executable in cygwin causing which
42853  # to not find them
42854  if test "x$new_path" = x \
42855      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42856      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42857    new_path=`$CYGPATH -u "$path"`
42858  fi
42859  if test "x$new_path" = x; then
42860    # Oops. Which didn't find the executable.
42861    # The splitting of arguments from the executable at a space might have been incorrect,
42862    # since paths with space are more likely in Windows. Give it another try with the whole
42863    # argument.
42864    path="$complete"
42865    arguments="EOL"
42866    new_path=`$CYGPATH -u "$path"`
42867    new_path=`$WHICH "$new_path" 2> /dev/null`
42868    # bat and cmd files are not always considered executable in cygwin causing which
42869    # to not find them
42870    if test "x$new_path" = x \
42871        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42872        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42873      new_path=`$CYGPATH -u "$path"`
42874    fi
42875    if test "x$new_path" = x; then
42876      # It's still not found. Now this is an unrecoverable error.
42877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42878$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42879      has_space=`$ECHO "$complete" | $GREP " "`
42880      if test "x$has_space" != x; then
42881        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42882$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42883      fi
42884      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42885    fi
42886  fi
42887
42888  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42889  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42890  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42891  # "foo.exe" is OK but "foo" is an error.
42892  #
42893  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42894  # It is also a way to make sure we got the proper file name for the real test later on.
42895  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42896  if test "x$test_shortpath" = x; then
42897    # Short path failed, file does not exist as specified.
42898    # Try adding .exe or .cmd
42899    if test -f "${new_path}.exe"; then
42900      input_to_shortpath="${new_path}.exe"
42901    elif test -f "${new_path}.cmd"; then
42902      input_to_shortpath="${new_path}.cmd"
42903    else
42904      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42905$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42906      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42907$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42908      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42909    fi
42910  else
42911    input_to_shortpath="$new_path"
42912  fi
42913
42914  # Call helper function which possibly converts this using DOS-style short mode.
42915  # If so, the updated path is stored in $new_path.
42916  new_path="$input_to_shortpath"
42917
42918  input_path="$input_to_shortpath"
42919  # Check if we need to convert this using DOS-style short mode. If the path
42920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42921  # take no chances and rewrite it.
42922  # Note: m4 eats our [], so we need to use [ and ] instead.
42923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42924  if test "x$has_forbidden_chars" != x; then
42925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42926    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42927    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42928    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42929      # Going to short mode and back again did indeed matter. Since short mode is
42930      # case insensitive, let's make it lowercase to improve readability.
42931      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42932      # Now convert it back to Unix-style (cygpath)
42933      input_path=`$CYGPATH -u "$shortmode_path"`
42934      new_path="$input_path"
42935    fi
42936  fi
42937
42938  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42939  if test "x$test_cygdrive_prefix" = x; then
42940    # As a simple fix, exclude /usr/bin since it's not a real path.
42941    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42942      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42943      # a path prefixed by /cygdrive for fixpath to work.
42944      new_path="$CYGWIN_ROOT_PATH$input_path"
42945    fi
42946  fi
42947
42948  # remove trailing .exe if any
42949  new_path="${new_path/%.exe/}"
42950
42951    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42952
42953  # First separate the path from the arguments. This will split at the first
42954  # space.
42955  complete="$OBJCOPY"
42956  path="${complete%% *}"
42957  tmp="$complete EOL"
42958  arguments="${tmp#* }"
42959
42960  # Input might be given as Windows format, start by converting to
42961  # unix format.
42962  new_path="$path"
42963
42964  windows_path="$new_path"
42965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42966    unix_path=`$CYGPATH -u "$windows_path"`
42967    new_path="$unix_path"
42968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42970    new_path="$unix_path"
42971  fi
42972
42973
42974  # Now try to locate executable using which
42975  new_path=`$WHICH "$new_path" 2> /dev/null`
42976
42977  if test "x$new_path" = x; then
42978    # Oops. Which didn't find the executable.
42979    # The splitting of arguments from the executable at a space might have been incorrect,
42980    # since paths with space are more likely in Windows. Give it another try with the whole
42981    # argument.
42982    path="$complete"
42983    arguments="EOL"
42984    new_path="$path"
42985
42986  windows_path="$new_path"
42987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42988    unix_path=`$CYGPATH -u "$windows_path"`
42989    new_path="$unix_path"
42990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42992    new_path="$unix_path"
42993  fi
42994
42995
42996    new_path=`$WHICH "$new_path" 2> /dev/null`
42997    # bat and cmd files are not always considered executable in MSYS causing which
42998    # to not find them
42999    if test "x$new_path" = x \
43000        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43001        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43002      new_path="$path"
43003
43004  windows_path="$new_path"
43005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43006    unix_path=`$CYGPATH -u "$windows_path"`
43007    new_path="$unix_path"
43008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43010    new_path="$unix_path"
43011  fi
43012
43013    fi
43014
43015    if test "x$new_path" = x; then
43016      # It's still not found. Now this is an unrecoverable error.
43017      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43018$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43019      has_space=`$ECHO "$complete" | $GREP " "`
43020      if test "x$has_space" != x; then
43021        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43022$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43023      fi
43024      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43025    fi
43026  fi
43027
43028  # Now new_path has a complete unix path to the binary
43029  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43030    # Keep paths in /bin as-is, but remove trailing .exe if any
43031    new_path="${new_path/%.exe/}"
43032    # Do not save /bin paths to all_fixpath_prefixes!
43033  else
43034    # Not in mixed or Windows style, start by that.
43035    new_path=`cmd //c echo $new_path`
43036
43037  input_path="$new_path"
43038  # Check if we need to convert this using DOS-style short mode. If the path
43039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43040  # take no chances and rewrite it.
43041  # Note: m4 eats our [], so we need to use [ and ] instead.
43042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43043  if test "x$has_forbidden_chars" != x; then
43044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43045    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43046  fi
43047
43048    # Output is in $new_path
43049
43050  windows_path="$new_path"
43051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43052    unix_path=`$CYGPATH -u "$windows_path"`
43053    new_path="$unix_path"
43054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43056    new_path="$unix_path"
43057  fi
43058
43059    # remove trailing .exe if any
43060    new_path="${new_path/%.exe/}"
43061
43062    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43063    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43064  fi
43065
43066    else
43067      # We're on a unix platform. Hooray! :)
43068      # First separate the path from the arguments. This will split at the first
43069      # space.
43070      complete="$OBJCOPY"
43071      path="${complete%% *}"
43072      tmp="$complete EOL"
43073      arguments="${tmp#* }"
43074
43075      # Cannot rely on the command "which" here since it doesn't always work.
43076      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43077      if test -z "$is_absolute_path"; then
43078        # Path to executable is not absolute. Find it.
43079        IFS_save="$IFS"
43080        IFS=:
43081        for p in $PATH; do
43082          if test -f "$p/$path" && test -x "$p/$path"; then
43083            new_path="$p/$path"
43084            break
43085          fi
43086        done
43087        IFS="$IFS_save"
43088      else
43089        # This is an absolute path, we can use it without further modifications.
43090        new_path="$path"
43091      fi
43092
43093      if test "x$new_path" = x; then
43094        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43095$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43096        has_space=`$ECHO "$complete" | $GREP " "`
43097        if test "x$has_space" != x; then
43098          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43099$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43100        fi
43101        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43102      fi
43103    fi
43104
43105    # Now join together the path and the arguments once again
43106    if test "x$arguments" != xEOL; then
43107      new_complete="$new_path ${arguments% *}"
43108    else
43109      new_complete="$new_path"
43110    fi
43111
43112    if test "x$complete" != "x$new_complete"; then
43113      OBJCOPY="$new_complete"
43114      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43115$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43116    fi
43117  fi
43118
43119      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43120        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43121        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43122        # - version number is last blank separate word on first line
43123        # - version number formats that have been seen:
43124        #   - <major>.<minor>
43125        #   - <major>.<minor>.<micro>
43126        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43127        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43128         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43129              -e 's/.* //' \
43130              -e '/^[01]\./b bad' \
43131              -e '/^2\./{' \
43132              -e '  s/^2\.//' \
43133              -e '  /^[0-9]$/b bad' \
43134              -e '  /^[0-9]\./b bad' \
43135              -e '  /^1[0-9]$/b bad' \
43136              -e '  /^1[0-9]\./b bad' \
43137              -e '  /^20\./b bad' \
43138              -e '  /^21\.0$/b bad' \
43139              -e '  /^21\.0\./b bad' \
43140              -e '}' \
43141              -e ':good' \
43142              -e 's/.*/VALID_VERSION/p' \
43143              -e 'q' \
43144              -e ':bad' \
43145              -e 's/.*/BAD_VERSION/p' \
43146              -e 'q'`
43147        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43148          OBJCOPY=
43149          { $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
43150$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43151          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43152$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43153          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43154$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43155          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43156$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43157          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43158$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43159        fi
43160      fi
43161    fi
43162  fi
43163
43164
43165
43166  # Publish this variable in the help.
43167
43168
43169  if [ -z "${OBJDUMP+x}" ]; then
43170    # The variable is not set by user, try to locate tool using the code snippet
43171    if test -n "$ac_tool_prefix"; then
43172  for ac_prog in gobjdump objdump
43173  do
43174    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43175set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43177$as_echo_n "checking for $ac_word... " >&6; }
43178if ${ac_cv_prog_OBJDUMP+:} false; then :
43179  $as_echo_n "(cached) " >&6
43180else
43181  if test -n "$OBJDUMP"; then
43182  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43183else
43184as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43185for as_dir in $PATH
43186do
43187  IFS=$as_save_IFS
43188  test -z "$as_dir" && as_dir=.
43189    for ac_exec_ext in '' $ac_executable_extensions; do
43190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43191    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43193    break 2
43194  fi
43195done
43196  done
43197IFS=$as_save_IFS
43198
43199fi
43200fi
43201OBJDUMP=$ac_cv_prog_OBJDUMP
43202if test -n "$OBJDUMP"; then
43203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43204$as_echo "$OBJDUMP" >&6; }
43205else
43206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43207$as_echo "no" >&6; }
43208fi
43209
43210
43211    test -n "$OBJDUMP" && break
43212  done
43213fi
43214if test -z "$OBJDUMP"; then
43215  ac_ct_OBJDUMP=$OBJDUMP
43216  for ac_prog in gobjdump objdump
43217do
43218  # Extract the first word of "$ac_prog", so it can be a program name with args.
43219set dummy $ac_prog; ac_word=$2
43220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43221$as_echo_n "checking for $ac_word... " >&6; }
43222if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43223  $as_echo_n "(cached) " >&6
43224else
43225  if test -n "$ac_ct_OBJDUMP"; then
43226  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43227else
43228as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43229for as_dir in $PATH
43230do
43231  IFS=$as_save_IFS
43232  test -z "$as_dir" && as_dir=.
43233    for ac_exec_ext in '' $ac_executable_extensions; do
43234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43235    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43237    break 2
43238  fi
43239done
43240  done
43241IFS=$as_save_IFS
43242
43243fi
43244fi
43245ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43246if test -n "$ac_ct_OBJDUMP"; then
43247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43248$as_echo "$ac_ct_OBJDUMP" >&6; }
43249else
43250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43251$as_echo "no" >&6; }
43252fi
43253
43254
43255  test -n "$ac_ct_OBJDUMP" && break
43256done
43257
43258  if test "x$ac_ct_OBJDUMP" = x; then
43259    OBJDUMP=""
43260  else
43261    case $cross_compiling:$ac_tool_warned in
43262yes:)
43263{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43264$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43265ac_tool_warned=yes ;;
43266esac
43267    OBJDUMP=$ac_ct_OBJDUMP
43268  fi
43269fi
43270
43271  else
43272    # The variable is set, but is it from the command line or the environment?
43273
43274    # Try to remove the string !OBJDUMP! from our list.
43275    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43276    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43277      # If it failed, the variable was not from the command line. Ignore it,
43278      # but warn the user (except for BASH, which is always set by the calling BASH).
43279      if test "xOBJDUMP" != xBASH; then
43280        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43281$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43282      fi
43283      # Try to locate tool using the code snippet
43284      if test -n "$ac_tool_prefix"; then
43285  for ac_prog in gobjdump objdump
43286  do
43287    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43288set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43290$as_echo_n "checking for $ac_word... " >&6; }
43291if ${ac_cv_prog_OBJDUMP+:} false; then :
43292  $as_echo_n "(cached) " >&6
43293else
43294  if test -n "$OBJDUMP"; then
43295  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43296else
43297as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43298for as_dir in $PATH
43299do
43300  IFS=$as_save_IFS
43301  test -z "$as_dir" && as_dir=.
43302    for ac_exec_ext in '' $ac_executable_extensions; do
43303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43304    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43306    break 2
43307  fi
43308done
43309  done
43310IFS=$as_save_IFS
43311
43312fi
43313fi
43314OBJDUMP=$ac_cv_prog_OBJDUMP
43315if test -n "$OBJDUMP"; then
43316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43317$as_echo "$OBJDUMP" >&6; }
43318else
43319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43320$as_echo "no" >&6; }
43321fi
43322
43323
43324    test -n "$OBJDUMP" && break
43325  done
43326fi
43327if test -z "$OBJDUMP"; then
43328  ac_ct_OBJDUMP=$OBJDUMP
43329  for ac_prog in gobjdump objdump
43330do
43331  # Extract the first word of "$ac_prog", so it can be a program name with args.
43332set dummy $ac_prog; ac_word=$2
43333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43334$as_echo_n "checking for $ac_word... " >&6; }
43335if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43336  $as_echo_n "(cached) " >&6
43337else
43338  if test -n "$ac_ct_OBJDUMP"; then
43339  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43340else
43341as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43342for as_dir in $PATH
43343do
43344  IFS=$as_save_IFS
43345  test -z "$as_dir" && as_dir=.
43346    for ac_exec_ext in '' $ac_executable_extensions; do
43347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43348    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43350    break 2
43351  fi
43352done
43353  done
43354IFS=$as_save_IFS
43355
43356fi
43357fi
43358ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43359if test -n "$ac_ct_OBJDUMP"; then
43360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43361$as_echo "$ac_ct_OBJDUMP" >&6; }
43362else
43363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43364$as_echo "no" >&6; }
43365fi
43366
43367
43368  test -n "$ac_ct_OBJDUMP" && break
43369done
43370
43371  if test "x$ac_ct_OBJDUMP" = x; then
43372    OBJDUMP=""
43373  else
43374    case $cross_compiling:$ac_tool_warned in
43375yes:)
43376{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43377$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43378ac_tool_warned=yes ;;
43379esac
43380    OBJDUMP=$ac_ct_OBJDUMP
43381  fi
43382fi
43383
43384    else
43385      # If it succeeded, then it was overridden by the user. We will use it
43386      # for the tool.
43387
43388      # First remove it from the list of overridden variables, so we can test
43389      # for unknown variables in the end.
43390      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43391
43392      # Check if we try to supply an empty value
43393      if test "x$OBJDUMP" = x; then
43394        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43395$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43396        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43397$as_echo_n "checking for OBJDUMP... " >&6; }
43398        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43399$as_echo "disabled" >&6; }
43400      else
43401        # Check if the provided tool contains a complete path.
43402        tool_specified="$OBJDUMP"
43403        tool_basename="${tool_specified##*/}"
43404        if test "x$tool_basename" = "x$tool_specified"; then
43405          # A command without a complete path is provided, search $PATH.
43406          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43407$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43408          # Extract the first word of "$tool_basename", so it can be a program name with args.
43409set dummy $tool_basename; ac_word=$2
43410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43411$as_echo_n "checking for $ac_word... " >&6; }
43412if ${ac_cv_path_OBJDUMP+:} false; then :
43413  $as_echo_n "(cached) " >&6
43414else
43415  case $OBJDUMP in
43416  [\\/]* | ?:[\\/]*)
43417  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43418  ;;
43419  *)
43420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43421for as_dir in $PATH
43422do
43423  IFS=$as_save_IFS
43424  test -z "$as_dir" && as_dir=.
43425    for ac_exec_ext in '' $ac_executable_extensions; do
43426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43427    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43429    break 2
43430  fi
43431done
43432  done
43433IFS=$as_save_IFS
43434
43435  ;;
43436esac
43437fi
43438OBJDUMP=$ac_cv_path_OBJDUMP
43439if test -n "$OBJDUMP"; then
43440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43441$as_echo "$OBJDUMP" >&6; }
43442else
43443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43444$as_echo "no" >&6; }
43445fi
43446
43447
43448          if test "x$OBJDUMP" = x; then
43449            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43450          fi
43451        else
43452          # Otherwise we believe it is a complete path. Use it as it is.
43453          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43454$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43455          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43456$as_echo_n "checking for OBJDUMP... " >&6; }
43457          if test ! -x "$tool_specified"; then
43458            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43459$as_echo "not found" >&6; }
43460            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43461          fi
43462          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43463$as_echo "$tool_specified" >&6; }
43464        fi
43465      fi
43466    fi
43467
43468  fi
43469
43470
43471  if test "x$OBJDUMP" != x; then
43472    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43473    # bails if argument is missing.
43474
43475  # Only process if variable expands to non-empty
43476
43477  if test "x$OBJDUMP" != x; then
43478    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43479
43480  # First separate the path from the arguments. This will split at the first
43481  # space.
43482  complete="$OBJDUMP"
43483  path="${complete%% *}"
43484  tmp="$complete EOL"
43485  arguments="${tmp#* }"
43486
43487  # Input might be given as Windows format, start by converting to
43488  # unix format.
43489  new_path=`$CYGPATH -u "$path"`
43490
43491  # Now try to locate executable using which
43492  new_path=`$WHICH "$new_path" 2> /dev/null`
43493  # bat and cmd files are not always considered executable in cygwin causing which
43494  # to not find them
43495  if test "x$new_path" = x \
43496      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43497      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43498    new_path=`$CYGPATH -u "$path"`
43499  fi
43500  if test "x$new_path" = x; then
43501    # Oops. Which didn't find the executable.
43502    # The splitting of arguments from the executable at a space might have been incorrect,
43503    # since paths with space are more likely in Windows. Give it another try with the whole
43504    # argument.
43505    path="$complete"
43506    arguments="EOL"
43507    new_path=`$CYGPATH -u "$path"`
43508    new_path=`$WHICH "$new_path" 2> /dev/null`
43509    # bat and cmd files are not always considered executable in cygwin causing which
43510    # to not find them
43511    if test "x$new_path" = x \
43512        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43513        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43514      new_path=`$CYGPATH -u "$path"`
43515    fi
43516    if test "x$new_path" = x; then
43517      # It's still not found. Now this is an unrecoverable error.
43518      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43519$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43520      has_space=`$ECHO "$complete" | $GREP " "`
43521      if test "x$has_space" != x; then
43522        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43523$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43524      fi
43525      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43526    fi
43527  fi
43528
43529  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43530  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43531  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43532  # "foo.exe" is OK but "foo" is an error.
43533  #
43534  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43535  # It is also a way to make sure we got the proper file name for the real test later on.
43536  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43537  if test "x$test_shortpath" = x; then
43538    # Short path failed, file does not exist as specified.
43539    # Try adding .exe or .cmd
43540    if test -f "${new_path}.exe"; then
43541      input_to_shortpath="${new_path}.exe"
43542    elif test -f "${new_path}.cmd"; then
43543      input_to_shortpath="${new_path}.cmd"
43544    else
43545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43546$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43547      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43548$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43549      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43550    fi
43551  else
43552    input_to_shortpath="$new_path"
43553  fi
43554
43555  # Call helper function which possibly converts this using DOS-style short mode.
43556  # If so, the updated path is stored in $new_path.
43557  new_path="$input_to_shortpath"
43558
43559  input_path="$input_to_shortpath"
43560  # Check if we need to convert this using DOS-style short mode. If the path
43561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43562  # take no chances and rewrite it.
43563  # Note: m4 eats our [], so we need to use [ and ] instead.
43564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43565  if test "x$has_forbidden_chars" != x; then
43566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43567    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43568    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43569    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43570      # Going to short mode and back again did indeed matter. Since short mode is
43571      # case insensitive, let's make it lowercase to improve readability.
43572      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43573      # Now convert it back to Unix-style (cygpath)
43574      input_path=`$CYGPATH -u "$shortmode_path"`
43575      new_path="$input_path"
43576    fi
43577  fi
43578
43579  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43580  if test "x$test_cygdrive_prefix" = x; then
43581    # As a simple fix, exclude /usr/bin since it's not a real path.
43582    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43583      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43584      # a path prefixed by /cygdrive for fixpath to work.
43585      new_path="$CYGWIN_ROOT_PATH$input_path"
43586    fi
43587  fi
43588
43589  # remove trailing .exe if any
43590  new_path="${new_path/%.exe/}"
43591
43592    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43593
43594  # First separate the path from the arguments. This will split at the first
43595  # space.
43596  complete="$OBJDUMP"
43597  path="${complete%% *}"
43598  tmp="$complete EOL"
43599  arguments="${tmp#* }"
43600
43601  # Input might be given as Windows format, start by converting to
43602  # unix format.
43603  new_path="$path"
43604
43605  windows_path="$new_path"
43606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43607    unix_path=`$CYGPATH -u "$windows_path"`
43608    new_path="$unix_path"
43609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43611    new_path="$unix_path"
43612  fi
43613
43614
43615  # Now try to locate executable using which
43616  new_path=`$WHICH "$new_path" 2> /dev/null`
43617
43618  if test "x$new_path" = x; then
43619    # Oops. Which didn't find the executable.
43620    # The splitting of arguments from the executable at a space might have been incorrect,
43621    # since paths with space are more likely in Windows. Give it another try with the whole
43622    # argument.
43623    path="$complete"
43624    arguments="EOL"
43625    new_path="$path"
43626
43627  windows_path="$new_path"
43628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43629    unix_path=`$CYGPATH -u "$windows_path"`
43630    new_path="$unix_path"
43631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43633    new_path="$unix_path"
43634  fi
43635
43636
43637    new_path=`$WHICH "$new_path" 2> /dev/null`
43638    # bat and cmd files are not always considered executable in MSYS causing which
43639    # to not find them
43640    if test "x$new_path" = x \
43641        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43642        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43643      new_path="$path"
43644
43645  windows_path="$new_path"
43646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43647    unix_path=`$CYGPATH -u "$windows_path"`
43648    new_path="$unix_path"
43649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43651    new_path="$unix_path"
43652  fi
43653
43654    fi
43655
43656    if test "x$new_path" = x; then
43657      # It's still not found. Now this is an unrecoverable error.
43658      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43659$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43660      has_space=`$ECHO "$complete" | $GREP " "`
43661      if test "x$has_space" != x; then
43662        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43663$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43664      fi
43665      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43666    fi
43667  fi
43668
43669  # Now new_path has a complete unix path to the binary
43670  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43671    # Keep paths in /bin as-is, but remove trailing .exe if any
43672    new_path="${new_path/%.exe/}"
43673    # Do not save /bin paths to all_fixpath_prefixes!
43674  else
43675    # Not in mixed or Windows style, start by that.
43676    new_path=`cmd //c echo $new_path`
43677
43678  input_path="$new_path"
43679  # Check if we need to convert this using DOS-style short mode. If the path
43680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43681  # take no chances and rewrite it.
43682  # Note: m4 eats our [], so we need to use [ and ] instead.
43683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43684  if test "x$has_forbidden_chars" != x; then
43685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43686    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43687  fi
43688
43689    # Output is in $new_path
43690
43691  windows_path="$new_path"
43692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43693    unix_path=`$CYGPATH -u "$windows_path"`
43694    new_path="$unix_path"
43695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43697    new_path="$unix_path"
43698  fi
43699
43700    # remove trailing .exe if any
43701    new_path="${new_path/%.exe/}"
43702
43703    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43704    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43705  fi
43706
43707    else
43708      # We're on a unix platform. Hooray! :)
43709      # First separate the path from the arguments. This will split at the first
43710      # space.
43711      complete="$OBJDUMP"
43712      path="${complete%% *}"
43713      tmp="$complete EOL"
43714      arguments="${tmp#* }"
43715
43716      # Cannot rely on the command "which" here since it doesn't always work.
43717      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43718      if test -z "$is_absolute_path"; then
43719        # Path to executable is not absolute. Find it.
43720        IFS_save="$IFS"
43721        IFS=:
43722        for p in $PATH; do
43723          if test -f "$p/$path" && test -x "$p/$path"; then
43724            new_path="$p/$path"
43725            break
43726          fi
43727        done
43728        IFS="$IFS_save"
43729      else
43730        # This is an absolute path, we can use it without further modifications.
43731        new_path="$path"
43732      fi
43733
43734      if test "x$new_path" = x; then
43735        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43736$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43737        has_space=`$ECHO "$complete" | $GREP " "`
43738        if test "x$has_space" != x; then
43739          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43740$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43741        fi
43742        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43743      fi
43744    fi
43745
43746    # Now join together the path and the arguments once again
43747    if test "x$arguments" != xEOL; then
43748      new_complete="$new_path ${arguments% *}"
43749    else
43750      new_complete="$new_path"
43751    fi
43752
43753    if test "x$complete" != "x$new_complete"; then
43754      OBJDUMP="$new_complete"
43755      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43756$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43757    fi
43758  fi
43759
43760  fi
43761
43762
43763  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43764  # to remain in place. Otherwise the compiler will not work in some siutations
43765  # in later configure checks.
43766  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43767    PATH="$OLD_PATH"
43768  fi
43769
43770  # Restore the flags to the user specified values.
43771  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43772  CFLAGS="$ORG_CFLAGS"
43773  CXXFLAGS="$ORG_CXXFLAGS"
43774
43775
43776# Finally do some processing after the detection phase
43777
43778  if test "x$COMPILE_TYPE" = "xcross"; then
43779    # Now we need to find a C/C++ compiler that can build executables for the
43780    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43781    # used once. Also, we need to do this without adding a tools dir to the
43782    # path, otherwise we might pick up cross-compilers which don't use standard
43783    # naming.
43784
43785    OLDPATH="$PATH"
43786
43787
43788# Check whether --with-build-devkit was given.
43789if test "${with_build_devkit+set}" = set; then :
43790  withval=$with_build_devkit;
43791fi
43792
43793    if test "x$with_build_devkit" = "xyes"; then
43794      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43795    elif test -n "$with_build_devkit"; then
43796      if test ! -d "$with_build_devkit"; then
43797        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43798      else
43799
43800  # Only process if variable expands to non-empty
43801
43802  if test "x$with_build_devkit" != x; then
43803    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43804
43805  # Input might be given as Windows format, start by converting to
43806  # unix format.
43807  path="$with_build_devkit"
43808  new_path=`$CYGPATH -u "$path"`
43809
43810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43813  # "foo.exe" is OK but "foo" is an error.
43814  #
43815  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43816  # It is also a way to make sure we got the proper file name for the real test later on.
43817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43818  if test "x$test_shortpath" = x; then
43819    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43820$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43821    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43822  fi
43823
43824  # Call helper function which possibly converts this using DOS-style short mode.
43825  # If so, the updated path is stored in $new_path.
43826
43827  input_path="$new_path"
43828  # Check if we need to convert this using DOS-style short mode. If the path
43829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43830  # take no chances and rewrite it.
43831  # Note: m4 eats our [], so we need to use [ and ] instead.
43832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43833  if test "x$has_forbidden_chars" != x; then
43834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43838      # Going to short mode and back again did indeed matter. Since short mode is
43839      # case insensitive, let's make it lowercase to improve readability.
43840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43841      # Now convert it back to Unix-style (cygpath)
43842      input_path=`$CYGPATH -u "$shortmode_path"`
43843      new_path="$input_path"
43844    fi
43845  fi
43846
43847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43848  if test "x$test_cygdrive_prefix" = x; then
43849    # As a simple fix, exclude /usr/bin since it's not a real path.
43850    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43852      # a path prefixed by /cygdrive for fixpath to work.
43853      new_path="$CYGWIN_ROOT_PATH$input_path"
43854    fi
43855  fi
43856
43857
43858  if test "x$path" != "x$new_path"; then
43859    with_build_devkit="$new_path"
43860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43861$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43862  fi
43863
43864    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43865
43866  path="$with_build_devkit"
43867  has_colon=`$ECHO $path | $GREP ^.:`
43868  new_path="$path"
43869  if test "x$has_colon" = x; then
43870    # Not in mixed or Windows style, start by that.
43871    new_path=`cmd //c echo $path`
43872  fi
43873
43874
43875  input_path="$new_path"
43876  # Check if we need to convert this using DOS-style short mode. If the path
43877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43878  # take no chances and rewrite it.
43879  # Note: m4 eats our [], so we need to use [ and ] instead.
43880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43881  if test "x$has_forbidden_chars" != x; then
43882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43883    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43884  fi
43885
43886
43887  windows_path="$new_path"
43888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43889    unix_path=`$CYGPATH -u "$windows_path"`
43890    new_path="$unix_path"
43891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43893    new_path="$unix_path"
43894  fi
43895
43896  if test "x$path" != "x$new_path"; then
43897    with_build_devkit="$new_path"
43898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43899$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43900  fi
43901
43902  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43903  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43904
43905    else
43906      # We're on a unix platform. Hooray! :)
43907      path="$with_build_devkit"
43908      has_space=`$ECHO "$path" | $GREP " "`
43909      if test "x$has_space" != x; then
43910        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43911$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43912        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43913      fi
43914
43915      # Use eval to expand a potential ~
43916      eval path="$path"
43917      if test ! -f "$path" && test ! -d "$path"; then
43918        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43919      fi
43920
43921      if test -d "$path"; then
43922        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43923      else
43924        dir="`$DIRNAME "$path"`"
43925        base="`$BASENAME "$path"`"
43926        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43927      fi
43928    fi
43929  fi
43930
43931        BUILD_DEVKIT_ROOT="$with_build_devkit"
43932        # Check for a meta data info file in the root of the devkit
43933        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43934          # Process devkit.info so that existing devkit variables are not
43935          # modified by this
43936          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43937              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43938              -e "s/\$host/\$build/g" \
43939              $BUILD_DEVKIT_ROOT/devkit.info \
43940              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43941          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43942          # This potentially sets the following:
43943          # A descriptive name of the devkit
43944
43945  if test "x$BUILD_DEVKIT_NAME" = x; then
43946    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43947  fi
43948
43949          # Corresponds to --with-extra-path
43950
43951  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43952    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43953  fi
43954
43955          # Corresponds to --with-toolchain-path
43956
43957  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43958    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43959  fi
43960
43961          # Corresponds to --with-sysroot
43962
43963  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43964    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43965  fi
43966
43967          # Skip the Window specific parts
43968        fi
43969
43970        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43971$as_echo_n "checking for build platform devkit... " >&6; }
43972        if test "x$BUILD_DEVKIT_NAME" != x; then
43973          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43974$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43975        else
43976          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43977$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43978        fi
43979
43980        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43981
43982  if test "x$BUILD_SYSROOT" != "x"; then
43983    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43984      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43985        # Solaris Studio does not have a concept of sysroot. Instead we must
43986        # make sure the default include and lib dirs are appended to each
43987        # compile and link command line. Must also add -I-xbuiltin to enable
43988        # inlining of system functions and intrinsics.
43989        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43990        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43991            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
43992      fi
43993    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43994      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43995      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43996    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43997      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43998      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43999    fi
44000    # Propagate the sysroot args to hotspot
44001    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
44002    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44003    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44004    # The global CFLAGS and LDFLAGS variables need these for configure to function
44005    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44006    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44007    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44008    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44009  fi
44010
44011  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44012    # We also need -iframework<path>/System/Library/Frameworks
44013    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44014    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44015    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44016    # set this here so it doesn't have to be peppered throughout the forest
44017    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44018    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44019  fi
44020
44021
44022
44023
44024
44025         # Fallback default of just /bin if DEVKIT_PATH is not defined
44026        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44027          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44028        fi
44029        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44030      fi
44031    fi
44032
44033    # FIXME: we should list the discovered compilers as an exclude pattern!
44034    # If we do that, we can do this detection before POST_DETECTION, and still
44035    # find the build compilers in the tools dir, if needed.
44036
44037
44038
44039  # Publish this variable in the help.
44040
44041
44042  if [ -z "${BUILD_CC+x}" ]; then
44043    # The variable is not set by user, try to locate tool using the code snippet
44044    for ac_prog in cl cc gcc
44045do
44046  # Extract the first word of "$ac_prog", so it can be a program name with args.
44047set dummy $ac_prog; ac_word=$2
44048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44049$as_echo_n "checking for $ac_word... " >&6; }
44050if ${ac_cv_path_BUILD_CC+:} false; then :
44051  $as_echo_n "(cached) " >&6
44052else
44053  case $BUILD_CC in
44054  [\\/]* | ?:[\\/]*)
44055  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44056  ;;
44057  *)
44058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44059for as_dir in $PATH
44060do
44061  IFS=$as_save_IFS
44062  test -z "$as_dir" && as_dir=.
44063    for ac_exec_ext in '' $ac_executable_extensions; do
44064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44065    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44067    break 2
44068  fi
44069done
44070  done
44071IFS=$as_save_IFS
44072
44073  ;;
44074esac
44075fi
44076BUILD_CC=$ac_cv_path_BUILD_CC
44077if test -n "$BUILD_CC"; then
44078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44079$as_echo "$BUILD_CC" >&6; }
44080else
44081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44082$as_echo "no" >&6; }
44083fi
44084
44085
44086  test -n "$BUILD_CC" && break
44087done
44088
44089  else
44090    # The variable is set, but is it from the command line or the environment?
44091
44092    # Try to remove the string !BUILD_CC! from our list.
44093    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44094    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44095      # If it failed, the variable was not from the command line. Ignore it,
44096      # but warn the user (except for BASH, which is always set by the calling BASH).
44097      if test "xBUILD_CC" != xBASH; then
44098        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44099$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44100      fi
44101      # Try to locate tool using the code snippet
44102      for ac_prog in cl cc gcc
44103do
44104  # Extract the first word of "$ac_prog", so it can be a program name with args.
44105set dummy $ac_prog; ac_word=$2
44106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44107$as_echo_n "checking for $ac_word... " >&6; }
44108if ${ac_cv_path_BUILD_CC+:} false; then :
44109  $as_echo_n "(cached) " >&6
44110else
44111  case $BUILD_CC in
44112  [\\/]* | ?:[\\/]*)
44113  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44114  ;;
44115  *)
44116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44117for as_dir in $PATH
44118do
44119  IFS=$as_save_IFS
44120  test -z "$as_dir" && as_dir=.
44121    for ac_exec_ext in '' $ac_executable_extensions; do
44122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44123    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44125    break 2
44126  fi
44127done
44128  done
44129IFS=$as_save_IFS
44130
44131  ;;
44132esac
44133fi
44134BUILD_CC=$ac_cv_path_BUILD_CC
44135if test -n "$BUILD_CC"; then
44136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44137$as_echo "$BUILD_CC" >&6; }
44138else
44139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44140$as_echo "no" >&6; }
44141fi
44142
44143
44144  test -n "$BUILD_CC" && break
44145done
44146
44147    else
44148      # If it succeeded, then it was overridden by the user. We will use it
44149      # for the tool.
44150
44151      # First remove it from the list of overridden variables, so we can test
44152      # for unknown variables in the end.
44153      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44154
44155      # Check if we try to supply an empty value
44156      if test "x$BUILD_CC" = x; then
44157        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44158$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44159        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44160$as_echo_n "checking for BUILD_CC... " >&6; }
44161        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44162$as_echo "disabled" >&6; }
44163      else
44164        # Check if the provided tool contains a complete path.
44165        tool_specified="$BUILD_CC"
44166        tool_basename="${tool_specified##*/}"
44167        if test "x$tool_basename" = "x$tool_specified"; then
44168          # A command without a complete path is provided, search $PATH.
44169          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44170$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44171          # Extract the first word of "$tool_basename", so it can be a program name with args.
44172set dummy $tool_basename; ac_word=$2
44173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44174$as_echo_n "checking for $ac_word... " >&6; }
44175if ${ac_cv_path_BUILD_CC+:} false; then :
44176  $as_echo_n "(cached) " >&6
44177else
44178  case $BUILD_CC in
44179  [\\/]* | ?:[\\/]*)
44180  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44181  ;;
44182  *)
44183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44184for as_dir in $PATH
44185do
44186  IFS=$as_save_IFS
44187  test -z "$as_dir" && as_dir=.
44188    for ac_exec_ext in '' $ac_executable_extensions; do
44189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44190    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44192    break 2
44193  fi
44194done
44195  done
44196IFS=$as_save_IFS
44197
44198  ;;
44199esac
44200fi
44201BUILD_CC=$ac_cv_path_BUILD_CC
44202if test -n "$BUILD_CC"; then
44203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44204$as_echo "$BUILD_CC" >&6; }
44205else
44206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44207$as_echo "no" >&6; }
44208fi
44209
44210
44211          if test "x$BUILD_CC" = x; then
44212            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44213          fi
44214        else
44215          # Otherwise we believe it is a complete path. Use it as it is.
44216          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44217$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44218          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44219$as_echo_n "checking for BUILD_CC... " >&6; }
44220          if test ! -x "$tool_specified"; then
44221            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44222$as_echo "not found" >&6; }
44223            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44224          fi
44225          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44226$as_echo "$tool_specified" >&6; }
44227        fi
44228      fi
44229    fi
44230
44231  fi
44232
44233
44234
44235  if test "x$BUILD_CC" = x; then
44236    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44237  fi
44238
44239
44240
44241  # Only process if variable expands to non-empty
44242
44243  if test "x$BUILD_CC" != x; then
44244    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44245
44246  # First separate the path from the arguments. This will split at the first
44247  # space.
44248  complete="$BUILD_CC"
44249  path="${complete%% *}"
44250  tmp="$complete EOL"
44251  arguments="${tmp#* }"
44252
44253  # Input might be given as Windows format, start by converting to
44254  # unix format.
44255  new_path=`$CYGPATH -u "$path"`
44256
44257  # Now try to locate executable using which
44258  new_path=`$WHICH "$new_path" 2> /dev/null`
44259  # bat and cmd files are not always considered executable in cygwin causing which
44260  # to not find them
44261  if test "x$new_path" = x \
44262      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44263      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44264    new_path=`$CYGPATH -u "$path"`
44265  fi
44266  if test "x$new_path" = x; then
44267    # Oops. Which didn't find the executable.
44268    # The splitting of arguments from the executable at a space might have been incorrect,
44269    # since paths with space are more likely in Windows. Give it another try with the whole
44270    # argument.
44271    path="$complete"
44272    arguments="EOL"
44273    new_path=`$CYGPATH -u "$path"`
44274    new_path=`$WHICH "$new_path" 2> /dev/null`
44275    # bat and cmd files are not always considered executable in cygwin causing which
44276    # to not find them
44277    if test "x$new_path" = x \
44278        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44279        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44280      new_path=`$CYGPATH -u "$path"`
44281    fi
44282    if test "x$new_path" = x; then
44283      # It's still not found. Now this is an unrecoverable error.
44284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44285$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44286      has_space=`$ECHO "$complete" | $GREP " "`
44287      if test "x$has_space" != x; then
44288        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44289$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44290      fi
44291      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44292    fi
44293  fi
44294
44295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44298  # "foo.exe" is OK but "foo" is an error.
44299  #
44300  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44301  # It is also a way to make sure we got the proper file name for the real test later on.
44302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44303  if test "x$test_shortpath" = x; then
44304    # Short path failed, file does not exist as specified.
44305    # Try adding .exe or .cmd
44306    if test -f "${new_path}.exe"; then
44307      input_to_shortpath="${new_path}.exe"
44308    elif test -f "${new_path}.cmd"; then
44309      input_to_shortpath="${new_path}.cmd"
44310    else
44311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44312$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44313      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44314$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44315      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44316    fi
44317  else
44318    input_to_shortpath="$new_path"
44319  fi
44320
44321  # Call helper function which possibly converts this using DOS-style short mode.
44322  # If so, the updated path is stored in $new_path.
44323  new_path="$input_to_shortpath"
44324
44325  input_path="$input_to_shortpath"
44326  # Check if we need to convert this using DOS-style short mode. If the path
44327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44328  # take no chances and rewrite it.
44329  # Note: m4 eats our [], so we need to use [ and ] instead.
44330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44331  if test "x$has_forbidden_chars" != x; then
44332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44333    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44334    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44335    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44336      # Going to short mode and back again did indeed matter. Since short mode is
44337      # case insensitive, let's make it lowercase to improve readability.
44338      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44339      # Now convert it back to Unix-style (cygpath)
44340      input_path=`$CYGPATH -u "$shortmode_path"`
44341      new_path="$input_path"
44342    fi
44343  fi
44344
44345  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44346  if test "x$test_cygdrive_prefix" = x; then
44347    # As a simple fix, exclude /usr/bin since it's not a real path.
44348    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44349      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44350      # a path prefixed by /cygdrive for fixpath to work.
44351      new_path="$CYGWIN_ROOT_PATH$input_path"
44352    fi
44353  fi
44354
44355  # remove trailing .exe if any
44356  new_path="${new_path/%.exe/}"
44357
44358    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44359
44360  # First separate the path from the arguments. This will split at the first
44361  # space.
44362  complete="$BUILD_CC"
44363  path="${complete%% *}"
44364  tmp="$complete EOL"
44365  arguments="${tmp#* }"
44366
44367  # Input might be given as Windows format, start by converting to
44368  # unix format.
44369  new_path="$path"
44370
44371  windows_path="$new_path"
44372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44373    unix_path=`$CYGPATH -u "$windows_path"`
44374    new_path="$unix_path"
44375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44377    new_path="$unix_path"
44378  fi
44379
44380
44381  # Now try to locate executable using which
44382  new_path=`$WHICH "$new_path" 2> /dev/null`
44383
44384  if test "x$new_path" = x; then
44385    # Oops. Which didn't find the executable.
44386    # The splitting of arguments from the executable at a space might have been incorrect,
44387    # since paths with space are more likely in Windows. Give it another try with the whole
44388    # argument.
44389    path="$complete"
44390    arguments="EOL"
44391    new_path="$path"
44392
44393  windows_path="$new_path"
44394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44395    unix_path=`$CYGPATH -u "$windows_path"`
44396    new_path="$unix_path"
44397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44399    new_path="$unix_path"
44400  fi
44401
44402
44403    new_path=`$WHICH "$new_path" 2> /dev/null`
44404    # bat and cmd files are not always considered executable in MSYS causing which
44405    # to not find them
44406    if test "x$new_path" = x \
44407        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44408        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44409      new_path="$path"
44410
44411  windows_path="$new_path"
44412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44413    unix_path=`$CYGPATH -u "$windows_path"`
44414    new_path="$unix_path"
44415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44417    new_path="$unix_path"
44418  fi
44419
44420    fi
44421
44422    if test "x$new_path" = x; then
44423      # It's still not found. Now this is an unrecoverable error.
44424      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44425$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44426      has_space=`$ECHO "$complete" | $GREP " "`
44427      if test "x$has_space" != x; then
44428        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44429$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44430      fi
44431      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44432    fi
44433  fi
44434
44435  # Now new_path has a complete unix path to the binary
44436  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44437    # Keep paths in /bin as-is, but remove trailing .exe if any
44438    new_path="${new_path/%.exe/}"
44439    # Do not save /bin paths to all_fixpath_prefixes!
44440  else
44441    # Not in mixed or Windows style, start by that.
44442    new_path=`cmd //c echo $new_path`
44443
44444  input_path="$new_path"
44445  # Check if we need to convert this using DOS-style short mode. If the path
44446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44447  # take no chances and rewrite it.
44448  # Note: m4 eats our [], so we need to use [ and ] instead.
44449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44450  if test "x$has_forbidden_chars" != x; then
44451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44452    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44453  fi
44454
44455    # Output is in $new_path
44456
44457  windows_path="$new_path"
44458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44459    unix_path=`$CYGPATH -u "$windows_path"`
44460    new_path="$unix_path"
44461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44463    new_path="$unix_path"
44464  fi
44465
44466    # remove trailing .exe if any
44467    new_path="${new_path/%.exe/}"
44468
44469    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44470    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44471  fi
44472
44473    else
44474      # We're on a unix platform. Hooray! :)
44475      # First separate the path from the arguments. This will split at the first
44476      # space.
44477      complete="$BUILD_CC"
44478      path="${complete%% *}"
44479      tmp="$complete EOL"
44480      arguments="${tmp#* }"
44481
44482      # Cannot rely on the command "which" here since it doesn't always work.
44483      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44484      if test -z "$is_absolute_path"; then
44485        # Path to executable is not absolute. Find it.
44486        IFS_save="$IFS"
44487        IFS=:
44488        for p in $PATH; do
44489          if test -f "$p/$path" && test -x "$p/$path"; then
44490            new_path="$p/$path"
44491            break
44492          fi
44493        done
44494        IFS="$IFS_save"
44495      else
44496        # This is an absolute path, we can use it without further modifications.
44497        new_path="$path"
44498      fi
44499
44500      if test "x$new_path" = x; then
44501        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44502$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44503        has_space=`$ECHO "$complete" | $GREP " "`
44504        if test "x$has_space" != x; then
44505          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44506$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44507        fi
44508        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44509      fi
44510    fi
44511
44512    # Now join together the path and the arguments once again
44513    if test "x$arguments" != xEOL; then
44514      new_complete="$new_path ${arguments% *}"
44515    else
44516      new_complete="$new_path"
44517    fi
44518
44519    if test "x$complete" != "x$new_complete"; then
44520      BUILD_CC="$new_complete"
44521      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44522$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44523    fi
44524  fi
44525
44526
44527
44528
44529  # Publish this variable in the help.
44530
44531
44532  if [ -z "${BUILD_CXX+x}" ]; then
44533    # The variable is not set by user, try to locate tool using the code snippet
44534    for ac_prog in cl CC g++
44535do
44536  # Extract the first word of "$ac_prog", so it can be a program name with args.
44537set dummy $ac_prog; ac_word=$2
44538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44539$as_echo_n "checking for $ac_word... " >&6; }
44540if ${ac_cv_path_BUILD_CXX+:} false; then :
44541  $as_echo_n "(cached) " >&6
44542else
44543  case $BUILD_CXX in
44544  [\\/]* | ?:[\\/]*)
44545  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44546  ;;
44547  *)
44548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44549for as_dir in $PATH
44550do
44551  IFS=$as_save_IFS
44552  test -z "$as_dir" && as_dir=.
44553    for ac_exec_ext in '' $ac_executable_extensions; do
44554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44555    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44557    break 2
44558  fi
44559done
44560  done
44561IFS=$as_save_IFS
44562
44563  ;;
44564esac
44565fi
44566BUILD_CXX=$ac_cv_path_BUILD_CXX
44567if test -n "$BUILD_CXX"; then
44568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44569$as_echo "$BUILD_CXX" >&6; }
44570else
44571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44572$as_echo "no" >&6; }
44573fi
44574
44575
44576  test -n "$BUILD_CXX" && break
44577done
44578
44579  else
44580    # The variable is set, but is it from the command line or the environment?
44581
44582    # Try to remove the string !BUILD_CXX! from our list.
44583    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44584    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44585      # If it failed, the variable was not from the command line. Ignore it,
44586      # but warn the user (except for BASH, which is always set by the calling BASH).
44587      if test "xBUILD_CXX" != xBASH; then
44588        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44589$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44590      fi
44591      # Try to locate tool using the code snippet
44592      for ac_prog in cl CC g++
44593do
44594  # Extract the first word of "$ac_prog", so it can be a program name with args.
44595set dummy $ac_prog; ac_word=$2
44596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44597$as_echo_n "checking for $ac_word... " >&6; }
44598if ${ac_cv_path_BUILD_CXX+:} false; then :
44599  $as_echo_n "(cached) " >&6
44600else
44601  case $BUILD_CXX in
44602  [\\/]* | ?:[\\/]*)
44603  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44604  ;;
44605  *)
44606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44607for as_dir in $PATH
44608do
44609  IFS=$as_save_IFS
44610  test -z "$as_dir" && as_dir=.
44611    for ac_exec_ext in '' $ac_executable_extensions; do
44612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44613    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44615    break 2
44616  fi
44617done
44618  done
44619IFS=$as_save_IFS
44620
44621  ;;
44622esac
44623fi
44624BUILD_CXX=$ac_cv_path_BUILD_CXX
44625if test -n "$BUILD_CXX"; then
44626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44627$as_echo "$BUILD_CXX" >&6; }
44628else
44629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44630$as_echo "no" >&6; }
44631fi
44632
44633
44634  test -n "$BUILD_CXX" && break
44635done
44636
44637    else
44638      # If it succeeded, then it was overridden by the user. We will use it
44639      # for the tool.
44640
44641      # First remove it from the list of overridden variables, so we can test
44642      # for unknown variables in the end.
44643      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44644
44645      # Check if we try to supply an empty value
44646      if test "x$BUILD_CXX" = x; then
44647        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44648$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44649        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44650$as_echo_n "checking for BUILD_CXX... " >&6; }
44651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44652$as_echo "disabled" >&6; }
44653      else
44654        # Check if the provided tool contains a complete path.
44655        tool_specified="$BUILD_CXX"
44656        tool_basename="${tool_specified##*/}"
44657        if test "x$tool_basename" = "x$tool_specified"; then
44658          # A command without a complete path is provided, search $PATH.
44659          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44660$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44661          # Extract the first word of "$tool_basename", so it can be a program name with args.
44662set dummy $tool_basename; ac_word=$2
44663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44664$as_echo_n "checking for $ac_word... " >&6; }
44665if ${ac_cv_path_BUILD_CXX+:} false; then :
44666  $as_echo_n "(cached) " >&6
44667else
44668  case $BUILD_CXX in
44669  [\\/]* | ?:[\\/]*)
44670  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44671  ;;
44672  *)
44673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44674for as_dir in $PATH
44675do
44676  IFS=$as_save_IFS
44677  test -z "$as_dir" && as_dir=.
44678    for ac_exec_ext in '' $ac_executable_extensions; do
44679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44680    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44682    break 2
44683  fi
44684done
44685  done
44686IFS=$as_save_IFS
44687
44688  ;;
44689esac
44690fi
44691BUILD_CXX=$ac_cv_path_BUILD_CXX
44692if test -n "$BUILD_CXX"; then
44693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44694$as_echo "$BUILD_CXX" >&6; }
44695else
44696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44697$as_echo "no" >&6; }
44698fi
44699
44700
44701          if test "x$BUILD_CXX" = x; then
44702            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44703          fi
44704        else
44705          # Otherwise we believe it is a complete path. Use it as it is.
44706          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44707$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44708          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44709$as_echo_n "checking for BUILD_CXX... " >&6; }
44710          if test ! -x "$tool_specified"; then
44711            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44712$as_echo "not found" >&6; }
44713            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44714          fi
44715          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44716$as_echo "$tool_specified" >&6; }
44717        fi
44718      fi
44719    fi
44720
44721  fi
44722
44723
44724
44725  if test "x$BUILD_CXX" = x; then
44726    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44727  fi
44728
44729
44730
44731  # Only process if variable expands to non-empty
44732
44733  if test "x$BUILD_CXX" != x; then
44734    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44735
44736  # First separate the path from the arguments. This will split at the first
44737  # space.
44738  complete="$BUILD_CXX"
44739  path="${complete%% *}"
44740  tmp="$complete EOL"
44741  arguments="${tmp#* }"
44742
44743  # Input might be given as Windows format, start by converting to
44744  # unix format.
44745  new_path=`$CYGPATH -u "$path"`
44746
44747  # Now try to locate executable using which
44748  new_path=`$WHICH "$new_path" 2> /dev/null`
44749  # bat and cmd files are not always considered executable in cygwin causing which
44750  # to not find them
44751  if test "x$new_path" = x \
44752      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44753      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44754    new_path=`$CYGPATH -u "$path"`
44755  fi
44756  if test "x$new_path" = x; then
44757    # Oops. Which didn't find the executable.
44758    # The splitting of arguments from the executable at a space might have been incorrect,
44759    # since paths with space are more likely in Windows. Give it another try with the whole
44760    # argument.
44761    path="$complete"
44762    arguments="EOL"
44763    new_path=`$CYGPATH -u "$path"`
44764    new_path=`$WHICH "$new_path" 2> /dev/null`
44765    # bat and cmd files are not always considered executable in cygwin causing which
44766    # to not find them
44767    if test "x$new_path" = x \
44768        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44769        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44770      new_path=`$CYGPATH -u "$path"`
44771    fi
44772    if test "x$new_path" = x; then
44773      # It's still not found. Now this is an unrecoverable error.
44774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44775$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44776      has_space=`$ECHO "$complete" | $GREP " "`
44777      if test "x$has_space" != x; then
44778        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44779$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44780      fi
44781      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44782    fi
44783  fi
44784
44785  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44786  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44787  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44788  # "foo.exe" is OK but "foo" is an error.
44789  #
44790  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44791  # It is also a way to make sure we got the proper file name for the real test later on.
44792  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44793  if test "x$test_shortpath" = x; then
44794    # Short path failed, file does not exist as specified.
44795    # Try adding .exe or .cmd
44796    if test -f "${new_path}.exe"; then
44797      input_to_shortpath="${new_path}.exe"
44798    elif test -f "${new_path}.cmd"; then
44799      input_to_shortpath="${new_path}.cmd"
44800    else
44801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44802$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44803      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44804$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44805      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44806    fi
44807  else
44808    input_to_shortpath="$new_path"
44809  fi
44810
44811  # Call helper function which possibly converts this using DOS-style short mode.
44812  # If so, the updated path is stored in $new_path.
44813  new_path="$input_to_shortpath"
44814
44815  input_path="$input_to_shortpath"
44816  # Check if we need to convert this using DOS-style short mode. If the path
44817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44818  # take no chances and rewrite it.
44819  # Note: m4 eats our [], so we need to use [ and ] instead.
44820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44821  if test "x$has_forbidden_chars" != x; then
44822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44826      # Going to short mode and back again did indeed matter. Since short mode is
44827      # case insensitive, let's make it lowercase to improve readability.
44828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44829      # Now convert it back to Unix-style (cygpath)
44830      input_path=`$CYGPATH -u "$shortmode_path"`
44831      new_path="$input_path"
44832    fi
44833  fi
44834
44835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44836  if test "x$test_cygdrive_prefix" = x; then
44837    # As a simple fix, exclude /usr/bin since it's not a real path.
44838    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44840      # a path prefixed by /cygdrive for fixpath to work.
44841      new_path="$CYGWIN_ROOT_PATH$input_path"
44842    fi
44843  fi
44844
44845  # remove trailing .exe if any
44846  new_path="${new_path/%.exe/}"
44847
44848    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44849
44850  # First separate the path from the arguments. This will split at the first
44851  # space.
44852  complete="$BUILD_CXX"
44853  path="${complete%% *}"
44854  tmp="$complete EOL"
44855  arguments="${tmp#* }"
44856
44857  # Input might be given as Windows format, start by converting to
44858  # unix format.
44859  new_path="$path"
44860
44861  windows_path="$new_path"
44862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44863    unix_path=`$CYGPATH -u "$windows_path"`
44864    new_path="$unix_path"
44865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44867    new_path="$unix_path"
44868  fi
44869
44870
44871  # Now try to locate executable using which
44872  new_path=`$WHICH "$new_path" 2> /dev/null`
44873
44874  if test "x$new_path" = x; then
44875    # Oops. Which didn't find the executable.
44876    # The splitting of arguments from the executable at a space might have been incorrect,
44877    # since paths with space are more likely in Windows. Give it another try with the whole
44878    # argument.
44879    path="$complete"
44880    arguments="EOL"
44881    new_path="$path"
44882
44883  windows_path="$new_path"
44884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44885    unix_path=`$CYGPATH -u "$windows_path"`
44886    new_path="$unix_path"
44887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44889    new_path="$unix_path"
44890  fi
44891
44892
44893    new_path=`$WHICH "$new_path" 2> /dev/null`
44894    # bat and cmd files are not always considered executable in MSYS causing which
44895    # to not find them
44896    if test "x$new_path" = x \
44897        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44898        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44899      new_path="$path"
44900
44901  windows_path="$new_path"
44902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44903    unix_path=`$CYGPATH -u "$windows_path"`
44904    new_path="$unix_path"
44905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44907    new_path="$unix_path"
44908  fi
44909
44910    fi
44911
44912    if test "x$new_path" = x; then
44913      # It's still not found. Now this is an unrecoverable error.
44914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44915$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44916      has_space=`$ECHO "$complete" | $GREP " "`
44917      if test "x$has_space" != x; then
44918        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44919$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44920      fi
44921      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44922    fi
44923  fi
44924
44925  # Now new_path has a complete unix path to the binary
44926  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44927    # Keep paths in /bin as-is, but remove trailing .exe if any
44928    new_path="${new_path/%.exe/}"
44929    # Do not save /bin paths to all_fixpath_prefixes!
44930  else
44931    # Not in mixed or Windows style, start by that.
44932    new_path=`cmd //c echo $new_path`
44933
44934  input_path="$new_path"
44935  # Check if we need to convert this using DOS-style short mode. If the path
44936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44937  # take no chances and rewrite it.
44938  # Note: m4 eats our [], so we need to use [ and ] instead.
44939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44940  if test "x$has_forbidden_chars" != x; then
44941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44943  fi
44944
44945    # Output is in $new_path
44946
44947  windows_path="$new_path"
44948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44949    unix_path=`$CYGPATH -u "$windows_path"`
44950    new_path="$unix_path"
44951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44953    new_path="$unix_path"
44954  fi
44955
44956    # remove trailing .exe if any
44957    new_path="${new_path/%.exe/}"
44958
44959    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44960    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44961  fi
44962
44963    else
44964      # We're on a unix platform. Hooray! :)
44965      # First separate the path from the arguments. This will split at the first
44966      # space.
44967      complete="$BUILD_CXX"
44968      path="${complete%% *}"
44969      tmp="$complete EOL"
44970      arguments="${tmp#* }"
44971
44972      # Cannot rely on the command "which" here since it doesn't always work.
44973      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44974      if test -z "$is_absolute_path"; then
44975        # Path to executable is not absolute. Find it.
44976        IFS_save="$IFS"
44977        IFS=:
44978        for p in $PATH; do
44979          if test -f "$p/$path" && test -x "$p/$path"; then
44980            new_path="$p/$path"
44981            break
44982          fi
44983        done
44984        IFS="$IFS_save"
44985      else
44986        # This is an absolute path, we can use it without further modifications.
44987        new_path="$path"
44988      fi
44989
44990      if test "x$new_path" = x; then
44991        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44992$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44993        has_space=`$ECHO "$complete" | $GREP " "`
44994        if test "x$has_space" != x; then
44995          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44996$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44997        fi
44998        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44999      fi
45000    fi
45001
45002    # Now join together the path and the arguments once again
45003    if test "x$arguments" != xEOL; then
45004      new_complete="$new_path ${arguments% *}"
45005    else
45006      new_complete="$new_path"
45007    fi
45008
45009    if test "x$complete" != "x$new_complete"; then
45010      BUILD_CXX="$new_complete"
45011      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45012$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45013    fi
45014  fi
45015
45016
45017
45018  # Publish this variable in the help.
45019
45020
45021  if [ -z "${BUILD_NM+x}" ]; then
45022    # The variable is not set by user, try to locate tool using the code snippet
45023    for ac_prog in nm gcc-nm
45024do
45025  # Extract the first word of "$ac_prog", so it can be a program name with args.
45026set dummy $ac_prog; ac_word=$2
45027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45028$as_echo_n "checking for $ac_word... " >&6; }
45029if ${ac_cv_path_BUILD_NM+:} false; then :
45030  $as_echo_n "(cached) " >&6
45031else
45032  case $BUILD_NM in
45033  [\\/]* | ?:[\\/]*)
45034  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45035  ;;
45036  *)
45037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45038for as_dir in $PATH
45039do
45040  IFS=$as_save_IFS
45041  test -z "$as_dir" && as_dir=.
45042    for ac_exec_ext in '' $ac_executable_extensions; do
45043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45044    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45046    break 2
45047  fi
45048done
45049  done
45050IFS=$as_save_IFS
45051
45052  ;;
45053esac
45054fi
45055BUILD_NM=$ac_cv_path_BUILD_NM
45056if test -n "$BUILD_NM"; then
45057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45058$as_echo "$BUILD_NM" >&6; }
45059else
45060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45061$as_echo "no" >&6; }
45062fi
45063
45064
45065  test -n "$BUILD_NM" && break
45066done
45067
45068  else
45069    # The variable is set, but is it from the command line or the environment?
45070
45071    # Try to remove the string !BUILD_NM! from our list.
45072    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45073    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45074      # If it failed, the variable was not from the command line. Ignore it,
45075      # but warn the user (except for BASH, which is always set by the calling BASH).
45076      if test "xBUILD_NM" != xBASH; then
45077        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45078$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45079      fi
45080      # Try to locate tool using the code snippet
45081      for ac_prog in nm gcc-nm
45082do
45083  # Extract the first word of "$ac_prog", so it can be a program name with args.
45084set dummy $ac_prog; ac_word=$2
45085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45086$as_echo_n "checking for $ac_word... " >&6; }
45087if ${ac_cv_path_BUILD_NM+:} false; then :
45088  $as_echo_n "(cached) " >&6
45089else
45090  case $BUILD_NM in
45091  [\\/]* | ?:[\\/]*)
45092  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45093  ;;
45094  *)
45095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45096for as_dir in $PATH
45097do
45098  IFS=$as_save_IFS
45099  test -z "$as_dir" && as_dir=.
45100    for ac_exec_ext in '' $ac_executable_extensions; do
45101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45102    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45104    break 2
45105  fi
45106done
45107  done
45108IFS=$as_save_IFS
45109
45110  ;;
45111esac
45112fi
45113BUILD_NM=$ac_cv_path_BUILD_NM
45114if test -n "$BUILD_NM"; then
45115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45116$as_echo "$BUILD_NM" >&6; }
45117else
45118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45119$as_echo "no" >&6; }
45120fi
45121
45122
45123  test -n "$BUILD_NM" && break
45124done
45125
45126    else
45127      # If it succeeded, then it was overridden by the user. We will use it
45128      # for the tool.
45129
45130      # First remove it from the list of overridden variables, so we can test
45131      # for unknown variables in the end.
45132      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45133
45134      # Check if we try to supply an empty value
45135      if test "x$BUILD_NM" = x; then
45136        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45137$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45138        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45139$as_echo_n "checking for BUILD_NM... " >&6; }
45140        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45141$as_echo "disabled" >&6; }
45142      else
45143        # Check if the provided tool contains a complete path.
45144        tool_specified="$BUILD_NM"
45145        tool_basename="${tool_specified##*/}"
45146        if test "x$tool_basename" = "x$tool_specified"; then
45147          # A command without a complete path is provided, search $PATH.
45148          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45149$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45150          # Extract the first word of "$tool_basename", so it can be a program name with args.
45151set dummy $tool_basename; ac_word=$2
45152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45153$as_echo_n "checking for $ac_word... " >&6; }
45154if ${ac_cv_path_BUILD_NM+:} false; then :
45155  $as_echo_n "(cached) " >&6
45156else
45157  case $BUILD_NM in
45158  [\\/]* | ?:[\\/]*)
45159  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45160  ;;
45161  *)
45162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45163for as_dir in $PATH
45164do
45165  IFS=$as_save_IFS
45166  test -z "$as_dir" && as_dir=.
45167    for ac_exec_ext in '' $ac_executable_extensions; do
45168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45169    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45171    break 2
45172  fi
45173done
45174  done
45175IFS=$as_save_IFS
45176
45177  ;;
45178esac
45179fi
45180BUILD_NM=$ac_cv_path_BUILD_NM
45181if test -n "$BUILD_NM"; then
45182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45183$as_echo "$BUILD_NM" >&6; }
45184else
45185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45186$as_echo "no" >&6; }
45187fi
45188
45189
45190          if test "x$BUILD_NM" = x; then
45191            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45192          fi
45193        else
45194          # Otherwise we believe it is a complete path. Use it as it is.
45195          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45196$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45197          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45198$as_echo_n "checking for BUILD_NM... " >&6; }
45199          if test ! -x "$tool_specified"; then
45200            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45201$as_echo "not found" >&6; }
45202            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45203          fi
45204          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45205$as_echo "$tool_specified" >&6; }
45206        fi
45207      fi
45208    fi
45209
45210  fi
45211
45212
45213
45214  # Only process if variable expands to non-empty
45215
45216  if test "x$BUILD_NM" != x; then
45217    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45218
45219  # First separate the path from the arguments. This will split at the first
45220  # space.
45221  complete="$BUILD_NM"
45222  path="${complete%% *}"
45223  tmp="$complete EOL"
45224  arguments="${tmp#* }"
45225
45226  # Input might be given as Windows format, start by converting to
45227  # unix format.
45228  new_path=`$CYGPATH -u "$path"`
45229
45230  # Now try to locate executable using which
45231  new_path=`$WHICH "$new_path" 2> /dev/null`
45232  # bat and cmd files are not always considered executable in cygwin causing which
45233  # to not find them
45234  if test "x$new_path" = x \
45235      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45236      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45237    new_path=`$CYGPATH -u "$path"`
45238  fi
45239  if test "x$new_path" = x; then
45240    # Oops. Which didn't find the executable.
45241    # The splitting of arguments from the executable at a space might have been incorrect,
45242    # since paths with space are more likely in Windows. Give it another try with the whole
45243    # argument.
45244    path="$complete"
45245    arguments="EOL"
45246    new_path=`$CYGPATH -u "$path"`
45247    new_path=`$WHICH "$new_path" 2> /dev/null`
45248    # bat and cmd files are not always considered executable in cygwin causing which
45249    # to not find them
45250    if test "x$new_path" = x \
45251        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45252        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45253      new_path=`$CYGPATH -u "$path"`
45254    fi
45255    if test "x$new_path" = x; then
45256      # It's still not found. Now this is an unrecoverable error.
45257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45258$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45259      has_space=`$ECHO "$complete" | $GREP " "`
45260      if test "x$has_space" != x; then
45261        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45262$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45263      fi
45264      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45265    fi
45266  fi
45267
45268  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45269  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45270  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45271  # "foo.exe" is OK but "foo" is an error.
45272  #
45273  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45274  # It is also a way to make sure we got the proper file name for the real test later on.
45275  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45276  if test "x$test_shortpath" = x; then
45277    # Short path failed, file does not exist as specified.
45278    # Try adding .exe or .cmd
45279    if test -f "${new_path}.exe"; then
45280      input_to_shortpath="${new_path}.exe"
45281    elif test -f "${new_path}.cmd"; then
45282      input_to_shortpath="${new_path}.cmd"
45283    else
45284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45285$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45286      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45287$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45288      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45289    fi
45290  else
45291    input_to_shortpath="$new_path"
45292  fi
45293
45294  # Call helper function which possibly converts this using DOS-style short mode.
45295  # If so, the updated path is stored in $new_path.
45296  new_path="$input_to_shortpath"
45297
45298  input_path="$input_to_shortpath"
45299  # Check if we need to convert this using DOS-style short mode. If the path
45300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45301  # take no chances and rewrite it.
45302  # Note: m4 eats our [], so we need to use [ and ] instead.
45303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45304  if test "x$has_forbidden_chars" != x; then
45305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45306    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45307    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45308    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45309      # Going to short mode and back again did indeed matter. Since short mode is
45310      # case insensitive, let's make it lowercase to improve readability.
45311      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45312      # Now convert it back to Unix-style (cygpath)
45313      input_path=`$CYGPATH -u "$shortmode_path"`
45314      new_path="$input_path"
45315    fi
45316  fi
45317
45318  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45319  if test "x$test_cygdrive_prefix" = x; then
45320    # As a simple fix, exclude /usr/bin since it's not a real path.
45321    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45322      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45323      # a path prefixed by /cygdrive for fixpath to work.
45324      new_path="$CYGWIN_ROOT_PATH$input_path"
45325    fi
45326  fi
45327
45328  # remove trailing .exe if any
45329  new_path="${new_path/%.exe/}"
45330
45331    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45332
45333  # First separate the path from the arguments. This will split at the first
45334  # space.
45335  complete="$BUILD_NM"
45336  path="${complete%% *}"
45337  tmp="$complete EOL"
45338  arguments="${tmp#* }"
45339
45340  # Input might be given as Windows format, start by converting to
45341  # unix format.
45342  new_path="$path"
45343
45344  windows_path="$new_path"
45345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45346    unix_path=`$CYGPATH -u "$windows_path"`
45347    new_path="$unix_path"
45348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45350    new_path="$unix_path"
45351  fi
45352
45353
45354  # Now try to locate executable using which
45355  new_path=`$WHICH "$new_path" 2> /dev/null`
45356
45357  if test "x$new_path" = x; then
45358    # Oops. Which didn't find the executable.
45359    # The splitting of arguments from the executable at a space might have been incorrect,
45360    # since paths with space are more likely in Windows. Give it another try with the whole
45361    # argument.
45362    path="$complete"
45363    arguments="EOL"
45364    new_path="$path"
45365
45366  windows_path="$new_path"
45367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45368    unix_path=`$CYGPATH -u "$windows_path"`
45369    new_path="$unix_path"
45370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45372    new_path="$unix_path"
45373  fi
45374
45375
45376    new_path=`$WHICH "$new_path" 2> /dev/null`
45377    # bat and cmd files are not always considered executable in MSYS causing which
45378    # to not find them
45379    if test "x$new_path" = x \
45380        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45381        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45382      new_path="$path"
45383
45384  windows_path="$new_path"
45385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45386    unix_path=`$CYGPATH -u "$windows_path"`
45387    new_path="$unix_path"
45388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45390    new_path="$unix_path"
45391  fi
45392
45393    fi
45394
45395    if test "x$new_path" = x; then
45396      # It's still not found. Now this is an unrecoverable error.
45397      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45398$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45399      has_space=`$ECHO "$complete" | $GREP " "`
45400      if test "x$has_space" != x; then
45401        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45402$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45403      fi
45404      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45405    fi
45406  fi
45407
45408  # Now new_path has a complete unix path to the binary
45409  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45410    # Keep paths in /bin as-is, but remove trailing .exe if any
45411    new_path="${new_path/%.exe/}"
45412    # Do not save /bin paths to all_fixpath_prefixes!
45413  else
45414    # Not in mixed or Windows style, start by that.
45415    new_path=`cmd //c echo $new_path`
45416
45417  input_path="$new_path"
45418  # Check if we need to convert this using DOS-style short mode. If the path
45419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45420  # take no chances and rewrite it.
45421  # Note: m4 eats our [], so we need to use [ and ] instead.
45422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45423  if test "x$has_forbidden_chars" != x; then
45424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45425    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45426  fi
45427
45428    # Output is in $new_path
45429
45430  windows_path="$new_path"
45431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45432    unix_path=`$CYGPATH -u "$windows_path"`
45433    new_path="$unix_path"
45434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45436    new_path="$unix_path"
45437  fi
45438
45439    # remove trailing .exe if any
45440    new_path="${new_path/%.exe/}"
45441
45442    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45443    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45444  fi
45445
45446    else
45447      # We're on a unix platform. Hooray! :)
45448      # First separate the path from the arguments. This will split at the first
45449      # space.
45450      complete="$BUILD_NM"
45451      path="${complete%% *}"
45452      tmp="$complete EOL"
45453      arguments="${tmp#* }"
45454
45455      # Cannot rely on the command "which" here since it doesn't always work.
45456      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45457      if test -z "$is_absolute_path"; then
45458        # Path to executable is not absolute. Find it.
45459        IFS_save="$IFS"
45460        IFS=:
45461        for p in $PATH; do
45462          if test -f "$p/$path" && test -x "$p/$path"; then
45463            new_path="$p/$path"
45464            break
45465          fi
45466        done
45467        IFS="$IFS_save"
45468      else
45469        # This is an absolute path, we can use it without further modifications.
45470        new_path="$path"
45471      fi
45472
45473      if test "x$new_path" = x; then
45474        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45475$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45476        has_space=`$ECHO "$complete" | $GREP " "`
45477        if test "x$has_space" != x; then
45478          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45479$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45480        fi
45481        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45482      fi
45483    fi
45484
45485    # Now join together the path and the arguments once again
45486    if test "x$arguments" != xEOL; then
45487      new_complete="$new_path ${arguments% *}"
45488    else
45489      new_complete="$new_path"
45490    fi
45491
45492    if test "x$complete" != "x$new_complete"; then
45493      BUILD_NM="$new_complete"
45494      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45495$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45496    fi
45497  fi
45498
45499
45500
45501  # Publish this variable in the help.
45502
45503
45504  if [ -z "${BUILD_AR+x}" ]; then
45505    # The variable is not set by user, try to locate tool using the code snippet
45506    for ac_prog in ar gcc-ar
45507do
45508  # Extract the first word of "$ac_prog", so it can be a program name with args.
45509set dummy $ac_prog; ac_word=$2
45510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45511$as_echo_n "checking for $ac_word... " >&6; }
45512if ${ac_cv_path_BUILD_AR+:} false; then :
45513  $as_echo_n "(cached) " >&6
45514else
45515  case $BUILD_AR in
45516  [\\/]* | ?:[\\/]*)
45517  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45518  ;;
45519  *)
45520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45521for as_dir in $PATH
45522do
45523  IFS=$as_save_IFS
45524  test -z "$as_dir" && as_dir=.
45525    for ac_exec_ext in '' $ac_executable_extensions; do
45526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45527    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45529    break 2
45530  fi
45531done
45532  done
45533IFS=$as_save_IFS
45534
45535  ;;
45536esac
45537fi
45538BUILD_AR=$ac_cv_path_BUILD_AR
45539if test -n "$BUILD_AR"; then
45540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45541$as_echo "$BUILD_AR" >&6; }
45542else
45543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45544$as_echo "no" >&6; }
45545fi
45546
45547
45548  test -n "$BUILD_AR" && break
45549done
45550
45551  else
45552    # The variable is set, but is it from the command line or the environment?
45553
45554    # Try to remove the string !BUILD_AR! from our list.
45555    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45556    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45557      # If it failed, the variable was not from the command line. Ignore it,
45558      # but warn the user (except for BASH, which is always set by the calling BASH).
45559      if test "xBUILD_AR" != xBASH; then
45560        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45561$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45562      fi
45563      # Try to locate tool using the code snippet
45564      for ac_prog in ar gcc-ar
45565do
45566  # Extract the first word of "$ac_prog", so it can be a program name with args.
45567set dummy $ac_prog; ac_word=$2
45568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45569$as_echo_n "checking for $ac_word... " >&6; }
45570if ${ac_cv_path_BUILD_AR+:} false; then :
45571  $as_echo_n "(cached) " >&6
45572else
45573  case $BUILD_AR in
45574  [\\/]* | ?:[\\/]*)
45575  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45576  ;;
45577  *)
45578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45579for as_dir in $PATH
45580do
45581  IFS=$as_save_IFS
45582  test -z "$as_dir" && as_dir=.
45583    for ac_exec_ext in '' $ac_executable_extensions; do
45584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45585    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45587    break 2
45588  fi
45589done
45590  done
45591IFS=$as_save_IFS
45592
45593  ;;
45594esac
45595fi
45596BUILD_AR=$ac_cv_path_BUILD_AR
45597if test -n "$BUILD_AR"; then
45598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45599$as_echo "$BUILD_AR" >&6; }
45600else
45601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45602$as_echo "no" >&6; }
45603fi
45604
45605
45606  test -n "$BUILD_AR" && break
45607done
45608
45609    else
45610      # If it succeeded, then it was overridden by the user. We will use it
45611      # for the tool.
45612
45613      # First remove it from the list of overridden variables, so we can test
45614      # for unknown variables in the end.
45615      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45616
45617      # Check if we try to supply an empty value
45618      if test "x$BUILD_AR" = x; then
45619        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45620$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45621        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45622$as_echo_n "checking for BUILD_AR... " >&6; }
45623        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45624$as_echo "disabled" >&6; }
45625      else
45626        # Check if the provided tool contains a complete path.
45627        tool_specified="$BUILD_AR"
45628        tool_basename="${tool_specified##*/}"
45629        if test "x$tool_basename" = "x$tool_specified"; then
45630          # A command without a complete path is provided, search $PATH.
45631          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45632$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45633          # Extract the first word of "$tool_basename", so it can be a program name with args.
45634set dummy $tool_basename; ac_word=$2
45635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45636$as_echo_n "checking for $ac_word... " >&6; }
45637if ${ac_cv_path_BUILD_AR+:} false; then :
45638  $as_echo_n "(cached) " >&6
45639else
45640  case $BUILD_AR in
45641  [\\/]* | ?:[\\/]*)
45642  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45643  ;;
45644  *)
45645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45646for as_dir in $PATH
45647do
45648  IFS=$as_save_IFS
45649  test -z "$as_dir" && as_dir=.
45650    for ac_exec_ext in '' $ac_executable_extensions; do
45651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45652    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45654    break 2
45655  fi
45656done
45657  done
45658IFS=$as_save_IFS
45659
45660  ;;
45661esac
45662fi
45663BUILD_AR=$ac_cv_path_BUILD_AR
45664if test -n "$BUILD_AR"; then
45665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45666$as_echo "$BUILD_AR" >&6; }
45667else
45668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45669$as_echo "no" >&6; }
45670fi
45671
45672
45673          if test "x$BUILD_AR" = x; then
45674            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45675          fi
45676        else
45677          # Otherwise we believe it is a complete path. Use it as it is.
45678          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45679$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45680          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45681$as_echo_n "checking for BUILD_AR... " >&6; }
45682          if test ! -x "$tool_specified"; then
45683            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45684$as_echo "not found" >&6; }
45685            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45686          fi
45687          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45688$as_echo "$tool_specified" >&6; }
45689        fi
45690      fi
45691    fi
45692
45693  fi
45694
45695
45696
45697  # Only process if variable expands to non-empty
45698
45699  if test "x$BUILD_AR" != x; then
45700    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45701
45702  # First separate the path from the arguments. This will split at the first
45703  # space.
45704  complete="$BUILD_AR"
45705  path="${complete%% *}"
45706  tmp="$complete EOL"
45707  arguments="${tmp#* }"
45708
45709  # Input might be given as Windows format, start by converting to
45710  # unix format.
45711  new_path=`$CYGPATH -u "$path"`
45712
45713  # Now try to locate executable using which
45714  new_path=`$WHICH "$new_path" 2> /dev/null`
45715  # bat and cmd files are not always considered executable in cygwin causing which
45716  # to not find them
45717  if test "x$new_path" = x \
45718      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45719      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45720    new_path=`$CYGPATH -u "$path"`
45721  fi
45722  if test "x$new_path" = x; then
45723    # Oops. Which didn't find the executable.
45724    # The splitting of arguments from the executable at a space might have been incorrect,
45725    # since paths with space are more likely in Windows. Give it another try with the whole
45726    # argument.
45727    path="$complete"
45728    arguments="EOL"
45729    new_path=`$CYGPATH -u "$path"`
45730    new_path=`$WHICH "$new_path" 2> /dev/null`
45731    # bat and cmd files are not always considered executable in cygwin causing which
45732    # to not find them
45733    if test "x$new_path" = x \
45734        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45735        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45736      new_path=`$CYGPATH -u "$path"`
45737    fi
45738    if test "x$new_path" = x; then
45739      # It's still not found. Now this is an unrecoverable error.
45740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45741$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45742      has_space=`$ECHO "$complete" | $GREP " "`
45743      if test "x$has_space" != x; then
45744        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45745$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45746      fi
45747      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45748    fi
45749  fi
45750
45751  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45752  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45753  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45754  # "foo.exe" is OK but "foo" is an error.
45755  #
45756  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45757  # It is also a way to make sure we got the proper file name for the real test later on.
45758  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45759  if test "x$test_shortpath" = x; then
45760    # Short path failed, file does not exist as specified.
45761    # Try adding .exe or .cmd
45762    if test -f "${new_path}.exe"; then
45763      input_to_shortpath="${new_path}.exe"
45764    elif test -f "${new_path}.cmd"; then
45765      input_to_shortpath="${new_path}.cmd"
45766    else
45767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45768$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45769      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45770$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45771      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45772    fi
45773  else
45774    input_to_shortpath="$new_path"
45775  fi
45776
45777  # Call helper function which possibly converts this using DOS-style short mode.
45778  # If so, the updated path is stored in $new_path.
45779  new_path="$input_to_shortpath"
45780
45781  input_path="$input_to_shortpath"
45782  # Check if we need to convert this using DOS-style short mode. If the path
45783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45784  # take no chances and rewrite it.
45785  # Note: m4 eats our [], so we need to use [ and ] instead.
45786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45787  if test "x$has_forbidden_chars" != x; then
45788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45789    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45790    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45791    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45792      # Going to short mode and back again did indeed matter. Since short mode is
45793      # case insensitive, let's make it lowercase to improve readability.
45794      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45795      # Now convert it back to Unix-style (cygpath)
45796      input_path=`$CYGPATH -u "$shortmode_path"`
45797      new_path="$input_path"
45798    fi
45799  fi
45800
45801  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45802  if test "x$test_cygdrive_prefix" = x; then
45803    # As a simple fix, exclude /usr/bin since it's not a real path.
45804    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45805      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45806      # a path prefixed by /cygdrive for fixpath to work.
45807      new_path="$CYGWIN_ROOT_PATH$input_path"
45808    fi
45809  fi
45810
45811  # remove trailing .exe if any
45812  new_path="${new_path/%.exe/}"
45813
45814    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45815
45816  # First separate the path from the arguments. This will split at the first
45817  # space.
45818  complete="$BUILD_AR"
45819  path="${complete%% *}"
45820  tmp="$complete EOL"
45821  arguments="${tmp#* }"
45822
45823  # Input might be given as Windows format, start by converting to
45824  # unix format.
45825  new_path="$path"
45826
45827  windows_path="$new_path"
45828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45829    unix_path=`$CYGPATH -u "$windows_path"`
45830    new_path="$unix_path"
45831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45833    new_path="$unix_path"
45834  fi
45835
45836
45837  # Now try to locate executable using which
45838  new_path=`$WHICH "$new_path" 2> /dev/null`
45839
45840  if test "x$new_path" = x; then
45841    # Oops. Which didn't find the executable.
45842    # The splitting of arguments from the executable at a space might have been incorrect,
45843    # since paths with space are more likely in Windows. Give it another try with the whole
45844    # argument.
45845    path="$complete"
45846    arguments="EOL"
45847    new_path="$path"
45848
45849  windows_path="$new_path"
45850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45851    unix_path=`$CYGPATH -u "$windows_path"`
45852    new_path="$unix_path"
45853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45855    new_path="$unix_path"
45856  fi
45857
45858
45859    new_path=`$WHICH "$new_path" 2> /dev/null`
45860    # bat and cmd files are not always considered executable in MSYS causing which
45861    # to not find them
45862    if test "x$new_path" = x \
45863        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45864        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45865      new_path="$path"
45866
45867  windows_path="$new_path"
45868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45869    unix_path=`$CYGPATH -u "$windows_path"`
45870    new_path="$unix_path"
45871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45873    new_path="$unix_path"
45874  fi
45875
45876    fi
45877
45878    if test "x$new_path" = x; then
45879      # It's still not found. Now this is an unrecoverable error.
45880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45881$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45882      has_space=`$ECHO "$complete" | $GREP " "`
45883      if test "x$has_space" != x; then
45884        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45885$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45886      fi
45887      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45888    fi
45889  fi
45890
45891  # Now new_path has a complete unix path to the binary
45892  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45893    # Keep paths in /bin as-is, but remove trailing .exe if any
45894    new_path="${new_path/%.exe/}"
45895    # Do not save /bin paths to all_fixpath_prefixes!
45896  else
45897    # Not in mixed or Windows style, start by that.
45898    new_path=`cmd //c echo $new_path`
45899
45900  input_path="$new_path"
45901  # Check if we need to convert this using DOS-style short mode. If the path
45902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45903  # take no chances and rewrite it.
45904  # Note: m4 eats our [], so we need to use [ and ] instead.
45905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45906  if test "x$has_forbidden_chars" != x; then
45907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45909  fi
45910
45911    # Output is in $new_path
45912
45913  windows_path="$new_path"
45914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45915    unix_path=`$CYGPATH -u "$windows_path"`
45916    new_path="$unix_path"
45917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45919    new_path="$unix_path"
45920  fi
45921
45922    # remove trailing .exe if any
45923    new_path="${new_path/%.exe/}"
45924
45925    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45926    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45927  fi
45928
45929    else
45930      # We're on a unix platform. Hooray! :)
45931      # First separate the path from the arguments. This will split at the first
45932      # space.
45933      complete="$BUILD_AR"
45934      path="${complete%% *}"
45935      tmp="$complete EOL"
45936      arguments="${tmp#* }"
45937
45938      # Cannot rely on the command "which" here since it doesn't always work.
45939      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45940      if test -z "$is_absolute_path"; then
45941        # Path to executable is not absolute. Find it.
45942        IFS_save="$IFS"
45943        IFS=:
45944        for p in $PATH; do
45945          if test -f "$p/$path" && test -x "$p/$path"; then
45946            new_path="$p/$path"
45947            break
45948          fi
45949        done
45950        IFS="$IFS_save"
45951      else
45952        # This is an absolute path, we can use it without further modifications.
45953        new_path="$path"
45954      fi
45955
45956      if test "x$new_path" = x; then
45957        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45958$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45959        has_space=`$ECHO "$complete" | $GREP " "`
45960        if test "x$has_space" != x; then
45961          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45962$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45963        fi
45964        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45965      fi
45966    fi
45967
45968    # Now join together the path and the arguments once again
45969    if test "x$arguments" != xEOL; then
45970      new_complete="$new_path ${arguments% *}"
45971    else
45972      new_complete="$new_path"
45973    fi
45974
45975    if test "x$complete" != "x$new_complete"; then
45976      BUILD_AR="$new_complete"
45977      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45978$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45979    fi
45980  fi
45981
45982
45983
45984  # Publish this variable in the help.
45985
45986
45987  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45988    # The variable is not set by user, try to locate tool using the code snippet
45989    for ac_prog in objcopy
45990do
45991  # Extract the first word of "$ac_prog", so it can be a program name with args.
45992set dummy $ac_prog; ac_word=$2
45993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45994$as_echo_n "checking for $ac_word... " >&6; }
45995if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45996  $as_echo_n "(cached) " >&6
45997else
45998  case $BUILD_OBJCOPY in
45999  [\\/]* | ?:[\\/]*)
46000  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46001  ;;
46002  *)
46003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46004for as_dir in $PATH
46005do
46006  IFS=$as_save_IFS
46007  test -z "$as_dir" && as_dir=.
46008    for ac_exec_ext in '' $ac_executable_extensions; do
46009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46010    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46012    break 2
46013  fi
46014done
46015  done
46016IFS=$as_save_IFS
46017
46018  ;;
46019esac
46020fi
46021BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46022if test -n "$BUILD_OBJCOPY"; then
46023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46024$as_echo "$BUILD_OBJCOPY" >&6; }
46025else
46026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46027$as_echo "no" >&6; }
46028fi
46029
46030
46031  test -n "$BUILD_OBJCOPY" && break
46032done
46033
46034  else
46035    # The variable is set, but is it from the command line or the environment?
46036
46037    # Try to remove the string !BUILD_OBJCOPY! from our list.
46038    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46039    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46040      # If it failed, the variable was not from the command line. Ignore it,
46041      # but warn the user (except for BASH, which is always set by the calling BASH).
46042      if test "xBUILD_OBJCOPY" != xBASH; then
46043        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46044$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46045      fi
46046      # Try to locate tool using the code snippet
46047      for ac_prog in objcopy
46048do
46049  # Extract the first word of "$ac_prog", so it can be a program name with args.
46050set dummy $ac_prog; ac_word=$2
46051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46052$as_echo_n "checking for $ac_word... " >&6; }
46053if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46054  $as_echo_n "(cached) " >&6
46055else
46056  case $BUILD_OBJCOPY in
46057  [\\/]* | ?:[\\/]*)
46058  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46059  ;;
46060  *)
46061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46062for as_dir in $PATH
46063do
46064  IFS=$as_save_IFS
46065  test -z "$as_dir" && as_dir=.
46066    for ac_exec_ext in '' $ac_executable_extensions; do
46067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46068    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46070    break 2
46071  fi
46072done
46073  done
46074IFS=$as_save_IFS
46075
46076  ;;
46077esac
46078fi
46079BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46080if test -n "$BUILD_OBJCOPY"; then
46081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46082$as_echo "$BUILD_OBJCOPY" >&6; }
46083else
46084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46085$as_echo "no" >&6; }
46086fi
46087
46088
46089  test -n "$BUILD_OBJCOPY" && break
46090done
46091
46092    else
46093      # If it succeeded, then it was overridden by the user. We will use it
46094      # for the tool.
46095
46096      # First remove it from the list of overridden variables, so we can test
46097      # for unknown variables in the end.
46098      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46099
46100      # Check if we try to supply an empty value
46101      if test "x$BUILD_OBJCOPY" = x; then
46102        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46103$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46104        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46105$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46106        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46107$as_echo "disabled" >&6; }
46108      else
46109        # Check if the provided tool contains a complete path.
46110        tool_specified="$BUILD_OBJCOPY"
46111        tool_basename="${tool_specified##*/}"
46112        if test "x$tool_basename" = "x$tool_specified"; then
46113          # A command without a complete path is provided, search $PATH.
46114          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46115$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46116          # Extract the first word of "$tool_basename", so it can be a program name with args.
46117set dummy $tool_basename; ac_word=$2
46118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46119$as_echo_n "checking for $ac_word... " >&6; }
46120if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46121  $as_echo_n "(cached) " >&6
46122else
46123  case $BUILD_OBJCOPY in
46124  [\\/]* | ?:[\\/]*)
46125  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46126  ;;
46127  *)
46128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46129for as_dir in $PATH
46130do
46131  IFS=$as_save_IFS
46132  test -z "$as_dir" && as_dir=.
46133    for ac_exec_ext in '' $ac_executable_extensions; do
46134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46135    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46137    break 2
46138  fi
46139done
46140  done
46141IFS=$as_save_IFS
46142
46143  ;;
46144esac
46145fi
46146BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46147if test -n "$BUILD_OBJCOPY"; then
46148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46149$as_echo "$BUILD_OBJCOPY" >&6; }
46150else
46151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46152$as_echo "no" >&6; }
46153fi
46154
46155
46156          if test "x$BUILD_OBJCOPY" = x; then
46157            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46158          fi
46159        else
46160          # Otherwise we believe it is a complete path. Use it as it is.
46161          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46162$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46163          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46164$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46165          if test ! -x "$tool_specified"; then
46166            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46167$as_echo "not found" >&6; }
46168            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46169          fi
46170          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46171$as_echo "$tool_specified" >&6; }
46172        fi
46173      fi
46174    fi
46175
46176  fi
46177
46178
46179
46180  # Only process if variable expands to non-empty
46181
46182  if test "x$BUILD_OBJCOPY" != x; then
46183    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46184
46185  # First separate the path from the arguments. This will split at the first
46186  # space.
46187  complete="$BUILD_OBJCOPY"
46188  path="${complete%% *}"
46189  tmp="$complete EOL"
46190  arguments="${tmp#* }"
46191
46192  # Input might be given as Windows format, start by converting to
46193  # unix format.
46194  new_path=`$CYGPATH -u "$path"`
46195
46196  # Now try to locate executable using which
46197  new_path=`$WHICH "$new_path" 2> /dev/null`
46198  # bat and cmd files are not always considered executable in cygwin causing which
46199  # to not find them
46200  if test "x$new_path" = x \
46201      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46202      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46203    new_path=`$CYGPATH -u "$path"`
46204  fi
46205  if test "x$new_path" = x; then
46206    # Oops. Which didn't find the executable.
46207    # The splitting of arguments from the executable at a space might have been incorrect,
46208    # since paths with space are more likely in Windows. Give it another try with the whole
46209    # argument.
46210    path="$complete"
46211    arguments="EOL"
46212    new_path=`$CYGPATH -u "$path"`
46213    new_path=`$WHICH "$new_path" 2> /dev/null`
46214    # bat and cmd files are not always considered executable in cygwin causing which
46215    # to not find them
46216    if test "x$new_path" = x \
46217        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46218        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46219      new_path=`$CYGPATH -u "$path"`
46220    fi
46221    if test "x$new_path" = x; then
46222      # It's still not found. Now this is an unrecoverable error.
46223      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46224$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46225      has_space=`$ECHO "$complete" | $GREP " "`
46226      if test "x$has_space" != x; then
46227        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46228$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46229      fi
46230      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46231    fi
46232  fi
46233
46234  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46235  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46236  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46237  # "foo.exe" is OK but "foo" is an error.
46238  #
46239  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46240  # It is also a way to make sure we got the proper file name for the real test later on.
46241  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46242  if test "x$test_shortpath" = x; then
46243    # Short path failed, file does not exist as specified.
46244    # Try adding .exe or .cmd
46245    if test -f "${new_path}.exe"; then
46246      input_to_shortpath="${new_path}.exe"
46247    elif test -f "${new_path}.cmd"; then
46248      input_to_shortpath="${new_path}.cmd"
46249    else
46250      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46251$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46252      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46253$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46254      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46255    fi
46256  else
46257    input_to_shortpath="$new_path"
46258  fi
46259
46260  # Call helper function which possibly converts this using DOS-style short mode.
46261  # If so, the updated path is stored in $new_path.
46262  new_path="$input_to_shortpath"
46263
46264  input_path="$input_to_shortpath"
46265  # Check if we need to convert this using DOS-style short mode. If the path
46266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46267  # take no chances and rewrite it.
46268  # Note: m4 eats our [], so we need to use [ and ] instead.
46269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46270  if test "x$has_forbidden_chars" != x; then
46271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46272    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46273    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46274    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46275      # Going to short mode and back again did indeed matter. Since short mode is
46276      # case insensitive, let's make it lowercase to improve readability.
46277      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46278      # Now convert it back to Unix-style (cygpath)
46279      input_path=`$CYGPATH -u "$shortmode_path"`
46280      new_path="$input_path"
46281    fi
46282  fi
46283
46284  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46285  if test "x$test_cygdrive_prefix" = x; then
46286    # As a simple fix, exclude /usr/bin since it's not a real path.
46287    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46288      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46289      # a path prefixed by /cygdrive for fixpath to work.
46290      new_path="$CYGWIN_ROOT_PATH$input_path"
46291    fi
46292  fi
46293
46294  # remove trailing .exe if any
46295  new_path="${new_path/%.exe/}"
46296
46297    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46298
46299  # First separate the path from the arguments. This will split at the first
46300  # space.
46301  complete="$BUILD_OBJCOPY"
46302  path="${complete%% *}"
46303  tmp="$complete EOL"
46304  arguments="${tmp#* }"
46305
46306  # Input might be given as Windows format, start by converting to
46307  # unix format.
46308  new_path="$path"
46309
46310  windows_path="$new_path"
46311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46312    unix_path=`$CYGPATH -u "$windows_path"`
46313    new_path="$unix_path"
46314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46316    new_path="$unix_path"
46317  fi
46318
46319
46320  # Now try to locate executable using which
46321  new_path=`$WHICH "$new_path" 2> /dev/null`
46322
46323  if test "x$new_path" = x; then
46324    # Oops. Which didn't find the executable.
46325    # The splitting of arguments from the executable at a space might have been incorrect,
46326    # since paths with space are more likely in Windows. Give it another try with the whole
46327    # argument.
46328    path="$complete"
46329    arguments="EOL"
46330    new_path="$path"
46331
46332  windows_path="$new_path"
46333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46334    unix_path=`$CYGPATH -u "$windows_path"`
46335    new_path="$unix_path"
46336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46338    new_path="$unix_path"
46339  fi
46340
46341
46342    new_path=`$WHICH "$new_path" 2> /dev/null`
46343    # bat and cmd files are not always considered executable in MSYS causing which
46344    # to not find them
46345    if test "x$new_path" = x \
46346        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46347        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46348      new_path="$path"
46349
46350  windows_path="$new_path"
46351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46352    unix_path=`$CYGPATH -u "$windows_path"`
46353    new_path="$unix_path"
46354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46356    new_path="$unix_path"
46357  fi
46358
46359    fi
46360
46361    if test "x$new_path" = x; then
46362      # It's still not found. Now this is an unrecoverable error.
46363      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46364$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46365      has_space=`$ECHO "$complete" | $GREP " "`
46366      if test "x$has_space" != x; then
46367        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46368$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46369      fi
46370      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46371    fi
46372  fi
46373
46374  # Now new_path has a complete unix path to the binary
46375  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46376    # Keep paths in /bin as-is, but remove trailing .exe if any
46377    new_path="${new_path/%.exe/}"
46378    # Do not save /bin paths to all_fixpath_prefixes!
46379  else
46380    # Not in mixed or Windows style, start by that.
46381    new_path=`cmd //c echo $new_path`
46382
46383  input_path="$new_path"
46384  # Check if we need to convert this using DOS-style short mode. If the path
46385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46386  # take no chances and rewrite it.
46387  # Note: m4 eats our [], so we need to use [ and ] instead.
46388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46389  if test "x$has_forbidden_chars" != x; then
46390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46391    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46392  fi
46393
46394    # Output is in $new_path
46395
46396  windows_path="$new_path"
46397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46398    unix_path=`$CYGPATH -u "$windows_path"`
46399    new_path="$unix_path"
46400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46402    new_path="$unix_path"
46403  fi
46404
46405    # remove trailing .exe if any
46406    new_path="${new_path/%.exe/}"
46407
46408    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46409    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46410  fi
46411
46412    else
46413      # We're on a unix platform. Hooray! :)
46414      # First separate the path from the arguments. This will split at the first
46415      # space.
46416      complete="$BUILD_OBJCOPY"
46417      path="${complete%% *}"
46418      tmp="$complete EOL"
46419      arguments="${tmp#* }"
46420
46421      # Cannot rely on the command "which" here since it doesn't always work.
46422      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46423      if test -z "$is_absolute_path"; then
46424        # Path to executable is not absolute. Find it.
46425        IFS_save="$IFS"
46426        IFS=:
46427        for p in $PATH; do
46428          if test -f "$p/$path" && test -x "$p/$path"; then
46429            new_path="$p/$path"
46430            break
46431          fi
46432        done
46433        IFS="$IFS_save"
46434      else
46435        # This is an absolute path, we can use it without further modifications.
46436        new_path="$path"
46437      fi
46438
46439      if test "x$new_path" = x; then
46440        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46441$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46442        has_space=`$ECHO "$complete" | $GREP " "`
46443        if test "x$has_space" != x; then
46444          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46445$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46446        fi
46447        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46448      fi
46449    fi
46450
46451    # Now join together the path and the arguments once again
46452    if test "x$arguments" != xEOL; then
46453      new_complete="$new_path ${arguments% *}"
46454    else
46455      new_complete="$new_path"
46456    fi
46457
46458    if test "x$complete" != "x$new_complete"; then
46459      BUILD_OBJCOPY="$new_complete"
46460      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46461$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46462    fi
46463  fi
46464
46465
46466
46467  # Publish this variable in the help.
46468
46469
46470  if [ -z "${BUILD_STRIP+x}" ]; then
46471    # The variable is not set by user, try to locate tool using the code snippet
46472    for ac_prog in strip
46473do
46474  # Extract the first word of "$ac_prog", so it can be a program name with args.
46475set dummy $ac_prog; ac_word=$2
46476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46477$as_echo_n "checking for $ac_word... " >&6; }
46478if ${ac_cv_path_BUILD_STRIP+:} false; then :
46479  $as_echo_n "(cached) " >&6
46480else
46481  case $BUILD_STRIP in
46482  [\\/]* | ?:[\\/]*)
46483  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46484  ;;
46485  *)
46486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46487for as_dir in $PATH
46488do
46489  IFS=$as_save_IFS
46490  test -z "$as_dir" && as_dir=.
46491    for ac_exec_ext in '' $ac_executable_extensions; do
46492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46493    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46495    break 2
46496  fi
46497done
46498  done
46499IFS=$as_save_IFS
46500
46501  ;;
46502esac
46503fi
46504BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46505if test -n "$BUILD_STRIP"; then
46506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46507$as_echo "$BUILD_STRIP" >&6; }
46508else
46509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46510$as_echo "no" >&6; }
46511fi
46512
46513
46514  test -n "$BUILD_STRIP" && break
46515done
46516
46517  else
46518    # The variable is set, but is it from the command line or the environment?
46519
46520    # Try to remove the string !BUILD_STRIP! from our list.
46521    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46522    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46523      # If it failed, the variable was not from the command line. Ignore it,
46524      # but warn the user (except for BASH, which is always set by the calling BASH).
46525      if test "xBUILD_STRIP" != xBASH; then
46526        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46527$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46528      fi
46529      # Try to locate tool using the code snippet
46530      for ac_prog in strip
46531do
46532  # Extract the first word of "$ac_prog", so it can be a program name with args.
46533set dummy $ac_prog; ac_word=$2
46534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46535$as_echo_n "checking for $ac_word... " >&6; }
46536if ${ac_cv_path_BUILD_STRIP+:} false; then :
46537  $as_echo_n "(cached) " >&6
46538else
46539  case $BUILD_STRIP in
46540  [\\/]* | ?:[\\/]*)
46541  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46542  ;;
46543  *)
46544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46545for as_dir in $PATH
46546do
46547  IFS=$as_save_IFS
46548  test -z "$as_dir" && as_dir=.
46549    for ac_exec_ext in '' $ac_executable_extensions; do
46550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46551    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46553    break 2
46554  fi
46555done
46556  done
46557IFS=$as_save_IFS
46558
46559  ;;
46560esac
46561fi
46562BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46563if test -n "$BUILD_STRIP"; then
46564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46565$as_echo "$BUILD_STRIP" >&6; }
46566else
46567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46568$as_echo "no" >&6; }
46569fi
46570
46571
46572  test -n "$BUILD_STRIP" && break
46573done
46574
46575    else
46576      # If it succeeded, then it was overridden by the user. We will use it
46577      # for the tool.
46578
46579      # First remove it from the list of overridden variables, so we can test
46580      # for unknown variables in the end.
46581      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46582
46583      # Check if we try to supply an empty value
46584      if test "x$BUILD_STRIP" = x; then
46585        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46586$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46587        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46588$as_echo_n "checking for BUILD_STRIP... " >&6; }
46589        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46590$as_echo "disabled" >&6; }
46591      else
46592        # Check if the provided tool contains a complete path.
46593        tool_specified="$BUILD_STRIP"
46594        tool_basename="${tool_specified##*/}"
46595        if test "x$tool_basename" = "x$tool_specified"; then
46596          # A command without a complete path is provided, search $PATH.
46597          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46598$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46599          # Extract the first word of "$tool_basename", so it can be a program name with args.
46600set dummy $tool_basename; ac_word=$2
46601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46602$as_echo_n "checking for $ac_word... " >&6; }
46603if ${ac_cv_path_BUILD_STRIP+:} false; then :
46604  $as_echo_n "(cached) " >&6
46605else
46606  case $BUILD_STRIP in
46607  [\\/]* | ?:[\\/]*)
46608  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46609  ;;
46610  *)
46611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46612for as_dir in $PATH
46613do
46614  IFS=$as_save_IFS
46615  test -z "$as_dir" && as_dir=.
46616    for ac_exec_ext in '' $ac_executable_extensions; do
46617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46618    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46620    break 2
46621  fi
46622done
46623  done
46624IFS=$as_save_IFS
46625
46626  ;;
46627esac
46628fi
46629BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46630if test -n "$BUILD_STRIP"; then
46631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46632$as_echo "$BUILD_STRIP" >&6; }
46633else
46634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46635$as_echo "no" >&6; }
46636fi
46637
46638
46639          if test "x$BUILD_STRIP" = x; then
46640            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46641          fi
46642        else
46643          # Otherwise we believe it is a complete path. Use it as it is.
46644          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46645$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46646          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46647$as_echo_n "checking for BUILD_STRIP... " >&6; }
46648          if test ! -x "$tool_specified"; then
46649            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46650$as_echo "not found" >&6; }
46651            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46652          fi
46653          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46654$as_echo "$tool_specified" >&6; }
46655        fi
46656      fi
46657    fi
46658
46659  fi
46660
46661
46662
46663  # Only process if variable expands to non-empty
46664
46665  if test "x$BUILD_STRIP" != x; then
46666    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46667
46668  # First separate the path from the arguments. This will split at the first
46669  # space.
46670  complete="$BUILD_STRIP"
46671  path="${complete%% *}"
46672  tmp="$complete EOL"
46673  arguments="${tmp#* }"
46674
46675  # Input might be given as Windows format, start by converting to
46676  # unix format.
46677  new_path=`$CYGPATH -u "$path"`
46678
46679  # Now try to locate executable using which
46680  new_path=`$WHICH "$new_path" 2> /dev/null`
46681  # bat and cmd files are not always considered executable in cygwin causing which
46682  # to not find them
46683  if test "x$new_path" = x \
46684      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46685      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46686    new_path=`$CYGPATH -u "$path"`
46687  fi
46688  if test "x$new_path" = x; then
46689    # Oops. Which didn't find the executable.
46690    # The splitting of arguments from the executable at a space might have been incorrect,
46691    # since paths with space are more likely in Windows. Give it another try with the whole
46692    # argument.
46693    path="$complete"
46694    arguments="EOL"
46695    new_path=`$CYGPATH -u "$path"`
46696    new_path=`$WHICH "$new_path" 2> /dev/null`
46697    # bat and cmd files are not always considered executable in cygwin causing which
46698    # to not find them
46699    if test "x$new_path" = x \
46700        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46701        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46702      new_path=`$CYGPATH -u "$path"`
46703    fi
46704    if test "x$new_path" = x; then
46705      # It's still not found. Now this is an unrecoverable error.
46706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46707$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46708      has_space=`$ECHO "$complete" | $GREP " "`
46709      if test "x$has_space" != x; then
46710        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46711$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46712      fi
46713      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46714    fi
46715  fi
46716
46717  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46718  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46719  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46720  # "foo.exe" is OK but "foo" is an error.
46721  #
46722  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46723  # It is also a way to make sure we got the proper file name for the real test later on.
46724  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46725  if test "x$test_shortpath" = x; then
46726    # Short path failed, file does not exist as specified.
46727    # Try adding .exe or .cmd
46728    if test -f "${new_path}.exe"; then
46729      input_to_shortpath="${new_path}.exe"
46730    elif test -f "${new_path}.cmd"; then
46731      input_to_shortpath="${new_path}.cmd"
46732    else
46733      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46734$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46735      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46736$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46737      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46738    fi
46739  else
46740    input_to_shortpath="$new_path"
46741  fi
46742
46743  # Call helper function which possibly converts this using DOS-style short mode.
46744  # If so, the updated path is stored in $new_path.
46745  new_path="$input_to_shortpath"
46746
46747  input_path="$input_to_shortpath"
46748  # Check if we need to convert this using DOS-style short mode. If the path
46749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46750  # take no chances and rewrite it.
46751  # Note: m4 eats our [], so we need to use [ and ] instead.
46752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46753  if test "x$has_forbidden_chars" != x; then
46754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46758      # Going to short mode and back again did indeed matter. Since short mode is
46759      # case insensitive, let's make it lowercase to improve readability.
46760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46761      # Now convert it back to Unix-style (cygpath)
46762      input_path=`$CYGPATH -u "$shortmode_path"`
46763      new_path="$input_path"
46764    fi
46765  fi
46766
46767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46768  if test "x$test_cygdrive_prefix" = x; then
46769    # As a simple fix, exclude /usr/bin since it's not a real path.
46770    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46772      # a path prefixed by /cygdrive for fixpath to work.
46773      new_path="$CYGWIN_ROOT_PATH$input_path"
46774    fi
46775  fi
46776
46777  # remove trailing .exe if any
46778  new_path="${new_path/%.exe/}"
46779
46780    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46781
46782  # First separate the path from the arguments. This will split at the first
46783  # space.
46784  complete="$BUILD_STRIP"
46785  path="${complete%% *}"
46786  tmp="$complete EOL"
46787  arguments="${tmp#* }"
46788
46789  # Input might be given as Windows format, start by converting to
46790  # unix format.
46791  new_path="$path"
46792
46793  windows_path="$new_path"
46794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46795    unix_path=`$CYGPATH -u "$windows_path"`
46796    new_path="$unix_path"
46797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46799    new_path="$unix_path"
46800  fi
46801
46802
46803  # Now try to locate executable using which
46804  new_path=`$WHICH "$new_path" 2> /dev/null`
46805
46806  if test "x$new_path" = x; then
46807    # Oops. Which didn't find the executable.
46808    # The splitting of arguments from the executable at a space might have been incorrect,
46809    # since paths with space are more likely in Windows. Give it another try with the whole
46810    # argument.
46811    path="$complete"
46812    arguments="EOL"
46813    new_path="$path"
46814
46815  windows_path="$new_path"
46816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46817    unix_path=`$CYGPATH -u "$windows_path"`
46818    new_path="$unix_path"
46819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46821    new_path="$unix_path"
46822  fi
46823
46824
46825    new_path=`$WHICH "$new_path" 2> /dev/null`
46826    # bat and cmd files are not always considered executable in MSYS causing which
46827    # to not find them
46828    if test "x$new_path" = x \
46829        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46830        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46831      new_path="$path"
46832
46833  windows_path="$new_path"
46834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46835    unix_path=`$CYGPATH -u "$windows_path"`
46836    new_path="$unix_path"
46837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46839    new_path="$unix_path"
46840  fi
46841
46842    fi
46843
46844    if test "x$new_path" = x; then
46845      # It's still not found. Now this is an unrecoverable error.
46846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46847$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46848      has_space=`$ECHO "$complete" | $GREP " "`
46849      if test "x$has_space" != x; then
46850        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46851$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46852      fi
46853      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46854    fi
46855  fi
46856
46857  # Now new_path has a complete unix path to the binary
46858  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46859    # Keep paths in /bin as-is, but remove trailing .exe if any
46860    new_path="${new_path/%.exe/}"
46861    # Do not save /bin paths to all_fixpath_prefixes!
46862  else
46863    # Not in mixed or Windows style, start by that.
46864    new_path=`cmd //c echo $new_path`
46865
46866  input_path="$new_path"
46867  # Check if we need to convert this using DOS-style short mode. If the path
46868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46869  # take no chances and rewrite it.
46870  # Note: m4 eats our [], so we need to use [ and ] instead.
46871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46872  if test "x$has_forbidden_chars" != x; then
46873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46875  fi
46876
46877    # Output is in $new_path
46878
46879  windows_path="$new_path"
46880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46881    unix_path=`$CYGPATH -u "$windows_path"`
46882    new_path="$unix_path"
46883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46885    new_path="$unix_path"
46886  fi
46887
46888    # remove trailing .exe if any
46889    new_path="${new_path/%.exe/}"
46890
46891    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46892    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46893  fi
46894
46895    else
46896      # We're on a unix platform. Hooray! :)
46897      # First separate the path from the arguments. This will split at the first
46898      # space.
46899      complete="$BUILD_STRIP"
46900      path="${complete%% *}"
46901      tmp="$complete EOL"
46902      arguments="${tmp#* }"
46903
46904      # Cannot rely on the command "which" here since it doesn't always work.
46905      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46906      if test -z "$is_absolute_path"; then
46907        # Path to executable is not absolute. Find it.
46908        IFS_save="$IFS"
46909        IFS=:
46910        for p in $PATH; do
46911          if test -f "$p/$path" && test -x "$p/$path"; then
46912            new_path="$p/$path"
46913            break
46914          fi
46915        done
46916        IFS="$IFS_save"
46917      else
46918        # This is an absolute path, we can use it without further modifications.
46919        new_path="$path"
46920      fi
46921
46922      if test "x$new_path" = x; then
46923        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46924$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46925        has_space=`$ECHO "$complete" | $GREP " "`
46926        if test "x$has_space" != x; then
46927          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46928$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46929        fi
46930        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46931      fi
46932    fi
46933
46934    # Now join together the path and the arguments once again
46935    if test "x$arguments" != xEOL; then
46936      new_complete="$new_path ${arguments% *}"
46937    else
46938      new_complete="$new_path"
46939    fi
46940
46941    if test "x$complete" != "x$new_complete"; then
46942      BUILD_STRIP="$new_complete"
46943      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46944$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46945    fi
46946  fi
46947
46948    # Assume the C compiler is the assembler
46949    BUILD_AS="$BUILD_CC -c"
46950    # Just like for the target compiler, use the compiler as linker
46951    BUILD_LD="$BUILD_CC"
46952    BUILD_LDCXX="$BUILD_CXX"
46953
46954    PATH="$OLDPATH"
46955
46956
46957  COMPILER=$BUILD_CC
46958  COMPILER_NAME=BuildC
46959
46960  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46961    # cc -V output typically looks like
46962    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46963    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46964    # Check that this is likely to be the Solaris Studio cc.
46965    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46966    if test $? -ne 0; then
46967      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46968      { $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
46969$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46970      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46971$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46972      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46973$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46974      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46975    fi
46976    # Remove usage instructions (if present), and
46977    # collapse compiler output into a single line
46978    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46979        $SED -e 's/ *[Uu]sage:.*//'`
46980    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46981        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46982  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46983    # xlc -qversion output typically looks like
46984    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46985    #     Version: 11.01.0000.0015
46986    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46987    # Check that this is likely to be the IBM XL C compiler.
46988    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46989    if test $? -ne 0; then
46990      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46991      { $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
46992$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46993      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46994$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46995      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46996$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46997      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46998    fi
46999    # Collapse compiler output into a single line
47000    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47001    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47002        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47003  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47004    # There is no specific version flag, but all output starts with a version string.
47005    # First line typically looks something like:
47006    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47007    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47008    # Check that this is likely to be Microsoft CL.EXE.
47009    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47010    if test $? -ne 0; then
47011      { $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
47012$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47013      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47014$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47015      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47016    fi
47017    # Collapse compiler output into a single line
47018    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47019    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47020        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47021  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47022    # gcc --version output typically looks like
47023    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47024    #     Copyright (C) 2013 Free Software Foundation, Inc.
47025    #     This is free software; see the source for copying conditions.  There is NO
47026    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47027    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47028    # Check that this is likely to be GCC.
47029    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47030    if test $? -ne 0; then
47031      { $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
47032$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47033      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47034$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47035      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47036    fi
47037    # Remove Copyright and legalese from version string, and
47038    # collapse into a single line
47039    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47040        $SED -e 's/ *Copyright .*//'`
47041    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47042        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47043  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47044    # clang --version output typically looks like
47045    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47046    #    clang version 3.3 (tags/RELEASE_33/final)
47047    # or
47048    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47049    #    Target: x86_64-pc-linux-gnu
47050    #    Thread model: posix
47051    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47052    # Check that this is likely to be clang
47053    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47054    if test $? -ne 0; then
47055      { $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
47056$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47057      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47058$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47059      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47060    fi
47061    # Collapse compiler output into a single line
47062    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47063    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47064        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47065  else
47066      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47067  fi
47068  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47069  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47070  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47071  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47072
47073  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47074$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47075
47076
47077  COMPILER=$BUILD_CXX
47078  COMPILER_NAME=BuildC++
47079
47080  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47081    # cc -V output typically looks like
47082    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47083    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47084    # Check that this is likely to be the Solaris Studio cc.
47085    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
47086    if test $? -ne 0; then
47087      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47088      { $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
47089$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47090      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47091$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47092      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47093$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47094      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47095    fi
47096    # Remove usage instructions (if present), and
47097    # collapse compiler output into a single line
47098    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47099        $SED -e 's/ *[Uu]sage:.*//'`
47100    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47101        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47102  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47103    # xlc -qversion output typically looks like
47104    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47105    #     Version: 11.01.0000.0015
47106    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47107    # Check that this is likely to be the IBM XL C compiler.
47108    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47109    if test $? -ne 0; then
47110      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47111      { $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
47112$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47113      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47114$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47115      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47116$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47117      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47118    fi
47119    # Collapse compiler output into a single line
47120    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47121    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47122        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47123  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47124    # There is no specific version flag, but all output starts with a version string.
47125    # First line typically looks something like:
47126    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47127    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47128    # Check that this is likely to be Microsoft CL.EXE.
47129    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47130    if test $? -ne 0; then
47131      { $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
47132$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47133      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47134$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47135      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47136    fi
47137    # Collapse compiler output into a single line
47138    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47139    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47140        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47141  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47142    # gcc --version output typically looks like
47143    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47144    #     Copyright (C) 2013 Free Software Foundation, Inc.
47145    #     This is free software; see the source for copying conditions.  There is NO
47146    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47147    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47148    # Check that this is likely to be GCC.
47149    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47150    if test $? -ne 0; then
47151      { $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
47152$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47153      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47154$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47155      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47156    fi
47157    # Remove Copyright and legalese from version string, and
47158    # collapse into a single line
47159    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47160        $SED -e 's/ *Copyright .*//'`
47161    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47162        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47163  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47164    # clang --version output typically looks like
47165    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47166    #    clang version 3.3 (tags/RELEASE_33/final)
47167    # or
47168    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47169    #    Target: x86_64-pc-linux-gnu
47170    #    Thread model: posix
47171    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47172    # Check that this is likely to be clang
47173    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47174    if test $? -ne 0; then
47175      { $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
47176$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47177      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47178$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47179      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47180    fi
47181    # Collapse compiler output into a single line
47182    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47183    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47184        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47185  else
47186      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47187  fi
47188  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47189  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47190  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47191  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47192
47193  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47194$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47195
47196
47197  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47198    { $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
47199$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47200    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47201$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47202  fi
47203
47204  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47205  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47206    { $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
47207$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;}
47208  fi
47209
47210  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47211    { $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
47212$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47213  fi
47214
47215  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47216
47217  else
47218    # If we are not cross compiling, use the normal target compilers for
47219    # building the build platform executables.
47220    BUILD_CC="$CC"
47221    BUILD_CXX="$CXX"
47222    BUILD_LD="$LD"
47223    BUILD_LDCXX="$LDCXX"
47224    BUILD_NM="$NM"
47225    BUILD_AS="$AS"
47226    BUILD_OBJCOPY="$OBJCOPY"
47227    BUILD_STRIP="$STRIP"
47228    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47229    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47230    BUILD_AR="$AR"
47231
47232
47233  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47234    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47235$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47236    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47237$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47238  fi
47239
47240  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47241  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47242    { $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
47243$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;}
47244  fi
47245
47246  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47247    { $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
47248$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47249  fi
47250
47251  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
47252
47253  fi
47254
47255
47256
47257
47258
47259
47260
47261
47262
47263
47264
47265
47266  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47267    # For hotspot, we need these in Windows mixed path,
47268    # so rewrite them all. Need added .exe suffix.
47269    HOTSPOT_CXX="$CXX.exe"
47270    HOTSPOT_LD="$LD.exe"
47271    HOTSPOT_MT="$MT.exe"
47272    HOTSPOT_RC="$RC.exe"
47273
47274  unix_path="$HOTSPOT_CXX"
47275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47276    windows_path=`$CYGPATH -m "$unix_path"`
47277    HOTSPOT_CXX="$windows_path"
47278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47279    windows_path=`cmd //c echo $unix_path`
47280    HOTSPOT_CXX="$windows_path"
47281  fi
47282
47283
47284  unix_path="$HOTSPOT_LD"
47285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47286    windows_path=`$CYGPATH -m "$unix_path"`
47287    HOTSPOT_LD="$windows_path"
47288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47289    windows_path=`cmd //c echo $unix_path`
47290    HOTSPOT_LD="$windows_path"
47291  fi
47292
47293
47294  unix_path="$HOTSPOT_MT"
47295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47296    windows_path=`$CYGPATH -m "$unix_path"`
47297    HOTSPOT_MT="$windows_path"
47298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47299    windows_path=`cmd //c echo $unix_path`
47300    HOTSPOT_MT="$windows_path"
47301  fi
47302
47303
47304  unix_path="$HOTSPOT_RC"
47305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47306    windows_path=`$CYGPATH -m "$unix_path"`
47307    HOTSPOT_RC="$windows_path"
47308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47309    windows_path=`cmd //c echo $unix_path`
47310    HOTSPOT_RC="$windows_path"
47311  fi
47312
47313
47314
47315  else
47316    HOTSPOT_CXX="$CXX"
47317    HOTSPOT_LD="$LD"
47318  fi
47319
47320
47321
47322  if test  "x$TOOLCHAIN_TYPE" = xclang; then
47323    USE_CLANG=true
47324  fi
47325
47326
47327
47328
47329
47330  # The package path is used only on macosx?
47331  # FIXME: clean this up, and/or move it elsewhere.
47332  PACKAGE_PATH=/opt/local
47333
47334
47335  # Check for extra potential brokenness.
47336  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47337    # On Windows, double-check that we got the right compiler.
47338    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47339    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47340    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47341      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47342        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
47343      fi
47344    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47345      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47346        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47347      fi
47348    fi
47349  fi
47350
47351  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47352    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47353    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47354    # This is later checked when setting flags.
47355
47356    # "-Og" suppported for GCC 4.8 and later
47357    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47358
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403
47404
47405    # Execute function body
47406
47407
47408
47409
47410
47411
47412
47413
47414
47415
47416
47417
47418
47419
47420
47421
47422
47423
47424
47425
47426
47427
47428
47429
47430
47431
47432
47433
47434
47435
47436
47437
47438
47439
47440
47441
47442
47443
47444
47445
47446
47447
47448
47449
47450
47451
47452
47453
47454    # Execute function body
47455
47456  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47457$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47458  supports=yes
47459
47460  saved_cflags="$CFLAGS"
47461  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47462  ac_ext=c
47463ac_cpp='$CPP $CPPFLAGS'
47464ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47465ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47466ac_compiler_gnu=$ac_cv_c_compiler_gnu
47467
47468  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47469/* end confdefs.h.  */
47470int i;
47471_ACEOF
47472if ac_fn_c_try_compile "$LINENO"; then :
47473
47474else
47475  supports=no
47476fi
47477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47478  ac_ext=cpp
47479ac_cpp='$CXXCPP $CPPFLAGS'
47480ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47481ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47482ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47483
47484  CFLAGS="$saved_cflags"
47485
47486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47487$as_echo "$supports" >&6; }
47488  if test "x$supports" = "xyes" ; then
47489    :
47490    C_COMP_SUPPORTS="yes"
47491  else
47492    :
47493    C_COMP_SUPPORTS="no"
47494  fi
47495
47496
47497
47498
47499
47500
47501
47502
47503
47504
47505
47506
47507
47508
47509
47510
47511
47512
47513
47514
47515
47516
47517
47518
47519
47520
47521
47522
47523
47524
47525
47526
47527
47528
47529
47530
47531
47532
47533
47534
47535
47536
47537
47538
47539
47540
47541
47542
47543
47544
47545
47546
47547
47548
47549
47550
47551
47552
47553
47554    # Execute function body
47555
47556  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47557$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47558  supports=yes
47559
47560  saved_cxxflags="$CXXFLAGS"
47561  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47562  ac_ext=cpp
47563ac_cpp='$CXXCPP $CPPFLAGS'
47564ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47565ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47566ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47567
47568  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47569/* end confdefs.h.  */
47570int i;
47571_ACEOF
47572if ac_fn_cxx_try_compile "$LINENO"; then :
47573
47574else
47575  supports=no
47576fi
47577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47578  ac_ext=cpp
47579ac_cpp='$CXXCPP $CPPFLAGS'
47580ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47581ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47582ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47583
47584  CXXFLAGS="$saved_cxxflags"
47585
47586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47587$as_echo "$supports" >&6; }
47588  if test "x$supports" = "xyes" ; then
47589    :
47590    CXX_COMP_SUPPORTS="yes"
47591  else
47592    :
47593    CXX_COMP_SUPPORTS="no"
47594  fi
47595
47596
47597
47598
47599
47600
47601
47602
47603
47604
47605
47606
47607
47608  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47609$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47610  supports=no
47611  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47612
47613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47614$as_echo "$supports" >&6; }
47615  if test "x$supports" = "xyes" ; then
47616    :
47617    HAS_CFLAG_OPTIMIZE_DEBUG=true
47618  else
47619    :
47620    HAS_CFLAG_OPTIMIZE_DEBUG=false
47621  fi
47622
47623
47624
47625
47626
47627
47628
47629    # "-z relro" supported in GNU binutils 2.17 and later
47630    LINKER_RELRO_FLAG="-Wl,-z,relro"
47631
47632
47633
47634
47635
47636
47637
47638
47639
47640
47641
47642
47643
47644
47645
47646
47647
47648
47649
47650
47651
47652
47653
47654
47655
47656
47657
47658
47659
47660
47661
47662
47663
47664
47665
47666
47667
47668
47669
47670
47671
47672
47673
47674
47675
47676
47677
47678    # Execute function body
47679
47680  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47681$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47682  supports=yes
47683
47684  saved_ldflags="$LDFLAGS"
47685  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47686  ac_ext=c
47687ac_cpp='$CPP $CPPFLAGS'
47688ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47689ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47690ac_compiler_gnu=$ac_cv_c_compiler_gnu
47691
47692  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47693/* end confdefs.h.  */
47694
47695int
47696main ()
47697{
47698
47699  ;
47700  return 0;
47701}
47702_ACEOF
47703if ac_fn_c_try_link "$LINENO"; then :
47704
47705else
47706  supports=no
47707fi
47708rm -f core conftest.err conftest.$ac_objext \
47709    conftest$ac_exeext conftest.$ac_ext
47710  ac_ext=cpp
47711ac_cpp='$CXXCPP $CPPFLAGS'
47712ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47713ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47714ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47715
47716  LDFLAGS="$saved_ldflags"
47717
47718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47719$as_echo "$supports" >&6; }
47720  if test "x$supports" = "xyes" ; then
47721    :
47722    HAS_LINKER_RELRO=true
47723  else
47724    :
47725    HAS_LINKER_RELRO=false
47726  fi
47727
47728
47729
47730
47731
47732
47733
47734
47735
47736
47737
47738
47739
47740    # "-z now" supported in GNU binutils 2.11 and later
47741    LINKER_NOW_FLAG="-Wl,-z,now"
47742
47743
47744
47745
47746
47747
47748
47749
47750
47751
47752
47753
47754
47755
47756
47757
47758
47759
47760
47761
47762
47763
47764
47765
47766
47767
47768
47769
47770
47771
47772
47773
47774
47775
47776
47777
47778
47779
47780
47781
47782
47783
47784
47785
47786
47787
47788
47789    # Execute function body
47790
47791  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47792$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47793  supports=yes
47794
47795  saved_ldflags="$LDFLAGS"
47796  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47797  ac_ext=c
47798ac_cpp='$CPP $CPPFLAGS'
47799ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47800ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47801ac_compiler_gnu=$ac_cv_c_compiler_gnu
47802
47803  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47804/* end confdefs.h.  */
47805
47806int
47807main ()
47808{
47809
47810  ;
47811  return 0;
47812}
47813_ACEOF
47814if ac_fn_c_try_link "$LINENO"; then :
47815
47816else
47817  supports=no
47818fi
47819rm -f core conftest.err conftest.$ac_objext \
47820    conftest$ac_exeext conftest.$ac_ext
47821  ac_ext=cpp
47822ac_cpp='$CXXCPP $CPPFLAGS'
47823ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47824ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47825ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47826
47827  LDFLAGS="$saved_ldflags"
47828
47829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47830$as_echo "$supports" >&6; }
47831  if test "x$supports" = "xyes" ; then
47832    :
47833    HAS_LINKER_NOW=true
47834  else
47835    :
47836    HAS_LINKER_NOW=false
47837  fi
47838
47839
47840
47841
47842
47843
47844
47845
47846
47847
47848
47849
47850  fi
47851
47852  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47853  # in executable.'
47854  USING_BROKEN_SUSE_LD=no
47855  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47856    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47857$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47858    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47859    $ECHO "int main() { }" > main.c
47860    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47861      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47862$as_echo "no" >&6; }
47863      USING_BROKEN_SUSE_LD=no
47864    else
47865      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47866$as_echo "yes" >&6; }
47867      USING_BROKEN_SUSE_LD=yes
47868    fi
47869    $RM version-script.map main.c a.out
47870  fi
47871
47872
47873  # Setup hotspot lecagy names for toolchains
47874  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47875  if test "x$TOOLCHAIN_TYPE" = xclang; then
47876    HOTSPOT_TOOLCHAIN_TYPE=gcc
47877  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47878    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47879  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47880    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47881  fi
47882
47883
47884
47885# Setup the JTReg Regression Test Harness.
47886
47887
47888# Check whether --with-jtreg was given.
47889if test "${with_jtreg+set}" = set; then :
47890  withval=$with_jtreg;
47891else
47892  with_jtreg=no
47893fi
47894
47895
47896  if test "x$with_jtreg" = xno; then
47897    # jtreg disabled
47898    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47899$as_echo_n "checking for jtreg... " >&6; }
47900    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47901$as_echo "no" >&6; }
47902  else
47903    if test "x$with_jtreg" != xyes; then
47904      # with path specified.
47905      JT_HOME="$with_jtreg"
47906    fi
47907
47908    if test "x$JT_HOME" != x; then
47909      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47910$as_echo_n "checking for jtreg... " >&6; }
47911
47912      # use JT_HOME enviroment var.
47913
47914  # Only process if variable expands to non-empty
47915
47916  if test "x$JT_HOME" != x; then
47917    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47918
47919  # Input might be given as Windows format, start by converting to
47920  # unix format.
47921  path="$JT_HOME"
47922  new_path=`$CYGPATH -u "$path"`
47923
47924  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47925  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47926  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47927  # "foo.exe" is OK but "foo" is an error.
47928  #
47929  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47930  # It is also a way to make sure we got the proper file name for the real test later on.
47931  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47932  if test "x$test_shortpath" = x; then
47933    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47934$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47935    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47936  fi
47937
47938  # Call helper function which possibly converts this using DOS-style short mode.
47939  # If so, the updated path is stored in $new_path.
47940
47941  input_path="$new_path"
47942  # Check if we need to convert this using DOS-style short mode. If the path
47943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47944  # take no chances and rewrite it.
47945  # Note: m4 eats our [], so we need to use [ and ] instead.
47946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47947  if test "x$has_forbidden_chars" != x; then
47948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47949    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47950    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47951    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47952      # Going to short mode and back again did indeed matter. Since short mode is
47953      # case insensitive, let's make it lowercase to improve readability.
47954      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47955      # Now convert it back to Unix-style (cygpath)
47956      input_path=`$CYGPATH -u "$shortmode_path"`
47957      new_path="$input_path"
47958    fi
47959  fi
47960
47961  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47962  if test "x$test_cygdrive_prefix" = x; then
47963    # As a simple fix, exclude /usr/bin since it's not a real path.
47964    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47965      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47966      # a path prefixed by /cygdrive for fixpath to work.
47967      new_path="$CYGWIN_ROOT_PATH$input_path"
47968    fi
47969  fi
47970
47971
47972  if test "x$path" != "x$new_path"; then
47973    JT_HOME="$new_path"
47974    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47975$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47976  fi
47977
47978    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47979
47980  path="$JT_HOME"
47981  has_colon=`$ECHO $path | $GREP ^.:`
47982  new_path="$path"
47983  if test "x$has_colon" = x; then
47984    # Not in mixed or Windows style, start by that.
47985    new_path=`cmd //c echo $path`
47986  fi
47987
47988
47989  input_path="$new_path"
47990  # Check if we need to convert this using DOS-style short mode. If the path
47991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47992  # take no chances and rewrite it.
47993  # Note: m4 eats our [], so we need to use [ and ] instead.
47994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47995  if test "x$has_forbidden_chars" != x; then
47996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47997    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47998  fi
47999
48000
48001  windows_path="$new_path"
48002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48003    unix_path=`$CYGPATH -u "$windows_path"`
48004    new_path="$unix_path"
48005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48007    new_path="$unix_path"
48008  fi
48009
48010  if test "x$path" != "x$new_path"; then
48011    JT_HOME="$new_path"
48012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48013$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48014  fi
48015
48016  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48017  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48018
48019    else
48020      # We're on a unix platform. Hooray! :)
48021      path="$JT_HOME"
48022      has_space=`$ECHO "$path" | $GREP " "`
48023      if test "x$has_space" != x; then
48024        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48025$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48026        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48027      fi
48028
48029      # Use eval to expand a potential ~
48030      eval path="$path"
48031      if test ! -f "$path" && test ! -d "$path"; then
48032        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48033      fi
48034
48035      if test -d "$path"; then
48036        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48037      else
48038        dir="`$DIRNAME "$path"`"
48039        base="`$BASENAME "$path"`"
48040        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48041      fi
48042    fi
48043  fi
48044
48045
48046      # jtreg win32 script works for everybody
48047      JTREGEXE="$JT_HOME/bin/jtreg"
48048
48049      if test ! -f "$JTREGEXE"; then
48050        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48051      fi
48052
48053      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48054$as_echo "$JTREGEXE" >&6; }
48055    else
48056      # try to find jtreg on path
48057
48058
48059
48060  # Publish this variable in the help.
48061
48062
48063  if [ -z "${JTREGEXE+x}" ]; then
48064    # The variable is not set by user, try to locate tool using the code snippet
48065    for ac_prog in jtreg
48066do
48067  # Extract the first word of "$ac_prog", so it can be a program name with args.
48068set dummy $ac_prog; ac_word=$2
48069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48070$as_echo_n "checking for $ac_word... " >&6; }
48071if ${ac_cv_path_JTREGEXE+:} false; then :
48072  $as_echo_n "(cached) " >&6
48073else
48074  case $JTREGEXE in
48075  [\\/]* | ?:[\\/]*)
48076  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48077  ;;
48078  *)
48079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48080for as_dir in $PATH
48081do
48082  IFS=$as_save_IFS
48083  test -z "$as_dir" && as_dir=.
48084    for ac_exec_ext in '' $ac_executable_extensions; do
48085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48086    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48088    break 2
48089  fi
48090done
48091  done
48092IFS=$as_save_IFS
48093
48094  ;;
48095esac
48096fi
48097JTREGEXE=$ac_cv_path_JTREGEXE
48098if test -n "$JTREGEXE"; then
48099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48100$as_echo "$JTREGEXE" >&6; }
48101else
48102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48103$as_echo "no" >&6; }
48104fi
48105
48106
48107  test -n "$JTREGEXE" && break
48108done
48109
48110  else
48111    # The variable is set, but is it from the command line or the environment?
48112
48113    # Try to remove the string !JTREGEXE! from our list.
48114    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48115    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48116      # If it failed, the variable was not from the command line. Ignore it,
48117      # but warn the user (except for BASH, which is always set by the calling BASH).
48118      if test "xJTREGEXE" != xBASH; then
48119        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48120$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48121      fi
48122      # Try to locate tool using the code snippet
48123      for ac_prog in jtreg
48124do
48125  # Extract the first word of "$ac_prog", so it can be a program name with args.
48126set dummy $ac_prog; ac_word=$2
48127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48128$as_echo_n "checking for $ac_word... " >&6; }
48129if ${ac_cv_path_JTREGEXE+:} false; then :
48130  $as_echo_n "(cached) " >&6
48131else
48132  case $JTREGEXE in
48133  [\\/]* | ?:[\\/]*)
48134  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48135  ;;
48136  *)
48137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48138for as_dir in $PATH
48139do
48140  IFS=$as_save_IFS
48141  test -z "$as_dir" && as_dir=.
48142    for ac_exec_ext in '' $ac_executable_extensions; do
48143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48144    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48146    break 2
48147  fi
48148done
48149  done
48150IFS=$as_save_IFS
48151
48152  ;;
48153esac
48154fi
48155JTREGEXE=$ac_cv_path_JTREGEXE
48156if test -n "$JTREGEXE"; then
48157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48158$as_echo "$JTREGEXE" >&6; }
48159else
48160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48161$as_echo "no" >&6; }
48162fi
48163
48164
48165  test -n "$JTREGEXE" && break
48166done
48167
48168    else
48169      # If it succeeded, then it was overridden by the user. We will use it
48170      # for the tool.
48171
48172      # First remove it from the list of overridden variables, so we can test
48173      # for unknown variables in the end.
48174      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48175
48176      # Check if we try to supply an empty value
48177      if test "x$JTREGEXE" = x; then
48178        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48179$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48180        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48181$as_echo_n "checking for JTREGEXE... " >&6; }
48182        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48183$as_echo "disabled" >&6; }
48184      else
48185        # Check if the provided tool contains a complete path.
48186        tool_specified="$JTREGEXE"
48187        tool_basename="${tool_specified##*/}"
48188        if test "x$tool_basename" = "x$tool_specified"; then
48189          # A command without a complete path is provided, search $PATH.
48190          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48191$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48192          # Extract the first word of "$tool_basename", so it can be a program name with args.
48193set dummy $tool_basename; ac_word=$2
48194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48195$as_echo_n "checking for $ac_word... " >&6; }
48196if ${ac_cv_path_JTREGEXE+:} false; then :
48197  $as_echo_n "(cached) " >&6
48198else
48199  case $JTREGEXE in
48200  [\\/]* | ?:[\\/]*)
48201  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48202  ;;
48203  *)
48204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48205for as_dir in $PATH
48206do
48207  IFS=$as_save_IFS
48208  test -z "$as_dir" && as_dir=.
48209    for ac_exec_ext in '' $ac_executable_extensions; do
48210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48211    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48213    break 2
48214  fi
48215done
48216  done
48217IFS=$as_save_IFS
48218
48219  ;;
48220esac
48221fi
48222JTREGEXE=$ac_cv_path_JTREGEXE
48223if test -n "$JTREGEXE"; then
48224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48225$as_echo "$JTREGEXE" >&6; }
48226else
48227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48228$as_echo "no" >&6; }
48229fi
48230
48231
48232          if test "x$JTREGEXE" = x; then
48233            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48234          fi
48235        else
48236          # Otherwise we believe it is a complete path. Use it as it is.
48237          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48238$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48239          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48240$as_echo_n "checking for JTREGEXE... " >&6; }
48241          if test ! -x "$tool_specified"; then
48242            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48243$as_echo "not found" >&6; }
48244            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48245          fi
48246          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48247$as_echo "$tool_specified" >&6; }
48248        fi
48249      fi
48250    fi
48251
48252  fi
48253
48254
48255
48256  if test "x$JTREGEXE" = x; then
48257    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48258  fi
48259
48260
48261      JT_HOME="`$DIRNAME $JTREGEXE`"
48262    fi
48263  fi
48264
48265
48266
48267
48268
48269
48270  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48271  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48272  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48273  #                              commands produced by the link step (currently AIX only)
48274  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48275    COMPILER_TARGET_BITS_FLAG="-q"
48276    COMPILER_COMMAND_FILE_FLAG="-f"
48277    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48278  else
48279    COMPILER_TARGET_BITS_FLAG="-m"
48280    COMPILER_COMMAND_FILE_FLAG="@"
48281    COMPILER_BINDCMD_FILE_FLAG=""
48282
48283    # The solstudio linker does not support @-files.
48284    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48285      COMPILER_COMMAND_FILE_FLAG=
48286    fi
48287
48288    # Check if @file is supported by gcc
48289    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48290      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48291$as_echo_n "checking if @file is supported by gcc... " >&6; }
48292      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48293      $ECHO "" "--version" > command.file
48294      if $CXX @command.file 2>&5 >&5; then
48295        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48296$as_echo "yes" >&6; }
48297        COMPILER_COMMAND_FILE_FLAG="@"
48298      else
48299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48300$as_echo "no" >&6; }
48301        COMPILER_COMMAND_FILE_FLAG=
48302      fi
48303      $RM command.file
48304    fi
48305  fi
48306
48307
48308
48309
48310  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48311  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48312    ARFLAGS="-r"
48313  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48314    ARFLAGS="-X64"
48315  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48316    # lib.exe is used as AR to create static libraries.
48317    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48318  else
48319    ARFLAGS=""
48320  fi
48321
48322
48323  ## Setup strip.
48324  # FIXME: should this really be per platform, or should it be per toolchain type?
48325  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48326  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48327  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48328    STRIPFLAGS="-g"
48329  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48330    STRIPFLAGS="-x"
48331  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48332    STRIPFLAGS="-S"
48333  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48334    STRIPFLAGS="-X32_64"
48335  fi
48336
48337
48338
48339  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48340    CC_OUT_OPTION=-Fo
48341    EXE_OUT_OPTION=-out:
48342    LD_OUT_OPTION=-out:
48343    AR_OUT_OPTION=-out:
48344  else
48345    # The option used to specify the target .o,.a or .so file.
48346    # When compiling, how to specify the to be created object file.
48347    CC_OUT_OPTION='-o$(SPACE)'
48348    # When linking, how to specify the to be created executable.
48349    EXE_OUT_OPTION='-o$(SPACE)'
48350    # When linking, how to specify the to be created dynamically linkable library.
48351    LD_OUT_OPTION='-o$(SPACE)'
48352    # When archiving, how to specify the to be create static archive for object files.
48353    AR_OUT_OPTION='rcs$(SPACE)'
48354  fi
48355
48356
48357
48358
48359
48360  # On Windows, we need to set RC flags.
48361  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48362    RC_FLAGS="-nologo -l0x409"
48363    JVM_RCFLAGS="-nologo"
48364    if test "x$DEBUG_LEVEL" = xrelease; then
48365      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48366      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48367    fi
48368
48369    # The version variables used to create RC_FLAGS may be overridden
48370    # in a custom configure script, or possibly the command line.
48371    # Let those variables be expanded at make time in spec.gmk.
48372    # The \$ are escaped to the shell, and the $(...) variables
48373    # are evaluated by make.
48374    RC_FLAGS="$RC_FLAGS \
48375        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48376        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48377        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48378        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48379        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48380        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48381        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48382
48383    JVM_RCFLAGS="$JVM_RCFLAGS \
48384        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48385        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48386        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48387        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48388        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48389        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48390        -D\"HS_FNAME=jvm.dll\" \
48391        -D\"HS_INTERNAL_NAME=jvm\""
48392  fi
48393
48394
48395
48396  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48397    # silence copyright notice and other headers.
48398    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48399  fi
48400
48401
48402# Now we can test some aspects on the target using configure macros.
48403
48404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48405$as_echo_n "checking for ANSI C header files... " >&6; }
48406if ${ac_cv_header_stdc+:} false; then :
48407  $as_echo_n "(cached) " >&6
48408else
48409  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48410/* end confdefs.h.  */
48411#include <stdlib.h>
48412#include <stdarg.h>
48413#include <string.h>
48414#include <float.h>
48415
48416int
48417main ()
48418{
48419
48420  ;
48421  return 0;
48422}
48423_ACEOF
48424if ac_fn_cxx_try_compile "$LINENO"; then :
48425  ac_cv_header_stdc=yes
48426else
48427  ac_cv_header_stdc=no
48428fi
48429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48430
48431if test $ac_cv_header_stdc = yes; then
48432  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48433  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48434/* end confdefs.h.  */
48435#include <string.h>
48436
48437_ACEOF
48438if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48439  $EGREP "memchr" >/dev/null 2>&1; then :
48440
48441else
48442  ac_cv_header_stdc=no
48443fi
48444rm -f conftest*
48445
48446fi
48447
48448if test $ac_cv_header_stdc = yes; then
48449  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48450  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48451/* end confdefs.h.  */
48452#include <stdlib.h>
48453
48454_ACEOF
48455if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48456  $EGREP "free" >/dev/null 2>&1; then :
48457
48458else
48459  ac_cv_header_stdc=no
48460fi
48461rm -f conftest*
48462
48463fi
48464
48465if test $ac_cv_header_stdc = yes; then
48466  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48467  if test "$cross_compiling" = yes; then :
48468  :
48469else
48470  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48471/* end confdefs.h.  */
48472#include <ctype.h>
48473#include <stdlib.h>
48474#if ((' ' & 0x0FF) == 0x020)
48475# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48476# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48477#else
48478# define ISLOWER(c) \
48479		   (('a' <= (c) && (c) <= 'i') \
48480		     || ('j' <= (c) && (c) <= 'r') \
48481		     || ('s' <= (c) && (c) <= 'z'))
48482# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48483#endif
48484
48485#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48486int
48487main ()
48488{
48489  int i;
48490  for (i = 0; i < 256; i++)
48491    if (XOR (islower (i), ISLOWER (i))
48492	|| toupper (i) != TOUPPER (i))
48493      return 2;
48494  return 0;
48495}
48496_ACEOF
48497if ac_fn_cxx_try_run "$LINENO"; then :
48498
48499else
48500  ac_cv_header_stdc=no
48501fi
48502rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48503  conftest.$ac_objext conftest.beam conftest.$ac_ext
48504fi
48505
48506fi
48507fi
48508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48509$as_echo "$ac_cv_header_stdc" >&6; }
48510if test $ac_cv_header_stdc = yes; then
48511
48512$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48513
48514fi
48515
48516# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48517for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48518		  inttypes.h stdint.h unistd.h
48519do :
48520  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48521ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48522"
48523if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48524  cat >>confdefs.h <<_ACEOF
48525#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48526_ACEOF
48527
48528fi
48529
48530done
48531
48532
48533
48534  ###############################################################################
48535  #
48536  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48537  # (The JVM can use 32 or 64 bit Java pointers but that decision
48538  # is made at runtime.)
48539  #
48540
48541  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48542    # Always specify -m flag on Solaris
48543    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48544
48545  # When we add flags to the "official" CFLAGS etc, we need to
48546  # keep track of these additions in ADDED_CFLAGS etc. These
48547  # will later be checked to make sure only controlled additions
48548  # have been made to CFLAGS etc.
48549  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48550  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48551  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48552
48553  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48554  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48555  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48556
48557  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48558  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48559  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48560
48561  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48562  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48563  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48564
48565  elif test "x$COMPILE_TYPE" = xreduced; then
48566    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48567      # Specify -m if running reduced on unix platforms
48568
48569  # When we add flags to the "official" CFLAGS etc, we need to
48570  # keep track of these additions in ADDED_CFLAGS etc. These
48571  # will later be checked to make sure only controlled additions
48572  # have been made to CFLAGS etc.
48573  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48574  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48575  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48576
48577  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48578  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48579  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48580
48581  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48582  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48583  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48584
48585  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48586  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48587  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48588
48589    fi
48590  fi
48591  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48592    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48593    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48594    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48595  fi
48596
48597  # Make compilation sanity check
48598  for ac_header in stdio.h
48599do :
48600  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48601if test "x$ac_cv_header_stdio_h" = xyes; then :
48602  cat >>confdefs.h <<_ACEOF
48603#define HAVE_STDIO_H 1
48604_ACEOF
48605
48606else
48607
48608    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48609$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48610    if test "x$COMPILE_TYPE" = xreduced; then
48611
48612  # Print a helpful message on how to acquire the necessary build dependency.
48613  # reduced is the help tag: freetype, cups, alsa etc
48614  MISSING_DEPENDENCY=reduced
48615
48616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48617    cygwin_help $MISSING_DEPENDENCY
48618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48619    msys_help $MISSING_DEPENDENCY
48620  else
48621    PKGHANDLER_COMMAND=
48622
48623    case $PKGHANDLER in
48624      apt-get)
48625        apt_help     $MISSING_DEPENDENCY ;;
48626      yum)
48627        yum_help     $MISSING_DEPENDENCY ;;
48628      port)
48629        port_help    $MISSING_DEPENDENCY ;;
48630      pkgutil)
48631        pkgutil_help $MISSING_DEPENDENCY ;;
48632      pkgadd)
48633        pkgadd_help  $MISSING_DEPENDENCY ;;
48634    esac
48635
48636    if test "x$PKGHANDLER_COMMAND" != x; then
48637      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48638    fi
48639  fi
48640
48641      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48642$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48643    elif test "x$COMPILE_TYPE" = xcross; then
48644      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48645$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48646    fi
48647    as_fn_error $? "Cannot continue." "$LINENO" 5
48648
48649fi
48650
48651done
48652
48653
48654  # The cast to long int works around a bug in the HP C Compiler
48655# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48656# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48657# This bug is HP SR number 8606223364.
48658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48659$as_echo_n "checking size of int *... " >&6; }
48660if ${ac_cv_sizeof_int_p+:} false; then :
48661  $as_echo_n "(cached) " >&6
48662else
48663  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48664
48665else
48666  if test "$ac_cv_type_int_p" = yes; then
48667     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48668$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48669as_fn_error 77 "cannot compute sizeof (int *)
48670See \`config.log' for more details" "$LINENO" 5; }
48671   else
48672     ac_cv_sizeof_int_p=0
48673   fi
48674fi
48675
48676fi
48677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48678$as_echo "$ac_cv_sizeof_int_p" >&6; }
48679
48680
48681
48682cat >>confdefs.h <<_ACEOF
48683#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48684_ACEOF
48685
48686
48687
48688  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48689  if test "x$ac_cv_sizeof_int_p" = x; then
48690    # The test failed, lets stick to the assumed value.
48691    { $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
48692$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48693  else
48694    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48695
48696    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48697      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48698      # Let's try to implicitely set the compilers target architecture and retry the test
48699      { $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
48700$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;}
48701      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48702$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48703
48704  # When we add flags to the "official" CFLAGS etc, we need to
48705  # keep track of these additions in ADDED_CFLAGS etc. These
48706  # will later be checked to make sure only controlled additions
48707  # have been made to CFLAGS etc.
48708  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48709  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48710  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48711
48712  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48713  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48714  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48715
48716  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48717  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48718  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48719
48720  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48721  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48722  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48723
48724
48725      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48726      unset ac_cv_sizeof_int_p
48727      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48728      cat >>confdefs.h <<_ACEOF
48729#undef SIZEOF_INT_P
48730_ACEOF
48731
48732      # The cast to long int works around a bug in the HP C Compiler
48733# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48734# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48735# This bug is HP SR number 8606223364.
48736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48737$as_echo_n "checking size of int *... " >&6; }
48738if ${ac_cv_sizeof_int_p+:} false; then :
48739  $as_echo_n "(cached) " >&6
48740else
48741  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48742
48743else
48744  if test "$ac_cv_type_int_p" = yes; then
48745     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48746$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48747as_fn_error 77 "cannot compute sizeof (int *)
48748See \`config.log' for more details" "$LINENO" 5; }
48749   else
48750     ac_cv_sizeof_int_p=0
48751   fi
48752fi
48753
48754fi
48755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48756$as_echo "$ac_cv_sizeof_int_p" >&6; }
48757
48758
48759
48760cat >>confdefs.h <<_ACEOF
48761#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48762_ACEOF
48763
48764
48765
48766      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48767
48768      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48769        { $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
48770$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;}
48771        if test "x$COMPILE_TYPE" = xreduced; then
48772
48773  # Print a helpful message on how to acquire the necessary build dependency.
48774  # reduced is the help tag: freetype, cups, alsa etc
48775  MISSING_DEPENDENCY=reduced
48776
48777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48778    cygwin_help $MISSING_DEPENDENCY
48779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48780    msys_help $MISSING_DEPENDENCY
48781  else
48782    PKGHANDLER_COMMAND=
48783
48784    case $PKGHANDLER in
48785      apt-get)
48786        apt_help     $MISSING_DEPENDENCY ;;
48787      yum)
48788        yum_help     $MISSING_DEPENDENCY ;;
48789      port)
48790        port_help    $MISSING_DEPENDENCY ;;
48791      pkgutil)
48792        pkgutil_help $MISSING_DEPENDENCY ;;
48793      pkgadd)
48794        pkgadd_help  $MISSING_DEPENDENCY ;;
48795    esac
48796
48797    if test "x$PKGHANDLER_COMMAND" != x; then
48798      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48799    fi
48800  fi
48801
48802          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48803$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48804        elif test "x$COMPILE_TYPE" = xcross; then
48805          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48806$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48807        fi
48808        as_fn_error $? "Cannot continue." "$LINENO" 5
48809      fi
48810    fi
48811  fi
48812
48813  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48814$as_echo_n "checking for target address size... " >&6; }
48815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48816$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48817
48818
48819  ###############################################################################
48820  #
48821  # Is the target little of big endian?
48822  #
48823   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48824$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48825if ${ac_cv_c_bigendian+:} false; then :
48826  $as_echo_n "(cached) " >&6
48827else
48828  ac_cv_c_bigendian=unknown
48829    # See if we're dealing with a universal compiler.
48830    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48831/* end confdefs.h.  */
48832#ifndef __APPLE_CC__
48833	       not a universal capable compiler
48834	     #endif
48835	     typedef int dummy;
48836
48837_ACEOF
48838if ac_fn_cxx_try_compile "$LINENO"; then :
48839
48840	# Check for potential -arch flags.  It is not universal unless
48841	# there are at least two -arch flags with different values.
48842	ac_arch=
48843	ac_prev=
48844	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48845	 if test -n "$ac_prev"; then
48846	   case $ac_word in
48847	     i?86 | x86_64 | ppc | ppc64)
48848	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48849		 ac_arch=$ac_word
48850	       else
48851		 ac_cv_c_bigendian=universal
48852		 break
48853	       fi
48854	       ;;
48855	   esac
48856	   ac_prev=
48857	 elif test "x$ac_word" = "x-arch"; then
48858	   ac_prev=arch
48859	 fi
48860       done
48861fi
48862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48863    if test $ac_cv_c_bigendian = unknown; then
48864      # See if sys/param.h defines the BYTE_ORDER macro.
48865      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48866/* end confdefs.h.  */
48867#include <sys/types.h>
48868	     #include <sys/param.h>
48869
48870int
48871main ()
48872{
48873#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48874		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48875		     && LITTLE_ENDIAN)
48876	      bogus endian macros
48877	     #endif
48878
48879  ;
48880  return 0;
48881}
48882_ACEOF
48883if ac_fn_cxx_try_compile "$LINENO"; then :
48884  # It does; now see whether it defined to BIG_ENDIAN or not.
48885	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48886/* end confdefs.h.  */
48887#include <sys/types.h>
48888		#include <sys/param.h>
48889
48890int
48891main ()
48892{
48893#if BYTE_ORDER != BIG_ENDIAN
48894		 not big endian
48895		#endif
48896
48897  ;
48898  return 0;
48899}
48900_ACEOF
48901if ac_fn_cxx_try_compile "$LINENO"; then :
48902  ac_cv_c_bigendian=yes
48903else
48904  ac_cv_c_bigendian=no
48905fi
48906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48907fi
48908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48909    fi
48910    if test $ac_cv_c_bigendian = unknown; then
48911      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48912      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48913/* end confdefs.h.  */
48914#include <limits.h>
48915
48916int
48917main ()
48918{
48919#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48920	      bogus endian macros
48921	     #endif
48922
48923  ;
48924  return 0;
48925}
48926_ACEOF
48927if ac_fn_cxx_try_compile "$LINENO"; then :
48928  # It does; now see whether it defined to _BIG_ENDIAN or not.
48929	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48930/* end confdefs.h.  */
48931#include <limits.h>
48932
48933int
48934main ()
48935{
48936#ifndef _BIG_ENDIAN
48937		 not big endian
48938		#endif
48939
48940  ;
48941  return 0;
48942}
48943_ACEOF
48944if ac_fn_cxx_try_compile "$LINENO"; then :
48945  ac_cv_c_bigendian=yes
48946else
48947  ac_cv_c_bigendian=no
48948fi
48949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48950fi
48951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48952    fi
48953    if test $ac_cv_c_bigendian = unknown; then
48954      # Compile a test program.
48955      if test "$cross_compiling" = yes; then :
48956  # Try to guess by grepping values from an object file.
48957	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48958/* end confdefs.h.  */
48959short int ascii_mm[] =
48960		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48961		short int ascii_ii[] =
48962		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48963		int use_ascii (int i) {
48964		  return ascii_mm[i] + ascii_ii[i];
48965		}
48966		short int ebcdic_ii[] =
48967		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48968		short int ebcdic_mm[] =
48969		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48970		int use_ebcdic (int i) {
48971		  return ebcdic_mm[i] + ebcdic_ii[i];
48972		}
48973		extern int foo;
48974
48975int
48976main ()
48977{
48978return use_ascii (foo) == use_ebcdic (foo);
48979  ;
48980  return 0;
48981}
48982_ACEOF
48983if ac_fn_cxx_try_compile "$LINENO"; then :
48984  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48985	      ac_cv_c_bigendian=yes
48986	    fi
48987	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48988	      if test "$ac_cv_c_bigendian" = unknown; then
48989		ac_cv_c_bigendian=no
48990	      else
48991		# finding both strings is unlikely to happen, but who knows?
48992		ac_cv_c_bigendian=unknown
48993	      fi
48994	    fi
48995fi
48996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48997else
48998  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48999/* end confdefs.h.  */
49000$ac_includes_default
49001int
49002main ()
49003{
49004
49005	     /* Are we little or big endian?  From Harbison&Steele.  */
49006	     union
49007	     {
49008	       long int l;
49009	       char c[sizeof (long int)];
49010	     } u;
49011	     u.l = 1;
49012	     return u.c[sizeof (long int) - 1] == 1;
49013
49014  ;
49015  return 0;
49016}
49017_ACEOF
49018if ac_fn_cxx_try_run "$LINENO"; then :
49019  ac_cv_c_bigendian=no
49020else
49021  ac_cv_c_bigendian=yes
49022fi
49023rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49024  conftest.$ac_objext conftest.beam conftest.$ac_ext
49025fi
49026
49027    fi
49028fi
49029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49030$as_echo "$ac_cv_c_bigendian" >&6; }
49031 case $ac_cv_c_bigendian in #(
49032   yes)
49033     ENDIAN="big";; #(
49034   no)
49035     ENDIAN="little" ;; #(
49036   universal)
49037     ENDIAN="universal_endianness"
49038     ;; #(
49039   *)
49040     ENDIAN="unknown" ;;
49041 esac
49042
49043
49044  if test "x$ENDIAN" = xuniversal_endianness; then
49045    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49046  fi
49047  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49048    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
49049  fi
49050
49051
49052# Configure flags for the tools
49053
49054  ###############################################################################
49055  #
49056  # How to compile shared libraries.
49057  #
49058
49059  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49060    PICFLAG="-fPIC"
49061    C_FLAG_REORDER=''
49062    CXX_FLAG_REORDER=''
49063
49064    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49065      # Linking is different on MacOSX
49066      if test "x$STATIC_BUILD" = xtrue; then
49067        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49068      else
49069        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49070        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49071      fi
49072      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49073      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49074      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49075      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49076    else
49077      # Default works for linux, might work on other platforms as well.
49078      SHARED_LIBRARY_FLAGS='-shared'
49079      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49080      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49081      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49082      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49083    fi
49084  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49085    C_FLAG_REORDER=''
49086    CXX_FLAG_REORDER=''
49087
49088    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49089      # Linking is different on MacOSX
49090      PICFLAG=''
49091      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49092      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49093      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49094      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49095      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49096
49097      if test "x$STATIC_BUILD" = xfalse; then
49098        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49099      fi
49100    else
49101      # Default works for linux, might work on other platforms as well.
49102      PICFLAG='-fPIC'
49103      SHARED_LIBRARY_FLAGS='-shared'
49104      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49105      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49106      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49107      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49108    fi
49109  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49110    PICFLAG="-KPIC"
49111    C_FLAG_REORDER='-xF'
49112    CXX_FLAG_REORDER='-xF'
49113    SHARED_LIBRARY_FLAGS="-G"
49114    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
49115    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49116    SET_SHARED_LIBRARY_NAME='-h $1'
49117    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49118  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49119    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49120    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49121    # will have to patch this single instruction with a call to some out-of-order code which
49122    # does the load from the TOC. This is of course slow. But in that case we also would have
49123    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49124    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49125    # can be patched directly by the linker and does not require a jump to out-of-order code.
49126    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49127    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49128    # loads for accessing a global variable). But there are rumors that this may be seen as a
49129    # 'performance feature' because of improved code locality of the symbols used in a
49130    # compilation unit.
49131    PICFLAG="-qpic"
49132    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49133    C_FLAG_REORDER=''
49134    CXX_FLAG_REORDER=''
49135    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49136    SET_EXECUTABLE_ORIGIN=""
49137    SET_SHARED_LIBRARY_ORIGIN=''
49138    SET_SHARED_LIBRARY_NAME=''
49139    SET_SHARED_LIBRARY_MAPFILE=''
49140  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49141    PICFLAG=""
49142    C_FLAG_REORDER=''
49143    CXX_FLAG_REORDER=''
49144    SHARED_LIBRARY_FLAGS="-dll"
49145    SET_EXECUTABLE_ORIGIN=''
49146    SET_SHARED_LIBRARY_ORIGIN=''
49147    SET_SHARED_LIBRARY_NAME=''
49148    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49149  fi
49150
49151
49152
49153
49154
49155
49156
49157
49158
49159  # The (cross) compiler is now configured, we can now test capabilities
49160  # of the target platform.
49161
49162
49163
49164  ###############################################################################
49165  #
49166  # Setup the opt flags for different compilers
49167  # and different operating systems.
49168  #
49169
49170  # FIXME: this was indirectly the old default, but just inherited.
49171  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49172  #   C_FLAG_DEPS="-MMD -MF"
49173  # fi
49174
49175  # Generate make dependency files
49176  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49177    C_FLAG_DEPS="-MMD -MF"
49178  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49179    C_FLAG_DEPS="-MMD -MF"
49180  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49181    C_FLAG_DEPS="-xMMD -xMF"
49182  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49183    C_FLAG_DEPS="-qmakedep=gcc -MF"
49184  fi
49185  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49186
49187
49188
49189  # Debug symbols
49190  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49191    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49192      # reduce from default "-g2" option to save space
49193      CFLAGS_DEBUG_SYMBOLS="-g1"
49194      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49195    else
49196      CFLAGS_DEBUG_SYMBOLS="-g"
49197      CXXFLAGS_DEBUG_SYMBOLS="-g"
49198    fi
49199  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49200    CFLAGS_DEBUG_SYMBOLS="-g"
49201    CXXFLAGS_DEBUG_SYMBOLS="-g"
49202  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49203    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49204    # -g0 enables debug symbols without disabling inlining.
49205    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49206  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49207    CFLAGS_DEBUG_SYMBOLS="-g"
49208    CXXFLAGS_DEBUG_SYMBOLS="-g"
49209  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49210    CFLAGS_DEBUG_SYMBOLS="-Zi"
49211    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49212  fi
49213
49214
49215
49216  # Debug symbols for JVM_CFLAGS
49217  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49218    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49219    if test "x$DEBUG_LEVEL" = xslowdebug; then
49220      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49221    else
49222      # -g0 does not disable inlining, which -g does.
49223      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49224    fi
49225  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49226    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49227  else
49228    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49229  fi
49230
49231
49232  # bounds, memory and behavior checking options
49233  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49234    case $DEBUG_LEVEL in
49235    release )
49236      # no adjustment
49237      ;;
49238    fastdebug )
49239      # no adjustment
49240      ;;
49241    slowdebug )
49242      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49243      # get's added conditionally on whether we produce debug symbols or not.
49244      # This is most likely not really correct.
49245
49246      # Add runtime stack smashing and undefined behavior checks.
49247      # Not all versions of gcc support -fstack-protector
49248      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49249
49250
49251
49252
49253
49254
49255
49256
49257
49258
49259
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277
49278
49279
49280
49281
49282
49283
49284
49285
49286
49287
49288
49289
49290
49291    # Execute function body
49292
49293
49294
49295
49296
49297
49298
49299
49300
49301
49302
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314
49315
49316
49317
49318
49319
49320
49321
49322
49323
49324
49325
49326
49327
49328
49329
49330
49331
49332
49333
49334
49335
49336
49337
49338
49339
49340    # Execute function body
49341
49342  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49343$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49344  supports=yes
49345
49346  saved_cflags="$CFLAGS"
49347  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49348  ac_ext=c
49349ac_cpp='$CPP $CPPFLAGS'
49350ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49351ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49352ac_compiler_gnu=$ac_cv_c_compiler_gnu
49353
49354  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49355/* end confdefs.h.  */
49356int i;
49357_ACEOF
49358if ac_fn_c_try_compile "$LINENO"; then :
49359
49360else
49361  supports=no
49362fi
49363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49364  ac_ext=cpp
49365ac_cpp='$CXXCPP $CPPFLAGS'
49366ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49367ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49368ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49369
49370  CFLAGS="$saved_cflags"
49371
49372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49373$as_echo "$supports" >&6; }
49374  if test "x$supports" = "xyes" ; then
49375    :
49376    C_COMP_SUPPORTS="yes"
49377  else
49378    :
49379    C_COMP_SUPPORTS="no"
49380  fi
49381
49382
49383
49384
49385
49386
49387
49388
49389
49390
49391
49392
49393
49394
49395
49396
49397
49398
49399
49400
49401
49402
49403
49404
49405
49406
49407
49408
49409
49410
49411
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422
49423
49424
49425
49426
49427
49428
49429
49430
49431
49432
49433
49434
49435
49436
49437
49438
49439
49440    # Execute function body
49441
49442  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49443$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49444  supports=yes
49445
49446  saved_cxxflags="$CXXFLAGS"
49447  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49448  ac_ext=cpp
49449ac_cpp='$CXXCPP $CPPFLAGS'
49450ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49451ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49452ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49453
49454  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49455/* end confdefs.h.  */
49456int i;
49457_ACEOF
49458if ac_fn_cxx_try_compile "$LINENO"; then :
49459
49460else
49461  supports=no
49462fi
49463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49464  ac_ext=cpp
49465ac_cpp='$CXXCPP $CPPFLAGS'
49466ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49467ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49468ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49469
49470  CXXFLAGS="$saved_cxxflags"
49471
49472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49473$as_echo "$supports" >&6; }
49474  if test "x$supports" = "xyes" ; then
49475    :
49476    CXX_COMP_SUPPORTS="yes"
49477  else
49478    :
49479    CXX_COMP_SUPPORTS="no"
49480  fi
49481
49482
49483
49484
49485
49486
49487
49488
49489
49490
49491
49492
49493
49494  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49495$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49496  supports=no
49497  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49498
49499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49500$as_echo "$supports" >&6; }
49501  if test "x$supports" = "xyes" ; then
49502    :
49503
49504  else
49505    :
49506    STACK_PROTECTOR_CFLAG=""
49507  fi
49508
49509
49510
49511
49512
49513
49514
49515      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49516      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49517      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49518        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49519      fi
49520      ;;
49521    esac
49522  fi
49523
49524  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49525    if test "x$DEBUG_LEVEL" != xrelease; then
49526      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49527        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49528      fi
49529    fi
49530  fi
49531
49532  # Optimization levels
49533  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49534    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49535
49536    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49537      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49538      C_O_FLAG_HIGHEST_JVM="-xO4"
49539      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49540      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49541      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49542      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49543      C_O_FLAG_DEBUG_JVM=""
49544      C_O_FLAG_NONE="-xregs=no%frameptr"
49545      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49546      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49547      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49548      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49549      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49550      CXX_O_FLAG_DEBUG_JVM=""
49551      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49552      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49553        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49554        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49555      fi
49556    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49557      C_O_FLAG_HIGHEST_JVM="-xO4"
49558      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49559      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49560      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49561      C_O_FLAG_DEBUG=""
49562      C_O_FLAG_DEBUG_JVM=""
49563      C_O_FLAG_NONE=""
49564      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49565      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49566      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49567      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49568      CXX_O_FLAG_DEBUG=""
49569      CXX_O_FLAG_DEBUG_JVM=""
49570      CXX_O_FLAG_NONE=""
49571    fi
49572  else
49573    # The remaining toolchains share opt flags between CC and CXX;
49574    # setup for C and duplicate afterwards.
49575    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49576      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49577        # On MacOSX we optimize for size, something
49578        # we should do for all platforms?
49579        C_O_FLAG_HIGHEST_JVM="-Os"
49580        C_O_FLAG_HIGHEST="-Os"
49581        C_O_FLAG_HI="-Os"
49582        C_O_FLAG_NORM="-Os"
49583        C_O_FLAG_SIZE="-Os"
49584      else
49585        C_O_FLAG_HIGHEST_JVM="-O3"
49586        C_O_FLAG_HIGHEST="-O3"
49587        C_O_FLAG_HI="-O3"
49588        C_O_FLAG_NORM="-O2"
49589        C_O_FLAG_SIZE="-Os"
49590      fi
49591      C_O_FLAG_DEBUG="-O0"
49592      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49593        C_O_FLAG_DEBUG_JVM=""
49594      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49595        C_O_FLAG_DEBUG_JVM="-O0"
49596      fi
49597      C_O_FLAG_NONE="-O0"
49598    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49599      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49600        # On MacOSX we optimize for size, something
49601        # we should do for all platforms?
49602        C_O_FLAG_HIGHEST_JVM="-Os"
49603        C_O_FLAG_HIGHEST="-Os"
49604        C_O_FLAG_HI="-Os"
49605        C_O_FLAG_NORM="-Os"
49606        C_O_FLAG_SIZE="-Os"
49607      else
49608        C_O_FLAG_HIGHEST_JVM="-O3"
49609        C_O_FLAG_HIGHEST="-O3"
49610        C_O_FLAG_HI="-O3"
49611        C_O_FLAG_NORM="-O2"
49612        C_O_FLAG_SIZE="-Os"
49613      fi
49614      C_O_FLAG_DEBUG="-O0"
49615      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49616        C_O_FLAG_DEBUG_JVM=""
49617      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49618        C_O_FLAG_DEBUG_JVM="-O0"
49619      fi
49620      C_O_FLAG_NONE="-O0"
49621    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49622      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49623      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49624      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49625      C_O_FLAG_NORM="-O2"
49626      C_O_FLAG_DEBUG="-qnoopt"
49627      # FIXME: Value below not verified.
49628      C_O_FLAG_DEBUG_JVM=""
49629      C_O_FLAG_NONE="-qnoopt"
49630    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49631      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49632      C_O_FLAG_HIGHEST="-O2"
49633      C_O_FLAG_HI="-O1"
49634      C_O_FLAG_NORM="-O1"
49635      C_O_FLAG_DEBUG="-Od"
49636      C_O_FLAG_DEBUG_JVM=""
49637      C_O_FLAG_NONE="-Od"
49638      C_O_FLAG_SIZE="-Os"
49639    fi
49640    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49641    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49642    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49643    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49644    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49645    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49646    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49647    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49648  fi
49649
49650  # Adjust optimization flags according to debug level.
49651  case $DEBUG_LEVEL in
49652    release )
49653      # no adjustment
49654      ;;
49655    fastdebug )
49656      # Not quite so much optimization
49657      C_O_FLAG_HI="$C_O_FLAG_NORM"
49658      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49659      ;;
49660    slowdebug )
49661      # Disable optimization
49662      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49663      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49664      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49665      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49666      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49667      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49668      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49669      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49670      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49671      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49672      ;;
49673  esac
49674
49675
49676
49677
49678
49679
49680
49681
49682
49683
49684
49685
49686
49687
49688
49689
49690
49691
49692
49693  # Special extras...
49694  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49695    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49696      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49697      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49698    fi
49699    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49700    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49701  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49702    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49703    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49704  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49705    CXXSTD_CXXFLAG="-std=gnu++98"
49706
49707
49708
49709
49710
49711
49712
49713
49714
49715
49716
49717
49718
49719
49720
49721
49722
49723
49724
49725
49726
49727
49728
49729
49730
49731
49732
49733
49734
49735
49736
49737
49738
49739
49740
49741
49742
49743
49744
49745
49746
49747
49748    # Execute function body
49749
49750  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49751$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49752  supports=yes
49753
49754  saved_cxxflags="$CXXFLAGS"
49755  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49756  ac_ext=cpp
49757ac_cpp='$CXXCPP $CPPFLAGS'
49758ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49759ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49760ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49761
49762  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49763/* end confdefs.h.  */
49764int i;
49765_ACEOF
49766if ac_fn_cxx_try_compile "$LINENO"; then :
49767
49768else
49769  supports=no
49770fi
49771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49772  ac_ext=cpp
49773ac_cpp='$CXXCPP $CPPFLAGS'
49774ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49775ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49776ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49777
49778  CXXFLAGS="$saved_cxxflags"
49779
49780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49781$as_echo "$supports" >&6; }
49782  if test "x$supports" = "xyes" ; then
49783    :
49784
49785  else
49786    :
49787    CXXSTD_CXXFLAG=""
49788  fi
49789
49790
49791
49792
49793
49794
49795
49796
49797
49798
49799
49800
49801    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49802    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49803
49804  fi
49805  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49806    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49807    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49808  fi
49809
49810  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49811    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49812    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49813  fi
49814
49815  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49816  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49817  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49818
49819  ###############################################################################
49820  #
49821  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49822  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49823  #
49824
49825  # Setup compiler/platform specific flags into
49826  #    CFLAGS_JDK    - C Compiler flags
49827  #    CXXFLAGS_JDK  - C++ Compiler flags
49828  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49829  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49830    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49831    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49832    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49833    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49834      # Force compatibility with i586 on 32 bit intel platforms.
49835      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49836      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49837    fi
49838    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49839        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49840    case $OPENJDK_TARGET_CPU_ARCH in
49841      arm )
49842        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49843        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49844        ;;
49845      ppc )
49846        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49847        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49848        ;;
49849      * )
49850        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49851        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49852        ;;
49853    esac
49854
49855
49856
49857
49858
49859
49860
49861
49862
49863
49864
49865
49866
49867
49868
49869
49870
49871
49872
49873
49874
49875
49876
49877
49878
49879
49880
49881
49882
49883
49884
49885
49886
49887
49888
49889
49890
49891
49892
49893
49894
49895
49896
49897
49898
49899
49900
49901
49902
49903
49904
49905
49906
49907
49908    # Execute function body
49909
49910  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49911  REFERENCE_VERSION=6
49912
49913  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49914    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49915  fi
49916
49917  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49918    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49919  fi
49920
49921  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49922  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49923
49924  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49925    :
49926
49927  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49928  # runs afoul of the more aggressive versions of these optimisations.
49929  # Notably, value range propagation now assumes that the this pointer of C++
49930  # member functions is non-null.
49931  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
49932        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49933        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
49934$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
49935  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49936  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49937
49938  else
49939    :
49940
49941  fi
49942
49943
49944
49945
49946
49947
49948
49949
49950
49951
49952
49953
49954
49955
49956  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49957    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49958
49959    # Restrict the debug information created by Clang to avoid
49960    # too big object files and speed the build up a little bit
49961    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49962    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49963    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49964      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49965        # Force compatibility with i586 on 32 bit intel platforms.
49966        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49967        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49968      fi
49969      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49970      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49971          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49972      case $OPENJDK_TARGET_CPU_ARCH in
49973        ppc )
49974          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49975          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49976          ;;
49977        * )
49978          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49979          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49980          ;;
49981      esac
49982    fi
49983  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49984    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49985    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49986    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49987      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49988    fi
49989
49990    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49991    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49992  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49993    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49994    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49995    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49996  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49997    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49998        -MD -Zc:wchar_t- -W3 -wd4800 \
49999        -DWIN32_LEAN_AND_MEAN \
50000        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50001        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50002        -DWIN32 -DIAL"
50003    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50004      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50005    else
50006      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50007    fi
50008    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50009    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50010    # studio.
50011    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50012      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50013      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50014      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50015    fi
50016  fi
50017
50018  ###############################################################################
50019
50020  # Adjust flags according to debug level.
50021  case $DEBUG_LEVEL in
50022    fastdebug | slowdebug )
50023      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50024      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50025      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50026      ;;
50027    release )
50028      ;;
50029    * )
50030      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50031      ;;
50032  esac
50033
50034  # Set some common defines. These works for all compilers, but assume
50035  # -D is universally accepted.
50036
50037  # Setup endianness
50038  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50039    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50040    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50041    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50042    #   Note: -Dmacro         is the same as    #define macro 1
50043    #         -Dmacro=        is the same as    #define macro
50044    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50045      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50046    else
50047      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50048    fi
50049  else
50050    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50051    # are defined in the system?
50052    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50053      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50054    else
50055      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50056    fi
50057  fi
50058
50059  # Setup target OS define. Use OS target name but in upper case.
50060  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50061  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50062
50063  # Setup target CPU
50064  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50065      $OPENJDK_TARGET_ADD_LP64 \
50066      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50067
50068  # Setup debug/release defines
50069  if test "x$DEBUG_LEVEL" = xrelease; then
50070    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50071    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50072      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50073    fi
50074  else
50075    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50076  fi
50077
50078  # Set some additional per-OS defines.
50079  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50080    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50081    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50082        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50083  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50084    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50085    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50086        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50087  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50088    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50089    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50090    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50091    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50092        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50093        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50094        -fno-omit-frame-pointer"
50095  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50096    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50097    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50098    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50099        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50100        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50101  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50102    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50103  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50104    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50105    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50106  fi
50107
50108  # Set some additional per-CPU defines.
50109  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50110    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50111  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50112    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50113  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50114    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50115      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50116      # fixes `relocation truncated to fit' error for gcc 4.1.
50117      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50118      # Use ppc64 instructions, but schedule for power5
50119      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50120    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50121      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50122    fi
50123  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50124    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50125      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50126      # Little endian machine uses ELFv2 ABI.
50127      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50128      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50129      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
50130    fi
50131  fi
50132
50133  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50134    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50135  fi
50136
50137  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50138    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50139      # Solaris does not have _LP64=1 in the old build.
50140      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50141      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50142    fi
50143  fi
50144
50145  # Set JVM_CFLAGS warning handling
50146  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50147    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50148        -Wunused-value -Woverloaded-virtual"
50149
50150    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50151
50152
50153
50154
50155
50156
50157
50158
50159
50160
50161
50162
50163
50164
50165
50166
50167
50168
50169
50170
50171
50172
50173
50174
50175
50176
50177
50178
50179
50180
50181
50182
50183
50184
50185
50186
50187
50188
50189
50190
50191
50192
50193
50194
50195
50196
50197
50198
50199
50200
50201
50202
50203
50204
50205    # Execute function body
50206
50207  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50208  REFERENCE_VERSION=4.8
50209
50210  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50211    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50212  fi
50213
50214  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50215    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50216  fi
50217
50218  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50219  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50220
50221  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50222    :
50223
50224            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50225            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50226
50227
50228  else
50229    :
50230
50231  fi
50232
50233
50234
50235
50236
50237
50238
50239
50240
50241
50242
50243
50244
50245
50246    fi
50247    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50248      # Non-zero builds have stricter warnings
50249      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50250    else
50251      if test "x$TOOLCHAIN_TYPE" = xclang; then
50252        # Some versions of llvm do not like -Wundef
50253        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50254      fi
50255    fi
50256  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50257    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50258        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50259  fi
50260
50261  # Additional macosx handling
50262  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50263    # Setting these parameters makes it an error to link to macosx APIs that are
50264    # newer than the given OS version and makes the linked binaries compatible
50265    # even if built on a newer version of the OS.
50266    # The expected format is X.Y.Z
50267    MACOSX_VERSION_MIN=10.7.0
50268
50269
50270    # The macro takes the version with no dots, ex: 1070
50271    # Let the flags variables get resolved in make for easier override on make
50272    # command line.
50273    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50274    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50275  fi
50276
50277  # Setup some hard coded includes
50278  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50279      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50280      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50281      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50282      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50283      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50284
50285  # The shared libraries are compiled using the picflag.
50286  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50287      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50288  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50289      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50290
50291  # Executable flags
50292  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50293  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50294
50295
50296
50297
50298
50299
50300  # Setup LDFLAGS et al.
50301  #
50302
50303  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50304    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50305    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50306    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50307    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50308      LDFLAGS_SAFESH="-safeseh"
50309      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50310      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50311      # NOTE: Old build added -machine. Probably not needed.
50312      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50313    else
50314      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50315    fi
50316  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50317      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50318      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50319        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50320        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50321    fi
50322  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50323    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50324    # We have previously set HAS_GNU_HASH if this is the case
50325    if test -n "$HAS_GNU_HASH"; then
50326      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50327      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50328      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50329    fi
50330      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50331        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50332    fi
50333    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50334      # And since we now know that the linker is gnu, then add -z defs, to forbid
50335      # undefined symbols in object files.
50336      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50337      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50338      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50339      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50340      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50341      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50342        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50343      fi
50344      case $DEBUG_LEVEL in
50345        release )
50346          # tell linker to optimize libraries.
50347          # Should this be supplied to the OSS linker as well?
50348          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50349          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50350          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50351          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50352            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50353          fi
50354          ;;
50355        slowdebug )
50356          # Hotspot always let the linker optimize
50357          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50358          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50359            # do relocations at load
50360            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50361            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50362            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50363          fi
50364          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50365            # mark relocations read only
50366            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50367            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50368            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50369          fi
50370          ;;
50371        fastdebug )
50372          # Hotspot always let the linker optimize
50373          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50374          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50375            # mark relocations read only
50376            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50377            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50378            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50379          fi
50380          ;;
50381        * )
50382          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50383          ;;
50384        esac
50385    fi
50386  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50387    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50388    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50389    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50390    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50391    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50392    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50393      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50394    fi
50395  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50396    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50397    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50398    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50399  fi
50400
50401  # Customize LDFLAGS for executables
50402
50403  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50404
50405  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50406    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50407      LDFLAGS_STACK_SIZE=1048576
50408    else
50409      LDFLAGS_STACK_SIZE=327680
50410    fi
50411    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50412  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50413    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50414  fi
50415
50416  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50417
50418  # Customize LDFLAGS for libs
50419  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50420
50421  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50422  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50423    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50424        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50425    JDKLIB_LIBS=""
50426  else
50427    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50428        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50429
50430    if test "xTARGET" = "xTARGET"; then
50431    # On some platforms (mac) the linker warns about non existing -L dirs.
50432    # Add server first if available. Linking aginst client does not always produce the same results.
50433      # Only add client/minimal dir if client/minimal is being built.
50434    # Default to server for other variants.
50435      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50436        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50437      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50438        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50439      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50440        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50441    else
50442        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50443    fi
50444    elif test "xTARGET" = "xBUILD"; then
50445      # When building a buildjdk, it's always only the server variant
50446      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50447          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50448    fi
50449
50450    JDKLIB_LIBS="-ljava -ljvm"
50451    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50452      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50453    fi
50454
50455  fi
50456
50457LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50458
50459  # Set JVM_LIBS (per os)
50460  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50461    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50462  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50463    # FIXME: This hard-coded path is not really proper.
50464    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50465      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50466    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50467      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50468    fi
50469    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50470        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50471  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50472    JVM_LIBS="$JVM_LIBS -lm"
50473  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50474    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50475  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50476    JVM_LIBS="$JVM_LIBS -lm"
50477  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50478    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50479        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50480        wsock32.lib winmm.lib version.lib psapi.lib"
50481    fi
50482
50483  # Set JVM_ASFLAGS
50484  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50485    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50486      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50487    fi
50488  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50489    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50490  fi
50491
50492  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50493
50494
50495
50496
50497
50498
50499
50500
50501
50502
50503
50504
50505
50506
50507
50508  # Special extras...
50509  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50510    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50511      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50512      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50513    fi
50514    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50515    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50516  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50517    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50518    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50519  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50520    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50521
50522
50523
50524
50525
50526
50527
50528
50529
50530
50531
50532
50533
50534
50535
50536
50537
50538
50539
50540
50541
50542
50543
50544
50545
50546
50547
50548
50549
50550
50551
50552
50553
50554
50555
50556
50557
50558
50559
50560
50561
50562
50563    # Execute function body
50564
50565  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50566$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50567  supports=yes
50568
50569  saved_cxxflags="$CXXFLAGS"
50570  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50571  ac_ext=cpp
50572ac_cpp='$CXXCPP $CPPFLAGS'
50573ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50574ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50575ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50576
50577  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50578/* end confdefs.h.  */
50579int i;
50580_ACEOF
50581if ac_fn_cxx_try_compile "$LINENO"; then :
50582
50583else
50584  supports=no
50585fi
50586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50587  ac_ext=cpp
50588ac_cpp='$CXXCPP $CPPFLAGS'
50589ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50590ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50591ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50592
50593  CXXFLAGS="$saved_cxxflags"
50594
50595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50596$as_echo "$supports" >&6; }
50597  if test "x$supports" = "xyes" ; then
50598    :
50599
50600  else
50601    :
50602    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50603  fi
50604
50605
50606
50607
50608
50609
50610
50611
50612
50613
50614
50615
50616    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50617    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50618
50619  fi
50620  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50621    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50622    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50623  fi
50624
50625  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50626    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50627    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50628  fi
50629
50630  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50631  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50632  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50633
50634  ###############################################################################
50635  #
50636  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50637  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50638  #
50639
50640  # Setup compiler/platform specific flags into
50641  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50642  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50643  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50644  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50645    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50646    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50647    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50648    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50649      # Force compatibility with i586 on 32 bit intel platforms.
50650      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50651      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50652    fi
50653    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50654        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50655    case $OPENJDK_BUILD_CPU_ARCH in
50656      arm )
50657        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50658        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50659        ;;
50660      ppc )
50661        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50662        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50663        ;;
50664      * )
50665        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50666        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50667        ;;
50668    esac
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706
50707
50708
50709
50710
50711
50712
50713
50714
50715
50716
50717
50718
50719
50720
50721
50722
50723    # Execute function body
50724
50725  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50726  REFERENCE_VERSION=6
50727
50728  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50729    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50730  fi
50731
50732  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50733    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50734  fi
50735
50736  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50737  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50738
50739  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50740    :
50741
50742  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50743  # runs afoul of the more aggressive versions of these optimisations.
50744  # Notably, value range propagation now assumes that the this pointer of C++
50745  # member functions is non-null.
50746  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50747        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50748        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50749$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50750  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50751  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50752
50753  else
50754    :
50755
50756  fi
50757
50758
50759
50760
50761
50762
50763
50764
50765
50766
50767
50768
50769
50770
50771  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50772    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50773
50774    # Restrict the debug information created by Clang to avoid
50775    # too big object files and speed the build up a little bit
50776    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50777    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50778    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50779      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50780        # Force compatibility with i586 on 32 bit intel platforms.
50781        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50782        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50783      fi
50784      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50785      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50786          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50787      case $OPENJDK_BUILD_CPU_ARCH in
50788        ppc )
50789          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50790          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50791          ;;
50792        * )
50793          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50794          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50795          ;;
50796      esac
50797    fi
50798  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50799    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50800    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50801    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50802      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50803    fi
50804
50805    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50806    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50807  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50808    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50809    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50810    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50811  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50812    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50813        -MD -Zc:wchar_t- -W3 -wd4800 \
50814        -DWIN32_LEAN_AND_MEAN \
50815        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50816        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50817        -DWIN32 -DIAL"
50818    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50819      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50820    else
50821      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50822    fi
50823    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50824    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50825    # studio.
50826    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50827      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50828      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50829      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50830    fi
50831  fi
50832
50833  ###############################################################################
50834
50835  # Adjust flags according to debug level.
50836  case $DEBUG_LEVEL in
50837    fastdebug | slowdebug )
50838      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50839      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50840      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50841      ;;
50842    release )
50843      ;;
50844    * )
50845      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50846      ;;
50847  esac
50848
50849  # Set some common defines. These works for all compilers, but assume
50850  # -D is universally accepted.
50851
50852  # Setup endianness
50853  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50854    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50855    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50856    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50857    #   Note: -Dmacro         is the same as    #define macro 1
50858    #         -Dmacro=        is the same as    #define macro
50859    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50860      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50861    else
50862      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50863    fi
50864  else
50865    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50866    # are defined in the system?
50867    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50868      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50869    else
50870      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50871    fi
50872  fi
50873
50874  # Setup target OS define. Use OS target name but in upper case.
50875  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50876  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50877
50878  # Setup target CPU
50879  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50880      $OPENJDK_BUILD_ADD_LP64 \
50881      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50882
50883  # Setup debug/release defines
50884  if test "x$DEBUG_LEVEL" = xrelease; then
50885    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50886    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50887      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50888    fi
50889  else
50890    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50891  fi
50892
50893  # Set some additional per-OS defines.
50894  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50895    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50896    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50897        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50898  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50899    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50900    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50901        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50902  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50903    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50904    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50905    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50906    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50907        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50908        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50909        -fno-omit-frame-pointer"
50910  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50911    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50912    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50913    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
50914        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50915        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50916  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50917    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50918  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50919    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50920    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50921  fi
50922
50923  # Set some additional per-CPU defines.
50924  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50925    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50926  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50927    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50928  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50929    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50930      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50931      # fixes `relocation truncated to fit' error for gcc 4.1.
50932      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50933      # Use ppc64 instructions, but schedule for power5
50934      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50935    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50936      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50937    fi
50938  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50939    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50940      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50941      # Little endian machine uses ELFv2 ABI.
50942      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50943      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50944      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
50945    fi
50946  fi
50947
50948  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50949    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50950  fi
50951
50952  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50953    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50954      # Solaris does not have _LP64=1 in the old build.
50955      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50956      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50957    fi
50958  fi
50959
50960  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50961  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50962    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50963        -Wunused-value -Woverloaded-virtual"
50964
50965    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50966
50967
50968
50969
50970
50971
50972
50973
50974
50975
50976
50977
50978
50979
50980
50981
50982
50983
50984
50985
50986
50987
50988
50989
50990
50991
50992
50993
50994
50995
50996
50997
50998
50999
51000
51001
51002
51003
51004
51005
51006
51007
51008
51009
51010
51011
51012
51013
51014
51015
51016
51017
51018
51019
51020    # Execute function body
51021
51022  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51023  REFERENCE_VERSION=4.8
51024
51025  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51026    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
51027  fi
51028
51029  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51030    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51031  fi
51032
51033  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51034  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51035
51036  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51037    :
51038
51039            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51040            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51041
51042
51043  else
51044    :
51045
51046  fi
51047
51048
51049
51050
51051
51052
51053
51054
51055
51056
51057
51058
51059
51060
51061    fi
51062    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51063      # Non-zero builds have stricter warnings
51064      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51065    else
51066      if test "x$TOOLCHAIN_TYPE" = xclang; then
51067        # Some versions of llvm do not like -Wundef
51068        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51069      fi
51070    fi
51071  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51072    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51073        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51074  fi
51075
51076  # Additional macosx handling
51077  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51078    # Setting these parameters makes it an error to link to macosx APIs that are
51079    # newer than the given OS version and makes the linked binaries compatible
51080    # even if built on a newer version of the OS.
51081    # The expected format is X.Y.Z
51082    MACOSX_VERSION_MIN=10.7.0
51083
51084
51085    # The macro takes the version with no dots, ex: 1070
51086    # Let the flags variables get resolved in make for easier override on make
51087    # command line.
51088    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)"
51089    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51090  fi
51091
51092  # Setup some hard coded includes
51093  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51094      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51095      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51096      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51097      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51098      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51099
51100  # The shared libraries are compiled using the picflag.
51101  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51102      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51103  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51104      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51105
51106  # Executable flags
51107  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51108  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51109
51110
51111
51112
51113
51114
51115  # Setup LDFLAGS et al.
51116  #
51117
51118  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51119    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51120    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51121    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51122    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51123      LDFLAGS_SAFESH="-safeseh"
51124      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51125      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51126      # NOTE: Old build added -machine. Probably not needed.
51127      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51128    else
51129      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51130    fi
51131  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51132      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51133      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51134        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51135        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51136    fi
51137  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51138    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51139    # We have previously set HAS_GNU_HASH if this is the case
51140    if test -n "$HAS_GNU_HASH"; then
51141      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51142      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51143      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51144    fi
51145      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51146        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51147    fi
51148    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51149      # And since we now know that the linker is gnu, then add -z defs, to forbid
51150      # undefined symbols in object files.
51151      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51152      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51153      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51154      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51155      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51156      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51157        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51158      fi
51159      case $DEBUG_LEVEL in
51160        release )
51161          # tell linker to optimize libraries.
51162          # Should this be supplied to the OSS linker as well?
51163          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51164          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51165          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51166          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51167            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51168          fi
51169          ;;
51170        slowdebug )
51171          # Hotspot always let the linker optimize
51172          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51173          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51174            # do relocations at load
51175            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51176            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51177            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51178          fi
51179          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51180            # mark relocations read only
51181            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51182            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51183            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51184          fi
51185          ;;
51186        fastdebug )
51187          # Hotspot always let the linker optimize
51188          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51189          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51190            # mark relocations read only
51191            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51192            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51193            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51194          fi
51195          ;;
51196        * )
51197          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51198          ;;
51199        esac
51200    fi
51201  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51202    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51203    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51204    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51205    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51206    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51207    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51208      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51209    fi
51210  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51211    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51212    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51213    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51214  fi
51215
51216  # Customize LDFLAGS for executables
51217
51218  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51219
51220  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51221    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51222      LDFLAGS_STACK_SIZE=1048576
51223    else
51224      LDFLAGS_STACK_SIZE=327680
51225    fi
51226    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51227  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51228    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51229  fi
51230
51231  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51232
51233  # Customize LDFLAGS for libs
51234  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51235
51236  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51237  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51238    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51239        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51240    OPENJDK_BUILD_JDKLIB_LIBS=""
51241  else
51242    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51243        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51244
51245    if test "xBUILD" = "xTARGET"; then
51246    # On some platforms (mac) the linker warns about non existing -L dirs.
51247    # Add server first if available. Linking aginst client does not always produce the same results.
51248      # Only add client/minimal dir if client/minimal is being built.
51249    # Default to server for other variants.
51250      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
51251        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51252      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
51253        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
51254      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51255        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
51256    else
51257        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51258    fi
51259    elif test "xBUILD" = "xBUILD"; then
51260      # When building a buildjdk, it's always only the server variant
51261      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51262          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51263    fi
51264
51265    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51266    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51267      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51268    fi
51269
51270  fi
51271
51272OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51273
51274  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51275  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51276    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51277  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51278    # FIXME: This hard-coded path is not really proper.
51279    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51280      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51281    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51282      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51283    fi
51284    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51285        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51286  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51287    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51288  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51289    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51290  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51291    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51292  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51293    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51294        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51295        wsock32.lib winmm.lib version.lib psapi.lib"
51296    fi
51297
51298  # Set OPENJDK_BUILD_JVM_ASFLAGS
51299  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51300    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51301      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51302    fi
51303  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51304    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51305  fi
51306
51307  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51308
51309
51310
51311
51312
51313
51314
51315
51316
51317
51318
51319
51320
51321
51322
51323  # Tests are only ever compiled for TARGET
51324  # Flags for compiling test libraries
51325  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51326  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51327
51328  # Flags for compiling test executables
51329  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51330  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51331
51332
51333
51334
51335
51336
51337  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51338  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51339
51340
51341
51342
51343
51344
51345  # Some Zero and Shark settings.
51346  # ZERO_ARCHFLAG tells the compiler which mode to build for
51347  case "${OPENJDK_TARGET_CPU}" in
51348    s390)
51349      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51350      ;;
51351    *)
51352      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51353  esac
51354
51355
51356
51357
51358
51359
51360
51361
51362
51363
51364
51365
51366
51367
51368
51369
51370
51371
51372
51373
51374
51375
51376
51377
51378
51379
51380
51381
51382
51383
51384
51385
51386
51387
51388
51389
51390
51391
51392
51393
51394
51395
51396    # Execute function body
51397
51398
51399
51400
51401
51402
51403
51404
51405
51406
51407
51408
51409
51410
51411
51412
51413
51414
51415
51416
51417
51418
51419
51420
51421
51422
51423
51424
51425
51426
51427
51428
51429
51430
51431
51432
51433
51434
51435
51436
51437
51438
51439
51440
51441
51442
51443
51444
51445    # Execute function body
51446
51447  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51448$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51449  supports=yes
51450
51451  saved_cflags="$CFLAGS"
51452  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51453  ac_ext=c
51454ac_cpp='$CPP $CPPFLAGS'
51455ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51456ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51457ac_compiler_gnu=$ac_cv_c_compiler_gnu
51458
51459  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51460/* end confdefs.h.  */
51461int i;
51462_ACEOF
51463if ac_fn_c_try_compile "$LINENO"; then :
51464
51465else
51466  supports=no
51467fi
51468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51469  ac_ext=cpp
51470ac_cpp='$CXXCPP $CPPFLAGS'
51471ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51472ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51473ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51474
51475  CFLAGS="$saved_cflags"
51476
51477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51478$as_echo "$supports" >&6; }
51479  if test "x$supports" = "xyes" ; then
51480    :
51481    C_COMP_SUPPORTS="yes"
51482  else
51483    :
51484    C_COMP_SUPPORTS="no"
51485  fi
51486
51487
51488
51489
51490
51491
51492
51493
51494
51495
51496
51497
51498
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508
51509
51510
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    # Execute function body
51546
51547  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51548$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51549  supports=yes
51550
51551  saved_cxxflags="$CXXFLAGS"
51552  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51553  ac_ext=cpp
51554ac_cpp='$CXXCPP $CPPFLAGS'
51555ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51556ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51557ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51558
51559  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51560/* end confdefs.h.  */
51561int i;
51562_ACEOF
51563if ac_fn_cxx_try_compile "$LINENO"; then :
51564
51565else
51566  supports=no
51567fi
51568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51569  ac_ext=cpp
51570ac_cpp='$CXXCPP $CPPFLAGS'
51571ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51572ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51573ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51574
51575  CXXFLAGS="$saved_cxxflags"
51576
51577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51578$as_echo "$supports" >&6; }
51579  if test "x$supports" = "xyes" ; then
51580    :
51581    CXX_COMP_SUPPORTS="yes"
51582  else
51583    :
51584    CXX_COMP_SUPPORTS="no"
51585  fi
51586
51587
51588
51589
51590
51591
51592
51593
51594
51595
51596
51597
51598
51599  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51600$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51601  supports=no
51602  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51603
51604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51605$as_echo "$supports" >&6; }
51606  if test "x$supports" = "xyes" ; then
51607    :
51608
51609  else
51610    :
51611    ZERO_ARCHFLAG=""
51612  fi
51613
51614
51615
51616
51617
51618
51619
51620
51621  # Check that the compiler supports -mX (or -qX on AIX) flags
51622  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51623
51624
51625
51626
51627
51628
51629
51630
51631
51632
51633
51634
51635
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658
51659
51660
51661
51662
51663
51664
51665
51666
51667
51668
51669
51670    # Execute function body
51671
51672
51673
51674
51675
51676
51677
51678
51679
51680
51681
51682
51683
51684
51685
51686
51687
51688
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698
51699
51700
51701
51702
51703
51704
51705
51706
51707
51708
51709
51710
51711
51712
51713
51714
51715
51716
51717
51718
51719    # Execute function body
51720
51721  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51722$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51723  supports=yes
51724
51725  saved_cflags="$CFLAGS"
51726  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51727  ac_ext=c
51728ac_cpp='$CPP $CPPFLAGS'
51729ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51730ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51731ac_compiler_gnu=$ac_cv_c_compiler_gnu
51732
51733  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51734/* end confdefs.h.  */
51735int i;
51736_ACEOF
51737if ac_fn_c_try_compile "$LINENO"; then :
51738
51739else
51740  supports=no
51741fi
51742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51743  ac_ext=cpp
51744ac_cpp='$CXXCPP $CPPFLAGS'
51745ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51746ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51747ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51748
51749  CFLAGS="$saved_cflags"
51750
51751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51752$as_echo "$supports" >&6; }
51753  if test "x$supports" = "xyes" ; then
51754    :
51755    C_COMP_SUPPORTS="yes"
51756  else
51757    :
51758    C_COMP_SUPPORTS="no"
51759  fi
51760
51761
51762
51763
51764
51765
51766
51767
51768
51769
51770
51771
51772
51773
51774
51775
51776
51777
51778
51779
51780
51781
51782
51783
51784
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    # Execute function body
51820
51821  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51822$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51823  supports=yes
51824
51825  saved_cxxflags="$CXXFLAGS"
51826  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51827  ac_ext=cpp
51828ac_cpp='$CXXCPP $CPPFLAGS'
51829ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51830ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51831ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51832
51833  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51834/* end confdefs.h.  */
51835int i;
51836_ACEOF
51837if ac_fn_cxx_try_compile "$LINENO"; then :
51838
51839else
51840  supports=no
51841fi
51842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51843  ac_ext=cpp
51844ac_cpp='$CXXCPP $CPPFLAGS'
51845ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51846ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51847ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51848
51849  CXXFLAGS="$saved_cxxflags"
51850
51851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51852$as_echo "$supports" >&6; }
51853  if test "x$supports" = "xyes" ; then
51854    :
51855    CXX_COMP_SUPPORTS="yes"
51856  else
51857    :
51858    CXX_COMP_SUPPORTS="no"
51859  fi
51860
51861
51862
51863
51864
51865
51866
51867
51868
51869
51870
51871
51872
51873  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51874$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51875  supports=no
51876  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51877
51878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51879$as_echo "$supports" >&6; }
51880  if test "x$supports" = "xyes" ; then
51881    :
51882    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51883  else
51884    :
51885    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51886  fi
51887
51888
51889
51890
51891
51892
51893
51894
51895  # Check whether --enable-warnings-as-errors was given.
51896if test "${enable_warnings_as_errors+set}" = set; then :
51897  enableval=$enable_warnings_as_errors;
51898fi
51899
51900
51901  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51902$as_echo_n "checking if native warnings are errors... " >&6; }
51903  if test "x$enable_warnings_as_errors" = "xyes"; then
51904    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51905$as_echo "yes (explicitely set)" >&6; }
51906    WARNINGS_AS_ERRORS=true
51907  elif test "x$enable_warnings_as_errors" = "xno"; then
51908    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51909$as_echo "no" >&6; }
51910    WARNINGS_AS_ERRORS=false
51911  elif test "x$enable_warnings_as_errors" = "x"; then
51912    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51913$as_echo "yes (default)" >&6; }
51914    WARNINGS_AS_ERRORS=true
51915  else
51916    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51917  fi
51918
51919  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51920    # Set legacy hotspot variable
51921    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51922  else
51923    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51924  fi
51925
51926
51927
51928
51929  case "${TOOLCHAIN_TYPE}" in
51930    microsoft)
51931      DISABLE_WARNING_PREFIX="-wd"
51932      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51933      ;;
51934    solstudio)
51935      DISABLE_WARNING_PREFIX="-erroff="
51936      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51937      ;;
51938    gcc)
51939      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51940
51941
51942
51943
51944
51945
51946
51947
51948
51949
51950
51951
51952
51953
51954
51955
51956
51957
51958
51959
51960
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972
51973
51974
51975
51976
51977
51978
51979
51980
51981
51982
51983
51984
51985
51986
51987    # Execute function body
51988
51989
51990
51991
51992
51993
51994
51995
51996
51997
51998
51999
52000
52001
52002
52003
52004
52005
52006
52007
52008
52009
52010
52011
52012
52013
52014
52015
52016
52017
52018
52019
52020
52021
52022
52023
52024
52025
52026
52027
52028
52029
52030
52031
52032
52033
52034
52035
52036    # Execute function body
52037
52038  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52039$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52040  supports=yes
52041
52042  saved_cflags="$CFLAGS"
52043  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52044  ac_ext=c
52045ac_cpp='$CPP $CPPFLAGS'
52046ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52047ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52048ac_compiler_gnu=$ac_cv_c_compiler_gnu
52049
52050  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52051/* end confdefs.h.  */
52052int i;
52053_ACEOF
52054if ac_fn_c_try_compile "$LINENO"; then :
52055
52056else
52057  supports=no
52058fi
52059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52060  ac_ext=cpp
52061ac_cpp='$CXXCPP $CPPFLAGS'
52062ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52063ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52064ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52065
52066  CFLAGS="$saved_cflags"
52067
52068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52069$as_echo "$supports" >&6; }
52070  if test "x$supports" = "xyes" ; then
52071    :
52072    C_COMP_SUPPORTS="yes"
52073  else
52074    :
52075    C_COMP_SUPPORTS="no"
52076  fi
52077
52078
52079
52080
52081
52082
52083
52084
52085
52086
52087
52088
52089
52090
52091
52092
52093
52094
52095
52096
52097
52098
52099
52100
52101
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    # Execute function body
52137
52138  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52139$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52140  supports=yes
52141
52142  saved_cxxflags="$CXXFLAGS"
52143  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52144  ac_ext=cpp
52145ac_cpp='$CXXCPP $CPPFLAGS'
52146ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52147ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52148ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52149
52150  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52151/* end confdefs.h.  */
52152int i;
52153_ACEOF
52154if ac_fn_cxx_try_compile "$LINENO"; then :
52155
52156else
52157  supports=no
52158fi
52159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52160  ac_ext=cpp
52161ac_cpp='$CXXCPP $CPPFLAGS'
52162ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52163ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52164ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52165
52166  CXXFLAGS="$saved_cxxflags"
52167
52168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52169$as_echo "$supports" >&6; }
52170  if test "x$supports" = "xyes" ; then
52171    :
52172    CXX_COMP_SUPPORTS="yes"
52173  else
52174    :
52175    CXX_COMP_SUPPORTS="no"
52176  fi
52177
52178
52179
52180
52181
52182
52183
52184
52185
52186
52187
52188
52189
52190  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52191$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52192  supports=no
52193  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52194
52195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52196$as_echo "$supports" >&6; }
52197  if test "x$supports" = "xyes" ; then
52198    :
52199    GCC_CAN_DISABLE_WARNINGS=true
52200  else
52201    :
52202    GCC_CAN_DISABLE_WARNINGS=false
52203
52204  fi
52205
52206
52207
52208
52209
52210
52211      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52212        DISABLE_WARNING_PREFIX="-Wno-"
52213      else
52214        DISABLE_WARNING_PREFIX=
52215      fi
52216      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52217      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52218      # CFLAGS since any target specific flags will likely not work with the
52219      # build compiler
52220      CC_OLD="$CC"
52221      CXX_OLD="$CXX"
52222      CC="$BUILD_CC"
52223      CXX="$BUILD_CXX"
52224      CFLAGS_OLD="$CFLAGS"
52225      CFLAGS=""
52226
52227
52228
52229
52230
52231
52232
52233
52234
52235
52236
52237
52238
52239
52240
52241
52242
52243
52244
52245
52246
52247
52248
52249
52250
52251
52252
52253
52254
52255
52256
52257
52258
52259
52260
52261
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271
52272
52273    # Execute function body
52274
52275
52276
52277
52278
52279
52280
52281
52282
52283
52284
52285
52286
52287
52288
52289
52290
52291
52292
52293
52294
52295
52296
52297
52298
52299
52300
52301
52302
52303
52304
52305
52306
52307
52308
52309
52310
52311
52312
52313
52314
52315
52316
52317
52318
52319
52320
52321
52322    # Execute function body
52323
52324  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52325$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52326  supports=yes
52327
52328  saved_cflags="$CFLAGS"
52329  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52330  ac_ext=c
52331ac_cpp='$CPP $CPPFLAGS'
52332ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52333ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52334ac_compiler_gnu=$ac_cv_c_compiler_gnu
52335
52336  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52337/* end confdefs.h.  */
52338int i;
52339_ACEOF
52340if ac_fn_c_try_compile "$LINENO"; then :
52341
52342else
52343  supports=no
52344fi
52345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52346  ac_ext=cpp
52347ac_cpp='$CXXCPP $CPPFLAGS'
52348ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52349ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52350ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52351
52352  CFLAGS="$saved_cflags"
52353
52354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52355$as_echo "$supports" >&6; }
52356  if test "x$supports" = "xyes" ; then
52357    :
52358    C_COMP_SUPPORTS="yes"
52359  else
52360    :
52361    C_COMP_SUPPORTS="no"
52362  fi
52363
52364
52365
52366
52367
52368
52369
52370
52371
52372
52373
52374
52375
52376
52377
52378
52379
52380
52381
52382
52383
52384
52385
52386
52387
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    # Execute function body
52423
52424  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52425$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52426  supports=yes
52427
52428  saved_cxxflags="$CXXFLAGS"
52429  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52430  ac_ext=cpp
52431ac_cpp='$CXXCPP $CPPFLAGS'
52432ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52433ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52434ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52435
52436  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52437/* end confdefs.h.  */
52438int i;
52439_ACEOF
52440if ac_fn_cxx_try_compile "$LINENO"; then :
52441
52442else
52443  supports=no
52444fi
52445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52446  ac_ext=cpp
52447ac_cpp='$CXXCPP $CPPFLAGS'
52448ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52449ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52450ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52451
52452  CXXFLAGS="$saved_cxxflags"
52453
52454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52455$as_echo "$supports" >&6; }
52456  if test "x$supports" = "xyes" ; then
52457    :
52458    CXX_COMP_SUPPORTS="yes"
52459  else
52460    :
52461    CXX_COMP_SUPPORTS="no"
52462  fi
52463
52464
52465
52466
52467
52468
52469
52470
52471
52472
52473
52474
52475
52476  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52477$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52478  supports=no
52479  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52480
52481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52482$as_echo "$supports" >&6; }
52483  if test "x$supports" = "xyes" ; then
52484    :
52485    BUILD_CC_CAN_DISABLE_WARNINGS=true
52486  else
52487    :
52488    BUILD_CC_CAN_DISABLE_WARNINGS=false
52489
52490  fi
52491
52492
52493
52494
52495
52496
52497      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52498        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52499      else
52500        BUILD_CC_DISABLE_WARNING_PREFIX=
52501      fi
52502      CC="$CC_OLD"
52503      CXX="$CXX_OLD"
52504      CFLAGS="$CFLAGS_OLD"
52505      ;;
52506    clang)
52507      DISABLE_WARNING_PREFIX="-Wno-"
52508      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52509      ;;
52510    xlc)
52511      DISABLE_WARNING_PREFIX="-qsuppress="
52512      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52513      ;;
52514  esac
52515
52516
52517
52518
52519
52520# Setup debug symbols (need objcopy from the toolchain for that)
52521
52522  #
52523  # NATIVE_DEBUG_SYMBOLS
52524  # This must be done after the toolchain is setup, since we're looking at objcopy.
52525  #
52526  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52527$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52528
52529# Check whether --with-native-debug-symbols was given.
52530if test "${with_native_debug_symbols+set}" = set; then :
52531  withval=$with_native_debug_symbols;
52532        if test "x$OPENJDK_TARGET_OS" = xaix; then
52533          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52534            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52535          fi
52536        fi
52537
52538else
52539
52540        if test "x$OPENJDK_TARGET_OS" = xaix; then
52541          # AIX doesn't support 'zipped' so use 'internal' as default
52542          with_native_debug_symbols="internal"
52543        else
52544          if test "x$STATIC_BUILD" = xtrue; then
52545            with_native_debug_symbols="none"
52546          else
52547            with_native_debug_symbols="zipped"
52548          fi
52549        fi
52550
52551fi
52552
52553  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52555$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52556
52557  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52558
52559    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52560      if test "x$OBJCOPY" = x; then
52561        # enabling of enable-debug-symbols and can't find objcopy
52562        # this is an error
52563        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52564      fi
52565    fi
52566
52567    COMPILE_WITH_DEBUG_SYMBOLS=true
52568    COPY_DEBUG_SYMBOLS=true
52569    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52570
52571    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52572    DEBUG_BINARIES=false
52573    STRIP_POLICY=min_strip
52574
52575  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52576    COMPILE_WITH_DEBUG_SYMBOLS=false
52577    COPY_DEBUG_SYMBOLS=false
52578    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52579
52580    DEBUG_BINARIES=false
52581    STRIP_POLICY=no_strip
52582  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52583    COMPILE_WITH_DEBUG_SYMBOLS=true
52584    COPY_DEBUG_SYMBOLS=false
52585    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52586
52587    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52588    DEBUG_BINARIES=true
52589    STRIP_POLICY=no_strip
52590    STRIP=""
52591
52592  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52593
52594    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52595      if test "x$OBJCOPY" = x; then
52596        # enabling of enable-debug-symbols and can't find objcopy
52597        # this is an error
52598        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52599      fi
52600    fi
52601
52602    COMPILE_WITH_DEBUG_SYMBOLS=true
52603    COPY_DEBUG_SYMBOLS=true
52604    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52605
52606    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52607    DEBUG_BINARIES=false
52608    STRIP_POLICY=min_strip
52609  else
52610    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52611  fi
52612
52613  # --enable-debug-symbols is deprecated.
52614  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52615
52616  # Check whether --enable-debug-symbols was given.
52617if test "${enable_debug_symbols+set}" = set; then :
52618  enableval=$enable_debug_symbols;
52619fi
52620
52621  if test "x$enable_debug_symbols" != x; then
52622    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52623$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52624
52625    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52626      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52627$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52628    fi
52629
52630  fi
52631
52632
52633  # --enable-zip-debug-info is deprecated.
52634  # Please use --with-native-debug-symbols=zipped .
52635
52636  # Check whether --enable-zip-debug-info was given.
52637if test "${enable_zip_debug_info+set}" = set; then :
52638  enableval=$enable_zip_debug_info;
52639fi
52640
52641  if test "x$enable_zip_debug_info" != x; then
52642    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52643$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52644
52645    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52646      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52647$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52648    fi
52649
52650  fi
52651
52652
52653
52654
52655
52656
52657  # Legacy values
52658
52659
52660
52661
52662  # Check whether --enable-native-coverage was given.
52663if test "${enable_native_coverage+set}" = set; then :
52664  enableval=$enable_native_coverage;
52665fi
52666
52667  GCOV_ENABLED="false"
52668  if test "x$enable_native_coverage" = "xyes"; then
52669    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52670      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52671$as_echo_n "checking if native coverage is enabled... " >&6; }
52672      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52673$as_echo "yes" >&6; }
52674      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52675      GCOV_LDFLAGS="-fprofile-arcs"
52676      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52677      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52678      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52679      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52680      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52681      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52682      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52683      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52684      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52685      GCOV_ENABLED="true"
52686    else
52687      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52688    fi
52689  elif test "x$enable_native_coverage" = "xno"; then
52690    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52691$as_echo_n "checking if native coverage is enabled... " >&6; }
52692    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52693$as_echo "no" >&6; }
52694  elif test "x$enable_native_coverage" != "x"; then
52695    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52696  fi
52697
52698
52699
52700
52701# Need toolchain to setup dtrace
52702
52703  # Test for dtrace dependencies
52704  # Check whether --enable-dtrace was given.
52705if test "${enable_dtrace+set}" = set; then :
52706  enableval=$enable_dtrace;
52707fi
52708
52709
52710  DTRACE_DEP_MISSING=false
52711
52712  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52713$as_echo_n "checking for dtrace tool... " >&6; }
52714  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52715    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52716$as_echo "$DTRACE" >&6; }
52717  else
52718    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52719$as_echo "not found, cannot build dtrace" >&6; }
52720    DTRACE_DEP_MISSING=true
52721  fi
52722
52723  for ac_header in sys/sdt.h
52724do :
52725  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52726if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52727  cat >>confdefs.h <<_ACEOF
52728#define HAVE_SYS_SDT_H 1
52729_ACEOF
52730 DTRACE_HEADERS_OK=yes
52731else
52732  DTRACE_HEADERS_OK=no
52733fi
52734
52735done
52736
52737  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52738    DTRACE_DEP_MISSING=true
52739  fi
52740
52741  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52742$as_echo_n "checking if dtrace should be built... " >&6; }
52743  if test "x$enable_dtrace" = "xyes"; then
52744    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52745      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52746$as_echo "no, missing dependencies" >&6; }
52747
52748  # Print a helpful message on how to acquire the necessary build dependency.
52749  # dtrace is the help tag: freetype, cups, alsa etc
52750  MISSING_DEPENDENCY=dtrace
52751
52752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52753    cygwin_help $MISSING_DEPENDENCY
52754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52755    msys_help $MISSING_DEPENDENCY
52756  else
52757    PKGHANDLER_COMMAND=
52758
52759    case $PKGHANDLER in
52760      apt-get)
52761        apt_help     $MISSING_DEPENDENCY ;;
52762      yum)
52763        yum_help     $MISSING_DEPENDENCY ;;
52764      port)
52765        port_help    $MISSING_DEPENDENCY ;;
52766      pkgutil)
52767        pkgutil_help $MISSING_DEPENDENCY ;;
52768      pkgadd)
52769        pkgadd_help  $MISSING_DEPENDENCY ;;
52770    esac
52771
52772    if test "x$PKGHANDLER_COMMAND" != x; then
52773      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52774    fi
52775  fi
52776
52777      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52778    else
52779      INCLUDE_DTRACE=true
52780      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52781$as_echo "yes, forced" >&6; }
52782    fi
52783  elif test "x$enable_dtrace" = "xno"; then
52784    INCLUDE_DTRACE=false
52785    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52786$as_echo "no, forced" >&6; }
52787  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52788    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52789      INCLUDE_DTRACE=false
52790      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52791$as_echo "no, missing dependencies" >&6; }
52792    else
52793      INCLUDE_DTRACE=true
52794      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52795$as_echo "yes, dependencies present" >&6; }
52796    fi
52797  else
52798    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52799  fi
52800
52801
52802
52803  # The user can in some cases supply additional jvm features. For the custom
52804  # variant, this defines the entire variant.
52805
52806# Check whether --with-jvm-features was given.
52807if test "${with_jvm_features+set}" = set; then :
52808  withval=$with_jvm_features;
52809fi
52810
52811  if test "x$with_jvm_features" != x; then
52812    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52813$as_echo_n "checking additional JVM features... " >&6; }
52814    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52815    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52816$as_echo "$JVM_FEATURES" >&6; }
52817  fi
52818
52819  # Verify that dependencies are met for explicitly set features.
52820  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52821    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52822  fi
52823
52824  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52825    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52826  fi
52827
52828  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
52829    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
52830  fi
52831
52832  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52833    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52834  fi
52835
52836  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52837    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52838  fi
52839
52840  # Turn on additional features based on other parts of configure
52841  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52842    JVM_FEATURES="$JVM_FEATURES dtrace"
52843  else
52844    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52845      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52846    fi
52847  fi
52848
52849  if test "x$STATIC_BUILD" = "xtrue"; then
52850    JVM_FEATURES="$JVM_FEATURES static-build"
52851  else
52852    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52853      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52854    fi
52855  fi
52856
52857  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52858    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52859      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52860    fi
52861  fi
52862
52863  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52864    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52865      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52866    fi
52867  fi
52868
52869  # Only enable jvmci on x86_64, sparcv9 and aarch64.
52870  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52871      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52872      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52873    JVM_FEATURES_jvmci="jvmci"
52874  else
52875    JVM_FEATURES_jvmci=""
52876  fi
52877
52878  # All variants but minimal (and custom) get these features
52879  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52880
52881  # Enable features depending on variant.
52882  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52883  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52884  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52885  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52886  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52887  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52888  JVM_FEATURES_custom="$JVM_FEATURES"
52889
52890
52891
52892
52893
52894
52895
52896
52897
52898  # Used for verification of Makefiles by check-jvm-feature
52899
52900
52901  # We don't support --with-jvm-interpreter anymore, use zero instead.
52902
52903
52904# Check whether --with-jvm-interpreter was given.
52905if test "${with_jvm_interpreter+set}" = set; then :
52906  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52907$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52908fi
52909
52910
52911
52912
52913  # Check whether --enable-hotspot-gtest was given.
52914if test "${enable_hotspot_gtest+set}" = set; then :
52915  enableval=$enable_hotspot_gtest;
52916fi
52917
52918
52919  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52920    GTEST_DIR_EXISTS="true"
52921  else
52922    GTEST_DIR_EXISTS="false"
52923  fi
52924
52925  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52926$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52927  if test "x$enable_hotspot_gtest" = "xyes"; then
52928    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52929      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52930$as_echo "yes, forced" >&6; }
52931      BUILD_GTEST="true"
52932    else
52933      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52934    fi
52935  elif test "x$enable_hotspot_gtest" = "xno"; then
52936    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52937$as_echo "no, forced" >&6; }
52938    BUILD_GTEST="false"
52939  elif test "x$enable_hotspot_gtest" = "x"; then
52940    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
52941      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52942$as_echo "yes" >&6; }
52943      BUILD_GTEST="true"
52944    else
52945      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52946$as_echo "no" >&6; }
52947      BUILD_GTEST="false"
52948    fi
52949  else
52950    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52951  fi
52952
52953
52954
52955
52956###############################################################################
52957#
52958# Check dependencies for external and internal libraries.
52959#
52960###############################################################################
52961
52962# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52963
52964  # When using cygwin or msys, we need a wrapper binary that renames
52965  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52966  # @files and rewrites these too! This wrapper binary is
52967  # called fixpath.
52968  FIXPATH=
52969  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52970    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52971$as_echo_n "checking if fixpath can be created... " >&6; }
52972    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52973    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52974    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52975    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52976      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52977      FIXPATH="$FIXPATH_BIN -c"
52978    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52979      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52980      # @ was chosen as separator to minimize risk of other tools messing around with it
52981      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52982          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
52983      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52984      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52985    fi
52986    FIXPATH_SRC_W="$FIXPATH_SRC"
52987    FIXPATH_BIN_W="$FIXPATH_BIN"
52988
52989  unix_path="$FIXPATH_SRC_W"
52990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52991    windows_path=`$CYGPATH -m "$unix_path"`
52992    FIXPATH_SRC_W="$windows_path"
52993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52994    windows_path=`cmd //c echo $unix_path`
52995    FIXPATH_SRC_W="$windows_path"
52996  fi
52997
52998
52999  unix_path="$FIXPATH_BIN_W"
53000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53001    windows_path=`$CYGPATH -m "$unix_path"`
53002    FIXPATH_BIN_W="$windows_path"
53003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53004    windows_path=`cmd //c echo $unix_path`
53005    FIXPATH_BIN_W="$windows_path"
53006  fi
53007
53008    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53009    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53010    cd $FIXPATH_DIR
53011    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53012    cd $CURDIR
53013
53014    if test ! -x $FIXPATH_BIN; then
53015      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53016$as_echo "no" >&6; }
53017      cat $FIXPATH_DIR/fixpath1.log
53018      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53019    fi
53020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53021$as_echo "yes" >&6; }
53022    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53023$as_echo_n "checking if fixpath.exe works... " >&6; }
53024    cd $FIXPATH_DIR
53025    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53026        > $FIXPATH_DIR/fixpath2.log 2>&1
53027    cd $CURDIR
53028    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53029      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53030$as_echo "no" >&6; }
53031      cat $FIXPATH_DIR/fixpath2.log
53032      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53033    fi
53034    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53035$as_echo "yes" >&6; }
53036
53037    FIXPATH_DETACH_FLAG="--detach"
53038  fi
53039
53040
53041
53042
53043
53044
53045  # Check if X11 is needed
53046  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53047    # No X11 support on windows or macosx
53048    NEEDS_LIB_X11=false
53049  else
53050    # All other instances need X11, even if building headless only, libawt still
53051    # needs X11 headers.
53052    NEEDS_LIB_X11=true
53053  fi
53054
53055  # Check if cups is needed
53056  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53057    # Windows have a separate print system
53058    NEEDS_LIB_CUPS=false
53059  else
53060    NEEDS_LIB_CUPS=true
53061  fi
53062
53063  # A custom hook may have set this already
53064  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53065    NEEDS_LIB_FREETYPE=true
53066  fi
53067
53068  # Check if alsa is needed
53069  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53070    NEEDS_LIB_ALSA=true
53071  else
53072    NEEDS_LIB_ALSA=false
53073  fi
53074
53075  # Check if ffi is needed
53076  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53077    NEEDS_LIB_FFI=true
53078  else
53079    NEEDS_LIB_FFI=false
53080  fi
53081
53082
53083  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53084  # dynamic build is configured on command line.
53085
53086# Check whether --with-stdc++lib was given.
53087if test "${with_stdc__lib+set}" = set; then :
53088  withval=$with_stdc__lib;
53089        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53090                && test "x$with_stdc__lib" != xdefault; then
53091          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53092        fi
53093
53094else
53095  with_stdc__lib=default
53096
53097fi
53098
53099
53100  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53101    # Test if stdc++ can be linked statically.
53102    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53103$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53104    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53105    ac_ext=cpp
53106ac_cpp='$CXXCPP $CPPFLAGS'
53107ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53108ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53109ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53110
53111    OLD_LIBS="$LIBS"
53112    LIBS="$STATIC_STDCXX_FLAGS"
53113    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53114/* end confdefs.h.  */
53115
53116int
53117main ()
53118{
53119return 0;
53120  ;
53121  return 0;
53122}
53123_ACEOF
53124if ac_fn_cxx_try_link "$LINENO"; then :
53125  has_static_libstdcxx=yes
53126else
53127  has_static_libstdcxx=no
53128fi
53129rm -f core conftest.err conftest.$ac_objext \
53130    conftest$ac_exeext conftest.$ac_ext
53131    LIBS="$OLD_LIBS"
53132    ac_ext=cpp
53133ac_cpp='$CXXCPP $CPPFLAGS'
53134ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53135ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53136ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53137
53138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53139$as_echo "$has_static_libstdcxx" >&6; }
53140
53141    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53142      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53143    fi
53144
53145    # If dynamic was requested, it's available since it would fail above otherwise.
53146    # If dynamic wasn't requested, go with static unless it isn't available.
53147    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53148$as_echo_n "checking how to link with libstdc++... " >&6; }
53149    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53150        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53151      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53152$as_echo "dynamic" >&6; }
53153    else
53154      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53155      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53156      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53157      # just use the same setting as for the TARGET toolchain.
53158      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53159      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53160$as_echo "static" >&6; }
53161    fi
53162  fi
53163
53164  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53165  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53166    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53167  fi
53168
53169
53170
53171  # Setup Windows runtime dlls
53172  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53173
53174
53175# Check whether --with-msvcr-dll was given.
53176if test "${with_msvcr_dll+set}" = set; then :
53177  withval=$with_msvcr_dll;
53178fi
53179
53180
53181  if test "x$with_msvcr_dll" != x; then
53182    # If given explicitely by user, do not probe. If not present, fail directly.
53183
53184  DLL_NAME="$MSVCR_NAME"
53185  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53186  METHOD="--with-msvcr-dll"
53187  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53188    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53189$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53190
53191    # Need to check if the found msvcr is correct architecture
53192    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53193$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53194    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53195    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53196      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53197      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53198      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53199        CORRECT_MSVCR_ARCH="PE32 executable"
53200      else
53201        CORRECT_MSVCR_ARCH="PE32+ executable"
53202      fi
53203    else
53204      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53205        CORRECT_MSVCR_ARCH=386
53206      else
53207        CORRECT_MSVCR_ARCH=x86-64
53208      fi
53209    fi
53210    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53211      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53212$as_echo "ok" >&6; }
53213      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53214
53215  # Only process if variable expands to non-empty
53216
53217  if test "x$MSVC_DLL" != x; then
53218    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53219
53220  # Input might be given as Windows format, start by converting to
53221  # unix format.
53222  path="$MSVC_DLL"
53223  new_path=`$CYGPATH -u "$path"`
53224
53225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53228  # "foo.exe" is OK but "foo" is an error.
53229  #
53230  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53231  # It is also a way to make sure we got the proper file name for the real test later on.
53232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53233  if test "x$test_shortpath" = x; then
53234    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53235$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53236    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53237  fi
53238
53239  # Call helper function which possibly converts this using DOS-style short mode.
53240  # If so, the updated path is stored in $new_path.
53241
53242  input_path="$new_path"
53243  # Check if we need to convert this using DOS-style short mode. If the path
53244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53245  # take no chances and rewrite it.
53246  # Note: m4 eats our [], so we need to use [ and ] instead.
53247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53248  if test "x$has_forbidden_chars" != x; then
53249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53250    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53251    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53252    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53253      # Going to short mode and back again did indeed matter. Since short mode is
53254      # case insensitive, let's make it lowercase to improve readability.
53255      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53256      # Now convert it back to Unix-style (cygpath)
53257      input_path=`$CYGPATH -u "$shortmode_path"`
53258      new_path="$input_path"
53259    fi
53260  fi
53261
53262  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53263  if test "x$test_cygdrive_prefix" = x; then
53264    # As a simple fix, exclude /usr/bin since it's not a real path.
53265    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53266      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53267      # a path prefixed by /cygdrive for fixpath to work.
53268      new_path="$CYGWIN_ROOT_PATH$input_path"
53269    fi
53270  fi
53271
53272
53273  if test "x$path" != "x$new_path"; then
53274    MSVC_DLL="$new_path"
53275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53276$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53277  fi
53278
53279    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53280
53281  path="$MSVC_DLL"
53282  has_colon=`$ECHO $path | $GREP ^.:`
53283  new_path="$path"
53284  if test "x$has_colon" = x; then
53285    # Not in mixed or Windows style, start by that.
53286    new_path=`cmd //c echo $path`
53287  fi
53288
53289
53290  input_path="$new_path"
53291  # Check if we need to convert this using DOS-style short mode. If the path
53292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53293  # take no chances and rewrite it.
53294  # Note: m4 eats our [], so we need to use [ and ] instead.
53295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53296  if test "x$has_forbidden_chars" != x; then
53297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53298    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53299  fi
53300
53301
53302  windows_path="$new_path"
53303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53304    unix_path=`$CYGPATH -u "$windows_path"`
53305    new_path="$unix_path"
53306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53308    new_path="$unix_path"
53309  fi
53310
53311  if test "x$path" != "x$new_path"; then
53312    MSVC_DLL="$new_path"
53313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53314$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53315  fi
53316
53317  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53318  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53319
53320    else
53321      # We're on a unix platform. Hooray! :)
53322      path="$MSVC_DLL"
53323      has_space=`$ECHO "$path" | $GREP " "`
53324      if test "x$has_space" != x; then
53325        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53326$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53327        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53328      fi
53329
53330      # Use eval to expand a potential ~
53331      eval path="$path"
53332      if test ! -f "$path" && test ! -d "$path"; then
53333        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53334      fi
53335
53336      if test -d "$path"; then
53337        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53338      else
53339        dir="`$DIRNAME "$path"`"
53340        base="`$BASENAME "$path"`"
53341        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53342      fi
53343    fi
53344  fi
53345
53346      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53347$as_echo_n "checking for $DLL_NAME... " >&6; }
53348      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53349$as_echo "$MSVC_DLL" >&6; }
53350    else
53351      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53352$as_echo "incorrect, ignoring" >&6; }
53353      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53354$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53355    fi
53356  fi
53357
53358    if test "x$MSVC_DLL" = x; then
53359      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53360    fi
53361    MSVCR_DLL="$MSVC_DLL"
53362  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53363
53364  DLL_NAME="$MSVCR_NAME"
53365  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53366  METHOD="devkit"
53367  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53368    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53369$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53370
53371    # Need to check if the found msvcr is correct architecture
53372    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53373$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53374    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53375    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53376      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53377      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53378      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53379        CORRECT_MSVCR_ARCH="PE32 executable"
53380      else
53381        CORRECT_MSVCR_ARCH="PE32+ executable"
53382      fi
53383    else
53384      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53385        CORRECT_MSVCR_ARCH=386
53386      else
53387        CORRECT_MSVCR_ARCH=x86-64
53388      fi
53389    fi
53390    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53391      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53392$as_echo "ok" >&6; }
53393      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53394
53395  # Only process if variable expands to non-empty
53396
53397  if test "x$MSVC_DLL" != x; then
53398    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53399
53400  # Input might be given as Windows format, start by converting to
53401  # unix format.
53402  path="$MSVC_DLL"
53403  new_path=`$CYGPATH -u "$path"`
53404
53405  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53406  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53407  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53408  # "foo.exe" is OK but "foo" is an error.
53409  #
53410  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53411  # It is also a way to make sure we got the proper file name for the real test later on.
53412  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53413  if test "x$test_shortpath" = x; then
53414    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53415$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53416    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53417  fi
53418
53419  # Call helper function which possibly converts this using DOS-style short mode.
53420  # If so, the updated path is stored in $new_path.
53421
53422  input_path="$new_path"
53423  # Check if we need to convert this using DOS-style short mode. If the path
53424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53425  # take no chances and rewrite it.
53426  # Note: m4 eats our [], so we need to use [ and ] instead.
53427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53428  if test "x$has_forbidden_chars" != x; then
53429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53430    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53431    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53432    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53433      # Going to short mode and back again did indeed matter. Since short mode is
53434      # case insensitive, let's make it lowercase to improve readability.
53435      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53436      # Now convert it back to Unix-style (cygpath)
53437      input_path=`$CYGPATH -u "$shortmode_path"`
53438      new_path="$input_path"
53439    fi
53440  fi
53441
53442  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53443  if test "x$test_cygdrive_prefix" = x; then
53444    # As a simple fix, exclude /usr/bin since it's not a real path.
53445    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53446      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53447      # a path prefixed by /cygdrive for fixpath to work.
53448      new_path="$CYGWIN_ROOT_PATH$input_path"
53449    fi
53450  fi
53451
53452
53453  if test "x$path" != "x$new_path"; then
53454    MSVC_DLL="$new_path"
53455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53456$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53457  fi
53458
53459    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53460
53461  path="$MSVC_DLL"
53462  has_colon=`$ECHO $path | $GREP ^.:`
53463  new_path="$path"
53464  if test "x$has_colon" = x; then
53465    # Not in mixed or Windows style, start by that.
53466    new_path=`cmd //c echo $path`
53467  fi
53468
53469
53470  input_path="$new_path"
53471  # Check if we need to convert this using DOS-style short mode. If the path
53472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53473  # take no chances and rewrite it.
53474  # Note: m4 eats our [], so we need to use [ and ] instead.
53475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53476  if test "x$has_forbidden_chars" != x; then
53477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53478    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53479  fi
53480
53481
53482  windows_path="$new_path"
53483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53484    unix_path=`$CYGPATH -u "$windows_path"`
53485    new_path="$unix_path"
53486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53488    new_path="$unix_path"
53489  fi
53490
53491  if test "x$path" != "x$new_path"; then
53492    MSVC_DLL="$new_path"
53493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53494$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53495  fi
53496
53497  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53498  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53499
53500    else
53501      # We're on a unix platform. Hooray! :)
53502      path="$MSVC_DLL"
53503      has_space=`$ECHO "$path" | $GREP " "`
53504      if test "x$has_space" != x; then
53505        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53506$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53507        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53508      fi
53509
53510      # Use eval to expand a potential ~
53511      eval path="$path"
53512      if test ! -f "$path" && test ! -d "$path"; then
53513        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53514      fi
53515
53516      if test -d "$path"; then
53517        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53518      else
53519        dir="`$DIRNAME "$path"`"
53520        base="`$BASENAME "$path"`"
53521        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53522      fi
53523    fi
53524  fi
53525
53526      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53527$as_echo_n "checking for $DLL_NAME... " >&6; }
53528      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53529$as_echo "$MSVC_DLL" >&6; }
53530    else
53531      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53532$as_echo "incorrect, ignoring" >&6; }
53533      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53534$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53535    fi
53536  fi
53537
53538    if test "x$MSVC_DLL" = x; then
53539      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53540    fi
53541    MSVCR_DLL="$MSVC_DLL"
53542  else
53543
53544  DLL_NAME="${MSVCR_NAME}"
53545  MSVC_DLL=
53546
53547  if test "x$MSVC_DLL" = x; then
53548    # Probe: Using well-known location from Visual Studio 10.0
53549    if test "x$VCINSTALLDIR" != x; then
53550      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53551
53552  windows_path="$CYGWIN_VC_INSTALL_DIR"
53553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53554    unix_path=`$CYGPATH -u "$windows_path"`
53555    CYGWIN_VC_INSTALL_DIR="$unix_path"
53556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53558    CYGWIN_VC_INSTALL_DIR="$unix_path"
53559  fi
53560
53561      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53562        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53563      else
53564        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53565      fi
53566      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53567
53568  DLL_NAME="$DLL_NAME"
53569  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53570  METHOD="well-known location in VCINSTALLDIR"
53571  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53572    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53573$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53574
53575    # Need to check if the found msvcr is correct architecture
53576    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53577$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53578    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53579    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53580      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53581      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53582      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53583        CORRECT_MSVCR_ARCH="PE32 executable"
53584      else
53585        CORRECT_MSVCR_ARCH="PE32+ executable"
53586      fi
53587    else
53588      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53589        CORRECT_MSVCR_ARCH=386
53590      else
53591        CORRECT_MSVCR_ARCH=x86-64
53592      fi
53593    fi
53594    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53595      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53596$as_echo "ok" >&6; }
53597      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53598
53599  # Only process if variable expands to non-empty
53600
53601  if test "x$MSVC_DLL" != x; then
53602    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53603
53604  # Input might be given as Windows format, start by converting to
53605  # unix format.
53606  path="$MSVC_DLL"
53607  new_path=`$CYGPATH -u "$path"`
53608
53609  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53610  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53611  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53612  # "foo.exe" is OK but "foo" is an error.
53613  #
53614  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53615  # It is also a way to make sure we got the proper file name for the real test later on.
53616  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53617  if test "x$test_shortpath" = x; then
53618    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53619$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53620    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53621  fi
53622
53623  # Call helper function which possibly converts this using DOS-style short mode.
53624  # If so, the updated path is stored in $new_path.
53625
53626  input_path="$new_path"
53627  # Check if we need to convert this using DOS-style short mode. If the path
53628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53629  # take no chances and rewrite it.
53630  # Note: m4 eats our [], so we need to use [ and ] instead.
53631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53632  if test "x$has_forbidden_chars" != x; then
53633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53634    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53635    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53636    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53637      # Going to short mode and back again did indeed matter. Since short mode is
53638      # case insensitive, let's make it lowercase to improve readability.
53639      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53640      # Now convert it back to Unix-style (cygpath)
53641      input_path=`$CYGPATH -u "$shortmode_path"`
53642      new_path="$input_path"
53643    fi
53644  fi
53645
53646  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53647  if test "x$test_cygdrive_prefix" = x; then
53648    # As a simple fix, exclude /usr/bin since it's not a real path.
53649    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53650      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53651      # a path prefixed by /cygdrive for fixpath to work.
53652      new_path="$CYGWIN_ROOT_PATH$input_path"
53653    fi
53654  fi
53655
53656
53657  if test "x$path" != "x$new_path"; then
53658    MSVC_DLL="$new_path"
53659    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53660$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53661  fi
53662
53663    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53664
53665  path="$MSVC_DLL"
53666  has_colon=`$ECHO $path | $GREP ^.:`
53667  new_path="$path"
53668  if test "x$has_colon" = x; then
53669    # Not in mixed or Windows style, start by that.
53670    new_path=`cmd //c echo $path`
53671  fi
53672
53673
53674  input_path="$new_path"
53675  # Check if we need to convert this using DOS-style short mode. If the path
53676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53677  # take no chances and rewrite it.
53678  # Note: m4 eats our [], so we need to use [ and ] instead.
53679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53680  if test "x$has_forbidden_chars" != x; then
53681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53682    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53683  fi
53684
53685
53686  windows_path="$new_path"
53687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53688    unix_path=`$CYGPATH -u "$windows_path"`
53689    new_path="$unix_path"
53690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53692    new_path="$unix_path"
53693  fi
53694
53695  if test "x$path" != "x$new_path"; then
53696    MSVC_DLL="$new_path"
53697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53698$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53699  fi
53700
53701  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53702  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53703
53704    else
53705      # We're on a unix platform. Hooray! :)
53706      path="$MSVC_DLL"
53707      has_space=`$ECHO "$path" | $GREP " "`
53708      if test "x$has_space" != x; then
53709        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53710$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53711        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53712      fi
53713
53714      # Use eval to expand a potential ~
53715      eval path="$path"
53716      if test ! -f "$path" && test ! -d "$path"; then
53717        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53718      fi
53719
53720      if test -d "$path"; then
53721        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53722      else
53723        dir="`$DIRNAME "$path"`"
53724        base="`$BASENAME "$path"`"
53725        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53726      fi
53727    fi
53728  fi
53729
53730      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53731$as_echo_n "checking for $DLL_NAME... " >&6; }
53732      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53733$as_echo "$MSVC_DLL" >&6; }
53734    else
53735      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53736$as_echo "incorrect, ignoring" >&6; }
53737      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53738$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53739    fi
53740  fi
53741
53742    fi
53743  fi
53744
53745  if test "x$MSVC_DLL" = x; then
53746    # Probe: Check in the Boot JDK directory.
53747    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53748
53749  DLL_NAME="$DLL_NAME"
53750  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53751  METHOD="well-known location in Boot JDK"
53752  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53753    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53754$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53755
53756    # Need to check if the found msvcr is correct architecture
53757    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53758$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53759    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53760    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53761      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53762      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53763      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53764        CORRECT_MSVCR_ARCH="PE32 executable"
53765      else
53766        CORRECT_MSVCR_ARCH="PE32+ executable"
53767      fi
53768    else
53769      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53770        CORRECT_MSVCR_ARCH=386
53771      else
53772        CORRECT_MSVCR_ARCH=x86-64
53773      fi
53774    fi
53775    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53776      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53777$as_echo "ok" >&6; }
53778      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53779
53780  # Only process if variable expands to non-empty
53781
53782  if test "x$MSVC_DLL" != x; then
53783    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53784
53785  # Input might be given as Windows format, start by converting to
53786  # unix format.
53787  path="$MSVC_DLL"
53788  new_path=`$CYGPATH -u "$path"`
53789
53790  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53791  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53792  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53793  # "foo.exe" is OK but "foo" is an error.
53794  #
53795  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53796  # It is also a way to make sure we got the proper file name for the real test later on.
53797  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53798  if test "x$test_shortpath" = x; then
53799    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53800$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53801    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53802  fi
53803
53804  # Call helper function which possibly converts this using DOS-style short mode.
53805  # If so, the updated path is stored in $new_path.
53806
53807  input_path="$new_path"
53808  # Check if we need to convert this using DOS-style short mode. If the path
53809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53810  # take no chances and rewrite it.
53811  # Note: m4 eats our [], so we need to use [ and ] instead.
53812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53813  if test "x$has_forbidden_chars" != x; then
53814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53815    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53816    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53817    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53818      # Going to short mode and back again did indeed matter. Since short mode is
53819      # case insensitive, let's make it lowercase to improve readability.
53820      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53821      # Now convert it back to Unix-style (cygpath)
53822      input_path=`$CYGPATH -u "$shortmode_path"`
53823      new_path="$input_path"
53824    fi
53825  fi
53826
53827  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53828  if test "x$test_cygdrive_prefix" = x; then
53829    # As a simple fix, exclude /usr/bin since it's not a real path.
53830    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53831      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53832      # a path prefixed by /cygdrive for fixpath to work.
53833      new_path="$CYGWIN_ROOT_PATH$input_path"
53834    fi
53835  fi
53836
53837
53838  if test "x$path" != "x$new_path"; then
53839    MSVC_DLL="$new_path"
53840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53841$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53842  fi
53843
53844    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53845
53846  path="$MSVC_DLL"
53847  has_colon=`$ECHO $path | $GREP ^.:`
53848  new_path="$path"
53849  if test "x$has_colon" = x; then
53850    # Not in mixed or Windows style, start by that.
53851    new_path=`cmd //c echo $path`
53852  fi
53853
53854
53855  input_path="$new_path"
53856  # Check if we need to convert this using DOS-style short mode. If the path
53857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53858  # take no chances and rewrite it.
53859  # Note: m4 eats our [], so we need to use [ and ] instead.
53860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53861  if test "x$has_forbidden_chars" != x; then
53862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53863    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53864  fi
53865
53866
53867  windows_path="$new_path"
53868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53869    unix_path=`$CYGPATH -u "$windows_path"`
53870    new_path="$unix_path"
53871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53873    new_path="$unix_path"
53874  fi
53875
53876  if test "x$path" != "x$new_path"; then
53877    MSVC_DLL="$new_path"
53878    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53879$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53880  fi
53881
53882  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53883  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53884
53885    else
53886      # We're on a unix platform. Hooray! :)
53887      path="$MSVC_DLL"
53888      has_space=`$ECHO "$path" | $GREP " "`
53889      if test "x$has_space" != x; then
53890        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53891$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53892        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53893      fi
53894
53895      # Use eval to expand a potential ~
53896      eval path="$path"
53897      if test ! -f "$path" && test ! -d "$path"; then
53898        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53899      fi
53900
53901      if test -d "$path"; then
53902        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53903      else
53904        dir="`$DIRNAME "$path"`"
53905        base="`$BASENAME "$path"`"
53906        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53907      fi
53908    fi
53909  fi
53910
53911      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53912$as_echo_n "checking for $DLL_NAME... " >&6; }
53913      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53914$as_echo "$MSVC_DLL" >&6; }
53915    else
53916      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53917$as_echo "incorrect, ignoring" >&6; }
53918      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53919$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53920    fi
53921  fi
53922
53923  fi
53924
53925  if test "x$MSVC_DLL" = x; then
53926    # Probe: Look in the Windows system32 directory
53927    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53928
53929  windows_path="$CYGWIN_SYSTEMROOT"
53930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53931    unix_path=`$CYGPATH -u "$windows_path"`
53932    CYGWIN_SYSTEMROOT="$unix_path"
53933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53935    CYGWIN_SYSTEMROOT="$unix_path"
53936  fi
53937
53938    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53939
53940  DLL_NAME="$DLL_NAME"
53941  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53942  METHOD="well-known location in SYSTEMROOT"
53943  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53944    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53945$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53946
53947    # Need to check if the found msvcr is correct architecture
53948    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53949$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53950    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53951    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53952      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53953      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53954      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53955        CORRECT_MSVCR_ARCH="PE32 executable"
53956      else
53957        CORRECT_MSVCR_ARCH="PE32+ executable"
53958      fi
53959    else
53960      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53961        CORRECT_MSVCR_ARCH=386
53962      else
53963        CORRECT_MSVCR_ARCH=x86-64
53964      fi
53965    fi
53966    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53967      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53968$as_echo "ok" >&6; }
53969      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53970
53971  # Only process if variable expands to non-empty
53972
53973  if test "x$MSVC_DLL" != x; then
53974    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53975
53976  # Input might be given as Windows format, start by converting to
53977  # unix format.
53978  path="$MSVC_DLL"
53979  new_path=`$CYGPATH -u "$path"`
53980
53981  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53982  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53983  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53984  # "foo.exe" is OK but "foo" is an error.
53985  #
53986  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53987  # It is also a way to make sure we got the proper file name for the real test later on.
53988  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53989  if test "x$test_shortpath" = x; then
53990    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53991$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53992    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53993  fi
53994
53995  # Call helper function which possibly converts this using DOS-style short mode.
53996  # If so, the updated path is stored in $new_path.
53997
53998  input_path="$new_path"
53999  # Check if we need to convert this using DOS-style short mode. If the path
54000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54001  # take no chances and rewrite it.
54002  # Note: m4 eats our [], so we need to use [ and ] instead.
54003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54004  if test "x$has_forbidden_chars" != x; then
54005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54006    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54007    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54008    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54009      # Going to short mode and back again did indeed matter. Since short mode is
54010      # case insensitive, let's make it lowercase to improve readability.
54011      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54012      # Now convert it back to Unix-style (cygpath)
54013      input_path=`$CYGPATH -u "$shortmode_path"`
54014      new_path="$input_path"
54015    fi
54016  fi
54017
54018  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54019  if test "x$test_cygdrive_prefix" = x; then
54020    # As a simple fix, exclude /usr/bin since it's not a real path.
54021    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54022      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54023      # a path prefixed by /cygdrive for fixpath to work.
54024      new_path="$CYGWIN_ROOT_PATH$input_path"
54025    fi
54026  fi
54027
54028
54029  if test "x$path" != "x$new_path"; then
54030    MSVC_DLL="$new_path"
54031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54032$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54033  fi
54034
54035    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54036
54037  path="$MSVC_DLL"
54038  has_colon=`$ECHO $path | $GREP ^.:`
54039  new_path="$path"
54040  if test "x$has_colon" = x; then
54041    # Not in mixed or Windows style, start by that.
54042    new_path=`cmd //c echo $path`
54043  fi
54044
54045
54046  input_path="$new_path"
54047  # Check if we need to convert this using DOS-style short mode. If the path
54048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54049  # take no chances and rewrite it.
54050  # Note: m4 eats our [], so we need to use [ and ] instead.
54051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54052  if test "x$has_forbidden_chars" != x; then
54053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54054    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54055  fi
54056
54057
54058  windows_path="$new_path"
54059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54060    unix_path=`$CYGPATH -u "$windows_path"`
54061    new_path="$unix_path"
54062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54064    new_path="$unix_path"
54065  fi
54066
54067  if test "x$path" != "x$new_path"; then
54068    MSVC_DLL="$new_path"
54069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54070$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54071  fi
54072
54073  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54074  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54075
54076    else
54077      # We're on a unix platform. Hooray! :)
54078      path="$MSVC_DLL"
54079      has_space=`$ECHO "$path" | $GREP " "`
54080      if test "x$has_space" != x; then
54081        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54082$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54083        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54084      fi
54085
54086      # Use eval to expand a potential ~
54087      eval path="$path"
54088      if test ! -f "$path" && test ! -d "$path"; then
54089        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54090      fi
54091
54092      if test -d "$path"; then
54093        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54094      else
54095        dir="`$DIRNAME "$path"`"
54096        base="`$BASENAME "$path"`"
54097        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54098      fi
54099    fi
54100  fi
54101
54102      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54103$as_echo_n "checking for $DLL_NAME... " >&6; }
54104      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54105$as_echo "$MSVC_DLL" >&6; }
54106    else
54107      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54108$as_echo "incorrect, ignoring" >&6; }
54109      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54110$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54111    fi
54112  fi
54113
54114  fi
54115
54116  if test "x$MSVC_DLL" = x; then
54117    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54118    if test "x$VS100COMNTOOLS" != x; then
54119      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54120
54121  windows_path="$CYGWIN_VS_TOOLS_DIR"
54122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54123    unix_path=`$CYGPATH -u "$windows_path"`
54124    CYGWIN_VS_TOOLS_DIR="$unix_path"
54125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54127    CYGWIN_VS_TOOLS_DIR="$unix_path"
54128  fi
54129
54130      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54131        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54132	    | $GREP -i /x64/ | $HEAD --lines 1`
54133      else
54134        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54135	    | $GREP -i /x86/ | $HEAD --lines 1`
54136      fi
54137
54138  DLL_NAME="$DLL_NAME"
54139  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54140  METHOD="search of VS100COMNTOOLS"
54141  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54142    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54143$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54144
54145    # Need to check if the found msvcr is correct architecture
54146    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54147$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54148    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54149    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54150      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54151      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54152      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54153        CORRECT_MSVCR_ARCH="PE32 executable"
54154      else
54155        CORRECT_MSVCR_ARCH="PE32+ executable"
54156      fi
54157    else
54158      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54159        CORRECT_MSVCR_ARCH=386
54160      else
54161        CORRECT_MSVCR_ARCH=x86-64
54162      fi
54163    fi
54164    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54165      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54166$as_echo "ok" >&6; }
54167      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54168
54169  # Only process if variable expands to non-empty
54170
54171  if test "x$MSVC_DLL" != x; then
54172    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54173
54174  # Input might be given as Windows format, start by converting to
54175  # unix format.
54176  path="$MSVC_DLL"
54177  new_path=`$CYGPATH -u "$path"`
54178
54179  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54180  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54181  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54182  # "foo.exe" is OK but "foo" is an error.
54183  #
54184  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54185  # It is also a way to make sure we got the proper file name for the real test later on.
54186  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54187  if test "x$test_shortpath" = x; then
54188    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54189$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54190    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54191  fi
54192
54193  # Call helper function which possibly converts this using DOS-style short mode.
54194  # If so, the updated path is stored in $new_path.
54195
54196  input_path="$new_path"
54197  # Check if we need to convert this using DOS-style short mode. If the path
54198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54199  # take no chances and rewrite it.
54200  # Note: m4 eats our [], so we need to use [ and ] instead.
54201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54202  if test "x$has_forbidden_chars" != x; then
54203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54204    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54205    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54206    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54207      # Going to short mode and back again did indeed matter. Since short mode is
54208      # case insensitive, let's make it lowercase to improve readability.
54209      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54210      # Now convert it back to Unix-style (cygpath)
54211      input_path=`$CYGPATH -u "$shortmode_path"`
54212      new_path="$input_path"
54213    fi
54214  fi
54215
54216  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54217  if test "x$test_cygdrive_prefix" = x; then
54218    # As a simple fix, exclude /usr/bin since it's not a real path.
54219    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54220      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54221      # a path prefixed by /cygdrive for fixpath to work.
54222      new_path="$CYGWIN_ROOT_PATH$input_path"
54223    fi
54224  fi
54225
54226
54227  if test "x$path" != "x$new_path"; then
54228    MSVC_DLL="$new_path"
54229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54230$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54231  fi
54232
54233    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54234
54235  path="$MSVC_DLL"
54236  has_colon=`$ECHO $path | $GREP ^.:`
54237  new_path="$path"
54238  if test "x$has_colon" = x; then
54239    # Not in mixed or Windows style, start by that.
54240    new_path=`cmd //c echo $path`
54241  fi
54242
54243
54244  input_path="$new_path"
54245  # Check if we need to convert this using DOS-style short mode. If the path
54246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54247  # take no chances and rewrite it.
54248  # Note: m4 eats our [], so we need to use [ and ] instead.
54249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54250  if test "x$has_forbidden_chars" != x; then
54251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54252    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54253  fi
54254
54255
54256  windows_path="$new_path"
54257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54258    unix_path=`$CYGPATH -u "$windows_path"`
54259    new_path="$unix_path"
54260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54262    new_path="$unix_path"
54263  fi
54264
54265  if test "x$path" != "x$new_path"; then
54266    MSVC_DLL="$new_path"
54267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54268$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54269  fi
54270
54271  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54272  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54273
54274    else
54275      # We're on a unix platform. Hooray! :)
54276      path="$MSVC_DLL"
54277      has_space=`$ECHO "$path" | $GREP " "`
54278      if test "x$has_space" != x; then
54279        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54280$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54281        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54282      fi
54283
54284      # Use eval to expand a potential ~
54285      eval path="$path"
54286      if test ! -f "$path" && test ! -d "$path"; then
54287        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54288      fi
54289
54290      if test -d "$path"; then
54291        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54292      else
54293        dir="`$DIRNAME "$path"`"
54294        base="`$BASENAME "$path"`"
54295        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54296      fi
54297    fi
54298  fi
54299
54300      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54301$as_echo_n "checking for $DLL_NAME... " >&6; }
54302      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54303$as_echo "$MSVC_DLL" >&6; }
54304    else
54305      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54306$as_echo "incorrect, ignoring" >&6; }
54307      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54308$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54309    fi
54310  fi
54311
54312    fi
54313  fi
54314
54315  if test "x$MSVC_DLL" = x; then
54316    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54317    # (This was the original behaviour; kept since it might turn something up)
54318    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54319      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54320        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54321	    | $GREP x64 | $HEAD --lines 1`
54322      else
54323        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54324	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54325        if test "x$POSSIBLE_MSVC_DLL" = x; then
54326          # We're grasping at straws now...
54327          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54328	      | $HEAD --lines 1`
54329        fi
54330      fi
54331
54332
54333  DLL_NAME="$DLL_NAME"
54334  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54335  METHOD="search of VCINSTALLDIR"
54336  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54337    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54338$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54339
54340    # Need to check if the found msvcr is correct architecture
54341    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54342$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54343    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54344    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54345      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54346      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54347      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54348        CORRECT_MSVCR_ARCH="PE32 executable"
54349      else
54350        CORRECT_MSVCR_ARCH="PE32+ executable"
54351      fi
54352    else
54353      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54354        CORRECT_MSVCR_ARCH=386
54355      else
54356        CORRECT_MSVCR_ARCH=x86-64
54357      fi
54358    fi
54359    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54360      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54361$as_echo "ok" >&6; }
54362      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54363
54364  # Only process if variable expands to non-empty
54365
54366  if test "x$MSVC_DLL" != x; then
54367    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54368
54369  # Input might be given as Windows format, start by converting to
54370  # unix format.
54371  path="$MSVC_DLL"
54372  new_path=`$CYGPATH -u "$path"`
54373
54374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54377  # "foo.exe" is OK but "foo" is an error.
54378  #
54379  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54380  # It is also a way to make sure we got the proper file name for the real test later on.
54381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54382  if test "x$test_shortpath" = x; then
54383    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54384$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54385    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54386  fi
54387
54388  # Call helper function which possibly converts this using DOS-style short mode.
54389  # If so, the updated path is stored in $new_path.
54390
54391  input_path="$new_path"
54392  # Check if we need to convert this using DOS-style short mode. If the path
54393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54394  # take no chances and rewrite it.
54395  # Note: m4 eats our [], so we need to use [ and ] instead.
54396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54397  if test "x$has_forbidden_chars" != x; then
54398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54402      # Going to short mode and back again did indeed matter. Since short mode is
54403      # case insensitive, let's make it lowercase to improve readability.
54404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54405      # Now convert it back to Unix-style (cygpath)
54406      input_path=`$CYGPATH -u "$shortmode_path"`
54407      new_path="$input_path"
54408    fi
54409  fi
54410
54411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54412  if test "x$test_cygdrive_prefix" = x; then
54413    # As a simple fix, exclude /usr/bin since it's not a real path.
54414    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54416      # a path prefixed by /cygdrive for fixpath to work.
54417      new_path="$CYGWIN_ROOT_PATH$input_path"
54418    fi
54419  fi
54420
54421
54422  if test "x$path" != "x$new_path"; then
54423    MSVC_DLL="$new_path"
54424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54425$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54426  fi
54427
54428    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54429
54430  path="$MSVC_DLL"
54431  has_colon=`$ECHO $path | $GREP ^.:`
54432  new_path="$path"
54433  if test "x$has_colon" = x; then
54434    # Not in mixed or Windows style, start by that.
54435    new_path=`cmd //c echo $path`
54436  fi
54437
54438
54439  input_path="$new_path"
54440  # Check if we need to convert this using DOS-style short mode. If the path
54441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54442  # take no chances and rewrite it.
54443  # Note: m4 eats our [], so we need to use [ and ] instead.
54444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54445  if test "x$has_forbidden_chars" != x; then
54446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54448  fi
54449
54450
54451  windows_path="$new_path"
54452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54453    unix_path=`$CYGPATH -u "$windows_path"`
54454    new_path="$unix_path"
54455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54457    new_path="$unix_path"
54458  fi
54459
54460  if test "x$path" != "x$new_path"; then
54461    MSVC_DLL="$new_path"
54462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54463$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54464  fi
54465
54466  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54467  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54468
54469    else
54470      # We're on a unix platform. Hooray! :)
54471      path="$MSVC_DLL"
54472      has_space=`$ECHO "$path" | $GREP " "`
54473      if test "x$has_space" != x; then
54474        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54475$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54476        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54477      fi
54478
54479      # Use eval to expand a potential ~
54480      eval path="$path"
54481      if test ! -f "$path" && test ! -d "$path"; then
54482        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54483      fi
54484
54485      if test -d "$path"; then
54486        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54487      else
54488        dir="`$DIRNAME "$path"`"
54489        base="`$BASENAME "$path"`"
54490        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54491      fi
54492    fi
54493  fi
54494
54495      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54496$as_echo_n "checking for $DLL_NAME... " >&6; }
54497      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54498$as_echo "$MSVC_DLL" >&6; }
54499    else
54500      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54501$as_echo "incorrect, ignoring" >&6; }
54502      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54503$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54504    fi
54505  fi
54506
54507    fi
54508  fi
54509
54510  if test "x$MSVC_DLL" = x; then
54511    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54512$as_echo_n "checking for $DLL_NAME... " >&6; }
54513    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54514$as_echo "no" >&6; }
54515    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54516  fi
54517
54518    MSVCR_DLL="$MSVC_DLL"
54519  fi
54520
54521
54522
54523# Check whether --with-msvcp-dll was given.
54524if test "${with_msvcp_dll+set}" = set; then :
54525  withval=$with_msvcp_dll;
54526fi
54527
54528
54529  if test "x$MSVCP_NAME" != "x"; then
54530    if test "x$with_msvcp_dll" != x; then
54531      # If given explicitely by user, do not probe. If not present, fail directly.
54532
54533  DLL_NAME="$MSVCP_NAME"
54534  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54535  METHOD="--with-msvcp-dll"
54536  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54537    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54538$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54539
54540    # Need to check if the found msvcr is correct architecture
54541    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54542$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54543    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54544    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54545      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54546      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54547      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54548        CORRECT_MSVCR_ARCH="PE32 executable"
54549      else
54550        CORRECT_MSVCR_ARCH="PE32+ executable"
54551      fi
54552    else
54553      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54554        CORRECT_MSVCR_ARCH=386
54555      else
54556        CORRECT_MSVCR_ARCH=x86-64
54557      fi
54558    fi
54559    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54560      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54561$as_echo "ok" >&6; }
54562      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54563
54564  # Only process if variable expands to non-empty
54565
54566  if test "x$MSVC_DLL" != x; then
54567    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54568
54569  # Input might be given as Windows format, start by converting to
54570  # unix format.
54571  path="$MSVC_DLL"
54572  new_path=`$CYGPATH -u "$path"`
54573
54574  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54575  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54576  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54577  # "foo.exe" is OK but "foo" is an error.
54578  #
54579  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54580  # It is also a way to make sure we got the proper file name for the real test later on.
54581  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54582  if test "x$test_shortpath" = x; then
54583    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54584$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54585    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54586  fi
54587
54588  # Call helper function which possibly converts this using DOS-style short mode.
54589  # If so, the updated path is stored in $new_path.
54590
54591  input_path="$new_path"
54592  # Check if we need to convert this using DOS-style short mode. If the path
54593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54594  # take no chances and rewrite it.
54595  # Note: m4 eats our [], so we need to use [ and ] instead.
54596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54597  if test "x$has_forbidden_chars" != x; then
54598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54599    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54600    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54601    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54602      # Going to short mode and back again did indeed matter. Since short mode is
54603      # case insensitive, let's make it lowercase to improve readability.
54604      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54605      # Now convert it back to Unix-style (cygpath)
54606      input_path=`$CYGPATH -u "$shortmode_path"`
54607      new_path="$input_path"
54608    fi
54609  fi
54610
54611  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54612  if test "x$test_cygdrive_prefix" = x; then
54613    # As a simple fix, exclude /usr/bin since it's not a real path.
54614    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54615      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54616      # a path prefixed by /cygdrive for fixpath to work.
54617      new_path="$CYGWIN_ROOT_PATH$input_path"
54618    fi
54619  fi
54620
54621
54622  if test "x$path" != "x$new_path"; then
54623    MSVC_DLL="$new_path"
54624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54625$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54626  fi
54627
54628    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54629
54630  path="$MSVC_DLL"
54631  has_colon=`$ECHO $path | $GREP ^.:`
54632  new_path="$path"
54633  if test "x$has_colon" = x; then
54634    # Not in mixed or Windows style, start by that.
54635    new_path=`cmd //c echo $path`
54636  fi
54637
54638
54639  input_path="$new_path"
54640  # Check if we need to convert this using DOS-style short mode. If the path
54641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54642  # take no chances and rewrite it.
54643  # Note: m4 eats our [], so we need to use [ and ] instead.
54644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54645  if test "x$has_forbidden_chars" != x; then
54646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54647    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54648  fi
54649
54650
54651  windows_path="$new_path"
54652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54653    unix_path=`$CYGPATH -u "$windows_path"`
54654    new_path="$unix_path"
54655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54657    new_path="$unix_path"
54658  fi
54659
54660  if test "x$path" != "x$new_path"; then
54661    MSVC_DLL="$new_path"
54662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54663$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54664  fi
54665
54666  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54667  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54668
54669    else
54670      # We're on a unix platform. Hooray! :)
54671      path="$MSVC_DLL"
54672      has_space=`$ECHO "$path" | $GREP " "`
54673      if test "x$has_space" != x; then
54674        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54675$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54676        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54677      fi
54678
54679      # Use eval to expand a potential ~
54680      eval path="$path"
54681      if test ! -f "$path" && test ! -d "$path"; then
54682        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54683      fi
54684
54685      if test -d "$path"; then
54686        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54687      else
54688        dir="`$DIRNAME "$path"`"
54689        base="`$BASENAME "$path"`"
54690        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54691      fi
54692    fi
54693  fi
54694
54695      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54696$as_echo_n "checking for $DLL_NAME... " >&6; }
54697      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54698$as_echo "$MSVC_DLL" >&6; }
54699    else
54700      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54701$as_echo "incorrect, ignoring" >&6; }
54702      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54703$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54704    fi
54705  fi
54706
54707      if test "x$MSVC_DLL" = x; then
54708        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54709      fi
54710      MSVCP_DLL="$MSVC_DLL"
54711    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54712
54713  DLL_NAME="$MSVCP_NAME"
54714  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54715  METHOD="devkit"
54716  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54717    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54718$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54719
54720    # Need to check if the found msvcr is correct architecture
54721    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54722$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54723    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54724    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54725      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54726      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54727      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54728        CORRECT_MSVCR_ARCH="PE32 executable"
54729      else
54730        CORRECT_MSVCR_ARCH="PE32+ executable"
54731      fi
54732    else
54733      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54734        CORRECT_MSVCR_ARCH=386
54735      else
54736        CORRECT_MSVCR_ARCH=x86-64
54737      fi
54738    fi
54739    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54740      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54741$as_echo "ok" >&6; }
54742      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54743
54744  # Only process if variable expands to non-empty
54745
54746  if test "x$MSVC_DLL" != x; then
54747    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54748
54749  # Input might be given as Windows format, start by converting to
54750  # unix format.
54751  path="$MSVC_DLL"
54752  new_path=`$CYGPATH -u "$path"`
54753
54754  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54755  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54756  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54757  # "foo.exe" is OK but "foo" is an error.
54758  #
54759  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54760  # It is also a way to make sure we got the proper file name for the real test later on.
54761  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54762  if test "x$test_shortpath" = x; then
54763    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54764$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54765    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54766  fi
54767
54768  # Call helper function which possibly converts this using DOS-style short mode.
54769  # If so, the updated path is stored in $new_path.
54770
54771  input_path="$new_path"
54772  # Check if we need to convert this using DOS-style short mode. If the path
54773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54774  # take no chances and rewrite it.
54775  # Note: m4 eats our [], so we need to use [ and ] instead.
54776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54777  if test "x$has_forbidden_chars" != x; then
54778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54779    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54780    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54781    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54782      # Going to short mode and back again did indeed matter. Since short mode is
54783      # case insensitive, let's make it lowercase to improve readability.
54784      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54785      # Now convert it back to Unix-style (cygpath)
54786      input_path=`$CYGPATH -u "$shortmode_path"`
54787      new_path="$input_path"
54788    fi
54789  fi
54790
54791  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54792  if test "x$test_cygdrive_prefix" = x; then
54793    # As a simple fix, exclude /usr/bin since it's not a real path.
54794    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54795      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54796      # a path prefixed by /cygdrive for fixpath to work.
54797      new_path="$CYGWIN_ROOT_PATH$input_path"
54798    fi
54799  fi
54800
54801
54802  if test "x$path" != "x$new_path"; then
54803    MSVC_DLL="$new_path"
54804    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54805$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54806  fi
54807
54808    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54809
54810  path="$MSVC_DLL"
54811  has_colon=`$ECHO $path | $GREP ^.:`
54812  new_path="$path"
54813  if test "x$has_colon" = x; then
54814    # Not in mixed or Windows style, start by that.
54815    new_path=`cmd //c echo $path`
54816  fi
54817
54818
54819  input_path="$new_path"
54820  # Check if we need to convert this using DOS-style short mode. If the path
54821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54822  # take no chances and rewrite it.
54823  # Note: m4 eats our [], so we need to use [ and ] instead.
54824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54825  if test "x$has_forbidden_chars" != x; then
54826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54827    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54828  fi
54829
54830
54831  windows_path="$new_path"
54832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54833    unix_path=`$CYGPATH -u "$windows_path"`
54834    new_path="$unix_path"
54835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54837    new_path="$unix_path"
54838  fi
54839
54840  if test "x$path" != "x$new_path"; then
54841    MSVC_DLL="$new_path"
54842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54843$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54844  fi
54845
54846  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54847  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54848
54849    else
54850      # We're on a unix platform. Hooray! :)
54851      path="$MSVC_DLL"
54852      has_space=`$ECHO "$path" | $GREP " "`
54853      if test "x$has_space" != x; then
54854        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54855$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54856        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54857      fi
54858
54859      # Use eval to expand a potential ~
54860      eval path="$path"
54861      if test ! -f "$path" && test ! -d "$path"; then
54862        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54863      fi
54864
54865      if test -d "$path"; then
54866        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54867      else
54868        dir="`$DIRNAME "$path"`"
54869        base="`$BASENAME "$path"`"
54870        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54871      fi
54872    fi
54873  fi
54874
54875      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54876$as_echo_n "checking for $DLL_NAME... " >&6; }
54877      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54878$as_echo "$MSVC_DLL" >&6; }
54879    else
54880      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54881$as_echo "incorrect, ignoring" >&6; }
54882      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54883$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54884    fi
54885  fi
54886
54887      if test "x$MSVC_DLL" = x; then
54888        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54889      fi
54890      MSVCP_DLL="$MSVC_DLL"
54891    else
54892
54893  DLL_NAME="${MSVCP_NAME}"
54894  MSVC_DLL=
54895
54896  if test "x$MSVC_DLL" = x; then
54897    # Probe: Using well-known location from Visual Studio 10.0
54898    if test "x$VCINSTALLDIR" != x; then
54899      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54900
54901  windows_path="$CYGWIN_VC_INSTALL_DIR"
54902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54903    unix_path=`$CYGPATH -u "$windows_path"`
54904    CYGWIN_VC_INSTALL_DIR="$unix_path"
54905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54907    CYGWIN_VC_INSTALL_DIR="$unix_path"
54908  fi
54909
54910      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54911        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54912      else
54913        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54914      fi
54915      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54916
54917  DLL_NAME="$DLL_NAME"
54918  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54919  METHOD="well-known location in VCINSTALLDIR"
54920  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54921    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54922$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54923
54924    # Need to check if the found msvcr is correct architecture
54925    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54926$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54927    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54928    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54929      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54930      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54931      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54932        CORRECT_MSVCR_ARCH="PE32 executable"
54933      else
54934        CORRECT_MSVCR_ARCH="PE32+ executable"
54935      fi
54936    else
54937      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54938        CORRECT_MSVCR_ARCH=386
54939      else
54940        CORRECT_MSVCR_ARCH=x86-64
54941      fi
54942    fi
54943    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54944      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54945$as_echo "ok" >&6; }
54946      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54947
54948  # Only process if variable expands to non-empty
54949
54950  if test "x$MSVC_DLL" != x; then
54951    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54952
54953  # Input might be given as Windows format, start by converting to
54954  # unix format.
54955  path="$MSVC_DLL"
54956  new_path=`$CYGPATH -u "$path"`
54957
54958  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54959  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54960  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54961  # "foo.exe" is OK but "foo" is an error.
54962  #
54963  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54964  # It is also a way to make sure we got the proper file name for the real test later on.
54965  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54966  if test "x$test_shortpath" = x; then
54967    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54968$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54969    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54970  fi
54971
54972  # Call helper function which possibly converts this using DOS-style short mode.
54973  # If so, the updated path is stored in $new_path.
54974
54975  input_path="$new_path"
54976  # Check if we need to convert this using DOS-style short mode. If the path
54977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54978  # take no chances and rewrite it.
54979  # Note: m4 eats our [], so we need to use [ and ] instead.
54980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54981  if test "x$has_forbidden_chars" != x; then
54982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54983    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54984    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54985    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54986      # Going to short mode and back again did indeed matter. Since short mode is
54987      # case insensitive, let's make it lowercase to improve readability.
54988      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54989      # Now convert it back to Unix-style (cygpath)
54990      input_path=`$CYGPATH -u "$shortmode_path"`
54991      new_path="$input_path"
54992    fi
54993  fi
54994
54995  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54996  if test "x$test_cygdrive_prefix" = x; then
54997    # As a simple fix, exclude /usr/bin since it's not a real path.
54998    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54999      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55000      # a path prefixed by /cygdrive for fixpath to work.
55001      new_path="$CYGWIN_ROOT_PATH$input_path"
55002    fi
55003  fi
55004
55005
55006  if test "x$path" != "x$new_path"; then
55007    MSVC_DLL="$new_path"
55008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55009$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55010  fi
55011
55012    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55013
55014  path="$MSVC_DLL"
55015  has_colon=`$ECHO $path | $GREP ^.:`
55016  new_path="$path"
55017  if test "x$has_colon" = x; then
55018    # Not in mixed or Windows style, start by that.
55019    new_path=`cmd //c echo $path`
55020  fi
55021
55022
55023  input_path="$new_path"
55024  # Check if we need to convert this using DOS-style short mode. If the path
55025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55026  # take no chances and rewrite it.
55027  # Note: m4 eats our [], so we need to use [ and ] instead.
55028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55029  if test "x$has_forbidden_chars" != x; then
55030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55031    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55032  fi
55033
55034
55035  windows_path="$new_path"
55036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55037    unix_path=`$CYGPATH -u "$windows_path"`
55038    new_path="$unix_path"
55039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55041    new_path="$unix_path"
55042  fi
55043
55044  if test "x$path" != "x$new_path"; then
55045    MSVC_DLL="$new_path"
55046    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55047$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55048  fi
55049
55050  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55051  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55052
55053    else
55054      # We're on a unix platform. Hooray! :)
55055      path="$MSVC_DLL"
55056      has_space=`$ECHO "$path" | $GREP " "`
55057      if test "x$has_space" != x; then
55058        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55059$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55060        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55061      fi
55062
55063      # Use eval to expand a potential ~
55064      eval path="$path"
55065      if test ! -f "$path" && test ! -d "$path"; then
55066        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55067      fi
55068
55069      if test -d "$path"; then
55070        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55071      else
55072        dir="`$DIRNAME "$path"`"
55073        base="`$BASENAME "$path"`"
55074        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55075      fi
55076    fi
55077  fi
55078
55079      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55080$as_echo_n "checking for $DLL_NAME... " >&6; }
55081      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55082$as_echo "$MSVC_DLL" >&6; }
55083    else
55084      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55085$as_echo "incorrect, ignoring" >&6; }
55086      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55087$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55088    fi
55089  fi
55090
55091    fi
55092  fi
55093
55094  if test "x$MSVC_DLL" = x; then
55095    # Probe: Check in the Boot JDK directory.
55096    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55097
55098  DLL_NAME="$DLL_NAME"
55099  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55100  METHOD="well-known location in Boot JDK"
55101  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55102    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55103$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55104
55105    # Need to check if the found msvcr is correct architecture
55106    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55107$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55108    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55109    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55110      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55111      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55112      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55113        CORRECT_MSVCR_ARCH="PE32 executable"
55114      else
55115        CORRECT_MSVCR_ARCH="PE32+ executable"
55116      fi
55117    else
55118      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55119        CORRECT_MSVCR_ARCH=386
55120      else
55121        CORRECT_MSVCR_ARCH=x86-64
55122      fi
55123    fi
55124    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55125      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55126$as_echo "ok" >&6; }
55127      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55128
55129  # Only process if variable expands to non-empty
55130
55131  if test "x$MSVC_DLL" != x; then
55132    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55133
55134  # Input might be given as Windows format, start by converting to
55135  # unix format.
55136  path="$MSVC_DLL"
55137  new_path=`$CYGPATH -u "$path"`
55138
55139  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55140  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55141  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55142  # "foo.exe" is OK but "foo" is an error.
55143  #
55144  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55145  # It is also a way to make sure we got the proper file name for the real test later on.
55146  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55147  if test "x$test_shortpath" = x; then
55148    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55149$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55150    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55151  fi
55152
55153  # Call helper function which possibly converts this using DOS-style short mode.
55154  # If so, the updated path is stored in $new_path.
55155
55156  input_path="$new_path"
55157  # Check if we need to convert this using DOS-style short mode. If the path
55158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55159  # take no chances and rewrite it.
55160  # Note: m4 eats our [], so we need to use [ and ] instead.
55161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55162  if test "x$has_forbidden_chars" != x; then
55163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55164    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55165    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55166    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55167      # Going to short mode and back again did indeed matter. Since short mode is
55168      # case insensitive, let's make it lowercase to improve readability.
55169      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55170      # Now convert it back to Unix-style (cygpath)
55171      input_path=`$CYGPATH -u "$shortmode_path"`
55172      new_path="$input_path"
55173    fi
55174  fi
55175
55176  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55177  if test "x$test_cygdrive_prefix" = x; then
55178    # As a simple fix, exclude /usr/bin since it's not a real path.
55179    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55180      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55181      # a path prefixed by /cygdrive for fixpath to work.
55182      new_path="$CYGWIN_ROOT_PATH$input_path"
55183    fi
55184  fi
55185
55186
55187  if test "x$path" != "x$new_path"; then
55188    MSVC_DLL="$new_path"
55189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55190$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55191  fi
55192
55193    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55194
55195  path="$MSVC_DLL"
55196  has_colon=`$ECHO $path | $GREP ^.:`
55197  new_path="$path"
55198  if test "x$has_colon" = x; then
55199    # Not in mixed or Windows style, start by that.
55200    new_path=`cmd //c echo $path`
55201  fi
55202
55203
55204  input_path="$new_path"
55205  # Check if we need to convert this using DOS-style short mode. If the path
55206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55207  # take no chances and rewrite it.
55208  # Note: m4 eats our [], so we need to use [ and ] instead.
55209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55210  if test "x$has_forbidden_chars" != x; then
55211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55212    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55213  fi
55214
55215
55216  windows_path="$new_path"
55217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55218    unix_path=`$CYGPATH -u "$windows_path"`
55219    new_path="$unix_path"
55220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55222    new_path="$unix_path"
55223  fi
55224
55225  if test "x$path" != "x$new_path"; then
55226    MSVC_DLL="$new_path"
55227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55228$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55229  fi
55230
55231  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55232  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55233
55234    else
55235      # We're on a unix platform. Hooray! :)
55236      path="$MSVC_DLL"
55237      has_space=`$ECHO "$path" | $GREP " "`
55238      if test "x$has_space" != x; then
55239        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55240$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55241        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55242      fi
55243
55244      # Use eval to expand a potential ~
55245      eval path="$path"
55246      if test ! -f "$path" && test ! -d "$path"; then
55247        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55248      fi
55249
55250      if test -d "$path"; then
55251        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55252      else
55253        dir="`$DIRNAME "$path"`"
55254        base="`$BASENAME "$path"`"
55255        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55256      fi
55257    fi
55258  fi
55259
55260      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55261$as_echo_n "checking for $DLL_NAME... " >&6; }
55262      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55263$as_echo "$MSVC_DLL" >&6; }
55264    else
55265      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55266$as_echo "incorrect, ignoring" >&6; }
55267      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55268$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55269    fi
55270  fi
55271
55272  fi
55273
55274  if test "x$MSVC_DLL" = x; then
55275    # Probe: Look in the Windows system32 directory
55276    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55277
55278  windows_path="$CYGWIN_SYSTEMROOT"
55279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55280    unix_path=`$CYGPATH -u "$windows_path"`
55281    CYGWIN_SYSTEMROOT="$unix_path"
55282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55284    CYGWIN_SYSTEMROOT="$unix_path"
55285  fi
55286
55287    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55288
55289  DLL_NAME="$DLL_NAME"
55290  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55291  METHOD="well-known location in SYSTEMROOT"
55292  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55293    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55294$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55295
55296    # Need to check if the found msvcr is correct architecture
55297    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55298$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55299    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55300    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55301      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55302      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55303      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55304        CORRECT_MSVCR_ARCH="PE32 executable"
55305      else
55306        CORRECT_MSVCR_ARCH="PE32+ executable"
55307      fi
55308    else
55309      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55310        CORRECT_MSVCR_ARCH=386
55311      else
55312        CORRECT_MSVCR_ARCH=x86-64
55313      fi
55314    fi
55315    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55316      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55317$as_echo "ok" >&6; }
55318      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55319
55320  # Only process if variable expands to non-empty
55321
55322  if test "x$MSVC_DLL" != x; then
55323    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55324
55325  # Input might be given as Windows format, start by converting to
55326  # unix format.
55327  path="$MSVC_DLL"
55328  new_path=`$CYGPATH -u "$path"`
55329
55330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55333  # "foo.exe" is OK but "foo" is an error.
55334  #
55335  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55336  # It is also a way to make sure we got the proper file name for the real test later on.
55337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55338  if test "x$test_shortpath" = x; then
55339    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55340$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55341    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55342  fi
55343
55344  # Call helper function which possibly converts this using DOS-style short mode.
55345  # If so, the updated path is stored in $new_path.
55346
55347  input_path="$new_path"
55348  # Check if we need to convert this using DOS-style short mode. If the path
55349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55350  # take no chances and rewrite it.
55351  # Note: m4 eats our [], so we need to use [ and ] instead.
55352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55353  if test "x$has_forbidden_chars" != x; then
55354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55355    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55356    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55357    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55358      # Going to short mode and back again did indeed matter. Since short mode is
55359      # case insensitive, let's make it lowercase to improve readability.
55360      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55361      # Now convert it back to Unix-style (cygpath)
55362      input_path=`$CYGPATH -u "$shortmode_path"`
55363      new_path="$input_path"
55364    fi
55365  fi
55366
55367  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55368  if test "x$test_cygdrive_prefix" = x; then
55369    # As a simple fix, exclude /usr/bin since it's not a real path.
55370    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55371      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55372      # a path prefixed by /cygdrive for fixpath to work.
55373      new_path="$CYGWIN_ROOT_PATH$input_path"
55374    fi
55375  fi
55376
55377
55378  if test "x$path" != "x$new_path"; then
55379    MSVC_DLL="$new_path"
55380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55381$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55382  fi
55383
55384    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55385
55386  path="$MSVC_DLL"
55387  has_colon=`$ECHO $path | $GREP ^.:`
55388  new_path="$path"
55389  if test "x$has_colon" = x; then
55390    # Not in mixed or Windows style, start by that.
55391    new_path=`cmd //c echo $path`
55392  fi
55393
55394
55395  input_path="$new_path"
55396  # Check if we need to convert this using DOS-style short mode. If the path
55397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55398  # take no chances and rewrite it.
55399  # Note: m4 eats our [], so we need to use [ and ] instead.
55400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55401  if test "x$has_forbidden_chars" != x; then
55402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55403    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55404  fi
55405
55406
55407  windows_path="$new_path"
55408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55409    unix_path=`$CYGPATH -u "$windows_path"`
55410    new_path="$unix_path"
55411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55413    new_path="$unix_path"
55414  fi
55415
55416  if test "x$path" != "x$new_path"; then
55417    MSVC_DLL="$new_path"
55418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55419$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55420  fi
55421
55422  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55423  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55424
55425    else
55426      # We're on a unix platform. Hooray! :)
55427      path="$MSVC_DLL"
55428      has_space=`$ECHO "$path" | $GREP " "`
55429      if test "x$has_space" != x; then
55430        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55431$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55432        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55433      fi
55434
55435      # Use eval to expand a potential ~
55436      eval path="$path"
55437      if test ! -f "$path" && test ! -d "$path"; then
55438        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55439      fi
55440
55441      if test -d "$path"; then
55442        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55443      else
55444        dir="`$DIRNAME "$path"`"
55445        base="`$BASENAME "$path"`"
55446        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55447      fi
55448    fi
55449  fi
55450
55451      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55452$as_echo_n "checking for $DLL_NAME... " >&6; }
55453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55454$as_echo "$MSVC_DLL" >&6; }
55455    else
55456      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55457$as_echo "incorrect, ignoring" >&6; }
55458      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55459$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55460    fi
55461  fi
55462
55463  fi
55464
55465  if test "x$MSVC_DLL" = x; then
55466    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55467    if test "x$VS100COMNTOOLS" != x; then
55468      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55469
55470  windows_path="$CYGWIN_VS_TOOLS_DIR"
55471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55472    unix_path=`$CYGPATH -u "$windows_path"`
55473    CYGWIN_VS_TOOLS_DIR="$unix_path"
55474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55476    CYGWIN_VS_TOOLS_DIR="$unix_path"
55477  fi
55478
55479      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55480        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55481	    | $GREP -i /x64/ | $HEAD --lines 1`
55482      else
55483        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55484	    | $GREP -i /x86/ | $HEAD --lines 1`
55485      fi
55486
55487  DLL_NAME="$DLL_NAME"
55488  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55489  METHOD="search of VS100COMNTOOLS"
55490  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55491    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55492$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55493
55494    # Need to check if the found msvcr is correct architecture
55495    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55496$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55497    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55498    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55499      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55500      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55501      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55502        CORRECT_MSVCR_ARCH="PE32 executable"
55503      else
55504        CORRECT_MSVCR_ARCH="PE32+ executable"
55505      fi
55506    else
55507      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55508        CORRECT_MSVCR_ARCH=386
55509      else
55510        CORRECT_MSVCR_ARCH=x86-64
55511      fi
55512    fi
55513    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55514      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55515$as_echo "ok" >&6; }
55516      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55517
55518  # Only process if variable expands to non-empty
55519
55520  if test "x$MSVC_DLL" != x; then
55521    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55522
55523  # Input might be given as Windows format, start by converting to
55524  # unix format.
55525  path="$MSVC_DLL"
55526  new_path=`$CYGPATH -u "$path"`
55527
55528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55531  # "foo.exe" is OK but "foo" is an error.
55532  #
55533  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55534  # It is also a way to make sure we got the proper file name for the real test later on.
55535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55536  if test "x$test_shortpath" = x; then
55537    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55538$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55539    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55540  fi
55541
55542  # Call helper function which possibly converts this using DOS-style short mode.
55543  # If so, the updated path is stored in $new_path.
55544
55545  input_path="$new_path"
55546  # Check if we need to convert this using DOS-style short mode. If the path
55547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55548  # take no chances and rewrite it.
55549  # Note: m4 eats our [], so we need to use [ and ] instead.
55550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55551  if test "x$has_forbidden_chars" != x; then
55552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55553    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55554    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55555    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55556      # Going to short mode and back again did indeed matter. Since short mode is
55557      # case insensitive, let's make it lowercase to improve readability.
55558      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55559      # Now convert it back to Unix-style (cygpath)
55560      input_path=`$CYGPATH -u "$shortmode_path"`
55561      new_path="$input_path"
55562    fi
55563  fi
55564
55565  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55566  if test "x$test_cygdrive_prefix" = x; then
55567    # As a simple fix, exclude /usr/bin since it's not a real path.
55568    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55569      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55570      # a path prefixed by /cygdrive for fixpath to work.
55571      new_path="$CYGWIN_ROOT_PATH$input_path"
55572    fi
55573  fi
55574
55575
55576  if test "x$path" != "x$new_path"; then
55577    MSVC_DLL="$new_path"
55578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55579$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55580  fi
55581
55582    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55583
55584  path="$MSVC_DLL"
55585  has_colon=`$ECHO $path | $GREP ^.:`
55586  new_path="$path"
55587  if test "x$has_colon" = x; then
55588    # Not in mixed or Windows style, start by that.
55589    new_path=`cmd //c echo $path`
55590  fi
55591
55592
55593  input_path="$new_path"
55594  # Check if we need to convert this using DOS-style short mode. If the path
55595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55596  # take no chances and rewrite it.
55597  # Note: m4 eats our [], so we need to use [ and ] instead.
55598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55599  if test "x$has_forbidden_chars" != x; then
55600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55601    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55602  fi
55603
55604
55605  windows_path="$new_path"
55606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55607    unix_path=`$CYGPATH -u "$windows_path"`
55608    new_path="$unix_path"
55609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55611    new_path="$unix_path"
55612  fi
55613
55614  if test "x$path" != "x$new_path"; then
55615    MSVC_DLL="$new_path"
55616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55617$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55618  fi
55619
55620  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55621  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55622
55623    else
55624      # We're on a unix platform. Hooray! :)
55625      path="$MSVC_DLL"
55626      has_space=`$ECHO "$path" | $GREP " "`
55627      if test "x$has_space" != x; then
55628        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55629$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55630        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55631      fi
55632
55633      # Use eval to expand a potential ~
55634      eval path="$path"
55635      if test ! -f "$path" && test ! -d "$path"; then
55636        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55637      fi
55638
55639      if test -d "$path"; then
55640        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55641      else
55642        dir="`$DIRNAME "$path"`"
55643        base="`$BASENAME "$path"`"
55644        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55645      fi
55646    fi
55647  fi
55648
55649      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55650$as_echo_n "checking for $DLL_NAME... " >&6; }
55651      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55652$as_echo "$MSVC_DLL" >&6; }
55653    else
55654      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55655$as_echo "incorrect, ignoring" >&6; }
55656      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55657$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55658    fi
55659  fi
55660
55661    fi
55662  fi
55663
55664  if test "x$MSVC_DLL" = x; then
55665    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55666    # (This was the original behaviour; kept since it might turn something up)
55667    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55668      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55669        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55670	    | $GREP x64 | $HEAD --lines 1`
55671      else
55672        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55673	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55674        if test "x$POSSIBLE_MSVC_DLL" = x; then
55675          # We're grasping at straws now...
55676          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55677	      | $HEAD --lines 1`
55678        fi
55679      fi
55680
55681
55682  DLL_NAME="$DLL_NAME"
55683  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55684  METHOD="search of VCINSTALLDIR"
55685  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55686    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55687$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55688
55689    # Need to check if the found msvcr is correct architecture
55690    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55691$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55692    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55693    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55694      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55695      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55696      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55697        CORRECT_MSVCR_ARCH="PE32 executable"
55698      else
55699        CORRECT_MSVCR_ARCH="PE32+ executable"
55700      fi
55701    else
55702      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55703        CORRECT_MSVCR_ARCH=386
55704      else
55705        CORRECT_MSVCR_ARCH=x86-64
55706      fi
55707    fi
55708    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55709      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55710$as_echo "ok" >&6; }
55711      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55712
55713  # Only process if variable expands to non-empty
55714
55715  if test "x$MSVC_DLL" != x; then
55716    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55717
55718  # Input might be given as Windows format, start by converting to
55719  # unix format.
55720  path="$MSVC_DLL"
55721  new_path=`$CYGPATH -u "$path"`
55722
55723  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55724  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55725  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55726  # "foo.exe" is OK but "foo" is an error.
55727  #
55728  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55729  # It is also a way to make sure we got the proper file name for the real test later on.
55730  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55731  if test "x$test_shortpath" = x; then
55732    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55733$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55734    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55735  fi
55736
55737  # Call helper function which possibly converts this using DOS-style short mode.
55738  # If so, the updated path is stored in $new_path.
55739
55740  input_path="$new_path"
55741  # Check if we need to convert this using DOS-style short mode. If the path
55742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55743  # take no chances and rewrite it.
55744  # Note: m4 eats our [], so we need to use [ and ] instead.
55745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55746  if test "x$has_forbidden_chars" != x; then
55747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55748    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55749    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55750    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55751      # Going to short mode and back again did indeed matter. Since short mode is
55752      # case insensitive, let's make it lowercase to improve readability.
55753      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55754      # Now convert it back to Unix-style (cygpath)
55755      input_path=`$CYGPATH -u "$shortmode_path"`
55756      new_path="$input_path"
55757    fi
55758  fi
55759
55760  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55761  if test "x$test_cygdrive_prefix" = x; then
55762    # As a simple fix, exclude /usr/bin since it's not a real path.
55763    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55764      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55765      # a path prefixed by /cygdrive for fixpath to work.
55766      new_path="$CYGWIN_ROOT_PATH$input_path"
55767    fi
55768  fi
55769
55770
55771  if test "x$path" != "x$new_path"; then
55772    MSVC_DLL="$new_path"
55773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55774$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55775  fi
55776
55777    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55778
55779  path="$MSVC_DLL"
55780  has_colon=`$ECHO $path | $GREP ^.:`
55781  new_path="$path"
55782  if test "x$has_colon" = x; then
55783    # Not in mixed or Windows style, start by that.
55784    new_path=`cmd //c echo $path`
55785  fi
55786
55787
55788  input_path="$new_path"
55789  # Check if we need to convert this using DOS-style short mode. If the path
55790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55791  # take no chances and rewrite it.
55792  # Note: m4 eats our [], so we need to use [ and ] instead.
55793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55794  if test "x$has_forbidden_chars" != x; then
55795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55796    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55797  fi
55798
55799
55800  windows_path="$new_path"
55801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55802    unix_path=`$CYGPATH -u "$windows_path"`
55803    new_path="$unix_path"
55804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55806    new_path="$unix_path"
55807  fi
55808
55809  if test "x$path" != "x$new_path"; then
55810    MSVC_DLL="$new_path"
55811    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55812$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55813  fi
55814
55815  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55816  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55817
55818    else
55819      # We're on a unix platform. Hooray! :)
55820      path="$MSVC_DLL"
55821      has_space=`$ECHO "$path" | $GREP " "`
55822      if test "x$has_space" != x; then
55823        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55824$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55825        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55826      fi
55827
55828      # Use eval to expand a potential ~
55829      eval path="$path"
55830      if test ! -f "$path" && test ! -d "$path"; then
55831        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55832      fi
55833
55834      if test -d "$path"; then
55835        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55836      else
55837        dir="`$DIRNAME "$path"`"
55838        base="`$BASENAME "$path"`"
55839        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55840      fi
55841    fi
55842  fi
55843
55844      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55845$as_echo_n "checking for $DLL_NAME... " >&6; }
55846      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55847$as_echo "$MSVC_DLL" >&6; }
55848    else
55849      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55850$as_echo "incorrect, ignoring" >&6; }
55851      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55852$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55853    fi
55854  fi
55855
55856    fi
55857  fi
55858
55859  if test "x$MSVC_DLL" = x; then
55860    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55861$as_echo_n "checking for $DLL_NAME... " >&6; }
55862    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55863$as_echo "no" >&6; }
55864    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55865  fi
55866
55867      MSVCP_DLL="$MSVC_DLL"
55868    fi
55869
55870  fi
55871
55872  fi
55873
55874
55875  if test "x$NEEDS_LIB_X11" = xfalse; then
55876    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55877      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55878$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55879    fi
55880    X_CFLAGS=
55881    X_LIBS=
55882  else
55883
55884    if test "x${with_x}" = xno; then
55885      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55886    fi
55887
55888    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55889      # The user has specified a X11 base directory. Use it for includes and
55890      # libraries, unless explicitely overridden.
55891      if test "x$x_includes" = xNONE; then
55892        x_includes="${with_x}/include"
55893      fi
55894      if test "x$x_libraries" = xNONE; then
55895        x_libraries="${with_x}/lib"
55896      fi
55897    else
55898      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55899      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55900      # --x-libraries for the sysroot, if that seems to be correct.
55901      if test "x$SYSROOT" != "x"; then
55902        if test "x$x_includes" = xNONE; then
55903          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55904            x_includes="$SYSROOT/usr/X11R6/include"
55905          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55906            x_includes="$SYSROOT/usr/include"
55907          fi
55908        fi
55909        if test "x$x_libraries" = xNONE; then
55910          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55911            x_libraries="$SYSROOT/usr/X11R6/lib"
55912          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55913            x_libraries="$SYSROOT/usr/lib64"
55914          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55915            x_libraries="$SYSROOT/usr/lib"
55916          fi
55917        fi
55918      fi
55919    fi
55920
55921    # Now let autoconf do it's magic
55922    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55923$as_echo_n "checking for X... " >&6; }
55924
55925
55926# Check whether --with-x was given.
55927if test "${with_x+set}" = set; then :
55928  withval=$with_x;
55929fi
55930
55931# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55932if test "x$with_x" = xno; then
55933  # The user explicitly disabled X.
55934  have_x=disabled
55935else
55936  case $x_includes,$x_libraries in #(
55937    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55938    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55939  $as_echo_n "(cached) " >&6
55940else
55941  # One or both of the vars are not set, and there is no cached value.
55942ac_x_includes=no ac_x_libraries=no
55943rm -f -r conftest.dir
55944if mkdir conftest.dir; then
55945  cd conftest.dir
55946  cat >Imakefile <<'_ACEOF'
55947incroot:
55948	@echo incroot='${INCROOT}'
55949usrlibdir:
55950	@echo usrlibdir='${USRLIBDIR}'
55951libdir:
55952	@echo libdir='${LIBDIR}'
55953_ACEOF
55954  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55955    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55956    for ac_var in incroot usrlibdir libdir; do
55957      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55958    done
55959    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55960    for ac_extension in a so sl dylib la dll; do
55961      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55962	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55963	ac_im_usrlibdir=$ac_im_libdir; break
55964      fi
55965    done
55966    # Screen out bogus values from the imake configuration.  They are
55967    # bogus both because they are the default anyway, and because
55968    # using them would break gcc on systems where it needs fixed includes.
55969    case $ac_im_incroot in
55970	/usr/include) ac_x_includes= ;;
55971	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55972    esac
55973    case $ac_im_usrlibdir in
55974	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55975	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55976    esac
55977  fi
55978  cd ..
55979  rm -f -r conftest.dir
55980fi
55981
55982# Standard set of common directories for X headers.
55983# Check X11 before X11Rn because it is often a symlink to the current release.
55984ac_x_header_dirs='
55985/usr/X11/include
55986/usr/X11R7/include
55987/usr/X11R6/include
55988/usr/X11R5/include
55989/usr/X11R4/include
55990
55991/usr/include/X11
55992/usr/include/X11R7
55993/usr/include/X11R6
55994/usr/include/X11R5
55995/usr/include/X11R4
55996
55997/usr/local/X11/include
55998/usr/local/X11R7/include
55999/usr/local/X11R6/include
56000/usr/local/X11R5/include
56001/usr/local/X11R4/include
56002
56003/usr/local/include/X11
56004/usr/local/include/X11R7
56005/usr/local/include/X11R6
56006/usr/local/include/X11R5
56007/usr/local/include/X11R4
56008
56009/usr/X386/include
56010/usr/x386/include
56011/usr/XFree86/include/X11
56012
56013/usr/include
56014/usr/local/include
56015/usr/unsupported/include
56016/usr/athena/include
56017/usr/local/x11r5/include
56018/usr/lpp/Xamples/include
56019
56020/usr/openwin/include
56021/usr/openwin/share/include'
56022
56023if test "$ac_x_includes" = no; then
56024  # Guess where to find include files, by looking for Xlib.h.
56025  # First, try using that file with no special directory specified.
56026  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56027/* end confdefs.h.  */
56028#include <X11/Xlib.h>
56029_ACEOF
56030if ac_fn_cxx_try_cpp "$LINENO"; then :
56031  # We can compile using X headers with no special include directory.
56032ac_x_includes=
56033else
56034  for ac_dir in $ac_x_header_dirs; do
56035  if test -r "$ac_dir/X11/Xlib.h"; then
56036    ac_x_includes=$ac_dir
56037    break
56038  fi
56039done
56040fi
56041rm -f conftest.err conftest.i conftest.$ac_ext
56042fi # $ac_x_includes = no
56043
56044if test "$ac_x_libraries" = no; then
56045  # Check for the libraries.
56046  # See if we find them without any special options.
56047  # Don't add to $LIBS permanently.
56048  ac_save_LIBS=$LIBS
56049  LIBS="-lX11 $LIBS"
56050  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56051/* end confdefs.h.  */
56052#include <X11/Xlib.h>
56053int
56054main ()
56055{
56056XrmInitialize ()
56057  ;
56058  return 0;
56059}
56060_ACEOF
56061if ac_fn_cxx_try_link "$LINENO"; then :
56062  LIBS=$ac_save_LIBS
56063# We can link X programs with no special library path.
56064ac_x_libraries=
56065else
56066  LIBS=$ac_save_LIBS
56067for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56068do
56069  # Don't even attempt the hair of trying to link an X program!
56070  for ac_extension in a so sl dylib la dll; do
56071    if test -r "$ac_dir/libX11.$ac_extension"; then
56072      ac_x_libraries=$ac_dir
56073      break 2
56074    fi
56075  done
56076done
56077fi
56078rm -f core conftest.err conftest.$ac_objext \
56079    conftest$ac_exeext conftest.$ac_ext
56080fi # $ac_x_libraries = no
56081
56082case $ac_x_includes,$ac_x_libraries in #(
56083  no,* | *,no | *\'*)
56084    # Didn't find X, or a directory has "'" in its name.
56085    ac_cv_have_x="have_x=no";; #(
56086  *)
56087    # Record where we found X for the cache.
56088    ac_cv_have_x="have_x=yes\
56089	ac_x_includes='$ac_x_includes'\
56090	ac_x_libraries='$ac_x_libraries'"
56091esac
56092fi
56093;; #(
56094    *) have_x=yes;;
56095  esac
56096  eval "$ac_cv_have_x"
56097fi # $with_x != no
56098
56099if test "$have_x" != yes; then
56100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56101$as_echo "$have_x" >&6; }
56102  no_x=yes
56103else
56104  # If each of the values was on the command line, it overrides each guess.
56105  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56106  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56107  # Update the cache value to reflect the command line values.
56108  ac_cv_have_x="have_x=yes\
56109	ac_x_includes='$x_includes'\
56110	ac_x_libraries='$x_libraries'"
56111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56112$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56113fi
56114
56115    if test "$no_x" = yes; then
56116  # Not all programs may use this symbol, but it does not hurt to define it.
56117
56118$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56119
56120  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56121else
56122  if test -n "$x_includes"; then
56123    X_CFLAGS="$X_CFLAGS -I$x_includes"
56124  fi
56125
56126  # It would also be nice to do this for all -L options, not just this one.
56127  if test -n "$x_libraries"; then
56128    X_LIBS="$X_LIBS -L$x_libraries"
56129    # For Solaris; some versions of Sun CC require a space after -R and
56130    # others require no space.  Words are not sufficient . . . .
56131    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56132$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56133    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56134    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56135    ac_cxx_werror_flag=yes
56136    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56137/* end confdefs.h.  */
56138
56139int
56140main ()
56141{
56142
56143  ;
56144  return 0;
56145}
56146_ACEOF
56147if ac_fn_cxx_try_link "$LINENO"; then :
56148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56149$as_echo "no" >&6; }
56150       X_LIBS="$X_LIBS -R$x_libraries"
56151else
56152  LIBS="$ac_xsave_LIBS -R $x_libraries"
56153       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56154/* end confdefs.h.  */
56155
56156int
56157main ()
56158{
56159
56160  ;
56161  return 0;
56162}
56163_ACEOF
56164if ac_fn_cxx_try_link "$LINENO"; then :
56165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56166$as_echo "yes" >&6; }
56167	  X_LIBS="$X_LIBS -R $x_libraries"
56168else
56169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56170$as_echo "neither works" >&6; }
56171fi
56172rm -f core conftest.err conftest.$ac_objext \
56173    conftest$ac_exeext conftest.$ac_ext
56174fi
56175rm -f core conftest.err conftest.$ac_objext \
56176    conftest$ac_exeext conftest.$ac_ext
56177    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56178    LIBS=$ac_xsave_LIBS
56179  fi
56180
56181  # Check for system-dependent libraries X programs must link with.
56182  # Do this before checking for the system-independent R6 libraries
56183  # (-lICE), since we may need -lsocket or whatever for X linking.
56184
56185  if test "$ISC" = yes; then
56186    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56187  else
56188    # Martyn Johnson says this is needed for Ultrix, if the X
56189    # libraries were built with DECnet support.  And Karl Berry says
56190    # the Alpha needs dnet_stub (dnet does not exist).
56191    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56192    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56193/* end confdefs.h.  */
56194
56195/* Override any GCC internal prototype to avoid an error.
56196   Use char because int might match the return type of a GCC
56197   builtin and then its argument prototype would still apply.  */
56198#ifdef __cplusplus
56199extern "C"
56200#endif
56201char XOpenDisplay ();
56202int
56203main ()
56204{
56205return XOpenDisplay ();
56206  ;
56207  return 0;
56208}
56209_ACEOF
56210if ac_fn_cxx_try_link "$LINENO"; then :
56211
56212else
56213  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56214$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56215if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56216  $as_echo_n "(cached) " >&6
56217else
56218  ac_check_lib_save_LIBS=$LIBS
56219LIBS="-ldnet  $LIBS"
56220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56221/* end confdefs.h.  */
56222
56223/* Override any GCC internal prototype to avoid an error.
56224   Use char because int might match the return type of a GCC
56225   builtin and then its argument prototype would still apply.  */
56226#ifdef __cplusplus
56227extern "C"
56228#endif
56229char dnet_ntoa ();
56230int
56231main ()
56232{
56233return dnet_ntoa ();
56234  ;
56235  return 0;
56236}
56237_ACEOF
56238if ac_fn_cxx_try_link "$LINENO"; then :
56239  ac_cv_lib_dnet_dnet_ntoa=yes
56240else
56241  ac_cv_lib_dnet_dnet_ntoa=no
56242fi
56243rm -f core conftest.err conftest.$ac_objext \
56244    conftest$ac_exeext conftest.$ac_ext
56245LIBS=$ac_check_lib_save_LIBS
56246fi
56247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56248$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56249if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56250  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56251fi
56252
56253    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56254      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56255$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56256if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56257  $as_echo_n "(cached) " >&6
56258else
56259  ac_check_lib_save_LIBS=$LIBS
56260LIBS="-ldnet_stub  $LIBS"
56261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56262/* end confdefs.h.  */
56263
56264/* Override any GCC internal prototype to avoid an error.
56265   Use char because int might match the return type of a GCC
56266   builtin and then its argument prototype would still apply.  */
56267#ifdef __cplusplus
56268extern "C"
56269#endif
56270char dnet_ntoa ();
56271int
56272main ()
56273{
56274return dnet_ntoa ();
56275  ;
56276  return 0;
56277}
56278_ACEOF
56279if ac_fn_cxx_try_link "$LINENO"; then :
56280  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56281else
56282  ac_cv_lib_dnet_stub_dnet_ntoa=no
56283fi
56284rm -f core conftest.err conftest.$ac_objext \
56285    conftest$ac_exeext conftest.$ac_ext
56286LIBS=$ac_check_lib_save_LIBS
56287fi
56288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56289$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56290if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56291  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56292fi
56293
56294    fi
56295fi
56296rm -f core conftest.err conftest.$ac_objext \
56297    conftest$ac_exeext conftest.$ac_ext
56298    LIBS="$ac_xsave_LIBS"
56299
56300    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56301    # to get the SysV transport functions.
56302    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56303    # needs -lnsl.
56304    # The nsl library prevents programs from opening the X display
56305    # on Irix 5.2, according to T.E. Dickey.
56306    # The functions gethostbyname, getservbyname, and inet_addr are
56307    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56308    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56309if test "x$ac_cv_func_gethostbyname" = xyes; then :
56310
56311fi
56312
56313    if test $ac_cv_func_gethostbyname = no; then
56314      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56315$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56316if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56317  $as_echo_n "(cached) " >&6
56318else
56319  ac_check_lib_save_LIBS=$LIBS
56320LIBS="-lnsl  $LIBS"
56321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56322/* end confdefs.h.  */
56323
56324/* Override any GCC internal prototype to avoid an error.
56325   Use char because int might match the return type of a GCC
56326   builtin and then its argument prototype would still apply.  */
56327#ifdef __cplusplus
56328extern "C"
56329#endif
56330char gethostbyname ();
56331int
56332main ()
56333{
56334return gethostbyname ();
56335  ;
56336  return 0;
56337}
56338_ACEOF
56339if ac_fn_cxx_try_link "$LINENO"; then :
56340  ac_cv_lib_nsl_gethostbyname=yes
56341else
56342  ac_cv_lib_nsl_gethostbyname=no
56343fi
56344rm -f core conftest.err conftest.$ac_objext \
56345    conftest$ac_exeext conftest.$ac_ext
56346LIBS=$ac_check_lib_save_LIBS
56347fi
56348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56349$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56350if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56351  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56352fi
56353
56354      if test $ac_cv_lib_nsl_gethostbyname = no; then
56355	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56356$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56357if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56358  $as_echo_n "(cached) " >&6
56359else
56360  ac_check_lib_save_LIBS=$LIBS
56361LIBS="-lbsd  $LIBS"
56362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56363/* end confdefs.h.  */
56364
56365/* Override any GCC internal prototype to avoid an error.
56366   Use char because int might match the return type of a GCC
56367   builtin and then its argument prototype would still apply.  */
56368#ifdef __cplusplus
56369extern "C"
56370#endif
56371char gethostbyname ();
56372int
56373main ()
56374{
56375return gethostbyname ();
56376  ;
56377  return 0;
56378}
56379_ACEOF
56380if ac_fn_cxx_try_link "$LINENO"; then :
56381  ac_cv_lib_bsd_gethostbyname=yes
56382else
56383  ac_cv_lib_bsd_gethostbyname=no
56384fi
56385rm -f core conftest.err conftest.$ac_objext \
56386    conftest$ac_exeext conftest.$ac_ext
56387LIBS=$ac_check_lib_save_LIBS
56388fi
56389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56390$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56391if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56392  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56393fi
56394
56395      fi
56396    fi
56397
56398    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56399    # socket/setsockopt and other routines are undefined under SCO ODT
56400    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56401    # on later versions), says Simon Leinen: it contains gethostby*
56402    # variants that don't use the name server (or something).  -lsocket
56403    # must be given before -lnsl if both are needed.  We assume that
56404    # if connect needs -lnsl, so does gethostbyname.
56405    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56406if test "x$ac_cv_func_connect" = xyes; then :
56407
56408fi
56409
56410    if test $ac_cv_func_connect = no; then
56411      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56412$as_echo_n "checking for connect in -lsocket... " >&6; }
56413if ${ac_cv_lib_socket_connect+:} false; then :
56414  $as_echo_n "(cached) " >&6
56415else
56416  ac_check_lib_save_LIBS=$LIBS
56417LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56419/* end confdefs.h.  */
56420
56421/* Override any GCC internal prototype to avoid an error.
56422   Use char because int might match the return type of a GCC
56423   builtin and then its argument prototype would still apply.  */
56424#ifdef __cplusplus
56425extern "C"
56426#endif
56427char connect ();
56428int
56429main ()
56430{
56431return connect ();
56432  ;
56433  return 0;
56434}
56435_ACEOF
56436if ac_fn_cxx_try_link "$LINENO"; then :
56437  ac_cv_lib_socket_connect=yes
56438else
56439  ac_cv_lib_socket_connect=no
56440fi
56441rm -f core conftest.err conftest.$ac_objext \
56442    conftest$ac_exeext conftest.$ac_ext
56443LIBS=$ac_check_lib_save_LIBS
56444fi
56445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56446$as_echo "$ac_cv_lib_socket_connect" >&6; }
56447if test "x$ac_cv_lib_socket_connect" = xyes; then :
56448  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56449fi
56450
56451    fi
56452
56453    # Guillermo Gomez says -lposix is necessary on A/UX.
56454    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56455if test "x$ac_cv_func_remove" = xyes; then :
56456
56457fi
56458
56459    if test $ac_cv_func_remove = no; then
56460      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56461$as_echo_n "checking for remove in -lposix... " >&6; }
56462if ${ac_cv_lib_posix_remove+:} false; then :
56463  $as_echo_n "(cached) " >&6
56464else
56465  ac_check_lib_save_LIBS=$LIBS
56466LIBS="-lposix  $LIBS"
56467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56468/* end confdefs.h.  */
56469
56470/* Override any GCC internal prototype to avoid an error.
56471   Use char because int might match the return type of a GCC
56472   builtin and then its argument prototype would still apply.  */
56473#ifdef __cplusplus
56474extern "C"
56475#endif
56476char remove ();
56477int
56478main ()
56479{
56480return remove ();
56481  ;
56482  return 0;
56483}
56484_ACEOF
56485if ac_fn_cxx_try_link "$LINENO"; then :
56486  ac_cv_lib_posix_remove=yes
56487else
56488  ac_cv_lib_posix_remove=no
56489fi
56490rm -f core conftest.err conftest.$ac_objext \
56491    conftest$ac_exeext conftest.$ac_ext
56492LIBS=$ac_check_lib_save_LIBS
56493fi
56494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56495$as_echo "$ac_cv_lib_posix_remove" >&6; }
56496if test "x$ac_cv_lib_posix_remove" = xyes; then :
56497  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56498fi
56499
56500    fi
56501
56502    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56503    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56504if test "x$ac_cv_func_shmat" = xyes; then :
56505
56506fi
56507
56508    if test $ac_cv_func_shmat = no; then
56509      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56510$as_echo_n "checking for shmat in -lipc... " >&6; }
56511if ${ac_cv_lib_ipc_shmat+:} false; then :
56512  $as_echo_n "(cached) " >&6
56513else
56514  ac_check_lib_save_LIBS=$LIBS
56515LIBS="-lipc  $LIBS"
56516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56517/* end confdefs.h.  */
56518
56519/* Override any GCC internal prototype to avoid an error.
56520   Use char because int might match the return type of a GCC
56521   builtin and then its argument prototype would still apply.  */
56522#ifdef __cplusplus
56523extern "C"
56524#endif
56525char shmat ();
56526int
56527main ()
56528{
56529return shmat ();
56530  ;
56531  return 0;
56532}
56533_ACEOF
56534if ac_fn_cxx_try_link "$LINENO"; then :
56535  ac_cv_lib_ipc_shmat=yes
56536else
56537  ac_cv_lib_ipc_shmat=no
56538fi
56539rm -f core conftest.err conftest.$ac_objext \
56540    conftest$ac_exeext conftest.$ac_ext
56541LIBS=$ac_check_lib_save_LIBS
56542fi
56543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56544$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56545if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56546  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56547fi
56548
56549    fi
56550  fi
56551
56552  # Check for libraries that X11R6 Xt/Xaw programs need.
56553  ac_save_LDFLAGS=$LDFLAGS
56554  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56555  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56556  # check for ICE first), but we must link in the order -lSM -lICE or
56557  # we get undefined symbols.  So assume we have SM if we have ICE.
56558  # These have to be linked with before -lX11, unlike the other
56559  # libraries we check for below, so use a different variable.
56560  # John Interrante, Karl Berry
56561  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56562$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56563if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56564  $as_echo_n "(cached) " >&6
56565else
56566  ac_check_lib_save_LIBS=$LIBS
56567LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56569/* end confdefs.h.  */
56570
56571/* Override any GCC internal prototype to avoid an error.
56572   Use char because int might match the return type of a GCC
56573   builtin and then its argument prototype would still apply.  */
56574#ifdef __cplusplus
56575extern "C"
56576#endif
56577char IceConnectionNumber ();
56578int
56579main ()
56580{
56581return IceConnectionNumber ();
56582  ;
56583  return 0;
56584}
56585_ACEOF
56586if ac_fn_cxx_try_link "$LINENO"; then :
56587  ac_cv_lib_ICE_IceConnectionNumber=yes
56588else
56589  ac_cv_lib_ICE_IceConnectionNumber=no
56590fi
56591rm -f core conftest.err conftest.$ac_objext \
56592    conftest$ac_exeext conftest.$ac_ext
56593LIBS=$ac_check_lib_save_LIBS
56594fi
56595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56596$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56597if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56598  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56599fi
56600
56601  LDFLAGS=$ac_save_LDFLAGS
56602
56603fi
56604
56605
56606    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56607    # this doesn't make sense so we remove it.
56608    if test "x$COMPILE_TYPE" = xcross; then
56609      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56610    fi
56611
56612    if test "x$no_x" = xyes; then
56613
56614  # Print a helpful message on how to acquire the necessary build dependency.
56615  # x11 is the help tag: freetype, cups, alsa etc
56616  MISSING_DEPENDENCY=x11
56617
56618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56619    cygwin_help $MISSING_DEPENDENCY
56620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56621    msys_help $MISSING_DEPENDENCY
56622  else
56623    PKGHANDLER_COMMAND=
56624
56625    case $PKGHANDLER in
56626      apt-get)
56627        apt_help     $MISSING_DEPENDENCY ;;
56628      yum)
56629        yum_help     $MISSING_DEPENDENCY ;;
56630      port)
56631        port_help    $MISSING_DEPENDENCY ;;
56632      pkgutil)
56633        pkgutil_help $MISSING_DEPENDENCY ;;
56634      pkgadd)
56635        pkgadd_help  $MISSING_DEPENDENCY ;;
56636    esac
56637
56638    if test "x$PKGHANDLER_COMMAND" != x; then
56639      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56640    fi
56641  fi
56642
56643      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56644    fi
56645
56646    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56647      OPENWIN_HOME="/usr/openwin"
56648      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56649      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56650          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56651    fi
56652
56653    ac_ext=c
56654ac_cpp='$CPP $CPPFLAGS'
56655ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56656ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56657ac_compiler_gnu=$ac_cv_c_compiler_gnu
56658
56659    OLD_CFLAGS="$CFLAGS"
56660    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56661
56662    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56663    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56664do :
56665  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56666ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56667          # include <X11/Xlib.h>
56668          # include <X11/Xutil.h>
56669
56670
56671"
56672if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56673  cat >>confdefs.h <<_ACEOF
56674#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56675_ACEOF
56676 X11_HEADERS_OK=yes
56677else
56678  X11_HEADERS_OK=no; break
56679fi
56680
56681done
56682
56683
56684    if test "x$X11_HEADERS_OK" = xno; then
56685
56686  # Print a helpful message on how to acquire the necessary build dependency.
56687  # x11 is the help tag: freetype, cups, alsa etc
56688  MISSING_DEPENDENCY=x11
56689
56690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56691    cygwin_help $MISSING_DEPENDENCY
56692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56693    msys_help $MISSING_DEPENDENCY
56694  else
56695    PKGHANDLER_COMMAND=
56696
56697    case $PKGHANDLER in
56698      apt-get)
56699        apt_help     $MISSING_DEPENDENCY ;;
56700      yum)
56701        yum_help     $MISSING_DEPENDENCY ;;
56702      port)
56703        port_help    $MISSING_DEPENDENCY ;;
56704      pkgutil)
56705        pkgutil_help $MISSING_DEPENDENCY ;;
56706      pkgadd)
56707        pkgadd_help  $MISSING_DEPENDENCY ;;
56708    esac
56709
56710    if test "x$PKGHANDLER_COMMAND" != x; then
56711      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56712    fi
56713  fi
56714
56715      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56716    fi
56717
56718    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56719    # defined in libawt_xawt.
56720    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56721$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56722    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56723/* end confdefs.h.  */
56724#include <X11/extensions/Xrender.h>
56725int
56726main ()
56727{
56728XLinearGradient x;
56729  ;
56730  return 0;
56731}
56732_ACEOF
56733if ac_fn_c_try_compile "$LINENO"; then :
56734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56735$as_echo "yes" >&6; }
56736else
56737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56738$as_echo "no" >&6; }
56739         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56740fi
56741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56742
56743    CFLAGS="$OLD_CFLAGS"
56744    ac_ext=cpp
56745ac_cpp='$CXXCPP $CPPFLAGS'
56746ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56747ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56748ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56749
56750  fi # NEEDS_LIB_X11
56751
56752
56753
56754
56755
56756
56757# Check whether --with-cups was given.
56758if test "${with_cups+set}" = set; then :
56759  withval=$with_cups;
56760fi
56761
56762
56763# Check whether --with-cups-include was given.
56764if test "${with_cups_include+set}" = set; then :
56765  withval=$with_cups_include;
56766fi
56767
56768
56769  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56770    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56771        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56772      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56773$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56774    fi
56775    CUPS_CFLAGS=
56776  else
56777    CUPS_FOUND=no
56778
56779    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56780      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56781    fi
56782
56783    if test "x${with_cups}" != x; then
56784      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56785$as_echo_n "checking for cups headers... " >&6; }
56786      if test -s "${with_cups}/include/cups/cups.h"; then
56787        CUPS_CFLAGS="-I${with_cups}/include"
56788        CUPS_FOUND=yes
56789        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56790$as_echo "$CUPS_FOUND" >&6; }
56791      else
56792        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56793      fi
56794    fi
56795    if test "x${with_cups_include}" != x; then
56796      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56797$as_echo_n "checking for cups headers... " >&6; }
56798      if test -s "${with_cups_include}/cups/cups.h"; then
56799        CUPS_CFLAGS="-I${with_cups_include}"
56800        CUPS_FOUND=yes
56801        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56802$as_echo "$CUPS_FOUND" >&6; }
56803      else
56804        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56805      fi
56806    fi
56807    if test "x$CUPS_FOUND" = xno; then
56808      # Are the cups headers installed in the default /usr/include location?
56809      for ac_header in cups/cups.h cups/ppd.h
56810do :
56811  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56812ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56813if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56814  cat >>confdefs.h <<_ACEOF
56815#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56816_ACEOF
56817
56818          CUPS_FOUND=yes
56819          CUPS_CFLAGS=
56820          DEFAULT_CUPS=yes
56821
56822fi
56823
56824done
56825
56826    fi
56827    if test "x$CUPS_FOUND" = xno; then
56828
56829  # Print a helpful message on how to acquire the necessary build dependency.
56830  # cups is the help tag: freetype, cups, alsa etc
56831  MISSING_DEPENDENCY=cups
56832
56833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56834    cygwin_help $MISSING_DEPENDENCY
56835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56836    msys_help $MISSING_DEPENDENCY
56837  else
56838    PKGHANDLER_COMMAND=
56839
56840    case $PKGHANDLER in
56841      apt-get)
56842        apt_help     $MISSING_DEPENDENCY ;;
56843      yum)
56844        yum_help     $MISSING_DEPENDENCY ;;
56845      port)
56846        port_help    $MISSING_DEPENDENCY ;;
56847      pkgutil)
56848        pkgutil_help $MISSING_DEPENDENCY ;;
56849      pkgadd)
56850        pkgadd_help  $MISSING_DEPENDENCY ;;
56851    esac
56852
56853    if test "x$PKGHANDLER_COMMAND" != x; then
56854      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56855    fi
56856  fi
56857
56858      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56859    fi
56860  fi
56861
56862
56863
56864
56865
56866# Check whether --with-freetype was given.
56867if test "${with_freetype+set}" = set; then :
56868  withval=$with_freetype;
56869fi
56870
56871
56872# Check whether --with-freetype-include was given.
56873if test "${with_freetype_include+set}" = set; then :
56874  withval=$with_freetype_include;
56875fi
56876
56877
56878# Check whether --with-freetype-lib was given.
56879if test "${with_freetype_lib+set}" = set; then :
56880  withval=$with_freetype_lib;
56881fi
56882
56883
56884# Check whether --with-freetype-src was given.
56885if test "${with_freetype_src+set}" = set; then :
56886  withval=$with_freetype_src;
56887fi
56888
56889  # Check whether --enable-freetype-bundling was given.
56890if test "${enable_freetype_bundling+set}" = set; then :
56891  enableval=$enable_freetype_bundling;
56892fi
56893
56894
56895  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56896  FREETYPE_BASE_NAME=freetype
56897  FREETYPE_CFLAGS=
56898  FREETYPE_LIBS=
56899  FREETYPE_BUNDLE_LIB_PATH=
56900
56901  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56902    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56903        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56904        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56905        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56906      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56907$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56908    fi
56909    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56910      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56911$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56912    fi
56913  else
56914    # freetype is needed to build; go get it!
56915
56916    BUNDLE_FREETYPE="$enable_freetype_bundling"
56917
56918    if  test "x$with_freetype_src" != x; then
56919      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56920        # Try to build freetype if --with-freetype-src was given on Windows
56921
56922  FREETYPE_SRC_PATH="$with_freetype_src"
56923  BUILD_FREETYPE=yes
56924
56925  # Check if the freetype sources are acessible..
56926  if ! test -d $FREETYPE_SRC_PATH; then
56927    { $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
56928$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56929    BUILD_FREETYPE=no
56930  fi
56931  # ..and contain a vc2010 project file
56932  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56933  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56934    { $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
56935$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56936    BUILD_FREETYPE=no
56937  fi
56938  # Now check if configure found a version of 'msbuild.exe'
56939  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56940    { $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
56941$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;}
56942    BUILD_FREETYPE=no
56943  fi
56944
56945  # Ready to go..
56946  if test "x$BUILD_FREETYPE" = xyes; then
56947    # msbuild requires trailing slashes for output directories
56948    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56949    freetype_lib_path_unix="$freetype_lib_path"
56950    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56951
56952  unix_path="$vcxproj_path"
56953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56954    windows_path=`$CYGPATH -m "$unix_path"`
56955    vcxproj_path="$windows_path"
56956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56957    windows_path=`cmd //c echo $unix_path`
56958    vcxproj_path="$windows_path"
56959  fi
56960
56961
56962  unix_path="$freetype_lib_path"
56963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56964    windows_path=`$CYGPATH -m "$unix_path"`
56965    freetype_lib_path="$windows_path"
56966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56967    windows_path=`cmd //c echo $unix_path`
56968    freetype_lib_path="$windows_path"
56969  fi
56970
56971
56972  unix_path="$freetype_obj_path"
56973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56974    windows_path=`$CYGPATH -m "$unix_path"`
56975    freetype_obj_path="$windows_path"
56976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56977    windows_path=`cmd //c echo $unix_path`
56978    freetype_obj_path="$windows_path"
56979  fi
56980
56981    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56982      freetype_platform=x64
56983    else
56984      freetype_platform=win32
56985    fi
56986
56987    # The original freetype project file is for VS 2010 (i.e. 'v100'),
56988    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56989    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
56990    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
56991    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
56992$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
56993
56994    # First we try to build the freetype.dll
56995    $ECHO -e "@echo off\n"\
56996        "$MSBUILD $vcxproj_path "\
56997        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56998        "/p:Configuration=\"Release Multithreaded\" "\
56999        "/p:Platform=$freetype_platform "\
57000        "/p:ConfigurationType=DynamicLibrary "\
57001        "/p:TargetName=freetype "\
57002        "/p:OutDir=\"$freetype_lib_path\" "\
57003        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57004    cmd /c freetype.bat
57005
57006    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57007      # If that succeeds we also build freetype.lib
57008      $ECHO -e "@echo off\n"\
57009          "$MSBUILD $vcxproj_path "\
57010          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57011          "/p:Configuration=\"Release Multithreaded\" "\
57012          "/p:Platform=$freetype_platform "\
57013          "/p:ConfigurationType=StaticLibrary "\
57014          "/p:TargetName=freetype "\
57015          "/p:OutDir=\"$freetype_lib_path\" "\
57016          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57017      cmd /c freetype.bat
57018
57019      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57020        # Once we build both, lib and dll, set freetype lib and include path appropriately
57021        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57022        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57023        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57024$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57025      else
57026        BUILD_FREETYPE=no
57027      fi
57028    else
57029      BUILD_FREETYPE=no
57030    fi
57031  fi
57032
57033        if test "x$BUILD_FREETYPE" = xyes; then
57034          # Okay, we built it. Check that it works.
57035
57036  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57037  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57038  METHOD="--with-freetype-src"
57039
57040  # Let's start with an optimistic view of the world :-)
57041  FOUND_FREETYPE=yes
57042
57043  # First look for the canonical freetype main include file ft2build.h.
57044  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57045    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57046    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57047    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57048      # Fail.
57049      FOUND_FREETYPE=no
57050    fi
57051  fi
57052
57053  if test "x$FOUND_FREETYPE" = xyes; then
57054    # Include file found, let's continue the sanity check.
57055    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57056$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57057
57058    # Reset to default value
57059    FREETYPE_BASE_NAME=freetype
57060    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57061    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57062      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57063          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57064        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57065        # for the .6 version explicitly.
57066        FREETYPE_BASE_NAME=freetype.6
57067        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57068        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57069$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57070      else
57071        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57072$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57073        FOUND_FREETYPE=no
57074      fi
57075    else
57076      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57077        # On Windows, we will need both .lib and .dll file.
57078        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57079          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57080$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57081          FOUND_FREETYPE=no
57082        fi
57083      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57084          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57085        # Found lib in isa dir, use that instead.
57086        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57087        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57088$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57089      fi
57090    fi
57091  fi
57092
57093  if test "x$FOUND_FREETYPE" = xyes; then
57094
57095  # Only process if variable expands to non-empty
57096
57097  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57098    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57099
57100  # Input might be given as Windows format, start by converting to
57101  # unix format.
57102  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57103  new_path=`$CYGPATH -u "$path"`
57104
57105  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57106  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57107  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57108  # "foo.exe" is OK but "foo" is an error.
57109  #
57110  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57111  # It is also a way to make sure we got the proper file name for the real test later on.
57112  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57113  if test "x$test_shortpath" = x; then
57114    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57115$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57116    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57117  fi
57118
57119  # Call helper function which possibly converts this using DOS-style short mode.
57120  # If so, the updated path is stored in $new_path.
57121
57122  input_path="$new_path"
57123  # Check if we need to convert this using DOS-style short mode. If the path
57124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57125  # take no chances and rewrite it.
57126  # Note: m4 eats our [], so we need to use [ and ] instead.
57127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57128  if test "x$has_forbidden_chars" != x; then
57129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57130    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57131    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57132    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57133      # Going to short mode and back again did indeed matter. Since short mode is
57134      # case insensitive, let's make it lowercase to improve readability.
57135      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57136      # Now convert it back to Unix-style (cygpath)
57137      input_path=`$CYGPATH -u "$shortmode_path"`
57138      new_path="$input_path"
57139    fi
57140  fi
57141
57142  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57143  if test "x$test_cygdrive_prefix" = x; then
57144    # As a simple fix, exclude /usr/bin since it's not a real path.
57145    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57146      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57147      # a path prefixed by /cygdrive for fixpath to work.
57148      new_path="$CYGWIN_ROOT_PATH$input_path"
57149    fi
57150  fi
57151
57152
57153  if test "x$path" != "x$new_path"; then
57154    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57155    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57156$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57157  fi
57158
57159    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57160
57161  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57162  has_colon=`$ECHO $path | $GREP ^.:`
57163  new_path="$path"
57164  if test "x$has_colon" = x; then
57165    # Not in mixed or Windows style, start by that.
57166    new_path=`cmd //c echo $path`
57167  fi
57168
57169
57170  input_path="$new_path"
57171  # Check if we need to convert this using DOS-style short mode. If the path
57172  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57173  # take no chances and rewrite it.
57174  # Note: m4 eats our [], so we need to use [ and ] instead.
57175  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57176  if test "x$has_forbidden_chars" != x; then
57177    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57178    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57179  fi
57180
57181
57182  windows_path="$new_path"
57183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57184    unix_path=`$CYGPATH -u "$windows_path"`
57185    new_path="$unix_path"
57186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57188    new_path="$unix_path"
57189  fi
57190
57191  if test "x$path" != "x$new_path"; then
57192    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57193    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57194$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57195  fi
57196
57197  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57198  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57199
57200    else
57201      # We're on a unix platform. Hooray! :)
57202      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57203      has_space=`$ECHO "$path" | $GREP " "`
57204      if test "x$has_space" != x; then
57205        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57206$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57207        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57208      fi
57209
57210      # Use eval to expand a potential ~
57211      eval path="$path"
57212      if test ! -f "$path" && test ! -d "$path"; then
57213        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57214      fi
57215
57216      if test -d "$path"; then
57217        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57218      else
57219        dir="`$DIRNAME "$path"`"
57220        base="`$BASENAME "$path"`"
57221        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57222      fi
57223    fi
57224  fi
57225
57226
57227  # Only process if variable expands to non-empty
57228
57229  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57230    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57231
57232  # Input might be given as Windows format, start by converting to
57233  # unix format.
57234  path="$POTENTIAL_FREETYPE_LIB_PATH"
57235  new_path=`$CYGPATH -u "$path"`
57236
57237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57240  # "foo.exe" is OK but "foo" is an error.
57241  #
57242  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57243  # It is also a way to make sure we got the proper file name for the real test later on.
57244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57245  if test "x$test_shortpath" = x; then
57246    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57247$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57248    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57249  fi
57250
57251  # Call helper function which possibly converts this using DOS-style short mode.
57252  # If so, the updated path is stored in $new_path.
57253
57254  input_path="$new_path"
57255  # Check if we need to convert this using DOS-style short mode. If the path
57256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57257  # take no chances and rewrite it.
57258  # Note: m4 eats our [], so we need to use [ and ] instead.
57259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57260  if test "x$has_forbidden_chars" != x; then
57261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57262    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57263    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57264    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57265      # Going to short mode and back again did indeed matter. Since short mode is
57266      # case insensitive, let's make it lowercase to improve readability.
57267      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57268      # Now convert it back to Unix-style (cygpath)
57269      input_path=`$CYGPATH -u "$shortmode_path"`
57270      new_path="$input_path"
57271    fi
57272  fi
57273
57274  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57275  if test "x$test_cygdrive_prefix" = x; then
57276    # As a simple fix, exclude /usr/bin since it's not a real path.
57277    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57278      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57279      # a path prefixed by /cygdrive for fixpath to work.
57280      new_path="$CYGWIN_ROOT_PATH$input_path"
57281    fi
57282  fi
57283
57284
57285  if test "x$path" != "x$new_path"; then
57286    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57287    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57288$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57289  fi
57290
57291    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57292
57293  path="$POTENTIAL_FREETYPE_LIB_PATH"
57294  has_colon=`$ECHO $path | $GREP ^.:`
57295  new_path="$path"
57296  if test "x$has_colon" = x; then
57297    # Not in mixed or Windows style, start by that.
57298    new_path=`cmd //c echo $path`
57299  fi
57300
57301
57302  input_path="$new_path"
57303  # Check if we need to convert this using DOS-style short mode. If the path
57304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57305  # take no chances and rewrite it.
57306  # Note: m4 eats our [], so we need to use [ and ] instead.
57307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57308  if test "x$has_forbidden_chars" != x; then
57309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57310    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57311  fi
57312
57313
57314  windows_path="$new_path"
57315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57316    unix_path=`$CYGPATH -u "$windows_path"`
57317    new_path="$unix_path"
57318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57320    new_path="$unix_path"
57321  fi
57322
57323  if test "x$path" != "x$new_path"; then
57324    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57326$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57327  fi
57328
57329  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57330  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57331
57332    else
57333      # We're on a unix platform. Hooray! :)
57334      path="$POTENTIAL_FREETYPE_LIB_PATH"
57335      has_space=`$ECHO "$path" | $GREP " "`
57336      if test "x$has_space" != x; then
57337        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57338$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57339        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57340      fi
57341
57342      # Use eval to expand a potential ~
57343      eval path="$path"
57344      if test ! -f "$path" && test ! -d "$path"; then
57345        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57346      fi
57347
57348      if test -d "$path"; then
57349        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57350      else
57351        dir="`$DIRNAME "$path"`"
57352        base="`$BASENAME "$path"`"
57353        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57354      fi
57355    fi
57356  fi
57357
57358
57359    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57360    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57361$as_echo_n "checking for freetype includes... " >&6; }
57362    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57363$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57364    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57365    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57366$as_echo_n "checking for freetype libraries... " >&6; }
57367    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57368$as_echo "$FREETYPE_LIB_PATH" >&6; }
57369  fi
57370
57371          if test "x$FOUND_FREETYPE" != xyes; then
57372            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57373          fi
57374        else
57375          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57376$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57377          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57378        fi
57379      else
57380        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57381$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57382      fi
57383    fi
57384
57385    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57386      # User has specified settings
57387
57388      if test "x$BUNDLE_FREETYPE" = x; then
57389        # If not specified, default is to bundle freetype
57390        BUNDLE_FREETYPE=yes
57391      fi
57392
57393      if test "x$with_freetype" != x; then
57394        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57395        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57396      fi
57397
57398      # Allow --with-freetype-lib and --with-freetype-include to override
57399      if test "x$with_freetype_include" != x; then
57400        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57401      fi
57402      if test "x$with_freetype_lib" != x; then
57403        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57404      fi
57405
57406      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57407        # Okay, we got it. Check that it works.
57408
57409  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57410  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57411  METHOD="--with-freetype"
57412
57413  # Let's start with an optimistic view of the world :-)
57414  FOUND_FREETYPE=yes
57415
57416  # First look for the canonical freetype main include file ft2build.h.
57417  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57418    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57419    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57420    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57421      # Fail.
57422      FOUND_FREETYPE=no
57423    fi
57424  fi
57425
57426  if test "x$FOUND_FREETYPE" = xyes; then
57427    # Include file found, let's continue the sanity check.
57428    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57429$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57430
57431    # Reset to default value
57432    FREETYPE_BASE_NAME=freetype
57433    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57434    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57435      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57436          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57437        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57438        # for the .6 version explicitly.
57439        FREETYPE_BASE_NAME=freetype.6
57440        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57441        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57442$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57443      else
57444        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57445$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57446        FOUND_FREETYPE=no
57447      fi
57448    else
57449      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57450        # On Windows, we will need both .lib and .dll file.
57451        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57452          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57453$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57454          FOUND_FREETYPE=no
57455        fi
57456      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57457          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57458        # Found lib in isa dir, use that instead.
57459        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57460        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57461$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57462      fi
57463    fi
57464  fi
57465
57466  if test "x$FOUND_FREETYPE" = xyes; then
57467
57468  # Only process if variable expands to non-empty
57469
57470  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57471    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57472
57473  # Input might be given as Windows format, start by converting to
57474  # unix format.
57475  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57476  new_path=`$CYGPATH -u "$path"`
57477
57478  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57479  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57480  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57481  # "foo.exe" is OK but "foo" is an error.
57482  #
57483  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57484  # It is also a way to make sure we got the proper file name for the real test later on.
57485  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57486  if test "x$test_shortpath" = x; then
57487    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57488$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57489    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57490  fi
57491
57492  # Call helper function which possibly converts this using DOS-style short mode.
57493  # If so, the updated path is stored in $new_path.
57494
57495  input_path="$new_path"
57496  # Check if we need to convert this using DOS-style short mode. If the path
57497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57498  # take no chances and rewrite it.
57499  # Note: m4 eats our [], so we need to use [ and ] instead.
57500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57501  if test "x$has_forbidden_chars" != x; then
57502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57503    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57504    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57505    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57506      # Going to short mode and back again did indeed matter. Since short mode is
57507      # case insensitive, let's make it lowercase to improve readability.
57508      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57509      # Now convert it back to Unix-style (cygpath)
57510      input_path=`$CYGPATH -u "$shortmode_path"`
57511      new_path="$input_path"
57512    fi
57513  fi
57514
57515  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57516  if test "x$test_cygdrive_prefix" = x; then
57517    # As a simple fix, exclude /usr/bin since it's not a real path.
57518    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57519      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57520      # a path prefixed by /cygdrive for fixpath to work.
57521      new_path="$CYGWIN_ROOT_PATH$input_path"
57522    fi
57523  fi
57524
57525
57526  if test "x$path" != "x$new_path"; then
57527    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57529$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57530  fi
57531
57532    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57533
57534  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57535  has_colon=`$ECHO $path | $GREP ^.:`
57536  new_path="$path"
57537  if test "x$has_colon" = x; then
57538    # Not in mixed or Windows style, start by that.
57539    new_path=`cmd //c echo $path`
57540  fi
57541
57542
57543  input_path="$new_path"
57544  # Check if we need to convert this using DOS-style short mode. If the path
57545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57546  # take no chances and rewrite it.
57547  # Note: m4 eats our [], so we need to use [ and ] instead.
57548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57549  if test "x$has_forbidden_chars" != x; then
57550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57551    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57552  fi
57553
57554
57555  windows_path="$new_path"
57556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57557    unix_path=`$CYGPATH -u "$windows_path"`
57558    new_path="$unix_path"
57559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57561    new_path="$unix_path"
57562  fi
57563
57564  if test "x$path" != "x$new_path"; then
57565    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57567$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57568  fi
57569
57570  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57571  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57572
57573    else
57574      # We're on a unix platform. Hooray! :)
57575      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57576      has_space=`$ECHO "$path" | $GREP " "`
57577      if test "x$has_space" != x; then
57578        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57579$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57580        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57581      fi
57582
57583      # Use eval to expand a potential ~
57584      eval path="$path"
57585      if test ! -f "$path" && test ! -d "$path"; then
57586        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57587      fi
57588
57589      if test -d "$path"; then
57590        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57591      else
57592        dir="`$DIRNAME "$path"`"
57593        base="`$BASENAME "$path"`"
57594        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57595      fi
57596    fi
57597  fi
57598
57599
57600  # Only process if variable expands to non-empty
57601
57602  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57603    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57604
57605  # Input might be given as Windows format, start by converting to
57606  # unix format.
57607  path="$POTENTIAL_FREETYPE_LIB_PATH"
57608  new_path=`$CYGPATH -u "$path"`
57609
57610  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57611  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57612  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57613  # "foo.exe" is OK but "foo" is an error.
57614  #
57615  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57616  # It is also a way to make sure we got the proper file name for the real test later on.
57617  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57618  if test "x$test_shortpath" = x; then
57619    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57620$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57621    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57622  fi
57623
57624  # Call helper function which possibly converts this using DOS-style short mode.
57625  # If so, the updated path is stored in $new_path.
57626
57627  input_path="$new_path"
57628  # Check if we need to convert this using DOS-style short mode. If the path
57629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57630  # take no chances and rewrite it.
57631  # Note: m4 eats our [], so we need to use [ and ] instead.
57632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57633  if test "x$has_forbidden_chars" != x; then
57634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57635    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57636    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57637    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57638      # Going to short mode and back again did indeed matter. Since short mode is
57639      # case insensitive, let's make it lowercase to improve readability.
57640      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57641      # Now convert it back to Unix-style (cygpath)
57642      input_path=`$CYGPATH -u "$shortmode_path"`
57643      new_path="$input_path"
57644    fi
57645  fi
57646
57647  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57648  if test "x$test_cygdrive_prefix" = x; then
57649    # As a simple fix, exclude /usr/bin since it's not a real path.
57650    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57651      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57652      # a path prefixed by /cygdrive for fixpath to work.
57653      new_path="$CYGWIN_ROOT_PATH$input_path"
57654    fi
57655  fi
57656
57657
57658  if test "x$path" != "x$new_path"; then
57659    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57661$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57662  fi
57663
57664    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57665
57666  path="$POTENTIAL_FREETYPE_LIB_PATH"
57667  has_colon=`$ECHO $path | $GREP ^.:`
57668  new_path="$path"
57669  if test "x$has_colon" = x; then
57670    # Not in mixed or Windows style, start by that.
57671    new_path=`cmd //c echo $path`
57672  fi
57673
57674
57675  input_path="$new_path"
57676  # Check if we need to convert this using DOS-style short mode. If the path
57677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57678  # take no chances and rewrite it.
57679  # Note: m4 eats our [], so we need to use [ and ] instead.
57680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57681  if test "x$has_forbidden_chars" != x; then
57682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57684  fi
57685
57686
57687  windows_path="$new_path"
57688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57689    unix_path=`$CYGPATH -u "$windows_path"`
57690    new_path="$unix_path"
57691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57693    new_path="$unix_path"
57694  fi
57695
57696  if test "x$path" != "x$new_path"; then
57697    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57699$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57700  fi
57701
57702  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57703  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57704
57705    else
57706      # We're on a unix platform. Hooray! :)
57707      path="$POTENTIAL_FREETYPE_LIB_PATH"
57708      has_space=`$ECHO "$path" | $GREP " "`
57709      if test "x$has_space" != x; then
57710        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57711$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57712        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57713      fi
57714
57715      # Use eval to expand a potential ~
57716      eval path="$path"
57717      if test ! -f "$path" && test ! -d "$path"; then
57718        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57719      fi
57720
57721      if test -d "$path"; then
57722        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57723      else
57724        dir="`$DIRNAME "$path"`"
57725        base="`$BASENAME "$path"`"
57726        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57727      fi
57728    fi
57729  fi
57730
57731
57732    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57733    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57734$as_echo_n "checking for freetype includes... " >&6; }
57735    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57736$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57737    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57738    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57739$as_echo_n "checking for freetype libraries... " >&6; }
57740    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57741$as_echo "$FREETYPE_LIB_PATH" >&6; }
57742  fi
57743
57744        if test "x$FOUND_FREETYPE" != xyes; then
57745          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57746        fi
57747      else
57748        # User specified only one of lib or include. This is an error.
57749        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57750          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57751$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57752          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57753        else
57754          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57755$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57756          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57757        fi
57758      fi
57759    else
57760      # User did not specify settings, but we need freetype. Try to locate it.
57761
57762      if test "x$BUNDLE_FREETYPE" = x; then
57763        # If not specified, default is to bundle freetype only on windows
57764        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57765          BUNDLE_FREETYPE=yes
57766        else
57767          BUNDLE_FREETYPE=no
57768        fi
57769      fi
57770
57771      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57772      if test "x$SYSROOT" = x; then
57773        if test "x$FOUND_FREETYPE" != xyes; then
57774          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57775          if test "x$PKG_CONFIG" != x; then
57776
57777pkg_failed=no
57778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57779$as_echo_n "checking for FREETYPE... " >&6; }
57780
57781if test -n "$FREETYPE_CFLAGS"; then
57782    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57783 elif test -n "$PKG_CONFIG"; then
57784    if test -n "$PKG_CONFIG" && \
57785    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57786  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57787  ac_status=$?
57788  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57789  test $ac_status = 0; }; then
57790  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57791else
57792  pkg_failed=yes
57793fi
57794 else
57795    pkg_failed=untried
57796fi
57797if test -n "$FREETYPE_LIBS"; then
57798    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57799 elif test -n "$PKG_CONFIG"; then
57800    if test -n "$PKG_CONFIG" && \
57801    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57802  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57803  ac_status=$?
57804  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57805  test $ac_status = 0; }; then
57806  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57807else
57808  pkg_failed=yes
57809fi
57810 else
57811    pkg_failed=untried
57812fi
57813
57814
57815
57816if test $pkg_failed = yes; then
57817
57818if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57819        _pkg_short_errors_supported=yes
57820else
57821        _pkg_short_errors_supported=no
57822fi
57823        if test $_pkg_short_errors_supported = yes; then
57824	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57825        else
57826	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57827        fi
57828	# Put the nasty error message in config.log where it belongs
57829	echo "$FREETYPE_PKG_ERRORS" >&5
57830
57831	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57832$as_echo "no" >&6; }
57833                FOUND_FREETYPE=no
57834elif test $pkg_failed = untried; then
57835	FOUND_FREETYPE=no
57836else
57837	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57838	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57839        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57840$as_echo "yes" >&6; }
57841	FOUND_FREETYPE=yes
57842fi
57843            if test "x$FOUND_FREETYPE" = xyes; then
57844              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57845              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57846              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57847              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57848                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57849              fi
57850              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57851              if test "x$BUNDLE_FREETYPE" = xyes; then
57852                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57853$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57854                FOUND_FREETYPE=no
57855              else
57856                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57857$as_echo_n "checking for freetype... " >&6; }
57858                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57859$as_echo "yes (using pkg-config)" >&6; }
57860              fi
57861            fi
57862          fi
57863        fi
57864      fi
57865
57866      if test "x$FOUND_FREETYPE" != xyes; then
57867        # Check in well-known locations
57868        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57869          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57870
57871  windows_path="$FREETYPE_BASE_DIR"
57872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57873    unix_path=`$CYGPATH -u "$windows_path"`
57874    FREETYPE_BASE_DIR="$unix_path"
57875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57877    FREETYPE_BASE_DIR="$unix_path"
57878  fi
57879
57880
57881  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57882  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57883  METHOD="well-known location"
57884
57885  # Let's start with an optimistic view of the world :-)
57886  FOUND_FREETYPE=yes
57887
57888  # First look for the canonical freetype main include file ft2build.h.
57889  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57890    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57891    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57892    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57893      # Fail.
57894      FOUND_FREETYPE=no
57895    fi
57896  fi
57897
57898  if test "x$FOUND_FREETYPE" = xyes; then
57899    # Include file found, let's continue the sanity check.
57900    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57901$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57902
57903    # Reset to default value
57904    FREETYPE_BASE_NAME=freetype
57905    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57906    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57907      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57908          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57909        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57910        # for the .6 version explicitly.
57911        FREETYPE_BASE_NAME=freetype.6
57912        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57913        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57914$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57915      else
57916        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57917$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57918        FOUND_FREETYPE=no
57919      fi
57920    else
57921      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57922        # On Windows, we will need both .lib and .dll file.
57923        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57924          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57925$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57926          FOUND_FREETYPE=no
57927        fi
57928      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57929          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57930        # Found lib in isa dir, use that instead.
57931        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57932        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57933$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57934      fi
57935    fi
57936  fi
57937
57938  if test "x$FOUND_FREETYPE" = xyes; then
57939
57940  # Only process if variable expands to non-empty
57941
57942  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57943    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57944
57945  # Input might be given as Windows format, start by converting to
57946  # unix format.
57947  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57948  new_path=`$CYGPATH -u "$path"`
57949
57950  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57951  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57952  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57953  # "foo.exe" is OK but "foo" is an error.
57954  #
57955  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57956  # It is also a way to make sure we got the proper file name for the real test later on.
57957  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57958  if test "x$test_shortpath" = x; then
57959    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57960$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57961    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57962  fi
57963
57964  # Call helper function which possibly converts this using DOS-style short mode.
57965  # If so, the updated path is stored in $new_path.
57966
57967  input_path="$new_path"
57968  # Check if we need to convert this using DOS-style short mode. If the path
57969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57970  # take no chances and rewrite it.
57971  # Note: m4 eats our [], so we need to use [ and ] instead.
57972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57973  if test "x$has_forbidden_chars" != x; then
57974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57975    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57976    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57977    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57978      # Going to short mode and back again did indeed matter. Since short mode is
57979      # case insensitive, let's make it lowercase to improve readability.
57980      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57981      # Now convert it back to Unix-style (cygpath)
57982      input_path=`$CYGPATH -u "$shortmode_path"`
57983      new_path="$input_path"
57984    fi
57985  fi
57986
57987  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57988  if test "x$test_cygdrive_prefix" = x; then
57989    # As a simple fix, exclude /usr/bin since it's not a real path.
57990    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57991      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57992      # a path prefixed by /cygdrive for fixpath to work.
57993      new_path="$CYGWIN_ROOT_PATH$input_path"
57994    fi
57995  fi
57996
57997
57998  if test "x$path" != "x$new_path"; then
57999    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58000    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58001$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58002  fi
58003
58004    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58005
58006  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58007  has_colon=`$ECHO $path | $GREP ^.:`
58008  new_path="$path"
58009  if test "x$has_colon" = x; then
58010    # Not in mixed or Windows style, start by that.
58011    new_path=`cmd //c echo $path`
58012  fi
58013
58014
58015  input_path="$new_path"
58016  # Check if we need to convert this using DOS-style short mode. If the path
58017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58018  # take no chances and rewrite it.
58019  # Note: m4 eats our [], so we need to use [ and ] instead.
58020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58021  if test "x$has_forbidden_chars" != x; then
58022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58023    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58024  fi
58025
58026
58027  windows_path="$new_path"
58028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58029    unix_path=`$CYGPATH -u "$windows_path"`
58030    new_path="$unix_path"
58031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58033    new_path="$unix_path"
58034  fi
58035
58036  if test "x$path" != "x$new_path"; then
58037    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58038    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58039$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58040  fi
58041
58042  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58043  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58044
58045    else
58046      # We're on a unix platform. Hooray! :)
58047      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58048      has_space=`$ECHO "$path" | $GREP " "`
58049      if test "x$has_space" != x; then
58050        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58051$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58052        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58053      fi
58054
58055      # Use eval to expand a potential ~
58056      eval path="$path"
58057      if test ! -f "$path" && test ! -d "$path"; then
58058        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58059      fi
58060
58061      if test -d "$path"; then
58062        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58063      else
58064        dir="`$DIRNAME "$path"`"
58065        base="`$BASENAME "$path"`"
58066        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58067      fi
58068    fi
58069  fi
58070
58071
58072  # Only process if variable expands to non-empty
58073
58074  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58075    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58076
58077  # Input might be given as Windows format, start by converting to
58078  # unix format.
58079  path="$POTENTIAL_FREETYPE_LIB_PATH"
58080  new_path=`$CYGPATH -u "$path"`
58081
58082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58085  # "foo.exe" is OK but "foo" is an error.
58086  #
58087  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58088  # It is also a way to make sure we got the proper file name for the real test later on.
58089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58090  if test "x$test_shortpath" = x; then
58091    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58092$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58093    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58094  fi
58095
58096  # Call helper function which possibly converts this using DOS-style short mode.
58097  # If so, the updated path is stored in $new_path.
58098
58099  input_path="$new_path"
58100  # Check if we need to convert this using DOS-style short mode. If the path
58101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58102  # take no chances and rewrite it.
58103  # Note: m4 eats our [], so we need to use [ and ] instead.
58104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58105  if test "x$has_forbidden_chars" != x; then
58106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58107    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58108    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58109    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58110      # Going to short mode and back again did indeed matter. Since short mode is
58111      # case insensitive, let's make it lowercase to improve readability.
58112      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58113      # Now convert it back to Unix-style (cygpath)
58114      input_path=`$CYGPATH -u "$shortmode_path"`
58115      new_path="$input_path"
58116    fi
58117  fi
58118
58119  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58120  if test "x$test_cygdrive_prefix" = x; then
58121    # As a simple fix, exclude /usr/bin since it's not a real path.
58122    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58123      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58124      # a path prefixed by /cygdrive for fixpath to work.
58125      new_path="$CYGWIN_ROOT_PATH$input_path"
58126    fi
58127  fi
58128
58129
58130  if test "x$path" != "x$new_path"; then
58131    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58133$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58134  fi
58135
58136    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58137
58138  path="$POTENTIAL_FREETYPE_LIB_PATH"
58139  has_colon=`$ECHO $path | $GREP ^.:`
58140  new_path="$path"
58141  if test "x$has_colon" = x; then
58142    # Not in mixed or Windows style, start by that.
58143    new_path=`cmd //c echo $path`
58144  fi
58145
58146
58147  input_path="$new_path"
58148  # Check if we need to convert this using DOS-style short mode. If the path
58149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58150  # take no chances and rewrite it.
58151  # Note: m4 eats our [], so we need to use [ and ] instead.
58152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58153  if test "x$has_forbidden_chars" != x; then
58154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58155    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58156  fi
58157
58158
58159  windows_path="$new_path"
58160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58161    unix_path=`$CYGPATH -u "$windows_path"`
58162    new_path="$unix_path"
58163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58165    new_path="$unix_path"
58166  fi
58167
58168  if test "x$path" != "x$new_path"; then
58169    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58171$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58172  fi
58173
58174  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58175  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58176
58177    else
58178      # We're on a unix platform. Hooray! :)
58179      path="$POTENTIAL_FREETYPE_LIB_PATH"
58180      has_space=`$ECHO "$path" | $GREP " "`
58181      if test "x$has_space" != x; then
58182        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58183$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58184        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58185      fi
58186
58187      # Use eval to expand a potential ~
58188      eval path="$path"
58189      if test ! -f "$path" && test ! -d "$path"; then
58190        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58191      fi
58192
58193      if test -d "$path"; then
58194        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58195      else
58196        dir="`$DIRNAME "$path"`"
58197        base="`$BASENAME "$path"`"
58198        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58199      fi
58200    fi
58201  fi
58202
58203
58204    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58205    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58206$as_echo_n "checking for freetype includes... " >&6; }
58207    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58208$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58209    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58210    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58211$as_echo_n "checking for freetype libraries... " >&6; }
58212    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58213$as_echo "$FREETYPE_LIB_PATH" >&6; }
58214  fi
58215
58216          if test "x$FOUND_FREETYPE" != xyes; then
58217            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58218
58219  windows_path="$FREETYPE_BASE_DIR"
58220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58221    unix_path=`$CYGPATH -u "$windows_path"`
58222    FREETYPE_BASE_DIR="$unix_path"
58223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58225    FREETYPE_BASE_DIR="$unix_path"
58226  fi
58227
58228
58229  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58230  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58231  METHOD="well-known location"
58232
58233  # Let's start with an optimistic view of the world :-)
58234  FOUND_FREETYPE=yes
58235
58236  # First look for the canonical freetype main include file ft2build.h.
58237  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58238    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58239    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58240    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58241      # Fail.
58242      FOUND_FREETYPE=no
58243    fi
58244  fi
58245
58246  if test "x$FOUND_FREETYPE" = xyes; then
58247    # Include file found, let's continue the sanity check.
58248    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58249$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58250
58251    # Reset to default value
58252    FREETYPE_BASE_NAME=freetype
58253    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58254    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58255      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58256          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58257        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58258        # for the .6 version explicitly.
58259        FREETYPE_BASE_NAME=freetype.6
58260        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58261        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58262$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58263      else
58264        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58265$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58266        FOUND_FREETYPE=no
58267      fi
58268    else
58269      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58270        # On Windows, we will need both .lib and .dll file.
58271        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58272          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58273$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58274          FOUND_FREETYPE=no
58275        fi
58276      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58277          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58278        # Found lib in isa dir, use that instead.
58279        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58280        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58281$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58282      fi
58283    fi
58284  fi
58285
58286  if test "x$FOUND_FREETYPE" = xyes; then
58287
58288  # Only process if variable expands to non-empty
58289
58290  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58291    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58292
58293  # Input might be given as Windows format, start by converting to
58294  # unix format.
58295  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58296  new_path=`$CYGPATH -u "$path"`
58297
58298  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58299  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58300  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58301  # "foo.exe" is OK but "foo" is an error.
58302  #
58303  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58304  # It is also a way to make sure we got the proper file name for the real test later on.
58305  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58306  if test "x$test_shortpath" = x; then
58307    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58308$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58309    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58310  fi
58311
58312  # Call helper function which possibly converts this using DOS-style short mode.
58313  # If so, the updated path is stored in $new_path.
58314
58315  input_path="$new_path"
58316  # Check if we need to convert this using DOS-style short mode. If the path
58317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58318  # take no chances and rewrite it.
58319  # Note: m4 eats our [], so we need to use [ and ] instead.
58320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58321  if test "x$has_forbidden_chars" != x; then
58322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58323    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58324    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58325    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58326      # Going to short mode and back again did indeed matter. Since short mode is
58327      # case insensitive, let's make it lowercase to improve readability.
58328      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58329      # Now convert it back to Unix-style (cygpath)
58330      input_path=`$CYGPATH -u "$shortmode_path"`
58331      new_path="$input_path"
58332    fi
58333  fi
58334
58335  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58336  if test "x$test_cygdrive_prefix" = x; then
58337    # As a simple fix, exclude /usr/bin since it's not a real path.
58338    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58339      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58340      # a path prefixed by /cygdrive for fixpath to work.
58341      new_path="$CYGWIN_ROOT_PATH$input_path"
58342    fi
58343  fi
58344
58345
58346  if test "x$path" != "x$new_path"; then
58347    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58348    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58349$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58350  fi
58351
58352    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58353
58354  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58355  has_colon=`$ECHO $path | $GREP ^.:`
58356  new_path="$path"
58357  if test "x$has_colon" = x; then
58358    # Not in mixed or Windows style, start by that.
58359    new_path=`cmd //c echo $path`
58360  fi
58361
58362
58363  input_path="$new_path"
58364  # Check if we need to convert this using DOS-style short mode. If the path
58365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58366  # take no chances and rewrite it.
58367  # Note: m4 eats our [], so we need to use [ and ] instead.
58368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58369  if test "x$has_forbidden_chars" != x; then
58370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58371    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58372  fi
58373
58374
58375  windows_path="$new_path"
58376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58377    unix_path=`$CYGPATH -u "$windows_path"`
58378    new_path="$unix_path"
58379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58381    new_path="$unix_path"
58382  fi
58383
58384  if test "x$path" != "x$new_path"; then
58385    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58386    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58387$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58388  fi
58389
58390  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58391  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58392
58393    else
58394      # We're on a unix platform. Hooray! :)
58395      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58396      has_space=`$ECHO "$path" | $GREP " "`
58397      if test "x$has_space" != x; then
58398        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58399$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58400        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58401      fi
58402
58403      # Use eval to expand a potential ~
58404      eval path="$path"
58405      if test ! -f "$path" && test ! -d "$path"; then
58406        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58407      fi
58408
58409      if test -d "$path"; then
58410        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58411      else
58412        dir="`$DIRNAME "$path"`"
58413        base="`$BASENAME "$path"`"
58414        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58415      fi
58416    fi
58417  fi
58418
58419
58420  # Only process if variable expands to non-empty
58421
58422  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58423    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58424
58425  # Input might be given as Windows format, start by converting to
58426  # unix format.
58427  path="$POTENTIAL_FREETYPE_LIB_PATH"
58428  new_path=`$CYGPATH -u "$path"`
58429
58430  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58431  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58432  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58433  # "foo.exe" is OK but "foo" is an error.
58434  #
58435  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58436  # It is also a way to make sure we got the proper file name for the real test later on.
58437  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58438  if test "x$test_shortpath" = x; then
58439    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58440$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58441    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58442  fi
58443
58444  # Call helper function which possibly converts this using DOS-style short mode.
58445  # If so, the updated path is stored in $new_path.
58446
58447  input_path="$new_path"
58448  # Check if we need to convert this using DOS-style short mode. If the path
58449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58450  # take no chances and rewrite it.
58451  # Note: m4 eats our [], so we need to use [ and ] instead.
58452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58453  if test "x$has_forbidden_chars" != x; then
58454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58455    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58456    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58457    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58458      # Going to short mode and back again did indeed matter. Since short mode is
58459      # case insensitive, let's make it lowercase to improve readability.
58460      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58461      # Now convert it back to Unix-style (cygpath)
58462      input_path=`$CYGPATH -u "$shortmode_path"`
58463      new_path="$input_path"
58464    fi
58465  fi
58466
58467  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58468  if test "x$test_cygdrive_prefix" = x; then
58469    # As a simple fix, exclude /usr/bin since it's not a real path.
58470    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58471      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58472      # a path prefixed by /cygdrive for fixpath to work.
58473      new_path="$CYGWIN_ROOT_PATH$input_path"
58474    fi
58475  fi
58476
58477
58478  if test "x$path" != "x$new_path"; then
58479    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58481$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58482  fi
58483
58484    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58485
58486  path="$POTENTIAL_FREETYPE_LIB_PATH"
58487  has_colon=`$ECHO $path | $GREP ^.:`
58488  new_path="$path"
58489  if test "x$has_colon" = x; then
58490    # Not in mixed or Windows style, start by that.
58491    new_path=`cmd //c echo $path`
58492  fi
58493
58494
58495  input_path="$new_path"
58496  # Check if we need to convert this using DOS-style short mode. If the path
58497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58498  # take no chances and rewrite it.
58499  # Note: m4 eats our [], so we need to use [ and ] instead.
58500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58501  if test "x$has_forbidden_chars" != x; then
58502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58503    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58504  fi
58505
58506
58507  windows_path="$new_path"
58508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58509    unix_path=`$CYGPATH -u "$windows_path"`
58510    new_path="$unix_path"
58511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58513    new_path="$unix_path"
58514  fi
58515
58516  if test "x$path" != "x$new_path"; then
58517    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58518    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58519$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58520  fi
58521
58522  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58523  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58524
58525    else
58526      # We're on a unix platform. Hooray! :)
58527      path="$POTENTIAL_FREETYPE_LIB_PATH"
58528      has_space=`$ECHO "$path" | $GREP " "`
58529      if test "x$has_space" != x; then
58530        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58531$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58532        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58533      fi
58534
58535      # Use eval to expand a potential ~
58536      eval path="$path"
58537      if test ! -f "$path" && test ! -d "$path"; then
58538        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58539      fi
58540
58541      if test -d "$path"; then
58542        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58543      else
58544        dir="`$DIRNAME "$path"`"
58545        base="`$BASENAME "$path"`"
58546        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58547      fi
58548    fi
58549  fi
58550
58551
58552    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58553    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58554$as_echo_n "checking for freetype includes... " >&6; }
58555    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58556$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58557    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58558    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58559$as_echo_n "checking for freetype libraries... " >&6; }
58560    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58561$as_echo "$FREETYPE_LIB_PATH" >&6; }
58562  fi
58563
58564          fi
58565          if test "x$FOUND_FREETYPE" != xyes; then
58566            FREETYPE_BASE_DIR="$HOME/freetype"
58567
58568  windows_path="$FREETYPE_BASE_DIR"
58569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58570    unix_path=`$CYGPATH -u "$windows_path"`
58571    FREETYPE_BASE_DIR="$unix_path"
58572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58574    FREETYPE_BASE_DIR="$unix_path"
58575  fi
58576
58577            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58578
58579  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58580  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58581  METHOD="well-known location"
58582
58583  # Let's start with an optimistic view of the world :-)
58584  FOUND_FREETYPE=yes
58585
58586  # First look for the canonical freetype main include file ft2build.h.
58587  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58588    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58589    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58590    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58591      # Fail.
58592      FOUND_FREETYPE=no
58593    fi
58594  fi
58595
58596  if test "x$FOUND_FREETYPE" = xyes; then
58597    # Include file found, let's continue the sanity check.
58598    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58599$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58600
58601    # Reset to default value
58602    FREETYPE_BASE_NAME=freetype
58603    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58604    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58605      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58606          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58607        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58608        # for the .6 version explicitly.
58609        FREETYPE_BASE_NAME=freetype.6
58610        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58611        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58612$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58613      else
58614        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58615$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58616        FOUND_FREETYPE=no
58617      fi
58618    else
58619      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58620        # On Windows, we will need both .lib and .dll file.
58621        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58622          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58623$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58624          FOUND_FREETYPE=no
58625        fi
58626      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58627          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58628        # Found lib in isa dir, use that instead.
58629        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58630        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58631$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58632      fi
58633    fi
58634  fi
58635
58636  if test "x$FOUND_FREETYPE" = xyes; then
58637
58638  # Only process if variable expands to non-empty
58639
58640  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58641    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58642
58643  # Input might be given as Windows format, start by converting to
58644  # unix format.
58645  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58646  new_path=`$CYGPATH -u "$path"`
58647
58648  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58649  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58650  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58651  # "foo.exe" is OK but "foo" is an error.
58652  #
58653  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58654  # It is also a way to make sure we got the proper file name for the real test later on.
58655  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58656  if test "x$test_shortpath" = x; then
58657    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58658$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58659    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58660  fi
58661
58662  # Call helper function which possibly converts this using DOS-style short mode.
58663  # If so, the updated path is stored in $new_path.
58664
58665  input_path="$new_path"
58666  # Check if we need to convert this using DOS-style short mode. If the path
58667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58668  # take no chances and rewrite it.
58669  # Note: m4 eats our [], so we need to use [ and ] instead.
58670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58671  if test "x$has_forbidden_chars" != x; then
58672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58673    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58674    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58675    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58676      # Going to short mode and back again did indeed matter. Since short mode is
58677      # case insensitive, let's make it lowercase to improve readability.
58678      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58679      # Now convert it back to Unix-style (cygpath)
58680      input_path=`$CYGPATH -u "$shortmode_path"`
58681      new_path="$input_path"
58682    fi
58683  fi
58684
58685  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58686  if test "x$test_cygdrive_prefix" = x; then
58687    # As a simple fix, exclude /usr/bin since it's not a real path.
58688    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58689      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58690      # a path prefixed by /cygdrive for fixpath to work.
58691      new_path="$CYGWIN_ROOT_PATH$input_path"
58692    fi
58693  fi
58694
58695
58696  if test "x$path" != "x$new_path"; then
58697    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58699$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58700  fi
58701
58702    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58703
58704  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58705  has_colon=`$ECHO $path | $GREP ^.:`
58706  new_path="$path"
58707  if test "x$has_colon" = x; then
58708    # Not in mixed or Windows style, start by that.
58709    new_path=`cmd //c echo $path`
58710  fi
58711
58712
58713  input_path="$new_path"
58714  # Check if we need to convert this using DOS-style short mode. If the path
58715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58716  # take no chances and rewrite it.
58717  # Note: m4 eats our [], so we need to use [ and ] instead.
58718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58719  if test "x$has_forbidden_chars" != x; then
58720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58721    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58722  fi
58723
58724
58725  windows_path="$new_path"
58726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58727    unix_path=`$CYGPATH -u "$windows_path"`
58728    new_path="$unix_path"
58729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58731    new_path="$unix_path"
58732  fi
58733
58734  if test "x$path" != "x$new_path"; then
58735    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58737$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58738  fi
58739
58740  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58741  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58742
58743    else
58744      # We're on a unix platform. Hooray! :)
58745      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58746      has_space=`$ECHO "$path" | $GREP " "`
58747      if test "x$has_space" != x; then
58748        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58749$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58750        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58751      fi
58752
58753      # Use eval to expand a potential ~
58754      eval path="$path"
58755      if test ! -f "$path" && test ! -d "$path"; then
58756        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58757      fi
58758
58759      if test -d "$path"; then
58760        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58761      else
58762        dir="`$DIRNAME "$path"`"
58763        base="`$BASENAME "$path"`"
58764        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58765      fi
58766    fi
58767  fi
58768
58769
58770  # Only process if variable expands to non-empty
58771
58772  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58773    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58774
58775  # Input might be given as Windows format, start by converting to
58776  # unix format.
58777  path="$POTENTIAL_FREETYPE_LIB_PATH"
58778  new_path=`$CYGPATH -u "$path"`
58779
58780  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58781  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58782  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58783  # "foo.exe" is OK but "foo" is an error.
58784  #
58785  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58786  # It is also a way to make sure we got the proper file name for the real test later on.
58787  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58788  if test "x$test_shortpath" = x; then
58789    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58790$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58791    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58792  fi
58793
58794  # Call helper function which possibly converts this using DOS-style short mode.
58795  # If so, the updated path is stored in $new_path.
58796
58797  input_path="$new_path"
58798  # Check if we need to convert this using DOS-style short mode. If the path
58799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58800  # take no chances and rewrite it.
58801  # Note: m4 eats our [], so we need to use [ and ] instead.
58802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58803  if test "x$has_forbidden_chars" != x; then
58804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58805    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58806    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58807    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58808      # Going to short mode and back again did indeed matter. Since short mode is
58809      # case insensitive, let's make it lowercase to improve readability.
58810      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58811      # Now convert it back to Unix-style (cygpath)
58812      input_path=`$CYGPATH -u "$shortmode_path"`
58813      new_path="$input_path"
58814    fi
58815  fi
58816
58817  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58818  if test "x$test_cygdrive_prefix" = x; then
58819    # As a simple fix, exclude /usr/bin since it's not a real path.
58820    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58821      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58822      # a path prefixed by /cygdrive for fixpath to work.
58823      new_path="$CYGWIN_ROOT_PATH$input_path"
58824    fi
58825  fi
58826
58827
58828  if test "x$path" != "x$new_path"; then
58829    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58831$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58832  fi
58833
58834    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58835
58836  path="$POTENTIAL_FREETYPE_LIB_PATH"
58837  has_colon=`$ECHO $path | $GREP ^.:`
58838  new_path="$path"
58839  if test "x$has_colon" = x; then
58840    # Not in mixed or Windows style, start by that.
58841    new_path=`cmd //c echo $path`
58842  fi
58843
58844
58845  input_path="$new_path"
58846  # Check if we need to convert this using DOS-style short mode. If the path
58847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58848  # take no chances and rewrite it.
58849  # Note: m4 eats our [], so we need to use [ and ] instead.
58850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58851  if test "x$has_forbidden_chars" != x; then
58852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58853    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58854  fi
58855
58856
58857  windows_path="$new_path"
58858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58859    unix_path=`$CYGPATH -u "$windows_path"`
58860    new_path="$unix_path"
58861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58863    new_path="$unix_path"
58864  fi
58865
58866  if test "x$path" != "x$new_path"; then
58867    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58869$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58870  fi
58871
58872  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58873  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58874
58875    else
58876      # We're on a unix platform. Hooray! :)
58877      path="$POTENTIAL_FREETYPE_LIB_PATH"
58878      has_space=`$ECHO "$path" | $GREP " "`
58879      if test "x$has_space" != x; then
58880        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58881$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58882        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58883      fi
58884
58885      # Use eval to expand a potential ~
58886      eval path="$path"
58887      if test ! -f "$path" && test ! -d "$path"; then
58888        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58889      fi
58890
58891      if test -d "$path"; then
58892        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58893      else
58894        dir="`$DIRNAME "$path"`"
58895        base="`$BASENAME "$path"`"
58896        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58897      fi
58898    fi
58899  fi
58900
58901
58902    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58903    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58904$as_echo_n "checking for freetype includes... " >&6; }
58905    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58906$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58907    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58908    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58909$as_echo_n "checking for freetype libraries... " >&6; }
58910    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58911$as_echo "$FREETYPE_LIB_PATH" >&6; }
58912  fi
58913
58914            else
58915
58916  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58917  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58918  METHOD="well-known location"
58919
58920  # Let's start with an optimistic view of the world :-)
58921  FOUND_FREETYPE=yes
58922
58923  # First look for the canonical freetype main include file ft2build.h.
58924  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58925    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58926    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58927    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58928      # Fail.
58929      FOUND_FREETYPE=no
58930    fi
58931  fi
58932
58933  if test "x$FOUND_FREETYPE" = xyes; then
58934    # Include file found, let's continue the sanity check.
58935    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58936$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58937
58938    # Reset to default value
58939    FREETYPE_BASE_NAME=freetype
58940    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58941    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58942      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58943          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58944        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58945        # for the .6 version explicitly.
58946        FREETYPE_BASE_NAME=freetype.6
58947        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58948        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58949$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58950      else
58951        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58952$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58953        FOUND_FREETYPE=no
58954      fi
58955    else
58956      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58957        # On Windows, we will need both .lib and .dll file.
58958        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58959          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58960$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58961          FOUND_FREETYPE=no
58962        fi
58963      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58964          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58965        # Found lib in isa dir, use that instead.
58966        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58967        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58968$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58969      fi
58970    fi
58971  fi
58972
58973  if test "x$FOUND_FREETYPE" = xyes; then
58974
58975  # Only process if variable expands to non-empty
58976
58977  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58978    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58979
58980  # Input might be given as Windows format, start by converting to
58981  # unix format.
58982  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58983  new_path=`$CYGPATH -u "$path"`
58984
58985  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58986  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58987  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58988  # "foo.exe" is OK but "foo" is an error.
58989  #
58990  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58991  # It is also a way to make sure we got the proper file name for the real test later on.
58992  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58993  if test "x$test_shortpath" = x; then
58994    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58995$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58996    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58997  fi
58998
58999  # Call helper function which possibly converts this using DOS-style short mode.
59000  # If so, the updated path is stored in $new_path.
59001
59002  input_path="$new_path"
59003  # Check if we need to convert this using DOS-style short mode. If the path
59004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59005  # take no chances and rewrite it.
59006  # Note: m4 eats our [], so we need to use [ and ] instead.
59007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59008  if test "x$has_forbidden_chars" != x; then
59009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59010    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59011    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59012    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59013      # Going to short mode and back again did indeed matter. Since short mode is
59014      # case insensitive, let's make it lowercase to improve readability.
59015      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59016      # Now convert it back to Unix-style (cygpath)
59017      input_path=`$CYGPATH -u "$shortmode_path"`
59018      new_path="$input_path"
59019    fi
59020  fi
59021
59022  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59023  if test "x$test_cygdrive_prefix" = x; then
59024    # As a simple fix, exclude /usr/bin since it's not a real path.
59025    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59026      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59027      # a path prefixed by /cygdrive for fixpath to work.
59028      new_path="$CYGWIN_ROOT_PATH$input_path"
59029    fi
59030  fi
59031
59032
59033  if test "x$path" != "x$new_path"; then
59034    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59036$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59037  fi
59038
59039    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59040
59041  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59042  has_colon=`$ECHO $path | $GREP ^.:`
59043  new_path="$path"
59044  if test "x$has_colon" = x; then
59045    # Not in mixed or Windows style, start by that.
59046    new_path=`cmd //c echo $path`
59047  fi
59048
59049
59050  input_path="$new_path"
59051  # Check if we need to convert this using DOS-style short mode. If the path
59052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59053  # take no chances and rewrite it.
59054  # Note: m4 eats our [], so we need to use [ and ] instead.
59055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59056  if test "x$has_forbidden_chars" != x; then
59057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59058    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59059  fi
59060
59061
59062  windows_path="$new_path"
59063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59064    unix_path=`$CYGPATH -u "$windows_path"`
59065    new_path="$unix_path"
59066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59068    new_path="$unix_path"
59069  fi
59070
59071  if test "x$path" != "x$new_path"; then
59072    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59074$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59075  fi
59076
59077  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59078  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59079
59080    else
59081      # We're on a unix platform. Hooray! :)
59082      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59083      has_space=`$ECHO "$path" | $GREP " "`
59084      if test "x$has_space" != x; then
59085        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59086$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59087        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59088      fi
59089
59090      # Use eval to expand a potential ~
59091      eval path="$path"
59092      if test ! -f "$path" && test ! -d "$path"; then
59093        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59094      fi
59095
59096      if test -d "$path"; then
59097        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59098      else
59099        dir="`$DIRNAME "$path"`"
59100        base="`$BASENAME "$path"`"
59101        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59102      fi
59103    fi
59104  fi
59105
59106
59107  # Only process if variable expands to non-empty
59108
59109  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59110    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59111
59112  # Input might be given as Windows format, start by converting to
59113  # unix format.
59114  path="$POTENTIAL_FREETYPE_LIB_PATH"
59115  new_path=`$CYGPATH -u "$path"`
59116
59117  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59118  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59119  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59120  # "foo.exe" is OK but "foo" is an error.
59121  #
59122  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59123  # It is also a way to make sure we got the proper file name for the real test later on.
59124  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59125  if test "x$test_shortpath" = x; then
59126    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59127$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59128    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59129  fi
59130
59131  # Call helper function which possibly converts this using DOS-style short mode.
59132  # If so, the updated path is stored in $new_path.
59133
59134  input_path="$new_path"
59135  # Check if we need to convert this using DOS-style short mode. If the path
59136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59137  # take no chances and rewrite it.
59138  # Note: m4 eats our [], so we need to use [ and ] instead.
59139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59140  if test "x$has_forbidden_chars" != x; then
59141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59142    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59143    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59144    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59145      # Going to short mode and back again did indeed matter. Since short mode is
59146      # case insensitive, let's make it lowercase to improve readability.
59147      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59148      # Now convert it back to Unix-style (cygpath)
59149      input_path=`$CYGPATH -u "$shortmode_path"`
59150      new_path="$input_path"
59151    fi
59152  fi
59153
59154  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59155  if test "x$test_cygdrive_prefix" = x; then
59156    # As a simple fix, exclude /usr/bin since it's not a real path.
59157    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59158      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59159      # a path prefixed by /cygdrive for fixpath to work.
59160      new_path="$CYGWIN_ROOT_PATH$input_path"
59161    fi
59162  fi
59163
59164
59165  if test "x$path" != "x$new_path"; then
59166    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59167    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59168$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59169  fi
59170
59171    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59172
59173  path="$POTENTIAL_FREETYPE_LIB_PATH"
59174  has_colon=`$ECHO $path | $GREP ^.:`
59175  new_path="$path"
59176  if test "x$has_colon" = x; then
59177    # Not in mixed or Windows style, start by that.
59178    new_path=`cmd //c echo $path`
59179  fi
59180
59181
59182  input_path="$new_path"
59183  # Check if we need to convert this using DOS-style short mode. If the path
59184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59185  # take no chances and rewrite it.
59186  # Note: m4 eats our [], so we need to use [ and ] instead.
59187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59188  if test "x$has_forbidden_chars" != x; then
59189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59190    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59191  fi
59192
59193
59194  windows_path="$new_path"
59195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59196    unix_path=`$CYGPATH -u "$windows_path"`
59197    new_path="$unix_path"
59198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59200    new_path="$unix_path"
59201  fi
59202
59203  if test "x$path" != "x$new_path"; then
59204    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59206$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59207  fi
59208
59209  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59210  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59211
59212    else
59213      # We're on a unix platform. Hooray! :)
59214      path="$POTENTIAL_FREETYPE_LIB_PATH"
59215      has_space=`$ECHO "$path" | $GREP " "`
59216      if test "x$has_space" != x; then
59217        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59218$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59219        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59220      fi
59221
59222      # Use eval to expand a potential ~
59223      eval path="$path"
59224      if test ! -f "$path" && test ! -d "$path"; then
59225        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59226      fi
59227
59228      if test -d "$path"; then
59229        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59230      else
59231        dir="`$DIRNAME "$path"`"
59232        base="`$BASENAME "$path"`"
59233        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59234      fi
59235    fi
59236  fi
59237
59238
59239    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59240    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59241$as_echo_n "checking for freetype includes... " >&6; }
59242    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59243$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59244    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59245    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59246$as_echo_n "checking for freetype libraries... " >&6; }
59247    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59248$as_echo "$FREETYPE_LIB_PATH" >&6; }
59249  fi
59250
59251            fi
59252            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59253                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59254              # Source is available, as a last resort try to build freetype in default location
59255
59256  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59257  BUILD_FREETYPE=yes
59258
59259  # Check if the freetype sources are acessible..
59260  if ! test -d $FREETYPE_SRC_PATH; then
59261    { $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
59262$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59263    BUILD_FREETYPE=no
59264  fi
59265  # ..and contain a vc2010 project file
59266  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59267  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59268    { $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
59269$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59270    BUILD_FREETYPE=no
59271  fi
59272  # Now check if configure found a version of 'msbuild.exe'
59273  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59274    { $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
59275$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;}
59276    BUILD_FREETYPE=no
59277  fi
59278
59279  # Ready to go..
59280  if test "x$BUILD_FREETYPE" = xyes; then
59281    # msbuild requires trailing slashes for output directories
59282    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59283    freetype_lib_path_unix="$freetype_lib_path"
59284    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59285
59286  unix_path="$vcxproj_path"
59287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59288    windows_path=`$CYGPATH -m "$unix_path"`
59289    vcxproj_path="$windows_path"
59290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59291    windows_path=`cmd //c echo $unix_path`
59292    vcxproj_path="$windows_path"
59293  fi
59294
59295
59296  unix_path="$freetype_lib_path"
59297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59298    windows_path=`$CYGPATH -m "$unix_path"`
59299    freetype_lib_path="$windows_path"
59300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59301    windows_path=`cmd //c echo $unix_path`
59302    freetype_lib_path="$windows_path"
59303  fi
59304
59305
59306  unix_path="$freetype_obj_path"
59307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59308    windows_path=`$CYGPATH -m "$unix_path"`
59309    freetype_obj_path="$windows_path"
59310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59311    windows_path=`cmd //c echo $unix_path`
59312    freetype_obj_path="$windows_path"
59313  fi
59314
59315    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59316      freetype_platform=x64
59317    else
59318      freetype_platform=win32
59319    fi
59320
59321    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59322    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59323    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59324    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59325    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59326$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59327
59328    # First we try to build the freetype.dll
59329    $ECHO -e "@echo off\n"\
59330        "$MSBUILD $vcxproj_path "\
59331        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59332        "/p:Configuration=\"Release Multithreaded\" "\
59333        "/p:Platform=$freetype_platform "\
59334        "/p:ConfigurationType=DynamicLibrary "\
59335        "/p:TargetName=freetype "\
59336        "/p:OutDir=\"$freetype_lib_path\" "\
59337        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59338    cmd /c freetype.bat
59339
59340    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59341      # If that succeeds we also build freetype.lib
59342      $ECHO -e "@echo off\n"\
59343          "$MSBUILD $vcxproj_path "\
59344          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59345          "/p:Configuration=\"Release Multithreaded\" "\
59346          "/p:Platform=$freetype_platform "\
59347          "/p:ConfigurationType=StaticLibrary "\
59348          "/p:TargetName=freetype "\
59349          "/p:OutDir=\"$freetype_lib_path\" "\
59350          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59351      cmd /c freetype.bat
59352
59353      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59354        # Once we build both, lib and dll, set freetype lib and include path appropriately
59355        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59356        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59357        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59358$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59359      else
59360        BUILD_FREETYPE=no
59361      fi
59362    else
59363      BUILD_FREETYPE=no
59364    fi
59365  fi
59366
59367              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59368
59369  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59370  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59371  METHOD="well-known location"
59372
59373  # Let's start with an optimistic view of the world :-)
59374  FOUND_FREETYPE=yes
59375
59376  # First look for the canonical freetype main include file ft2build.h.
59377  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59378    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59379    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59380    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59381      # Fail.
59382      FOUND_FREETYPE=no
59383    fi
59384  fi
59385
59386  if test "x$FOUND_FREETYPE" = xyes; then
59387    # Include file found, let's continue the sanity check.
59388    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59389$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59390
59391    # Reset to default value
59392    FREETYPE_BASE_NAME=freetype
59393    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59394    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59395      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59396          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59397        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59398        # for the .6 version explicitly.
59399        FREETYPE_BASE_NAME=freetype.6
59400        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59401        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59402$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59403      else
59404        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59405$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59406        FOUND_FREETYPE=no
59407      fi
59408    else
59409      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59410        # On Windows, we will need both .lib and .dll file.
59411        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59412          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59413$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59414          FOUND_FREETYPE=no
59415        fi
59416      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59417          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59418        # Found lib in isa dir, use that instead.
59419        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59420        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59421$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59422      fi
59423    fi
59424  fi
59425
59426  if test "x$FOUND_FREETYPE" = xyes; then
59427
59428  # Only process if variable expands to non-empty
59429
59430  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59431    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59432
59433  # Input might be given as Windows format, start by converting to
59434  # unix format.
59435  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59436  new_path=`$CYGPATH -u "$path"`
59437
59438  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59439  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59440  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59441  # "foo.exe" is OK but "foo" is an error.
59442  #
59443  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59444  # It is also a way to make sure we got the proper file name for the real test later on.
59445  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59446  if test "x$test_shortpath" = x; then
59447    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59448$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59449    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59450  fi
59451
59452  # Call helper function which possibly converts this using DOS-style short mode.
59453  # If so, the updated path is stored in $new_path.
59454
59455  input_path="$new_path"
59456  # Check if we need to convert this using DOS-style short mode. If the path
59457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59458  # take no chances and rewrite it.
59459  # Note: m4 eats our [], so we need to use [ and ] instead.
59460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59461  if test "x$has_forbidden_chars" != x; then
59462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59466      # Going to short mode and back again did indeed matter. Since short mode is
59467      # case insensitive, let's make it lowercase to improve readability.
59468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59469      # Now convert it back to Unix-style (cygpath)
59470      input_path=`$CYGPATH -u "$shortmode_path"`
59471      new_path="$input_path"
59472    fi
59473  fi
59474
59475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59476  if test "x$test_cygdrive_prefix" = x; then
59477    # As a simple fix, exclude /usr/bin since it's not a real path.
59478    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59480      # a path prefixed by /cygdrive for fixpath to work.
59481      new_path="$CYGWIN_ROOT_PATH$input_path"
59482    fi
59483  fi
59484
59485
59486  if test "x$path" != "x$new_path"; then
59487    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59489$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59490  fi
59491
59492    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59493
59494  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59495  has_colon=`$ECHO $path | $GREP ^.:`
59496  new_path="$path"
59497  if test "x$has_colon" = x; then
59498    # Not in mixed or Windows style, start by that.
59499    new_path=`cmd //c echo $path`
59500  fi
59501
59502
59503  input_path="$new_path"
59504  # Check if we need to convert this using DOS-style short mode. If the path
59505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59506  # take no chances and rewrite it.
59507  # Note: m4 eats our [], so we need to use [ and ] instead.
59508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59509  if test "x$has_forbidden_chars" != x; then
59510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59511    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59512  fi
59513
59514
59515  windows_path="$new_path"
59516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59517    unix_path=`$CYGPATH -u "$windows_path"`
59518    new_path="$unix_path"
59519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59521    new_path="$unix_path"
59522  fi
59523
59524  if test "x$path" != "x$new_path"; then
59525    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59527$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59528  fi
59529
59530  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59531  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59532
59533    else
59534      # We're on a unix platform. Hooray! :)
59535      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59536      has_space=`$ECHO "$path" | $GREP " "`
59537      if test "x$has_space" != x; then
59538        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59539$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59540        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59541      fi
59542
59543      # Use eval to expand a potential ~
59544      eval path="$path"
59545      if test ! -f "$path" && test ! -d "$path"; then
59546        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59547      fi
59548
59549      if test -d "$path"; then
59550        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59551      else
59552        dir="`$DIRNAME "$path"`"
59553        base="`$BASENAME "$path"`"
59554        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59555      fi
59556    fi
59557  fi
59558
59559
59560  # Only process if variable expands to non-empty
59561
59562  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59563    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59564
59565  # Input might be given as Windows format, start by converting to
59566  # unix format.
59567  path="$POTENTIAL_FREETYPE_LIB_PATH"
59568  new_path=`$CYGPATH -u "$path"`
59569
59570  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59571  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59572  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59573  # "foo.exe" is OK but "foo" is an error.
59574  #
59575  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59576  # It is also a way to make sure we got the proper file name for the real test later on.
59577  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59578  if test "x$test_shortpath" = x; then
59579    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59580$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59581    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59582  fi
59583
59584  # Call helper function which possibly converts this using DOS-style short mode.
59585  # If so, the updated path is stored in $new_path.
59586
59587  input_path="$new_path"
59588  # Check if we need to convert this using DOS-style short mode. If the path
59589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59590  # take no chances and rewrite it.
59591  # Note: m4 eats our [], so we need to use [ and ] instead.
59592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59593  if test "x$has_forbidden_chars" != x; then
59594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59595    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59596    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59597    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59598      # Going to short mode and back again did indeed matter. Since short mode is
59599      # case insensitive, let's make it lowercase to improve readability.
59600      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59601      # Now convert it back to Unix-style (cygpath)
59602      input_path=`$CYGPATH -u "$shortmode_path"`
59603      new_path="$input_path"
59604    fi
59605  fi
59606
59607  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59608  if test "x$test_cygdrive_prefix" = x; then
59609    # As a simple fix, exclude /usr/bin since it's not a real path.
59610    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59611      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59612      # a path prefixed by /cygdrive for fixpath to work.
59613      new_path="$CYGWIN_ROOT_PATH$input_path"
59614    fi
59615  fi
59616
59617
59618  if test "x$path" != "x$new_path"; then
59619    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59620    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59621$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59622  fi
59623
59624    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59625
59626  path="$POTENTIAL_FREETYPE_LIB_PATH"
59627  has_colon=`$ECHO $path | $GREP ^.:`
59628  new_path="$path"
59629  if test "x$has_colon" = x; then
59630    # Not in mixed or Windows style, start by that.
59631    new_path=`cmd //c echo $path`
59632  fi
59633
59634
59635  input_path="$new_path"
59636  # Check if we need to convert this using DOS-style short mode. If the path
59637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59638  # take no chances and rewrite it.
59639  # Note: m4 eats our [], so we need to use [ and ] instead.
59640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59641  if test "x$has_forbidden_chars" != x; then
59642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59643    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59644  fi
59645
59646
59647  windows_path="$new_path"
59648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59649    unix_path=`$CYGPATH -u "$windows_path"`
59650    new_path="$unix_path"
59651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59653    new_path="$unix_path"
59654  fi
59655
59656  if test "x$path" != "x$new_path"; then
59657    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59658    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59659$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59660  fi
59661
59662  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59663  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59664
59665    else
59666      # We're on a unix platform. Hooray! :)
59667      path="$POTENTIAL_FREETYPE_LIB_PATH"
59668      has_space=`$ECHO "$path" | $GREP " "`
59669      if test "x$has_space" != x; then
59670        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59671$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59672        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59673      fi
59674
59675      # Use eval to expand a potential ~
59676      eval path="$path"
59677      if test ! -f "$path" && test ! -d "$path"; then
59678        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59679      fi
59680
59681      if test -d "$path"; then
59682        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59683      else
59684        dir="`$DIRNAME "$path"`"
59685        base="`$BASENAME "$path"`"
59686        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59687      fi
59688    fi
59689  fi
59690
59691
59692    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59693    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59694$as_echo_n "checking for freetype includes... " >&6; }
59695    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59696$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59697    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59698    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59699$as_echo_n "checking for freetype libraries... " >&6; }
59700    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59701$as_echo "$FREETYPE_LIB_PATH" >&6; }
59702  fi
59703
59704              else
59705
59706  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59707  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59708  METHOD="well-known location"
59709
59710  # Let's start with an optimistic view of the world :-)
59711  FOUND_FREETYPE=yes
59712
59713  # First look for the canonical freetype main include file ft2build.h.
59714  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59715    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59716    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59717    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59718      # Fail.
59719      FOUND_FREETYPE=no
59720    fi
59721  fi
59722
59723  if test "x$FOUND_FREETYPE" = xyes; then
59724    # Include file found, let's continue the sanity check.
59725    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59726$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59727
59728    # Reset to default value
59729    FREETYPE_BASE_NAME=freetype
59730    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59731    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59732      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59733          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59734        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59735        # for the .6 version explicitly.
59736        FREETYPE_BASE_NAME=freetype.6
59737        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59738        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59739$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59740      else
59741        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59742$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59743        FOUND_FREETYPE=no
59744      fi
59745    else
59746      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59747        # On Windows, we will need both .lib and .dll file.
59748        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59749          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59750$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59751          FOUND_FREETYPE=no
59752        fi
59753      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59754          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59755        # Found lib in isa dir, use that instead.
59756        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59757        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59758$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59759      fi
59760    fi
59761  fi
59762
59763  if test "x$FOUND_FREETYPE" = xyes; then
59764
59765  # Only process if variable expands to non-empty
59766
59767  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59768    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59769
59770  # Input might be given as Windows format, start by converting to
59771  # unix format.
59772  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59773  new_path=`$CYGPATH -u "$path"`
59774
59775  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59776  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59777  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59778  # "foo.exe" is OK but "foo" is an error.
59779  #
59780  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59781  # It is also a way to make sure we got the proper file name for the real test later on.
59782  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59783  if test "x$test_shortpath" = x; then
59784    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59785$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59786    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59787  fi
59788
59789  # Call helper function which possibly converts this using DOS-style short mode.
59790  # If so, the updated path is stored in $new_path.
59791
59792  input_path="$new_path"
59793  # Check if we need to convert this using DOS-style short mode. If the path
59794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59795  # take no chances and rewrite it.
59796  # Note: m4 eats our [], so we need to use [ and ] instead.
59797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59798  if test "x$has_forbidden_chars" != x; then
59799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59800    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59801    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59802    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59803      # Going to short mode and back again did indeed matter. Since short mode is
59804      # case insensitive, let's make it lowercase to improve readability.
59805      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59806      # Now convert it back to Unix-style (cygpath)
59807      input_path=`$CYGPATH -u "$shortmode_path"`
59808      new_path="$input_path"
59809    fi
59810  fi
59811
59812  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59813  if test "x$test_cygdrive_prefix" = x; then
59814    # As a simple fix, exclude /usr/bin since it's not a real path.
59815    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59816      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59817      # a path prefixed by /cygdrive for fixpath to work.
59818      new_path="$CYGWIN_ROOT_PATH$input_path"
59819    fi
59820  fi
59821
59822
59823  if test "x$path" != "x$new_path"; then
59824    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59825    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59826$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59827  fi
59828
59829    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59830
59831  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59832  has_colon=`$ECHO $path | $GREP ^.:`
59833  new_path="$path"
59834  if test "x$has_colon" = x; then
59835    # Not in mixed or Windows style, start by that.
59836    new_path=`cmd //c echo $path`
59837  fi
59838
59839
59840  input_path="$new_path"
59841  # Check if we need to convert this using DOS-style short mode. If the path
59842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59843  # take no chances and rewrite it.
59844  # Note: m4 eats our [], so we need to use [ and ] instead.
59845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59846  if test "x$has_forbidden_chars" != x; then
59847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59848    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59849  fi
59850
59851
59852  windows_path="$new_path"
59853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59854    unix_path=`$CYGPATH -u "$windows_path"`
59855    new_path="$unix_path"
59856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59858    new_path="$unix_path"
59859  fi
59860
59861  if test "x$path" != "x$new_path"; then
59862    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59864$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59865  fi
59866
59867  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59868  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59869
59870    else
59871      # We're on a unix platform. Hooray! :)
59872      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59873      has_space=`$ECHO "$path" | $GREP " "`
59874      if test "x$has_space" != x; then
59875        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59876$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59877        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59878      fi
59879
59880      # Use eval to expand a potential ~
59881      eval path="$path"
59882      if test ! -f "$path" && test ! -d "$path"; then
59883        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59884      fi
59885
59886      if test -d "$path"; then
59887        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59888      else
59889        dir="`$DIRNAME "$path"`"
59890        base="`$BASENAME "$path"`"
59891        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59892      fi
59893    fi
59894  fi
59895
59896
59897  # Only process if variable expands to non-empty
59898
59899  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59900    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59901
59902  # Input might be given as Windows format, start by converting to
59903  # unix format.
59904  path="$POTENTIAL_FREETYPE_LIB_PATH"
59905  new_path=`$CYGPATH -u "$path"`
59906
59907  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59908  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59909  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59910  # "foo.exe" is OK but "foo" is an error.
59911  #
59912  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59913  # It is also a way to make sure we got the proper file name for the real test later on.
59914  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59915  if test "x$test_shortpath" = x; then
59916    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59917$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59918    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59919  fi
59920
59921  # Call helper function which possibly converts this using DOS-style short mode.
59922  # If so, the updated path is stored in $new_path.
59923
59924  input_path="$new_path"
59925  # Check if we need to convert this using DOS-style short mode. If the path
59926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59927  # take no chances and rewrite it.
59928  # Note: m4 eats our [], so we need to use [ and ] instead.
59929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59930  if test "x$has_forbidden_chars" != x; then
59931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59932    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59933    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59934    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59935      # Going to short mode and back again did indeed matter. Since short mode is
59936      # case insensitive, let's make it lowercase to improve readability.
59937      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59938      # Now convert it back to Unix-style (cygpath)
59939      input_path=`$CYGPATH -u "$shortmode_path"`
59940      new_path="$input_path"
59941    fi
59942  fi
59943
59944  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59945  if test "x$test_cygdrive_prefix" = x; then
59946    # As a simple fix, exclude /usr/bin since it's not a real path.
59947    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59948      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59949      # a path prefixed by /cygdrive for fixpath to work.
59950      new_path="$CYGWIN_ROOT_PATH$input_path"
59951    fi
59952  fi
59953
59954
59955  if test "x$path" != "x$new_path"; then
59956    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59958$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59959  fi
59960
59961    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59962
59963  path="$POTENTIAL_FREETYPE_LIB_PATH"
59964  has_colon=`$ECHO $path | $GREP ^.:`
59965  new_path="$path"
59966  if test "x$has_colon" = x; then
59967    # Not in mixed or Windows style, start by that.
59968    new_path=`cmd //c echo $path`
59969  fi
59970
59971
59972  input_path="$new_path"
59973  # Check if we need to convert this using DOS-style short mode. If the path
59974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59975  # take no chances and rewrite it.
59976  # Note: m4 eats our [], so we need to use [ and ] instead.
59977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59978  if test "x$has_forbidden_chars" != x; then
59979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59980    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59981  fi
59982
59983
59984  windows_path="$new_path"
59985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59986    unix_path=`$CYGPATH -u "$windows_path"`
59987    new_path="$unix_path"
59988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59990    new_path="$unix_path"
59991  fi
59992
59993  if test "x$path" != "x$new_path"; then
59994    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59996$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59997  fi
59998
59999  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60000  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60001
60002    else
60003      # We're on a unix platform. Hooray! :)
60004      path="$POTENTIAL_FREETYPE_LIB_PATH"
60005      has_space=`$ECHO "$path" | $GREP " "`
60006      if test "x$has_space" != x; then
60007        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60008$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60009        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60010      fi
60011
60012      # Use eval to expand a potential ~
60013      eval path="$path"
60014      if test ! -f "$path" && test ! -d "$path"; then
60015        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60016      fi
60017
60018      if test -d "$path"; then
60019        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60020      else
60021        dir="`$DIRNAME "$path"`"
60022        base="`$BASENAME "$path"`"
60023        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60024      fi
60025    fi
60026  fi
60027
60028
60029    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60030    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60031$as_echo_n "checking for freetype includes... " >&6; }
60032    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60033$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60034    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60035    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60036$as_echo_n "checking for freetype libraries... " >&6; }
60037    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60038$as_echo "$FREETYPE_LIB_PATH" >&6; }
60039  fi
60040
60041              fi
60042            fi
60043          fi
60044        else
60045          FREETYPE_BASE_DIR="$SYSROOT/usr"
60046
60047  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60048  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60049  METHOD="well-known location"
60050
60051  # Let's start with an optimistic view of the world :-)
60052  FOUND_FREETYPE=yes
60053
60054  # First look for the canonical freetype main include file ft2build.h.
60055  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60056    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60057    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60058    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60059      # Fail.
60060      FOUND_FREETYPE=no
60061    fi
60062  fi
60063
60064  if test "x$FOUND_FREETYPE" = xyes; then
60065    # Include file found, let's continue the sanity check.
60066    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60067$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60068
60069    # Reset to default value
60070    FREETYPE_BASE_NAME=freetype
60071    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60072    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60073      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60074          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60075        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60076        # for the .6 version explicitly.
60077        FREETYPE_BASE_NAME=freetype.6
60078        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60079        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60080$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60081      else
60082        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60083$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60084        FOUND_FREETYPE=no
60085      fi
60086    else
60087      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60088        # On Windows, we will need both .lib and .dll file.
60089        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60090          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60091$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60092          FOUND_FREETYPE=no
60093        fi
60094      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60095          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60096        # Found lib in isa dir, use that instead.
60097        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60098        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60099$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60100      fi
60101    fi
60102  fi
60103
60104  if test "x$FOUND_FREETYPE" = xyes; then
60105
60106  # Only process if variable expands to non-empty
60107
60108  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60109    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60110
60111  # Input might be given as Windows format, start by converting to
60112  # unix format.
60113  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60114  new_path=`$CYGPATH -u "$path"`
60115
60116  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60117  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60118  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60119  # "foo.exe" is OK but "foo" is an error.
60120  #
60121  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60122  # It is also a way to make sure we got the proper file name for the real test later on.
60123  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60124  if test "x$test_shortpath" = x; then
60125    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60126$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60127    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60128  fi
60129
60130  # Call helper function which possibly converts this using DOS-style short mode.
60131  # If so, the updated path is stored in $new_path.
60132
60133  input_path="$new_path"
60134  # Check if we need to convert this using DOS-style short mode. If the path
60135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60136  # take no chances and rewrite it.
60137  # Note: m4 eats our [], so we need to use [ and ] instead.
60138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60139  if test "x$has_forbidden_chars" != x; then
60140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60141    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60142    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60143    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60144      # Going to short mode and back again did indeed matter. Since short mode is
60145      # case insensitive, let's make it lowercase to improve readability.
60146      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60147      # Now convert it back to Unix-style (cygpath)
60148      input_path=`$CYGPATH -u "$shortmode_path"`
60149      new_path="$input_path"
60150    fi
60151  fi
60152
60153  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60154  if test "x$test_cygdrive_prefix" = x; then
60155    # As a simple fix, exclude /usr/bin since it's not a real path.
60156    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60157      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60158      # a path prefixed by /cygdrive for fixpath to work.
60159      new_path="$CYGWIN_ROOT_PATH$input_path"
60160    fi
60161  fi
60162
60163
60164  if test "x$path" != "x$new_path"; then
60165    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60166    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60167$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60168  fi
60169
60170    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60171
60172  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60173  has_colon=`$ECHO $path | $GREP ^.:`
60174  new_path="$path"
60175  if test "x$has_colon" = x; then
60176    # Not in mixed or Windows style, start by that.
60177    new_path=`cmd //c echo $path`
60178  fi
60179
60180
60181  input_path="$new_path"
60182  # Check if we need to convert this using DOS-style short mode. If the path
60183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60184  # take no chances and rewrite it.
60185  # Note: m4 eats our [], so we need to use [ and ] instead.
60186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60187  if test "x$has_forbidden_chars" != x; then
60188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60189    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60190  fi
60191
60192
60193  windows_path="$new_path"
60194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60195    unix_path=`$CYGPATH -u "$windows_path"`
60196    new_path="$unix_path"
60197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60199    new_path="$unix_path"
60200  fi
60201
60202  if test "x$path" != "x$new_path"; then
60203    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60204    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60205$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60206  fi
60207
60208  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60209  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60210
60211    else
60212      # We're on a unix platform. Hooray! :)
60213      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60214      has_space=`$ECHO "$path" | $GREP " "`
60215      if test "x$has_space" != x; then
60216        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60217$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60218        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60219      fi
60220
60221      # Use eval to expand a potential ~
60222      eval path="$path"
60223      if test ! -f "$path" && test ! -d "$path"; then
60224        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60225      fi
60226
60227      if test -d "$path"; then
60228        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60229      else
60230        dir="`$DIRNAME "$path"`"
60231        base="`$BASENAME "$path"`"
60232        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60233      fi
60234    fi
60235  fi
60236
60237
60238  # Only process if variable expands to non-empty
60239
60240  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60241    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60242
60243  # Input might be given as Windows format, start by converting to
60244  # unix format.
60245  path="$POTENTIAL_FREETYPE_LIB_PATH"
60246  new_path=`$CYGPATH -u "$path"`
60247
60248  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60249  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60250  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60251  # "foo.exe" is OK but "foo" is an error.
60252  #
60253  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60254  # It is also a way to make sure we got the proper file name for the real test later on.
60255  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60256  if test "x$test_shortpath" = x; then
60257    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60258$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60259    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60260  fi
60261
60262  # Call helper function which possibly converts this using DOS-style short mode.
60263  # If so, the updated path is stored in $new_path.
60264
60265  input_path="$new_path"
60266  # Check if we need to convert this using DOS-style short mode. If the path
60267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60268  # take no chances and rewrite it.
60269  # Note: m4 eats our [], so we need to use [ and ] instead.
60270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60271  if test "x$has_forbidden_chars" != x; then
60272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60273    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60274    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60275    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60276      # Going to short mode and back again did indeed matter. Since short mode is
60277      # case insensitive, let's make it lowercase to improve readability.
60278      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60279      # Now convert it back to Unix-style (cygpath)
60280      input_path=`$CYGPATH -u "$shortmode_path"`
60281      new_path="$input_path"
60282    fi
60283  fi
60284
60285  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60286  if test "x$test_cygdrive_prefix" = x; then
60287    # As a simple fix, exclude /usr/bin since it's not a real path.
60288    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60289      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60290      # a path prefixed by /cygdrive for fixpath to work.
60291      new_path="$CYGWIN_ROOT_PATH$input_path"
60292    fi
60293  fi
60294
60295
60296  if test "x$path" != "x$new_path"; then
60297    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60299$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60300  fi
60301
60302    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60303
60304  path="$POTENTIAL_FREETYPE_LIB_PATH"
60305  has_colon=`$ECHO $path | $GREP ^.:`
60306  new_path="$path"
60307  if test "x$has_colon" = x; then
60308    # Not in mixed or Windows style, start by that.
60309    new_path=`cmd //c echo $path`
60310  fi
60311
60312
60313  input_path="$new_path"
60314  # Check if we need to convert this using DOS-style short mode. If the path
60315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60316  # take no chances and rewrite it.
60317  # Note: m4 eats our [], so we need to use [ and ] instead.
60318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60319  if test "x$has_forbidden_chars" != x; then
60320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60321    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60322  fi
60323
60324
60325  windows_path="$new_path"
60326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60327    unix_path=`$CYGPATH -u "$windows_path"`
60328    new_path="$unix_path"
60329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60331    new_path="$unix_path"
60332  fi
60333
60334  if test "x$path" != "x$new_path"; then
60335    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60336    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60337$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60338  fi
60339
60340  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60341  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60342
60343    else
60344      # We're on a unix platform. Hooray! :)
60345      path="$POTENTIAL_FREETYPE_LIB_PATH"
60346      has_space=`$ECHO "$path" | $GREP " "`
60347      if test "x$has_space" != x; then
60348        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60349$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60350        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60351      fi
60352
60353      # Use eval to expand a potential ~
60354      eval path="$path"
60355      if test ! -f "$path" && test ! -d "$path"; then
60356        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60357      fi
60358
60359      if test -d "$path"; then
60360        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60361      else
60362        dir="`$DIRNAME "$path"`"
60363        base="`$BASENAME "$path"`"
60364        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60365      fi
60366    fi
60367  fi
60368
60369
60370    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60371    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60372$as_echo_n "checking for freetype includes... " >&6; }
60373    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60374$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60375    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60376    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60377$as_echo_n "checking for freetype libraries... " >&6; }
60378    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60379$as_echo "$FREETYPE_LIB_PATH" >&6; }
60380  fi
60381
60382
60383          if test "x$FOUND_FREETYPE" != xyes; then
60384            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60385
60386  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60387  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60388  METHOD="well-known location"
60389
60390  # Let's start with an optimistic view of the world :-)
60391  FOUND_FREETYPE=yes
60392
60393  # First look for the canonical freetype main include file ft2build.h.
60394  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60395    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60396    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60397    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60398      # Fail.
60399      FOUND_FREETYPE=no
60400    fi
60401  fi
60402
60403  if test "x$FOUND_FREETYPE" = xyes; then
60404    # Include file found, let's continue the sanity check.
60405    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60406$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60407
60408    # Reset to default value
60409    FREETYPE_BASE_NAME=freetype
60410    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60411    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60412      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60413          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60414        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60415        # for the .6 version explicitly.
60416        FREETYPE_BASE_NAME=freetype.6
60417        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60418        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60419$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60420      else
60421        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60422$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60423        FOUND_FREETYPE=no
60424      fi
60425    else
60426      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60427        # On Windows, we will need both .lib and .dll file.
60428        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60429          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60430$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60431          FOUND_FREETYPE=no
60432        fi
60433      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60434          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60435        # Found lib in isa dir, use that instead.
60436        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60437        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60438$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60439      fi
60440    fi
60441  fi
60442
60443  if test "x$FOUND_FREETYPE" = xyes; then
60444
60445  # Only process if variable expands to non-empty
60446
60447  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60448    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60449
60450  # Input might be given as Windows format, start by converting to
60451  # unix format.
60452  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60453  new_path=`$CYGPATH -u "$path"`
60454
60455  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60456  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60457  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60458  # "foo.exe" is OK but "foo" is an error.
60459  #
60460  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60461  # It is also a way to make sure we got the proper file name for the real test later on.
60462  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60463  if test "x$test_shortpath" = x; then
60464    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60465$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60466    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60467  fi
60468
60469  # Call helper function which possibly converts this using DOS-style short mode.
60470  # If so, the updated path is stored in $new_path.
60471
60472  input_path="$new_path"
60473  # Check if we need to convert this using DOS-style short mode. If the path
60474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60475  # take no chances and rewrite it.
60476  # Note: m4 eats our [], so we need to use [ and ] instead.
60477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60478  if test "x$has_forbidden_chars" != x; then
60479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60480    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60481    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60482    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60483      # Going to short mode and back again did indeed matter. Since short mode is
60484      # case insensitive, let's make it lowercase to improve readability.
60485      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60486      # Now convert it back to Unix-style (cygpath)
60487      input_path=`$CYGPATH -u "$shortmode_path"`
60488      new_path="$input_path"
60489    fi
60490  fi
60491
60492  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60493  if test "x$test_cygdrive_prefix" = x; then
60494    # As a simple fix, exclude /usr/bin since it's not a real path.
60495    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60496      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60497      # a path prefixed by /cygdrive for fixpath to work.
60498      new_path="$CYGWIN_ROOT_PATH$input_path"
60499    fi
60500  fi
60501
60502
60503  if test "x$path" != "x$new_path"; then
60504    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60505    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60506$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60507  fi
60508
60509    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60510
60511  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60512  has_colon=`$ECHO $path | $GREP ^.:`
60513  new_path="$path"
60514  if test "x$has_colon" = x; then
60515    # Not in mixed or Windows style, start by that.
60516    new_path=`cmd //c echo $path`
60517  fi
60518
60519
60520  input_path="$new_path"
60521  # Check if we need to convert this using DOS-style short mode. If the path
60522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60523  # take no chances and rewrite it.
60524  # Note: m4 eats our [], so we need to use [ and ] instead.
60525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60526  if test "x$has_forbidden_chars" != x; then
60527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60528    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60529  fi
60530
60531
60532  windows_path="$new_path"
60533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60534    unix_path=`$CYGPATH -u "$windows_path"`
60535    new_path="$unix_path"
60536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60538    new_path="$unix_path"
60539  fi
60540
60541  if test "x$path" != "x$new_path"; then
60542    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60543    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60544$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60545  fi
60546
60547  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60548  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60549
60550    else
60551      # We're on a unix platform. Hooray! :)
60552      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60553      has_space=`$ECHO "$path" | $GREP " "`
60554      if test "x$has_space" != x; then
60555        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60556$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60557        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60558      fi
60559
60560      # Use eval to expand a potential ~
60561      eval path="$path"
60562      if test ! -f "$path" && test ! -d "$path"; then
60563        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60564      fi
60565
60566      if test -d "$path"; then
60567        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60568      else
60569        dir="`$DIRNAME "$path"`"
60570        base="`$BASENAME "$path"`"
60571        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60572      fi
60573    fi
60574  fi
60575
60576
60577  # Only process if variable expands to non-empty
60578
60579  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60580    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60581
60582  # Input might be given as Windows format, start by converting to
60583  # unix format.
60584  path="$POTENTIAL_FREETYPE_LIB_PATH"
60585  new_path=`$CYGPATH -u "$path"`
60586
60587  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60588  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60589  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60590  # "foo.exe" is OK but "foo" is an error.
60591  #
60592  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60593  # It is also a way to make sure we got the proper file name for the real test later on.
60594  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60595  if test "x$test_shortpath" = x; then
60596    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60597$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60598    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60599  fi
60600
60601  # Call helper function which possibly converts this using DOS-style short mode.
60602  # If so, the updated path is stored in $new_path.
60603
60604  input_path="$new_path"
60605  # Check if we need to convert this using DOS-style short mode. If the path
60606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60607  # take no chances and rewrite it.
60608  # Note: m4 eats our [], so we need to use [ and ] instead.
60609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60610  if test "x$has_forbidden_chars" != x; then
60611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60612    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60613    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60614    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60615      # Going to short mode and back again did indeed matter. Since short mode is
60616      # case insensitive, let's make it lowercase to improve readability.
60617      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60618      # Now convert it back to Unix-style (cygpath)
60619      input_path=`$CYGPATH -u "$shortmode_path"`
60620      new_path="$input_path"
60621    fi
60622  fi
60623
60624  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60625  if test "x$test_cygdrive_prefix" = x; then
60626    # As a simple fix, exclude /usr/bin since it's not a real path.
60627    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60628      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60629      # a path prefixed by /cygdrive for fixpath to work.
60630      new_path="$CYGWIN_ROOT_PATH$input_path"
60631    fi
60632  fi
60633
60634
60635  if test "x$path" != "x$new_path"; then
60636    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60638$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60639  fi
60640
60641    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60642
60643  path="$POTENTIAL_FREETYPE_LIB_PATH"
60644  has_colon=`$ECHO $path | $GREP ^.:`
60645  new_path="$path"
60646  if test "x$has_colon" = x; then
60647    # Not in mixed or Windows style, start by that.
60648    new_path=`cmd //c echo $path`
60649  fi
60650
60651
60652  input_path="$new_path"
60653  # Check if we need to convert this using DOS-style short mode. If the path
60654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60655  # take no chances and rewrite it.
60656  # Note: m4 eats our [], so we need to use [ and ] instead.
60657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60658  if test "x$has_forbidden_chars" != x; then
60659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60660    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60661  fi
60662
60663
60664  windows_path="$new_path"
60665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60666    unix_path=`$CYGPATH -u "$windows_path"`
60667    new_path="$unix_path"
60668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60670    new_path="$unix_path"
60671  fi
60672
60673  if test "x$path" != "x$new_path"; then
60674    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60676$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60677  fi
60678
60679  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60680  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60681
60682    else
60683      # We're on a unix platform. Hooray! :)
60684      path="$POTENTIAL_FREETYPE_LIB_PATH"
60685      has_space=`$ECHO "$path" | $GREP " "`
60686      if test "x$has_space" != x; then
60687        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60688$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60689        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60690      fi
60691
60692      # Use eval to expand a potential ~
60693      eval path="$path"
60694      if test ! -f "$path" && test ! -d "$path"; then
60695        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60696      fi
60697
60698      if test -d "$path"; then
60699        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60700      else
60701        dir="`$DIRNAME "$path"`"
60702        base="`$BASENAME "$path"`"
60703        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60704      fi
60705    fi
60706  fi
60707
60708
60709    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60710    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60711$as_echo_n "checking for freetype includes... " >&6; }
60712    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60713$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60714    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60715    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60716$as_echo_n "checking for freetype libraries... " >&6; }
60717    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60718$as_echo "$FREETYPE_LIB_PATH" >&6; }
60719  fi
60720
60721          fi
60722
60723          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60724            if test "x$FOUND_FREETYPE" != xyes; then
60725              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60726              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60727
60728  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60729  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60730  METHOD="well-known location"
60731
60732  # Let's start with an optimistic view of the world :-)
60733  FOUND_FREETYPE=yes
60734
60735  # First look for the canonical freetype main include file ft2build.h.
60736  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60737    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60738    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60739    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60740      # Fail.
60741      FOUND_FREETYPE=no
60742    fi
60743  fi
60744
60745  if test "x$FOUND_FREETYPE" = xyes; then
60746    # Include file found, let's continue the sanity check.
60747    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60748$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60749
60750    # Reset to default value
60751    FREETYPE_BASE_NAME=freetype
60752    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60753    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60754      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60755          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60756        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60757        # for the .6 version explicitly.
60758        FREETYPE_BASE_NAME=freetype.6
60759        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60760        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60761$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60762      else
60763        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60764$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60765        FOUND_FREETYPE=no
60766      fi
60767    else
60768      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60769        # On Windows, we will need both .lib and .dll file.
60770        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60771          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60772$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60773          FOUND_FREETYPE=no
60774        fi
60775      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60776          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60777        # Found lib in isa dir, use that instead.
60778        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60779        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60780$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60781      fi
60782    fi
60783  fi
60784
60785  if test "x$FOUND_FREETYPE" = xyes; then
60786
60787  # Only process if variable expands to non-empty
60788
60789  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60790    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60791
60792  # Input might be given as Windows format, start by converting to
60793  # unix format.
60794  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60795  new_path=`$CYGPATH -u "$path"`
60796
60797  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60798  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60799  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60800  # "foo.exe" is OK but "foo" is an error.
60801  #
60802  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60803  # It is also a way to make sure we got the proper file name for the real test later on.
60804  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60805  if test "x$test_shortpath" = x; then
60806    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60807$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60808    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60809  fi
60810
60811  # Call helper function which possibly converts this using DOS-style short mode.
60812  # If so, the updated path is stored in $new_path.
60813
60814  input_path="$new_path"
60815  # Check if we need to convert this using DOS-style short mode. If the path
60816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60817  # take no chances and rewrite it.
60818  # Note: m4 eats our [], so we need to use [ and ] instead.
60819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60820  if test "x$has_forbidden_chars" != x; then
60821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60822    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60823    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60824    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60825      # Going to short mode and back again did indeed matter. Since short mode is
60826      # case insensitive, let's make it lowercase to improve readability.
60827      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60828      # Now convert it back to Unix-style (cygpath)
60829      input_path=`$CYGPATH -u "$shortmode_path"`
60830      new_path="$input_path"
60831    fi
60832  fi
60833
60834  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60835  if test "x$test_cygdrive_prefix" = x; then
60836    # As a simple fix, exclude /usr/bin since it's not a real path.
60837    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60838      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60839      # a path prefixed by /cygdrive for fixpath to work.
60840      new_path="$CYGWIN_ROOT_PATH$input_path"
60841    fi
60842  fi
60843
60844
60845  if test "x$path" != "x$new_path"; then
60846    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60848$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60849  fi
60850
60851    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60852
60853  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60854  has_colon=`$ECHO $path | $GREP ^.:`
60855  new_path="$path"
60856  if test "x$has_colon" = x; then
60857    # Not in mixed or Windows style, start by that.
60858    new_path=`cmd //c echo $path`
60859  fi
60860
60861
60862  input_path="$new_path"
60863  # Check if we need to convert this using DOS-style short mode. If the path
60864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60865  # take no chances and rewrite it.
60866  # Note: m4 eats our [], so we need to use [ and ] instead.
60867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60868  if test "x$has_forbidden_chars" != x; then
60869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60870    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60871  fi
60872
60873
60874  windows_path="$new_path"
60875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60876    unix_path=`$CYGPATH -u "$windows_path"`
60877    new_path="$unix_path"
60878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60880    new_path="$unix_path"
60881  fi
60882
60883  if test "x$path" != "x$new_path"; then
60884    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60886$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60887  fi
60888
60889  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60890  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60891
60892    else
60893      # We're on a unix platform. Hooray! :)
60894      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60895      has_space=`$ECHO "$path" | $GREP " "`
60896      if test "x$has_space" != x; then
60897        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60898$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60899        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60900      fi
60901
60902      # Use eval to expand a potential ~
60903      eval path="$path"
60904      if test ! -f "$path" && test ! -d "$path"; then
60905        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60906      fi
60907
60908      if test -d "$path"; then
60909        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60910      else
60911        dir="`$DIRNAME "$path"`"
60912        base="`$BASENAME "$path"`"
60913        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60914      fi
60915    fi
60916  fi
60917
60918
60919  # Only process if variable expands to non-empty
60920
60921  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60922    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60923
60924  # Input might be given as Windows format, start by converting to
60925  # unix format.
60926  path="$POTENTIAL_FREETYPE_LIB_PATH"
60927  new_path=`$CYGPATH -u "$path"`
60928
60929  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60930  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60931  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60932  # "foo.exe" is OK but "foo" is an error.
60933  #
60934  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60935  # It is also a way to make sure we got the proper file name for the real test later on.
60936  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60937  if test "x$test_shortpath" = x; then
60938    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60939$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60940    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60941  fi
60942
60943  # Call helper function which possibly converts this using DOS-style short mode.
60944  # If so, the updated path is stored in $new_path.
60945
60946  input_path="$new_path"
60947  # Check if we need to convert this using DOS-style short mode. If the path
60948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60949  # take no chances and rewrite it.
60950  # Note: m4 eats our [], so we need to use [ and ] instead.
60951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60952  if test "x$has_forbidden_chars" != x; then
60953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60954    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60955    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60956    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60957      # Going to short mode and back again did indeed matter. Since short mode is
60958      # case insensitive, let's make it lowercase to improve readability.
60959      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60960      # Now convert it back to Unix-style (cygpath)
60961      input_path=`$CYGPATH -u "$shortmode_path"`
60962      new_path="$input_path"
60963    fi
60964  fi
60965
60966  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60967  if test "x$test_cygdrive_prefix" = x; then
60968    # As a simple fix, exclude /usr/bin since it's not a real path.
60969    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60970      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60971      # a path prefixed by /cygdrive for fixpath to work.
60972      new_path="$CYGWIN_ROOT_PATH$input_path"
60973    fi
60974  fi
60975
60976
60977  if test "x$path" != "x$new_path"; then
60978    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60980$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60981  fi
60982
60983    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60984
60985  path="$POTENTIAL_FREETYPE_LIB_PATH"
60986  has_colon=`$ECHO $path | $GREP ^.:`
60987  new_path="$path"
60988  if test "x$has_colon" = x; then
60989    # Not in mixed or Windows style, start by that.
60990    new_path=`cmd //c echo $path`
60991  fi
60992
60993
60994  input_path="$new_path"
60995  # Check if we need to convert this using DOS-style short mode. If the path
60996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60997  # take no chances and rewrite it.
60998  # Note: m4 eats our [], so we need to use [ and ] instead.
60999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61000  if test "x$has_forbidden_chars" != x; then
61001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61002    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61003  fi
61004
61005
61006  windows_path="$new_path"
61007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61008    unix_path=`$CYGPATH -u "$windows_path"`
61009    new_path="$unix_path"
61010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61012    new_path="$unix_path"
61013  fi
61014
61015  if test "x$path" != "x$new_path"; then
61016    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61017    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61018$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61019  fi
61020
61021  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61022  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61023
61024    else
61025      # We're on a unix platform. Hooray! :)
61026      path="$POTENTIAL_FREETYPE_LIB_PATH"
61027      has_space=`$ECHO "$path" | $GREP " "`
61028      if test "x$has_space" != x; then
61029        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61030$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61031        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61032      fi
61033
61034      # Use eval to expand a potential ~
61035      eval path="$path"
61036      if test ! -f "$path" && test ! -d "$path"; then
61037        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61038      fi
61039
61040      if test -d "$path"; then
61041        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61042      else
61043        dir="`$DIRNAME "$path"`"
61044        base="`$BASENAME "$path"`"
61045        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61046      fi
61047    fi
61048  fi
61049
61050
61051    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61052    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61053$as_echo_n "checking for freetype includes... " >&6; }
61054    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61055$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61056    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61057    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61058$as_echo_n "checking for freetype libraries... " >&6; }
61059    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61060$as_echo "$FREETYPE_LIB_PATH" >&6; }
61061  fi
61062
61063            fi
61064          fi
61065
61066          if test "x$FOUND_FREETYPE" != xyes; then
61067            FREETYPE_BASE_DIR="$SYSROOT/usr"
61068            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61069
61070  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61071  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61072  METHOD="well-known location"
61073
61074  # Let's start with an optimistic view of the world :-)
61075  FOUND_FREETYPE=yes
61076
61077  # First look for the canonical freetype main include file ft2build.h.
61078  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61079    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61080    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61081    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61082      # Fail.
61083      FOUND_FREETYPE=no
61084    fi
61085  fi
61086
61087  if test "x$FOUND_FREETYPE" = xyes; then
61088    # Include file found, let's continue the sanity check.
61089    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61090$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61091
61092    # Reset to default value
61093    FREETYPE_BASE_NAME=freetype
61094    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61095    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61096      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61097          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61098        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61099        # for the .6 version explicitly.
61100        FREETYPE_BASE_NAME=freetype.6
61101        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61102        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61103$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61104      else
61105        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61106$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61107        FOUND_FREETYPE=no
61108      fi
61109    else
61110      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61111        # On Windows, we will need both .lib and .dll file.
61112        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61113          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61114$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61115          FOUND_FREETYPE=no
61116        fi
61117      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61118          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61119        # Found lib in isa dir, use that instead.
61120        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61121        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61122$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61123      fi
61124    fi
61125  fi
61126
61127  if test "x$FOUND_FREETYPE" = xyes; then
61128
61129  # Only process if variable expands to non-empty
61130
61131  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61132    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61133
61134  # Input might be given as Windows format, start by converting to
61135  # unix format.
61136  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61137  new_path=`$CYGPATH -u "$path"`
61138
61139  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61140  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61141  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61142  # "foo.exe" is OK but "foo" is an error.
61143  #
61144  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61145  # It is also a way to make sure we got the proper file name for the real test later on.
61146  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61147  if test "x$test_shortpath" = x; then
61148    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61149$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61150    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61151  fi
61152
61153  # Call helper function which possibly converts this using DOS-style short mode.
61154  # If so, the updated path is stored in $new_path.
61155
61156  input_path="$new_path"
61157  # Check if we need to convert this using DOS-style short mode. If the path
61158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61159  # take no chances and rewrite it.
61160  # Note: m4 eats our [], so we need to use [ and ] instead.
61161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61162  if test "x$has_forbidden_chars" != x; then
61163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61164    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61165    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61166    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61167      # Going to short mode and back again did indeed matter. Since short mode is
61168      # case insensitive, let's make it lowercase to improve readability.
61169      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61170      # Now convert it back to Unix-style (cygpath)
61171      input_path=`$CYGPATH -u "$shortmode_path"`
61172      new_path="$input_path"
61173    fi
61174  fi
61175
61176  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61177  if test "x$test_cygdrive_prefix" = x; then
61178    # As a simple fix, exclude /usr/bin since it's not a real path.
61179    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61180      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61181      # a path prefixed by /cygdrive for fixpath to work.
61182      new_path="$CYGWIN_ROOT_PATH$input_path"
61183    fi
61184  fi
61185
61186
61187  if test "x$path" != "x$new_path"; then
61188    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61190$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61191  fi
61192
61193    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61194
61195  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61196  has_colon=`$ECHO $path | $GREP ^.:`
61197  new_path="$path"
61198  if test "x$has_colon" = x; then
61199    # Not in mixed or Windows style, start by that.
61200    new_path=`cmd //c echo $path`
61201  fi
61202
61203
61204  input_path="$new_path"
61205  # Check if we need to convert this using DOS-style short mode. If the path
61206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61207  # take no chances and rewrite it.
61208  # Note: m4 eats our [], so we need to use [ and ] instead.
61209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61210  if test "x$has_forbidden_chars" != x; then
61211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61212    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61213  fi
61214
61215
61216  windows_path="$new_path"
61217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61218    unix_path=`$CYGPATH -u "$windows_path"`
61219    new_path="$unix_path"
61220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61222    new_path="$unix_path"
61223  fi
61224
61225  if test "x$path" != "x$new_path"; then
61226    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61228$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61229  fi
61230
61231  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61232  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61233
61234    else
61235      # We're on a unix platform. Hooray! :)
61236      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61237      has_space=`$ECHO "$path" | $GREP " "`
61238      if test "x$has_space" != x; then
61239        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61240$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61241        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61242      fi
61243
61244      # Use eval to expand a potential ~
61245      eval path="$path"
61246      if test ! -f "$path" && test ! -d "$path"; then
61247        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61248      fi
61249
61250      if test -d "$path"; then
61251        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61252      else
61253        dir="`$DIRNAME "$path"`"
61254        base="`$BASENAME "$path"`"
61255        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61256      fi
61257    fi
61258  fi
61259
61260
61261  # Only process if variable expands to non-empty
61262
61263  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61264    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61265
61266  # Input might be given as Windows format, start by converting to
61267  # unix format.
61268  path="$POTENTIAL_FREETYPE_LIB_PATH"
61269  new_path=`$CYGPATH -u "$path"`
61270
61271  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61272  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61273  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61274  # "foo.exe" is OK but "foo" is an error.
61275  #
61276  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61277  # It is also a way to make sure we got the proper file name for the real test later on.
61278  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61279  if test "x$test_shortpath" = x; then
61280    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61281$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61282    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61283  fi
61284
61285  # Call helper function which possibly converts this using DOS-style short mode.
61286  # If so, the updated path is stored in $new_path.
61287
61288  input_path="$new_path"
61289  # Check if we need to convert this using DOS-style short mode. If the path
61290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61291  # take no chances and rewrite it.
61292  # Note: m4 eats our [], so we need to use [ and ] instead.
61293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61294  if test "x$has_forbidden_chars" != x; then
61295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61296    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61297    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61298    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61299      # Going to short mode and back again did indeed matter. Since short mode is
61300      # case insensitive, let's make it lowercase to improve readability.
61301      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61302      # Now convert it back to Unix-style (cygpath)
61303      input_path=`$CYGPATH -u "$shortmode_path"`
61304      new_path="$input_path"
61305    fi
61306  fi
61307
61308  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61309  if test "x$test_cygdrive_prefix" = x; then
61310    # As a simple fix, exclude /usr/bin since it's not a real path.
61311    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61312      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61313      # a path prefixed by /cygdrive for fixpath to work.
61314      new_path="$CYGWIN_ROOT_PATH$input_path"
61315    fi
61316  fi
61317
61318
61319  if test "x$path" != "x$new_path"; then
61320    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61322$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61323  fi
61324
61325    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61326
61327  path="$POTENTIAL_FREETYPE_LIB_PATH"
61328  has_colon=`$ECHO $path | $GREP ^.:`
61329  new_path="$path"
61330  if test "x$has_colon" = x; then
61331    # Not in mixed or Windows style, start by that.
61332    new_path=`cmd //c echo $path`
61333  fi
61334
61335
61336  input_path="$new_path"
61337  # Check if we need to convert this using DOS-style short mode. If the path
61338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61339  # take no chances and rewrite it.
61340  # Note: m4 eats our [], so we need to use [ and ] instead.
61341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61342  if test "x$has_forbidden_chars" != x; then
61343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61344    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61345  fi
61346
61347
61348  windows_path="$new_path"
61349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61350    unix_path=`$CYGPATH -u "$windows_path"`
61351    new_path="$unix_path"
61352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61354    new_path="$unix_path"
61355  fi
61356
61357  if test "x$path" != "x$new_path"; then
61358    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61360$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61361  fi
61362
61363  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61364  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61365
61366    else
61367      # We're on a unix platform. Hooray! :)
61368      path="$POTENTIAL_FREETYPE_LIB_PATH"
61369      has_space=`$ECHO "$path" | $GREP " "`
61370      if test "x$has_space" != x; then
61371        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61372$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61373        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61374      fi
61375
61376      # Use eval to expand a potential ~
61377      eval path="$path"
61378      if test ! -f "$path" && test ! -d "$path"; then
61379        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61380      fi
61381
61382      if test -d "$path"; then
61383        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61384      else
61385        dir="`$DIRNAME "$path"`"
61386        base="`$BASENAME "$path"`"
61387        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61388      fi
61389    fi
61390  fi
61391
61392
61393    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61394    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61395$as_echo_n "checking for freetype includes... " >&6; }
61396    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61397$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61398    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61399    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61400$as_echo_n "checking for freetype libraries... " >&6; }
61401    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61402$as_echo "$FREETYPE_LIB_PATH" >&6; }
61403  fi
61404
61405            else
61406
61407  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61408  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61409  METHOD="well-known location"
61410
61411  # Let's start with an optimistic view of the world :-)
61412  FOUND_FREETYPE=yes
61413
61414  # First look for the canonical freetype main include file ft2build.h.
61415  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61416    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61417    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61418    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61419      # Fail.
61420      FOUND_FREETYPE=no
61421    fi
61422  fi
61423
61424  if test "x$FOUND_FREETYPE" = xyes; then
61425    # Include file found, let's continue the sanity check.
61426    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61427$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61428
61429    # Reset to default value
61430    FREETYPE_BASE_NAME=freetype
61431    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61432    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61433      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61434          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61435        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61436        # for the .6 version explicitly.
61437        FREETYPE_BASE_NAME=freetype.6
61438        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61439        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61440$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61441      else
61442        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61443$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61444        FOUND_FREETYPE=no
61445      fi
61446    else
61447      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61448        # On Windows, we will need both .lib and .dll file.
61449        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61450          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61451$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61452          FOUND_FREETYPE=no
61453        fi
61454      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61455          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61456        # Found lib in isa dir, use that instead.
61457        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61458        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61459$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61460      fi
61461    fi
61462  fi
61463
61464  if test "x$FOUND_FREETYPE" = xyes; then
61465
61466  # Only process if variable expands to non-empty
61467
61468  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61469    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61470
61471  # Input might be given as Windows format, start by converting to
61472  # unix format.
61473  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61474  new_path=`$CYGPATH -u "$path"`
61475
61476  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61477  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61478  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61479  # "foo.exe" is OK but "foo" is an error.
61480  #
61481  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61482  # It is also a way to make sure we got the proper file name for the real test later on.
61483  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61484  if test "x$test_shortpath" = x; then
61485    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61486$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61487    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61488  fi
61489
61490  # Call helper function which possibly converts this using DOS-style short mode.
61491  # If so, the updated path is stored in $new_path.
61492
61493  input_path="$new_path"
61494  # Check if we need to convert this using DOS-style short mode. If the path
61495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61496  # take no chances and rewrite it.
61497  # Note: m4 eats our [], so we need to use [ and ] instead.
61498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61499  if test "x$has_forbidden_chars" != x; then
61500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61501    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61502    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61503    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61504      # Going to short mode and back again did indeed matter. Since short mode is
61505      # case insensitive, let's make it lowercase to improve readability.
61506      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61507      # Now convert it back to Unix-style (cygpath)
61508      input_path=`$CYGPATH -u "$shortmode_path"`
61509      new_path="$input_path"
61510    fi
61511  fi
61512
61513  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61514  if test "x$test_cygdrive_prefix" = x; then
61515    # As a simple fix, exclude /usr/bin since it's not a real path.
61516    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61517      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61518      # a path prefixed by /cygdrive for fixpath to work.
61519      new_path="$CYGWIN_ROOT_PATH$input_path"
61520    fi
61521  fi
61522
61523
61524  if test "x$path" != "x$new_path"; then
61525    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61527$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61528  fi
61529
61530    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61531
61532  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61533  has_colon=`$ECHO $path | $GREP ^.:`
61534  new_path="$path"
61535  if test "x$has_colon" = x; then
61536    # Not in mixed or Windows style, start by that.
61537    new_path=`cmd //c echo $path`
61538  fi
61539
61540
61541  input_path="$new_path"
61542  # Check if we need to convert this using DOS-style short mode. If the path
61543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61544  # take no chances and rewrite it.
61545  # Note: m4 eats our [], so we need to use [ and ] instead.
61546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61547  if test "x$has_forbidden_chars" != x; then
61548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61549    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61550  fi
61551
61552
61553  windows_path="$new_path"
61554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61555    unix_path=`$CYGPATH -u "$windows_path"`
61556    new_path="$unix_path"
61557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61559    new_path="$unix_path"
61560  fi
61561
61562  if test "x$path" != "x$new_path"; then
61563    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61565$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61566  fi
61567
61568  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61569  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61570
61571    else
61572      # We're on a unix platform. Hooray! :)
61573      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61574      has_space=`$ECHO "$path" | $GREP " "`
61575      if test "x$has_space" != x; then
61576        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61577$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61578        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61579      fi
61580
61581      # Use eval to expand a potential ~
61582      eval path="$path"
61583      if test ! -f "$path" && test ! -d "$path"; then
61584        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61585      fi
61586
61587      if test -d "$path"; then
61588        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61589      else
61590        dir="`$DIRNAME "$path"`"
61591        base="`$BASENAME "$path"`"
61592        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61593      fi
61594    fi
61595  fi
61596
61597
61598  # Only process if variable expands to non-empty
61599
61600  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61601    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61602
61603  # Input might be given as Windows format, start by converting to
61604  # unix format.
61605  path="$POTENTIAL_FREETYPE_LIB_PATH"
61606  new_path=`$CYGPATH -u "$path"`
61607
61608  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61609  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61610  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61611  # "foo.exe" is OK but "foo" is an error.
61612  #
61613  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61614  # It is also a way to make sure we got the proper file name for the real test later on.
61615  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61616  if test "x$test_shortpath" = x; then
61617    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61618$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61619    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61620  fi
61621
61622  # Call helper function which possibly converts this using DOS-style short mode.
61623  # If so, the updated path is stored in $new_path.
61624
61625  input_path="$new_path"
61626  # Check if we need to convert this using DOS-style short mode. If the path
61627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61628  # take no chances and rewrite it.
61629  # Note: m4 eats our [], so we need to use [ and ] instead.
61630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61631  if test "x$has_forbidden_chars" != x; then
61632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61633    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61634    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61635    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61636      # Going to short mode and back again did indeed matter. Since short mode is
61637      # case insensitive, let's make it lowercase to improve readability.
61638      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61639      # Now convert it back to Unix-style (cygpath)
61640      input_path=`$CYGPATH -u "$shortmode_path"`
61641      new_path="$input_path"
61642    fi
61643  fi
61644
61645  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61646  if test "x$test_cygdrive_prefix" = x; then
61647    # As a simple fix, exclude /usr/bin since it's not a real path.
61648    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61649      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61650      # a path prefixed by /cygdrive for fixpath to work.
61651      new_path="$CYGWIN_ROOT_PATH$input_path"
61652    fi
61653  fi
61654
61655
61656  if test "x$path" != "x$new_path"; then
61657    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61658    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61659$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61660  fi
61661
61662    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61663
61664  path="$POTENTIAL_FREETYPE_LIB_PATH"
61665  has_colon=`$ECHO $path | $GREP ^.:`
61666  new_path="$path"
61667  if test "x$has_colon" = x; then
61668    # Not in mixed or Windows style, start by that.
61669    new_path=`cmd //c echo $path`
61670  fi
61671
61672
61673  input_path="$new_path"
61674  # Check if we need to convert this using DOS-style short mode. If the path
61675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61676  # take no chances and rewrite it.
61677  # Note: m4 eats our [], so we need to use [ and ] instead.
61678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61679  if test "x$has_forbidden_chars" != x; then
61680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61681    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61682  fi
61683
61684
61685  windows_path="$new_path"
61686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61687    unix_path=`$CYGPATH -u "$windows_path"`
61688    new_path="$unix_path"
61689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61691    new_path="$unix_path"
61692  fi
61693
61694  if test "x$path" != "x$new_path"; then
61695    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61696    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61697$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61698  fi
61699
61700  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61701  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61702
61703    else
61704      # We're on a unix platform. Hooray! :)
61705      path="$POTENTIAL_FREETYPE_LIB_PATH"
61706      has_space=`$ECHO "$path" | $GREP " "`
61707      if test "x$has_space" != x; then
61708        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61709$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61710        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61711      fi
61712
61713      # Use eval to expand a potential ~
61714      eval path="$path"
61715      if test ! -f "$path" && test ! -d "$path"; then
61716        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61717      fi
61718
61719      if test -d "$path"; then
61720        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61721      else
61722        dir="`$DIRNAME "$path"`"
61723        base="`$BASENAME "$path"`"
61724        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61725      fi
61726    fi
61727  fi
61728
61729
61730    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61731    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61732$as_echo_n "checking for freetype includes... " >&6; }
61733    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61734$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61735    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61736    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61737$as_echo_n "checking for freetype libraries... " >&6; }
61738    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61739$as_echo "$FREETYPE_LIB_PATH" >&6; }
61740  fi
61741
61742              if test "x$FOUND_FREETYPE" != xyes; then
61743
61744  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61745  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61746  METHOD="well-known location"
61747
61748  # Let's start with an optimistic view of the world :-)
61749  FOUND_FREETYPE=yes
61750
61751  # First look for the canonical freetype main include file ft2build.h.
61752  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61753    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61754    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61755    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61756      # Fail.
61757      FOUND_FREETYPE=no
61758    fi
61759  fi
61760
61761  if test "x$FOUND_FREETYPE" = xyes; then
61762    # Include file found, let's continue the sanity check.
61763    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61764$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61765
61766    # Reset to default value
61767    FREETYPE_BASE_NAME=freetype
61768    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61769    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61770      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61771          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61772        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61773        # for the .6 version explicitly.
61774        FREETYPE_BASE_NAME=freetype.6
61775        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61776        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61777$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61778      else
61779        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61780$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61781        FOUND_FREETYPE=no
61782      fi
61783    else
61784      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61785        # On Windows, we will need both .lib and .dll file.
61786        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61787          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61788$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61789          FOUND_FREETYPE=no
61790        fi
61791      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61792          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61793        # Found lib in isa dir, use that instead.
61794        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61795        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61796$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61797      fi
61798    fi
61799  fi
61800
61801  if test "x$FOUND_FREETYPE" = xyes; then
61802
61803  # Only process if variable expands to non-empty
61804
61805  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61806    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61807
61808  # Input might be given as Windows format, start by converting to
61809  # unix format.
61810  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61811  new_path=`$CYGPATH -u "$path"`
61812
61813  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61814  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61815  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61816  # "foo.exe" is OK but "foo" is an error.
61817  #
61818  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61819  # It is also a way to make sure we got the proper file name for the real test later on.
61820  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61821  if test "x$test_shortpath" = x; then
61822    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61823$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61824    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61825  fi
61826
61827  # Call helper function which possibly converts this using DOS-style short mode.
61828  # If so, the updated path is stored in $new_path.
61829
61830  input_path="$new_path"
61831  # Check if we need to convert this using DOS-style short mode. If the path
61832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61833  # take no chances and rewrite it.
61834  # Note: m4 eats our [], so we need to use [ and ] instead.
61835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61836  if test "x$has_forbidden_chars" != x; then
61837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61841      # Going to short mode and back again did indeed matter. Since short mode is
61842      # case insensitive, let's make it lowercase to improve readability.
61843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61844      # Now convert it back to Unix-style (cygpath)
61845      input_path=`$CYGPATH -u "$shortmode_path"`
61846      new_path="$input_path"
61847    fi
61848  fi
61849
61850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61851  if test "x$test_cygdrive_prefix" = x; then
61852    # As a simple fix, exclude /usr/bin since it's not a real path.
61853    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61855      # a path prefixed by /cygdrive for fixpath to work.
61856      new_path="$CYGWIN_ROOT_PATH$input_path"
61857    fi
61858  fi
61859
61860
61861  if test "x$path" != "x$new_path"; then
61862    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61864$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61865  fi
61866
61867    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61868
61869  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61870  has_colon=`$ECHO $path | $GREP ^.:`
61871  new_path="$path"
61872  if test "x$has_colon" = x; then
61873    # Not in mixed or Windows style, start by that.
61874    new_path=`cmd //c echo $path`
61875  fi
61876
61877
61878  input_path="$new_path"
61879  # Check if we need to convert this using DOS-style short mode. If the path
61880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61881  # take no chances and rewrite it.
61882  # Note: m4 eats our [], so we need to use [ and ] instead.
61883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61884  if test "x$has_forbidden_chars" != x; then
61885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61887  fi
61888
61889
61890  windows_path="$new_path"
61891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61892    unix_path=`$CYGPATH -u "$windows_path"`
61893    new_path="$unix_path"
61894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61896    new_path="$unix_path"
61897  fi
61898
61899  if test "x$path" != "x$new_path"; then
61900    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61902$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61903  fi
61904
61905  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61906  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61907
61908    else
61909      # We're on a unix platform. Hooray! :)
61910      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61911      has_space=`$ECHO "$path" | $GREP " "`
61912      if test "x$has_space" != x; then
61913        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61914$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61915        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61916      fi
61917
61918      # Use eval to expand a potential ~
61919      eval path="$path"
61920      if test ! -f "$path" && test ! -d "$path"; then
61921        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61922      fi
61923
61924      if test -d "$path"; then
61925        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61926      else
61927        dir="`$DIRNAME "$path"`"
61928        base="`$BASENAME "$path"`"
61929        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61930      fi
61931    fi
61932  fi
61933
61934
61935  # Only process if variable expands to non-empty
61936
61937  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61938    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61939
61940  # Input might be given as Windows format, start by converting to
61941  # unix format.
61942  path="$POTENTIAL_FREETYPE_LIB_PATH"
61943  new_path=`$CYGPATH -u "$path"`
61944
61945  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61946  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61947  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61948  # "foo.exe" is OK but "foo" is an error.
61949  #
61950  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61951  # It is also a way to make sure we got the proper file name for the real test later on.
61952  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61953  if test "x$test_shortpath" = x; then
61954    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61955$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61956    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61957  fi
61958
61959  # Call helper function which possibly converts this using DOS-style short mode.
61960  # If so, the updated path is stored in $new_path.
61961
61962  input_path="$new_path"
61963  # Check if we need to convert this using DOS-style short mode. If the path
61964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61965  # take no chances and rewrite it.
61966  # Note: m4 eats our [], so we need to use [ and ] instead.
61967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61968  if test "x$has_forbidden_chars" != x; then
61969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61970    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61971    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61972    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61973      # Going to short mode and back again did indeed matter. Since short mode is
61974      # case insensitive, let's make it lowercase to improve readability.
61975      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61976      # Now convert it back to Unix-style (cygpath)
61977      input_path=`$CYGPATH -u "$shortmode_path"`
61978      new_path="$input_path"
61979    fi
61980  fi
61981
61982  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61983  if test "x$test_cygdrive_prefix" = x; then
61984    # As a simple fix, exclude /usr/bin since it's not a real path.
61985    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61986      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61987      # a path prefixed by /cygdrive for fixpath to work.
61988      new_path="$CYGWIN_ROOT_PATH$input_path"
61989    fi
61990  fi
61991
61992
61993  if test "x$path" != "x$new_path"; then
61994    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61996$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61997  fi
61998
61999    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62000
62001  path="$POTENTIAL_FREETYPE_LIB_PATH"
62002  has_colon=`$ECHO $path | $GREP ^.:`
62003  new_path="$path"
62004  if test "x$has_colon" = x; then
62005    # Not in mixed or Windows style, start by that.
62006    new_path=`cmd //c echo $path`
62007  fi
62008
62009
62010  input_path="$new_path"
62011  # Check if we need to convert this using DOS-style short mode. If the path
62012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62013  # take no chances and rewrite it.
62014  # Note: m4 eats our [], so we need to use [ and ] instead.
62015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62016  if test "x$has_forbidden_chars" != x; then
62017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62018    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62019  fi
62020
62021
62022  windows_path="$new_path"
62023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62024    unix_path=`$CYGPATH -u "$windows_path"`
62025    new_path="$unix_path"
62026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62028    new_path="$unix_path"
62029  fi
62030
62031  if test "x$path" != "x$new_path"; then
62032    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62034$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62035  fi
62036
62037  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62038  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62039
62040    else
62041      # We're on a unix platform. Hooray! :)
62042      path="$POTENTIAL_FREETYPE_LIB_PATH"
62043      has_space=`$ECHO "$path" | $GREP " "`
62044      if test "x$has_space" != x; then
62045        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62046$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62047        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62048      fi
62049
62050      # Use eval to expand a potential ~
62051      eval path="$path"
62052      if test ! -f "$path" && test ! -d "$path"; then
62053        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62054      fi
62055
62056      if test -d "$path"; then
62057        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62058      else
62059        dir="`$DIRNAME "$path"`"
62060        base="`$BASENAME "$path"`"
62061        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62062      fi
62063    fi
62064  fi
62065
62066
62067    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62068    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62069$as_echo_n "checking for freetype includes... " >&6; }
62070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62071$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62072    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62073    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62074$as_echo_n "checking for freetype libraries... " >&6; }
62075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62076$as_echo "$FREETYPE_LIB_PATH" >&6; }
62077  fi
62078
62079              fi
62080            fi
62081          fi
62082        fi
62083      fi # end check in well-known locations
62084
62085      if test "x$FOUND_FREETYPE" != xyes; then
62086
62087  # Print a helpful message on how to acquire the necessary build dependency.
62088  # freetype is the help tag: freetype, cups, alsa etc
62089  MISSING_DEPENDENCY=freetype
62090
62091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62092    cygwin_help $MISSING_DEPENDENCY
62093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62094    msys_help $MISSING_DEPENDENCY
62095  else
62096    PKGHANDLER_COMMAND=
62097
62098    case $PKGHANDLER in
62099      apt-get)
62100        apt_help     $MISSING_DEPENDENCY ;;
62101      yum)
62102        yum_help     $MISSING_DEPENDENCY ;;
62103      port)
62104        port_help    $MISSING_DEPENDENCY ;;
62105      pkgutil)
62106        pkgutil_help $MISSING_DEPENDENCY ;;
62107      pkgadd)
62108        pkgadd_help  $MISSING_DEPENDENCY ;;
62109    esac
62110
62111    if test "x$PKGHANDLER_COMMAND" != x; then
62112      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62113    fi
62114  fi
62115
62116        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62117      fi
62118    fi # end user specified settings
62119
62120    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62121    if test "x$FREETYPE_CFLAGS" = x; then
62122
62123  # Only process if variable expands to non-empty
62124
62125  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62126    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62127
62128  # Input might be given as Windows format, start by converting to
62129  # unix format.
62130  path="$FREETYPE_INCLUDE_PATH"
62131  new_path=`$CYGPATH -u "$path"`
62132
62133  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62134  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62135  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62136  # "foo.exe" is OK but "foo" is an error.
62137  #
62138  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62139  # It is also a way to make sure we got the proper file name for the real test later on.
62140  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62141  if test "x$test_shortpath" = x; then
62142    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62143$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62144    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62145  fi
62146
62147  # Call helper function which possibly converts this using DOS-style short mode.
62148  # If so, the updated path is stored in $new_path.
62149
62150  input_path="$new_path"
62151  # Check if we need to convert this using DOS-style short mode. If the path
62152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62153  # take no chances and rewrite it.
62154  # Note: m4 eats our [], so we need to use [ and ] instead.
62155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62156  if test "x$has_forbidden_chars" != x; then
62157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62158    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62159    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62160    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62161      # Going to short mode and back again did indeed matter. Since short mode is
62162      # case insensitive, let's make it lowercase to improve readability.
62163      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62164      # Now convert it back to Unix-style (cygpath)
62165      input_path=`$CYGPATH -u "$shortmode_path"`
62166      new_path="$input_path"
62167    fi
62168  fi
62169
62170  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62171  if test "x$test_cygdrive_prefix" = x; then
62172    # As a simple fix, exclude /usr/bin since it's not a real path.
62173    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62174      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62175      # a path prefixed by /cygdrive for fixpath to work.
62176      new_path="$CYGWIN_ROOT_PATH$input_path"
62177    fi
62178  fi
62179
62180
62181  if test "x$path" != "x$new_path"; then
62182    FREETYPE_INCLUDE_PATH="$new_path"
62183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62184$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62185  fi
62186
62187    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62188
62189  path="$FREETYPE_INCLUDE_PATH"
62190  has_colon=`$ECHO $path | $GREP ^.:`
62191  new_path="$path"
62192  if test "x$has_colon" = x; then
62193    # Not in mixed or Windows style, start by that.
62194    new_path=`cmd //c echo $path`
62195  fi
62196
62197
62198  input_path="$new_path"
62199  # Check if we need to convert this using DOS-style short mode. If the path
62200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62201  # take no chances and rewrite it.
62202  # Note: m4 eats our [], so we need to use [ and ] instead.
62203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62204  if test "x$has_forbidden_chars" != x; then
62205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62207  fi
62208
62209
62210  windows_path="$new_path"
62211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62212    unix_path=`$CYGPATH -u "$windows_path"`
62213    new_path="$unix_path"
62214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62216    new_path="$unix_path"
62217  fi
62218
62219  if test "x$path" != "x$new_path"; then
62220    FREETYPE_INCLUDE_PATH="$new_path"
62221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62222$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62223  fi
62224
62225  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62226  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62227
62228    else
62229      # We're on a unix platform. Hooray! :)
62230      path="$FREETYPE_INCLUDE_PATH"
62231      has_space=`$ECHO "$path" | $GREP " "`
62232      if test "x$has_space" != x; then
62233        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62234$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62235        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62236      fi
62237
62238      # Use eval to expand a potential ~
62239      eval path="$path"
62240      if test ! -f "$path" && test ! -d "$path"; then
62241        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62242      fi
62243
62244      if test -d "$path"; then
62245        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62246      else
62247        dir="`$DIRNAME "$path"`"
62248        base="`$BASENAME "$path"`"
62249        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62250      fi
62251    fi
62252  fi
62253
62254      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62255        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62256      else
62257        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62258      fi
62259    fi
62260
62261    if test "x$FREETYPE_LIBS" = x; then
62262
62263  # Only process if variable expands to non-empty
62264
62265  if test "x$FREETYPE_LIB_PATH" != x; then
62266    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62267
62268  # Input might be given as Windows format, start by converting to
62269  # unix format.
62270  path="$FREETYPE_LIB_PATH"
62271  new_path=`$CYGPATH -u "$path"`
62272
62273  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62274  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62275  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62276  # "foo.exe" is OK but "foo" is an error.
62277  #
62278  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62279  # It is also a way to make sure we got the proper file name for the real test later on.
62280  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62281  if test "x$test_shortpath" = x; then
62282    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62283$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62284    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62285  fi
62286
62287  # Call helper function which possibly converts this using DOS-style short mode.
62288  # If so, the updated path is stored in $new_path.
62289
62290  input_path="$new_path"
62291  # Check if we need to convert this using DOS-style short mode. If the path
62292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62293  # take no chances and rewrite it.
62294  # Note: m4 eats our [], so we need to use [ and ] instead.
62295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62296  if test "x$has_forbidden_chars" != x; then
62297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62298    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62299    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62300    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62301      # Going to short mode and back again did indeed matter. Since short mode is
62302      # case insensitive, let's make it lowercase to improve readability.
62303      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62304      # Now convert it back to Unix-style (cygpath)
62305      input_path=`$CYGPATH -u "$shortmode_path"`
62306      new_path="$input_path"
62307    fi
62308  fi
62309
62310  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62311  if test "x$test_cygdrive_prefix" = x; then
62312    # As a simple fix, exclude /usr/bin since it's not a real path.
62313    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62314      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62315      # a path prefixed by /cygdrive for fixpath to work.
62316      new_path="$CYGWIN_ROOT_PATH$input_path"
62317    fi
62318  fi
62319
62320
62321  if test "x$path" != "x$new_path"; then
62322    FREETYPE_LIB_PATH="$new_path"
62323    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62324$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62325  fi
62326
62327    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62328
62329  path="$FREETYPE_LIB_PATH"
62330  has_colon=`$ECHO $path | $GREP ^.:`
62331  new_path="$path"
62332  if test "x$has_colon" = x; then
62333    # Not in mixed or Windows style, start by that.
62334    new_path=`cmd //c echo $path`
62335  fi
62336
62337
62338  input_path="$new_path"
62339  # Check if we need to convert this using DOS-style short mode. If the path
62340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62341  # take no chances and rewrite it.
62342  # Note: m4 eats our [], so we need to use [ and ] instead.
62343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62344  if test "x$has_forbidden_chars" != x; then
62345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62346    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62347  fi
62348
62349
62350  windows_path="$new_path"
62351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62352    unix_path=`$CYGPATH -u "$windows_path"`
62353    new_path="$unix_path"
62354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62356    new_path="$unix_path"
62357  fi
62358
62359  if test "x$path" != "x$new_path"; then
62360    FREETYPE_LIB_PATH="$new_path"
62361    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62362$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62363  fi
62364
62365  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62366  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62367
62368    else
62369      # We're on a unix platform. Hooray! :)
62370      path="$FREETYPE_LIB_PATH"
62371      has_space=`$ECHO "$path" | $GREP " "`
62372      if test "x$has_space" != x; then
62373        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62374$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62375        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62376      fi
62377
62378      # Use eval to expand a potential ~
62379      eval path="$path"
62380      if test ! -f "$path" && test ! -d "$path"; then
62381        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62382      fi
62383
62384      if test -d "$path"; then
62385        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62386      else
62387        dir="`$DIRNAME "$path"`"
62388        base="`$BASENAME "$path"`"
62389        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62390      fi
62391    fi
62392  fi
62393
62394      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62395        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62396      else
62397        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62398      fi
62399    fi
62400
62401    # Try to compile it
62402    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62403$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62404    ac_ext=cpp
62405ac_cpp='$CXXCPP $CPPFLAGS'
62406ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62407ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62408ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62409
62410    PREV_CXXCFLAGS="$CXXFLAGS"
62411    PREV_LIBS="$LIBS"
62412    PREV_CXX="$CXX"
62413    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62414    LIBS="$LIBS $FREETYPE_LIBS"
62415    CXX="$FIXPATH $CXX"
62416    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62417/* end confdefs.h.  */
62418
62419          #include<ft2build.h>
62420          #include FT_FREETYPE_H
62421          int main () {
62422            FT_Init_FreeType(NULL);
62423            return 0;
62424          }
62425
62426_ACEOF
62427if ac_fn_cxx_try_link "$LINENO"; then :
62428
62429          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62430$as_echo "yes" >&6; }
62431
62432else
62433
62434          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62435$as_echo "no" >&6; }
62436          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62437$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62438          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62439$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62440
62441
62442  # Print a helpful message on how to acquire the necessary build dependency.
62443  # freetype is the help tag: freetype, cups, alsa etc
62444  MISSING_DEPENDENCY=freetype
62445
62446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62447    cygwin_help $MISSING_DEPENDENCY
62448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62449    msys_help $MISSING_DEPENDENCY
62450  else
62451    PKGHANDLER_COMMAND=
62452
62453    case $PKGHANDLER in
62454      apt-get)
62455        apt_help     $MISSING_DEPENDENCY ;;
62456      yum)
62457        yum_help     $MISSING_DEPENDENCY ;;
62458      port)
62459        port_help    $MISSING_DEPENDENCY ;;
62460      pkgutil)
62461        pkgutil_help $MISSING_DEPENDENCY ;;
62462      pkgadd)
62463        pkgadd_help  $MISSING_DEPENDENCY ;;
62464    esac
62465
62466    if test "x$PKGHANDLER_COMMAND" != x; then
62467      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62468    fi
62469  fi
62470
62471
62472          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62473
62474
62475fi
62476rm -f core conftest.err conftest.$ac_objext \
62477    conftest$ac_exeext conftest.$ac_ext
62478    CXXCFLAGS="$PREV_CXXFLAGS"
62479    LIBS="$PREV_LIBS"
62480    CXX="$PREV_CXX"
62481    ac_ext=cpp
62482ac_cpp='$CXXCPP $CPPFLAGS'
62483ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62484ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62485ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62486
62487
62488    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62489$as_echo_n "checking if we should bundle freetype... " >&6; }
62490    if test "x$BUNDLE_FREETYPE" = xyes; then
62491      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62492    fi
62493    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62494$as_echo "$BUNDLE_FREETYPE" >&6; }
62495
62496  fi # end freetype needed
62497
62498
62499
62500
62501
62502
62503
62504# Check whether --with-alsa was given.
62505if test "${with_alsa+set}" = set; then :
62506  withval=$with_alsa;
62507fi
62508
62509
62510# Check whether --with-alsa-include was given.
62511if test "${with_alsa_include+set}" = set; then :
62512  withval=$with_alsa_include;
62513fi
62514
62515
62516# Check whether --with-alsa-lib was given.
62517if test "${with_alsa_lib+set}" = set; then :
62518  withval=$with_alsa_lib;
62519fi
62520
62521
62522  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62523    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62524        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62525        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62526      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62527$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62528    fi
62529    ALSA_CFLAGS=
62530    ALSA_LIBS=
62531  else
62532    ALSA_FOUND=no
62533
62534    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62535      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62536    fi
62537
62538    if test "x${with_alsa}" != x; then
62539      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62540      ALSA_CFLAGS="-I${with_alsa}/include"
62541      ALSA_FOUND=yes
62542    fi
62543    if test "x${with_alsa_include}" != x; then
62544      ALSA_CFLAGS="-I${with_alsa_include}"
62545      ALSA_FOUND=yes
62546    fi
62547    if test "x${with_alsa_lib}" != x; then
62548      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62549      ALSA_FOUND=yes
62550    fi
62551    # Do not try pkg-config if we have a sysroot set.
62552    if test "x$SYSROOT" = x; then
62553      if test "x$ALSA_FOUND" = xno; then
62554
62555pkg_failed=no
62556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62557$as_echo_n "checking for ALSA... " >&6; }
62558
62559if test -n "$ALSA_CFLAGS"; then
62560    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62561 elif test -n "$PKG_CONFIG"; then
62562    if test -n "$PKG_CONFIG" && \
62563    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62564  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62565  ac_status=$?
62566  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62567  test $ac_status = 0; }; then
62568  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62569else
62570  pkg_failed=yes
62571fi
62572 else
62573    pkg_failed=untried
62574fi
62575if test -n "$ALSA_LIBS"; then
62576    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62577 elif test -n "$PKG_CONFIG"; then
62578    if test -n "$PKG_CONFIG" && \
62579    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62580  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62581  ac_status=$?
62582  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62583  test $ac_status = 0; }; then
62584  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62585else
62586  pkg_failed=yes
62587fi
62588 else
62589    pkg_failed=untried
62590fi
62591
62592
62593
62594if test $pkg_failed = yes; then
62595
62596if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62597        _pkg_short_errors_supported=yes
62598else
62599        _pkg_short_errors_supported=no
62600fi
62601        if test $_pkg_short_errors_supported = yes; then
62602	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62603        else
62604	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62605        fi
62606	# Put the nasty error message in config.log where it belongs
62607	echo "$ALSA_PKG_ERRORS" >&5
62608
62609	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62610$as_echo "no" >&6; }
62611                ALSA_FOUND=no
62612elif test $pkg_failed = untried; then
62613	ALSA_FOUND=no
62614else
62615	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62616	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62617        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62618$as_echo "yes" >&6; }
62619	ALSA_FOUND=yes
62620fi
62621      fi
62622    fi
62623    if test "x$ALSA_FOUND" = xno; then
62624      for ac_header in alsa/asoundlib.h
62625do :
62626  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62627if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62628  cat >>confdefs.h <<_ACEOF
62629#define HAVE_ALSA_ASOUNDLIB_H 1
62630_ACEOF
62631
62632            ALSA_FOUND=yes
62633            ALSA_CFLAGS=-Iignoreme
62634            ALSA_LIBS=-lasound
62635            DEFAULT_ALSA=yes
62636
62637else
62638  ALSA_FOUND=no
62639
62640fi
62641
62642done
62643
62644    fi
62645    if test "x$ALSA_FOUND" = xno; then
62646
62647  # Print a helpful message on how to acquire the necessary build dependency.
62648  # alsa is the help tag: freetype, cups, alsa etc
62649  MISSING_DEPENDENCY=alsa
62650
62651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62652    cygwin_help $MISSING_DEPENDENCY
62653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62654    msys_help $MISSING_DEPENDENCY
62655  else
62656    PKGHANDLER_COMMAND=
62657
62658    case $PKGHANDLER in
62659      apt-get)
62660        apt_help     $MISSING_DEPENDENCY ;;
62661      yum)
62662        yum_help     $MISSING_DEPENDENCY ;;
62663      port)
62664        port_help    $MISSING_DEPENDENCY ;;
62665      pkgutil)
62666        pkgutil_help $MISSING_DEPENDENCY ;;
62667      pkgadd)
62668        pkgadd_help  $MISSING_DEPENDENCY ;;
62669    esac
62670
62671    if test "x$PKGHANDLER_COMMAND" != x; then
62672      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62673    fi
62674  fi
62675
62676      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62677    fi
62678  fi
62679
62680
62681
62682
62683
62684
62685# Check whether --with-libffi was given.
62686if test "${with_libffi+set}" = set; then :
62687  withval=$with_libffi;
62688fi
62689
62690
62691# Check whether --with-libffi-include was given.
62692if test "${with_libffi_include+set}" = set; then :
62693  withval=$with_libffi_include;
62694fi
62695
62696
62697# Check whether --with-libffi-lib was given.
62698if test "${with_libffi_lib+set}" = set; then :
62699  withval=$with_libffi_lib;
62700fi
62701
62702
62703  if test "x$NEEDS_LIB_FFI" = xfalse; then
62704    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62705        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62706        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62707      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62708$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62709    fi
62710    LIBFFI_CFLAGS=
62711    LIBFFI_LIBS=
62712  else
62713    LIBFFI_FOUND=no
62714
62715    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62716      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62717    fi
62718
62719    if test "x${with_libffi}" != x; then
62720      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62721      LIBFFI_CFLAGS="-I${with_libffi}/include"
62722      LIBFFI_FOUND=yes
62723    fi
62724    if test "x${with_libffi_include}" != x; then
62725      LIBFFI_CFLAGS="-I${with_libffi_include}"
62726      LIBFFI_FOUND=yes
62727    fi
62728    if test "x${with_libffi_lib}" != x; then
62729      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62730      LIBFFI_FOUND=yes
62731    fi
62732    # Do not try pkg-config if we have a sysroot set.
62733    if test "x$SYSROOT" = x; then
62734      if test "x$LIBFFI_FOUND" = xno; then
62735        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62736
62737pkg_failed=no
62738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62739$as_echo_n "checking for LIBFFI... " >&6; }
62740
62741if test -n "$LIBFFI_CFLAGS"; then
62742    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62743 elif test -n "$PKG_CONFIG"; then
62744    if test -n "$PKG_CONFIG" && \
62745    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62746  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62747  ac_status=$?
62748  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62749  test $ac_status = 0; }; then
62750  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62751else
62752  pkg_failed=yes
62753fi
62754 else
62755    pkg_failed=untried
62756fi
62757if test -n "$LIBFFI_LIBS"; then
62758    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62759 elif test -n "$PKG_CONFIG"; then
62760    if test -n "$PKG_CONFIG" && \
62761    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62762  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62763  ac_status=$?
62764  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62765  test $ac_status = 0; }; then
62766  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62767else
62768  pkg_failed=yes
62769fi
62770 else
62771    pkg_failed=untried
62772fi
62773
62774
62775
62776if test $pkg_failed = yes; then
62777
62778if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62779        _pkg_short_errors_supported=yes
62780else
62781        _pkg_short_errors_supported=no
62782fi
62783        if test $_pkg_short_errors_supported = yes; then
62784	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62785        else
62786	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62787        fi
62788	# Put the nasty error message in config.log where it belongs
62789	echo "$LIBFFI_PKG_ERRORS" >&5
62790
62791	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62792$as_echo "no" >&6; }
62793                LIBFFI_FOUND=no
62794elif test $pkg_failed = untried; then
62795	LIBFFI_FOUND=no
62796else
62797	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62798	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62799        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62800$as_echo "yes" >&6; }
62801	LIBFFI_FOUND=yes
62802fi
62803      fi
62804    fi
62805    if test "x$LIBFFI_FOUND" = xno; then
62806      for ac_header in ffi.h
62807do :
62808  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62809if test "x$ac_cv_header_ffi_h" = xyes; then :
62810  cat >>confdefs.h <<_ACEOF
62811#define HAVE_FFI_H 1
62812_ACEOF
62813
62814            LIBFFI_FOUND=yes
62815            LIBFFI_CFLAGS=
62816            LIBFFI_LIBS=-lffi
62817
62818else
62819  LIBFFI_FOUND=no
62820
62821fi
62822
62823done
62824
62825    fi
62826    if test "x$LIBFFI_FOUND" = xno; then
62827
62828  # Print a helpful message on how to acquire the necessary build dependency.
62829  # ffi is the help tag: freetype, cups, alsa etc
62830  MISSING_DEPENDENCY=ffi
62831
62832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62833    cygwin_help $MISSING_DEPENDENCY
62834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62835    msys_help $MISSING_DEPENDENCY
62836  else
62837    PKGHANDLER_COMMAND=
62838
62839    case $PKGHANDLER in
62840      apt-get)
62841        apt_help     $MISSING_DEPENDENCY ;;
62842      yum)
62843        yum_help     $MISSING_DEPENDENCY ;;
62844      port)
62845        port_help    $MISSING_DEPENDENCY ;;
62846      pkgutil)
62847        pkgutil_help $MISSING_DEPENDENCY ;;
62848      pkgadd)
62849        pkgadd_help  $MISSING_DEPENDENCY ;;
62850    esac
62851
62852    if test "x$PKGHANDLER_COMMAND" != x; then
62853      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62854    fi
62855  fi
62856
62857      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62858    fi
62859
62860    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62861$as_echo_n "checking if libffi works... " >&6; }
62862    ac_ext=c
62863ac_cpp='$CPP $CPPFLAGS'
62864ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62865ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62866ac_compiler_gnu=$ac_cv_c_compiler_gnu
62867
62868    OLD_CFLAGS="$CFLAGS"
62869    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62870    OLD_LIBS="$LIBS"
62871    LIBS="$LIBS $LIBFFI_LIBS"
62872    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62873/* end confdefs.h.  */
62874#include <ffi.h>
62875int
62876main ()
62877{
62878
62879          ffi_call(NULL, NULL, NULL, NULL);
62880          return 0;
62881
62882  ;
62883  return 0;
62884}
62885_ACEOF
62886if ac_fn_c_try_link "$LINENO"; then :
62887  LIBFFI_WORKS=yes
62888else
62889  LIBFFI_WORKS=no
62890
62891fi
62892rm -f core conftest.err conftest.$ac_objext \
62893    conftest$ac_exeext conftest.$ac_ext
62894    CFLAGS="$OLD_CFLAGS"
62895    LIBS="$OLD_LIBS"
62896    ac_ext=cpp
62897ac_cpp='$CXXCPP $CPPFLAGS'
62898ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62899ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62900ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62901
62902    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62903$as_echo "$LIBFFI_WORKS" >&6; }
62904
62905    if test "x$LIBFFI_WORKS" = xno; then
62906
62907  # Print a helpful message on how to acquire the necessary build dependency.
62908  # ffi is the help tag: freetype, cups, alsa etc
62909  MISSING_DEPENDENCY=ffi
62910
62911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62912    cygwin_help $MISSING_DEPENDENCY
62913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62914    msys_help $MISSING_DEPENDENCY
62915  else
62916    PKGHANDLER_COMMAND=
62917
62918    case $PKGHANDLER in
62919      apt-get)
62920        apt_help     $MISSING_DEPENDENCY ;;
62921      yum)
62922        yum_help     $MISSING_DEPENDENCY ;;
62923      port)
62924        port_help    $MISSING_DEPENDENCY ;;
62925      pkgutil)
62926        pkgutil_help $MISSING_DEPENDENCY ;;
62927      pkgadd)
62928        pkgadd_help  $MISSING_DEPENDENCY ;;
62929    esac
62930
62931    if test "x$PKGHANDLER_COMMAND" != x; then
62932      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62933    fi
62934  fi
62935
62936      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
62937    fi
62938  fi
62939
62940
62941
62942
62943
62944  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
62945    # Extract the first word of "llvm-config", so it can be a program name with args.
62946set dummy llvm-config; ac_word=$2
62947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62948$as_echo_n "checking for $ac_word... " >&6; }
62949if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
62950  $as_echo_n "(cached) " >&6
62951else
62952  if test -n "$LLVM_CONFIG"; then
62953  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
62954else
62955as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62956for as_dir in $PATH
62957do
62958  IFS=$as_save_IFS
62959  test -z "$as_dir" && as_dir=.
62960    for ac_exec_ext in '' $ac_executable_extensions; do
62961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62962    ac_cv_prog_LLVM_CONFIG="llvm-config"
62963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62964    break 2
62965  fi
62966done
62967  done
62968IFS=$as_save_IFS
62969
62970fi
62971fi
62972LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
62973if test -n "$LLVM_CONFIG"; then
62974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
62975$as_echo "$LLVM_CONFIG" >&6; }
62976else
62977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62978$as_echo "no" >&6; }
62979fi
62980
62981
62982
62983    if test "x$LLVM_CONFIG" != xllvm-config; then
62984      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
62985    fi
62986
62987    llvm_components="jit mcjit engine nativecodegen native"
62988    unset LLVM_CFLAGS
62989    for flag in $("$LLVM_CONFIG" --cxxflags); do
62990      if echo "${flag}" | grep -q '^-[ID]'; then
62991        if test "${flag}" != "-D_DEBUG" ; then
62992          if test "${LLVM_CFLAGS}" != "" ; then
62993            LLVM_CFLAGS="${LLVM_CFLAGS} "
62994          fi
62995          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
62996        fi
62997      fi
62998    done
62999    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63000    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63001
63002    unset LLVM_LDFLAGS
63003    for flag in $("${LLVM_CONFIG}" --ldflags); do
63004      if echo "${flag}" | grep -q '^-L'; then
63005        if test "${LLVM_LDFLAGS}" != ""; then
63006          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63007        fi
63008        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63009      fi
63010    done
63011
63012    unset LLVM_LIBS
63013    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63014      if echo "${flag}" | grep -q '^-l'; then
63015        if test "${LLVM_LIBS}" != ""; then
63016          LLVM_LIBS="${LLVM_LIBS} "
63017        fi
63018        LLVM_LIBS="${LLVM_LIBS}${flag}"
63019      fi
63020    done
63021
63022    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63023    # always properly detect -ltinfo
63024    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63025
63026
63027
63028
63029  fi
63030
63031
63032
63033# Check whether --with-libjpeg was given.
63034if test "${with_libjpeg+set}" = set; then :
63035  withval=$with_libjpeg;
63036fi
63037
63038
63039  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63040$as_echo_n "checking for which libjpeg to use... " >&6; }
63041  # default is bundled
63042  DEFAULT_LIBJPEG=bundled
63043  # if user didn't specify, use DEFAULT_LIBJPEG
63044  if test "x${with_libjpeg}" = "x"; then
63045    with_libjpeg=${DEFAULT_LIBJPEG}
63046  fi
63047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63048$as_echo "${with_libjpeg}" >&6; }
63049
63050  if test "x${with_libjpeg}" = "xbundled"; then
63051    USE_EXTERNAL_LIBJPEG=false
63052  elif test "x${with_libjpeg}" = "xsystem"; then
63053    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63054if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63055
63056else
63057   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63058fi
63059
63060
63061    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63062$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63063if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63064  $as_echo_n "(cached) " >&6
63065else
63066  ac_check_lib_save_LIBS=$LIBS
63067LIBS="-ljpeg  $LIBS"
63068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63069/* end confdefs.h.  */
63070
63071/* Override any GCC internal prototype to avoid an error.
63072   Use char because int might match the return type of a GCC
63073   builtin and then its argument prototype would still apply.  */
63074#ifdef __cplusplus
63075extern "C"
63076#endif
63077char jpeg_CreateDecompress ();
63078int
63079main ()
63080{
63081return jpeg_CreateDecompress ();
63082  ;
63083  return 0;
63084}
63085_ACEOF
63086if ac_fn_cxx_try_link "$LINENO"; then :
63087  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63088else
63089  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63090fi
63091rm -f core conftest.err conftest.$ac_objext \
63092    conftest$ac_exeext conftest.$ac_ext
63093LIBS=$ac_check_lib_save_LIBS
63094fi
63095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63096$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63097if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63098  cat >>confdefs.h <<_ACEOF
63099#define HAVE_LIBJPEG 1
63100_ACEOF
63101
63102  LIBS="-ljpeg $LIBS"
63103
63104else
63105   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63106fi
63107
63108
63109    USE_EXTERNAL_LIBJPEG=true
63110  else
63111    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63112  fi
63113
63114
63115
63116
63117
63118# Check whether --with-giflib was given.
63119if test "${with_giflib+set}" = set; then :
63120  withval=$with_giflib;
63121fi
63122
63123
63124  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63125$as_echo_n "checking for which giflib to use... " >&6; }
63126  # default is bundled
63127  DEFAULT_GIFLIB=bundled
63128  # if user didn't specify, use DEFAULT_GIFLIB
63129  if test "x${with_giflib}" = "x"; then
63130    with_giflib=${DEFAULT_GIFLIB}
63131  fi
63132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63133$as_echo "${with_giflib}" >&6; }
63134
63135  if test "x${with_giflib}" = "xbundled"; then
63136    USE_EXTERNAL_LIBGIF=false
63137  elif test "x${with_giflib}" = "xsystem"; then
63138    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63139if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63140
63141else
63142   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63143fi
63144
63145
63146    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63147$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63148if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63149  $as_echo_n "(cached) " >&6
63150else
63151  ac_check_lib_save_LIBS=$LIBS
63152LIBS="-lgif  $LIBS"
63153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63154/* end confdefs.h.  */
63155
63156/* Override any GCC internal prototype to avoid an error.
63157   Use char because int might match the return type of a GCC
63158   builtin and then its argument prototype would still apply.  */
63159#ifdef __cplusplus
63160extern "C"
63161#endif
63162char DGifGetCode ();
63163int
63164main ()
63165{
63166return DGifGetCode ();
63167  ;
63168  return 0;
63169}
63170_ACEOF
63171if ac_fn_cxx_try_link "$LINENO"; then :
63172  ac_cv_lib_gif_DGifGetCode=yes
63173else
63174  ac_cv_lib_gif_DGifGetCode=no
63175fi
63176rm -f core conftest.err conftest.$ac_objext \
63177    conftest$ac_exeext conftest.$ac_ext
63178LIBS=$ac_check_lib_save_LIBS
63179fi
63180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63181$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63182if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63183  cat >>confdefs.h <<_ACEOF
63184#define HAVE_LIBGIF 1
63185_ACEOF
63186
63187  LIBS="-lgif $LIBS"
63188
63189else
63190   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63191fi
63192
63193
63194    USE_EXTERNAL_LIBGIF=true
63195  else
63196    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63197  fi
63198
63199
63200
63201
63202
63203# Check whether --with-libpng was given.
63204if test "${with_libpng+set}" = set; then :
63205  withval=$with_libpng;
63206fi
63207
63208
63209  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63210$as_echo_n "checking for which libpng to use... " >&6; }
63211
63212  # default is bundled
63213  DEFAULT_LIBPNG=bundled
63214  # if user didn't specify, use DEFAULT_LIBPNG
63215  if test "x${with_libpng}" = "x"; then
63216      with_libpng=${DEFAULT_LIBPNG}
63217  fi
63218
63219  if test "x${with_libpng}" = "xbundled"; then
63220      USE_EXTERNAL_LIBPNG=false
63221      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63222$as_echo "bundled" >&6; }
63223  elif test "x${with_libpng}" = "xsystem"; then
63224
63225pkg_failed=no
63226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63227$as_echo_n "checking for PNG... " >&6; }
63228
63229if test -n "$PNG_CFLAGS"; then
63230    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63231 elif test -n "$PKG_CONFIG"; then
63232    if test -n "$PKG_CONFIG" && \
63233    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63234  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63235  ac_status=$?
63236  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63237  test $ac_status = 0; }; then
63238  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63239else
63240  pkg_failed=yes
63241fi
63242 else
63243    pkg_failed=untried
63244fi
63245if test -n "$PNG_LIBS"; then
63246    pkg_cv_PNG_LIBS="$PNG_LIBS"
63247 elif test -n "$PKG_CONFIG"; then
63248    if test -n "$PKG_CONFIG" && \
63249    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63250  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63251  ac_status=$?
63252  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63253  test $ac_status = 0; }; then
63254  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63255else
63256  pkg_failed=yes
63257fi
63258 else
63259    pkg_failed=untried
63260fi
63261
63262
63263
63264if test $pkg_failed = yes; then
63265
63266if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63267        _pkg_short_errors_supported=yes
63268else
63269        _pkg_short_errors_supported=no
63270fi
63271        if test $_pkg_short_errors_supported = yes; then
63272	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63273        else
63274	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63275        fi
63276	# Put the nasty error message in config.log where it belongs
63277	echo "$PNG_PKG_ERRORS" >&5
63278
63279	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63280$as_echo "no" >&6; }
63281                 LIBPNG_FOUND=no
63282elif test $pkg_failed = untried; then
63283	 LIBPNG_FOUND=no
63284else
63285	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63286	PNG_LIBS=$pkg_cv_PNG_LIBS
63287        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63288$as_echo "yes" >&6; }
63289	 LIBPNG_FOUND=yes
63290fi
63291      if test "x${LIBPNG_FOUND}" = "xyes"; then
63292          USE_EXTERNAL_LIBPNG=true
63293          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63294$as_echo "system" >&6; }
63295      else
63296          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63297$as_echo "system not found" >&6; }
63298          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63299      fi
63300  else
63301      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63302  fi
63303
63304
63305
63306
63307
63308# Check whether --with-zlib was given.
63309if test "${with_zlib+set}" = set; then :
63310  withval=$with_zlib;
63311fi
63312
63313
63314  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63315$as_echo_n "checking for compress in -lz... " >&6; }
63316if ${ac_cv_lib_z_compress+:} false; then :
63317  $as_echo_n "(cached) " >&6
63318else
63319  ac_check_lib_save_LIBS=$LIBS
63320LIBS="-lz  $LIBS"
63321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63322/* end confdefs.h.  */
63323
63324/* Override any GCC internal prototype to avoid an error.
63325   Use char because int might match the return type of a GCC
63326   builtin and then its argument prototype would still apply.  */
63327#ifdef __cplusplus
63328extern "C"
63329#endif
63330char compress ();
63331int
63332main ()
63333{
63334return compress ();
63335  ;
63336  return 0;
63337}
63338_ACEOF
63339if ac_fn_cxx_try_link "$LINENO"; then :
63340  ac_cv_lib_z_compress=yes
63341else
63342  ac_cv_lib_z_compress=no
63343fi
63344rm -f core conftest.err conftest.$ac_objext \
63345    conftest$ac_exeext conftest.$ac_ext
63346LIBS=$ac_check_lib_save_LIBS
63347fi
63348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63349$as_echo "$ac_cv_lib_z_compress" >&6; }
63350if test "x$ac_cv_lib_z_compress" = xyes; then :
63351   ZLIB_FOUND=yes
63352else
63353   ZLIB_FOUND=no
63354fi
63355
63356
63357  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63358$as_echo_n "checking for which zlib to use... " >&6; }
63359
63360  DEFAULT_ZLIB=system
63361  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63362    # On windows default is bundled...on others default is system
63363    DEFAULT_ZLIB=bundled
63364  fi
63365
63366  if test "x${ZLIB_FOUND}" != "xyes"; then
63367    # If we don't find any system...set default to bundled
63368    DEFAULT_ZLIB=bundled
63369  fi
63370
63371  # If user didn't specify, use DEFAULT_ZLIB
63372  if test "x${with_zlib}" = "x"; then
63373    with_zlib=${DEFAULT_ZLIB}
63374  fi
63375
63376  if test "x${with_zlib}" = "xbundled"; then
63377    USE_EXTERNAL_LIBZ=false
63378    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63379$as_echo "bundled" >&6; }
63380  elif test "x${with_zlib}" = "xsystem"; then
63381    if test "x${ZLIB_FOUND}" = "xyes"; then
63382      USE_EXTERNAL_LIBZ=true
63383      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63384$as_echo "system" >&6; }
63385    else
63386      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63387$as_echo "system not found" >&6; }
63388      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63389    fi
63390  else
63391    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63392  fi
63393
63394
63395
63396
63397
63398# Check whether --with-lcms was given.
63399if test "${with_lcms+set}" = set; then :
63400  withval=$with_lcms;
63401fi
63402
63403
63404  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63405$as_echo_n "checking for which lcms to use... " >&6; }
63406
63407  DEFAULT_LCMS=bundled
63408  # If user didn't specify, use DEFAULT_LCMS
63409  if test "x${with_lcms}" = "x"; then
63410      with_lcms=${DEFAULT_LCMS}
63411  fi
63412
63413  if test "x${with_lcms}" = "xbundled"; then
63414    USE_EXTERNAL_LCMS=false
63415    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63416$as_echo "bundled" >&6; }
63417  elif test "x${with_lcms}" = "xsystem"; then
63418    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63419$as_echo "system" >&6; }
63420
63421pkg_failed=no
63422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63423$as_echo_n "checking for LCMS... " >&6; }
63424
63425if test -n "$LCMS_CFLAGS"; then
63426    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63427 elif test -n "$PKG_CONFIG"; then
63428    if test -n "$PKG_CONFIG" && \
63429    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63430  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63431  ac_status=$?
63432  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63433  test $ac_status = 0; }; then
63434  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63435else
63436  pkg_failed=yes
63437fi
63438 else
63439    pkg_failed=untried
63440fi
63441if test -n "$LCMS_LIBS"; then
63442    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63443 elif test -n "$PKG_CONFIG"; then
63444    if test -n "$PKG_CONFIG" && \
63445    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63446  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63447  ac_status=$?
63448  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63449  test $ac_status = 0; }; then
63450  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63451else
63452  pkg_failed=yes
63453fi
63454 else
63455    pkg_failed=untried
63456fi
63457
63458
63459
63460if test $pkg_failed = yes; then
63461
63462if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63463        _pkg_short_errors_supported=yes
63464else
63465        _pkg_short_errors_supported=no
63466fi
63467        if test $_pkg_short_errors_supported = yes; then
63468	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63469        else
63470	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63471        fi
63472	# Put the nasty error message in config.log where it belongs
63473	echo "$LCMS_PKG_ERRORS" >&5
63474
63475	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63476$as_echo "no" >&6; }
63477                LCMS_FOUND=no
63478elif test $pkg_failed = untried; then
63479	LCMS_FOUND=no
63480else
63481	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63482	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63483        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63484$as_echo "yes" >&6; }
63485	LCMS_FOUND=yes
63486fi
63487    if test "x${LCMS_FOUND}" = "xyes"; then
63488      USE_EXTERNAL_LCMS=true
63489    else
63490      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63491    fi
63492  else
63493    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63494  fi
63495
63496
63497
63498
63499
63500
63501
63502
63503
63504
63505
63506  # Setup libm (the maths library)
63507  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63508    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63509$as_echo_n "checking for cos in -lm... " >&6; }
63510if ${ac_cv_lib_m_cos+:} false; then :
63511  $as_echo_n "(cached) " >&6
63512else
63513  ac_check_lib_save_LIBS=$LIBS
63514LIBS="-lm  $LIBS"
63515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63516/* end confdefs.h.  */
63517
63518/* Override any GCC internal prototype to avoid an error.
63519   Use char because int might match the return type of a GCC
63520   builtin and then its argument prototype would still apply.  */
63521#ifdef __cplusplus
63522extern "C"
63523#endif
63524char cos ();
63525int
63526main ()
63527{
63528return cos ();
63529  ;
63530  return 0;
63531}
63532_ACEOF
63533if ac_fn_cxx_try_link "$LINENO"; then :
63534  ac_cv_lib_m_cos=yes
63535else
63536  ac_cv_lib_m_cos=no
63537fi
63538rm -f core conftest.err conftest.$ac_objext \
63539    conftest$ac_exeext conftest.$ac_ext
63540LIBS=$ac_check_lib_save_LIBS
63541fi
63542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63543$as_echo "$ac_cv_lib_m_cos" >&6; }
63544if test "x$ac_cv_lib_m_cos" = xyes; then :
63545  cat >>confdefs.h <<_ACEOF
63546#define HAVE_LIBM 1
63547_ACEOF
63548
63549  LIBS="-lm $LIBS"
63550
63551else
63552
63553        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63554$as_echo "$as_me: Maths library was not found" >&6;}
63555
63556fi
63557
63558    LIBM="-lm"
63559  else
63560    LIBM=""
63561  fi
63562
63563
63564  # Setup libdl (for dynamic library loading)
63565  save_LIBS="$LIBS"
63566  LIBS=""
63567  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63568$as_echo_n "checking for dlopen in -ldl... " >&6; }
63569if ${ac_cv_lib_dl_dlopen+:} false; then :
63570  $as_echo_n "(cached) " >&6
63571else
63572  ac_check_lib_save_LIBS=$LIBS
63573LIBS="-ldl  $LIBS"
63574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63575/* end confdefs.h.  */
63576
63577/* Override any GCC internal prototype to avoid an error.
63578   Use char because int might match the return type of a GCC
63579   builtin and then its argument prototype would still apply.  */
63580#ifdef __cplusplus
63581extern "C"
63582#endif
63583char dlopen ();
63584int
63585main ()
63586{
63587return dlopen ();
63588  ;
63589  return 0;
63590}
63591_ACEOF
63592if ac_fn_cxx_try_link "$LINENO"; then :
63593  ac_cv_lib_dl_dlopen=yes
63594else
63595  ac_cv_lib_dl_dlopen=no
63596fi
63597rm -f core conftest.err conftest.$ac_objext \
63598    conftest$ac_exeext conftest.$ac_ext
63599LIBS=$ac_check_lib_save_LIBS
63600fi
63601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63602$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63603if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63604  cat >>confdefs.h <<_ACEOF
63605#define HAVE_LIBDL 1
63606_ACEOF
63607
63608  LIBS="-ldl $LIBS"
63609
63610fi
63611
63612  LIBDL="$LIBS"
63613
63614  LIBS="$save_LIBS"
63615
63616  # Deprecated libraries, keep the flags for backwards compatibility
63617  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63618
63619
63620# Check whether --with-dxsdk was given.
63621if test "${with_dxsdk+set}" = set; then :
63622  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63623$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63624fi
63625
63626
63627
63628
63629# Check whether --with-dxsdk-lib was given.
63630if test "${with_dxsdk_lib+set}" = set; then :
63631  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63632$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63633fi
63634
63635
63636
63637
63638# Check whether --with-dxsdk-include was given.
63639if test "${with_dxsdk_include+set}" = set; then :
63640  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63641$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63642fi
63643
63644
63645  fi
63646
63647  # Control if libzip can use mmap. Available for purposes of overriding.
63648  LIBZIP_CAN_USE_MMAP=true
63649
63650
63651
63652  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
63653    # Find the root of the Solaris Studio installation from the compiler path
63654    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63655    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63656    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63657$as_echo_n "checking for libstlport.so.1... " >&6; }
63658    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
63659      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
63660      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
63661    fi
63662    if test -f "$STLPORT_LIB"; then
63663      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63664$as_echo "yes, $STLPORT_LIB" >&6; }
63665
63666  # Only process if variable expands to non-empty
63667
63668  if test "x$STLPORT_LIB" != x; then
63669    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63670
63671  # Input might be given as Windows format, start by converting to
63672  # unix format.
63673  path="$STLPORT_LIB"
63674  new_path=`$CYGPATH -u "$path"`
63675
63676  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63677  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63678  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63679  # "foo.exe" is OK but "foo" is an error.
63680  #
63681  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63682  # It is also a way to make sure we got the proper file name for the real test later on.
63683  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63684  if test "x$test_shortpath" = x; then
63685    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63686$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63687    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63688  fi
63689
63690  # Call helper function which possibly converts this using DOS-style short mode.
63691  # If so, the updated path is stored in $new_path.
63692
63693  input_path="$new_path"
63694  # Check if we need to convert this using DOS-style short mode. If the path
63695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63696  # take no chances and rewrite it.
63697  # Note: m4 eats our [], so we need to use [ and ] instead.
63698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63699  if test "x$has_forbidden_chars" != x; then
63700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63701    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63702    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63703    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63704      # Going to short mode and back again did indeed matter. Since short mode is
63705      # case insensitive, let's make it lowercase to improve readability.
63706      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63707      # Now convert it back to Unix-style (cygpath)
63708      input_path=`$CYGPATH -u "$shortmode_path"`
63709      new_path="$input_path"
63710    fi
63711  fi
63712
63713  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63714  if test "x$test_cygdrive_prefix" = x; then
63715    # As a simple fix, exclude /usr/bin since it's not a real path.
63716    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63717      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63718      # a path prefixed by /cygdrive for fixpath to work.
63719      new_path="$CYGWIN_ROOT_PATH$input_path"
63720    fi
63721  fi
63722
63723
63724  if test "x$path" != "x$new_path"; then
63725    STLPORT_LIB="$new_path"
63726    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63727$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63728  fi
63729
63730    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63731
63732  path="$STLPORT_LIB"
63733  has_colon=`$ECHO $path | $GREP ^.:`
63734  new_path="$path"
63735  if test "x$has_colon" = x; then
63736    # Not in mixed or Windows style, start by that.
63737    new_path=`cmd //c echo $path`
63738  fi
63739
63740
63741  input_path="$new_path"
63742  # Check if we need to convert this using DOS-style short mode. If the path
63743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63744  # take no chances and rewrite it.
63745  # Note: m4 eats our [], so we need to use [ and ] instead.
63746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63747  if test "x$has_forbidden_chars" != x; then
63748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63749    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63750  fi
63751
63752
63753  windows_path="$new_path"
63754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63755    unix_path=`$CYGPATH -u "$windows_path"`
63756    new_path="$unix_path"
63757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63759    new_path="$unix_path"
63760  fi
63761
63762  if test "x$path" != "x$new_path"; then
63763    STLPORT_LIB="$new_path"
63764    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63765$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63766  fi
63767
63768  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63769  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63770
63771    else
63772      # We're on a unix platform. Hooray! :)
63773      path="$STLPORT_LIB"
63774      has_space=`$ECHO "$path" | $GREP " "`
63775      if test "x$has_space" != x; then
63776        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63777$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63778        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63779      fi
63780
63781      # Use eval to expand a potential ~
63782      eval path="$path"
63783      if test ! -f "$path" && test ! -d "$path"; then
63784        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63785      fi
63786
63787      if test -d "$path"; then
63788        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63789      else
63790        dir="`$DIRNAME "$path"`"
63791        base="`$BASENAME "$path"`"
63792        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63793      fi
63794    fi
63795  fi
63796
63797    else
63798      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63799$as_echo "no, not found at $STLPORT_LIB" >&6; }
63800      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63801    fi
63802
63803  fi
63804
63805
63806
63807
63808
63809
63810
63811
63812
63813
63814
63815
63816
63817
63818###############################################################################
63819#
63820# We need to do some final tweaking, when everything else is done.
63821#
63822###############################################################################
63823
63824
63825  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63826$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63827
63828  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63829    ENABLE_INTREE_EC=yes
63830    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63831$as_echo "yes" >&6; }
63832  else
63833    ENABLE_INTREE_EC=no
63834    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63835$as_echo "no" >&6; }
63836  fi
63837
63838
63839
63840
63841  # Check whether --enable-jtreg-failure-handler was given.
63842if test "${enable_jtreg_failure_handler+set}" = set; then :
63843  enableval=$enable_jtreg_failure_handler;
63844fi
63845
63846
63847  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
63848$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
63849
63850  if test "x$enable_jtreg_failure_handler" = "xyes"; then
63851    if test "x$JT_HOME" = "x"; then
63852      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
63853    else
63854      BUILD_FAILURE_HANDLER=true
63855      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63856$as_echo "yes, forced" >&6; }
63857    fi
63858  elif test "x$enable_jtreg_failure_handler" = "xno"; then
63859    BUILD_FAILURE_HANDLER=false
63860    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63861$as_echo "no, forced" >&6; }
63862  elif test "x$enable_jtreg_failure_handler" = "xauto" \
63863      || test "x$enable_jtreg_failure_handler" = "x"; then
63864    if test "x$JT_HOME" = "x"; then
63865      BUILD_FAILURE_HANDLER=false
63866      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
63867$as_echo "no, missing jtreg" >&6; }
63868    else
63869      BUILD_FAILURE_HANDLER=true
63870      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
63871$as_echo "yes, jtreg present" >&6; }
63872    fi
63873  else
63874    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
63875  fi
63876
63877
63878
63879
63880  # Check whether --enable-generate-classlist was given.
63881if test "${enable_generate_classlist+set}" = set; then :
63882  enableval=$enable_generate_classlist;
63883fi
63884
63885
63886  # Check if it's likely that it's possible to generate the classlist. Depending
63887  # on exact jvm configuration it could be possible anyway.
63888  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
63889    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
63890  else
63891    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
63892  fi
63893
63894  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
63895$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
63896  if test "x$enable_generate_classlist" = "xyes"; then
63897    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63898$as_echo "yes, forced" >&6; }
63899    ENABLE_GENERATE_CLASSLIST="true"
63900    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
63901      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
63902$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
63903    fi
63904  elif test "x$enable_generate_classlist" = "xno"; then
63905    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63906$as_echo "no, forced" >&6; }
63907    ENABLE_GENERATE_CLASSLIST="false"
63908  elif test "x$enable_generate_classlist" = "x"; then
63909    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
63910      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63911$as_echo "yes" >&6; }
63912      ENABLE_GENERATE_CLASSLIST="true"
63913    else
63914      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63915$as_echo "no" >&6; }
63916      ENABLE_GENERATE_CLASSLIST="false"
63917    fi
63918  else
63919    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
63920  fi
63921
63922
63923
63924
63925###############################################################################
63926#
63927# Configure parts of the build that only affect the build performance,
63928# not the result.
63929#
63930###############################################################################
63931
63932
63933  # How many cores do we have on this build system?
63934
63935# Check whether --with-num-cores was given.
63936if test "${with_num_cores+set}" = set; then :
63937  withval=$with_num_cores;
63938fi
63939
63940  if test "x$with_num_cores" = x; then
63941    # The number of cores were not specified, try to probe them.
63942
63943  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63944$as_echo_n "checking for number of cores... " >&6; }
63945  NUM_CORES=1
63946  FOUND_CORES=no
63947
63948  if test -f /proc/cpuinfo; then
63949    # Looks like a Linux (or cygwin) system
63950    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63951    FOUND_CORES=yes
63952  elif test -x /usr/sbin/psrinfo; then
63953    # Looks like a Solaris system
63954    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63955    FOUND_CORES=yes
63956  elif test -x /usr/sbin/sysctl; then
63957    # Looks like a MacOSX system
63958    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63959    FOUND_CORES=yes
63960  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63961    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63962    FOUND_CORES=yes
63963  elif test -n "$NUMBER_OF_PROCESSORS"; then
63964    # On windows, look in the env
63965    NUM_CORES=$NUMBER_OF_PROCESSORS
63966    FOUND_CORES=yes
63967  fi
63968
63969  if test "x$FOUND_CORES" = xyes; then
63970    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63971$as_echo "$NUM_CORES" >&6; }
63972  else
63973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
63974$as_echo "could not detect number of cores, defaulting to 1" >&6; }
63975    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
63976$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
63977  fi
63978
63979  else
63980    NUM_CORES=$with_num_cores
63981  fi
63982
63983
63984
63985  # How much memory do we have on this build system?
63986
63987# Check whether --with-memory-size was given.
63988if test "${with_memory_size+set}" = set; then :
63989  withval=$with_memory_size;
63990fi
63991
63992  if test "x$with_memory_size" = x; then
63993    # The memory size was not specified, try to probe it.
63994
63995  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
63996$as_echo_n "checking for memory size... " >&6; }
63997  # Default to 1024 MB
63998  MEMORY_SIZE=1024
63999  FOUND_MEM=no
64000
64001  if test -f /proc/meminfo; then
64002    # Looks like a Linux (or cygwin) system
64003    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64004    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64005    FOUND_MEM=yes
64006  elif test -x /usr/sbin/prtconf; then
64007    # Looks like a Solaris or AIX system
64008    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64009    FOUND_MEM=yes
64010  elif test -x /usr/sbin/sysctl; then
64011    # Looks like a MacOSX system
64012    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64013    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64014    FOUND_MEM=yes
64015  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64016    # Windows, but without cygwin
64017    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64018    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64019    FOUND_MEM=yes
64020  fi
64021
64022  if test "x$FOUND_MEM" = xyes; then
64023    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64024$as_echo "$MEMORY_SIZE MB" >&6; }
64025  else
64026    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64027$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64028    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64029$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64030  fi
64031
64032  else
64033    MEMORY_SIZE=$with_memory_size
64034  fi
64035
64036
64037
64038  # Provide a decent default number of parallel jobs for make depending on
64039  # number of cores, amount of memory and machine architecture.
64040
64041# Check whether --with-jobs was given.
64042if test "${with_jobs+set}" = set; then :
64043  withval=$with_jobs;
64044fi
64045
64046  if test "x$with_jobs" = x; then
64047    # Number of jobs was not specified, calculate.
64048    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64049$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64050    # Approximate memory in GB.
64051    memory_gb=`expr $MEMORY_SIZE / 1024`
64052    # Pick the lowest of memory in gb and number of cores.
64053    if test "$memory_gb" -lt "$NUM_CORES"; then
64054      JOBS="$memory_gb"
64055    else
64056      JOBS="$NUM_CORES"
64057    fi
64058    if test "$JOBS" -eq "0"; then
64059      JOBS=1
64060    fi
64061    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64062$as_echo "$JOBS" >&6; }
64063  else
64064    JOBS=$with_jobs
64065  fi
64066
64067
64068
64069  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64070
64071# Check whether --with-test-jobs was given.
64072if test "${with_test_jobs+set}" = set; then :
64073  withval=$with_test_jobs;
64074fi
64075
64076  if test "x$with_test_jobs" = x; then
64077      TEST_JOBS=0
64078  else
64079      TEST_JOBS=$with_test_jobs
64080  fi
64081
64082
64083
64084# Setup arguments for the boot jdk (after cores and memory have been setup)
64085
64086  ##############################################################################
64087  #
64088  # Specify jvm options for anything that is run with the Boot JDK.
64089  # Not all JVM:s accept the same arguments on the command line.
64090  #
64091
64092# Check whether --with-boot-jdk-jvmargs was given.
64093if test "${with_boot_jdk_jvmargs+set}" = set; then :
64094  withval=$with_boot_jdk_jvmargs;
64095fi
64096
64097
64098  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64099$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64100
64101  # Disable special log output when a debug build is used as Boot JDK...
64102
64103  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64104  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64105  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64106  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64107  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64108  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64109    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64110    JVM_ARG_OK=true
64111  else
64112    $ECHO "Arg failed:" >&5
64113    $ECHO "$OUTPUT" >&5
64114    JVM_ARG_OK=false
64115  fi
64116
64117
64118  # Force en-US environment
64119
64120  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64121  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64122  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64123  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64124  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64125  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64126    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64127    JVM_ARG_OK=true
64128  else
64129    $ECHO "Arg failed:" >&5
64130    $ECHO "$OUTPUT" >&5
64131    JVM_ARG_OK=false
64132  fi
64133
64134
64135  # Apply user provided options.
64136
64137  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64138  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64139  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64140  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64141  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64142  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64143    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64144    JVM_ARG_OK=true
64145  else
64146    $ECHO "Arg failed:" >&5
64147    $ECHO "$OUTPUT" >&5
64148    JVM_ARG_OK=false
64149  fi
64150
64151
64152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64153$as_echo "$boot_jdk_jvmargs" >&6; }
64154
64155  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64156  JAVA_FLAGS=$boot_jdk_jvmargs
64157
64158
64159
64160  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64161$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64162
64163  # Starting amount of heap memory.
64164
64165  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64166  $ECHO "Command: $JAVA -Xms64M -version" >&5
64167  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64168  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64169  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64170  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64171    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64172    JVM_ARG_OK=true
64173  else
64174    $ECHO "Arg failed:" >&5
64175    $ECHO "$OUTPUT" >&5
64176    JVM_ARG_OK=false
64177  fi
64178
64179  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64180
64181  # Maximum amount of heap memory and stack size.
64182  JVM_HEAP_LIMIT_32="1024"
64183  # Running a 64 bit JVM allows for and requires a bigger heap
64184  JVM_HEAP_LIMIT_64="1600"
64185  STACK_SIZE_32=768
64186  STACK_SIZE_64=1536
64187  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64188  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64189    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64190  fi
64191  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64192    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64193  fi
64194  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64195    JVM_HEAP_LIMIT_32=512
64196    JVM_HEAP_LIMIT_64=512
64197  fi
64198
64199  if test "x$BOOT_JDK_BITS" = "x32"; then
64200    STACK_SIZE=$STACK_SIZE_32
64201    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64202  else
64203    STACK_SIZE=$STACK_SIZE_64
64204    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64205  fi
64206
64207  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64208  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64209  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64210  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64211  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64212  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64213    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64214    JVM_ARG_OK=true
64215  else
64216    $ECHO "Arg failed:" >&5
64217    $ECHO "$OUTPUT" >&5
64218    JVM_ARG_OK=false
64219  fi
64220
64221
64222  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64223  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64224  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64225  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64226  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64227  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64228    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64229    JVM_ARG_OK=true
64230  else
64231    $ECHO "Arg failed:" >&5
64232    $ECHO "$OUTPUT" >&5
64233    JVM_ARG_OK=false
64234  fi
64235
64236
64237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64238$as_echo "$boot_jdk_jvmargs_big" >&6; }
64239
64240  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64241
64242
64243  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64244    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64245    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64246  else
64247    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64248    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64249  fi
64250  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64251  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64252  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64253$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64255$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64256
64257
64258  # By default, the main javac compilations use big
64259  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64260
64261
64262  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64263$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64264
64265  # Use serial gc for small short lived tools if possible
64266
64267  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64268  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64269  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64270  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64271  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64272  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64273    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64274    JVM_ARG_OK=true
64275  else
64276    $ECHO "Arg failed:" >&5
64277    $ECHO "$OUTPUT" >&5
64278    JVM_ARG_OK=false
64279  fi
64280
64281
64282  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64283  $ECHO "Command: $JAVA -Xms32M -version" >&5
64284  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64285  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64286  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64287  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64288    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64289    JVM_ARG_OK=true
64290  else
64291    $ECHO "Arg failed:" >&5
64292    $ECHO "$OUTPUT" >&5
64293    JVM_ARG_OK=false
64294  fi
64295
64296
64297  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64298  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64299  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64300  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64301  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64302  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64303    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64304    JVM_ARG_OK=true
64305  else
64306    $ECHO "Arg failed:" >&5
64307    $ECHO "$OUTPUT" >&5
64308    JVM_ARG_OK=false
64309  fi
64310
64311
64312  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64313  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64314  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64315  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64316  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64317  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64318    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64319    JVM_ARG_OK=true
64320  else
64321    $ECHO "Arg failed:" >&5
64322    $ECHO "$OUTPUT" >&5
64323    JVM_ARG_OK=false
64324  fi
64325
64326
64327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64328$as_echo "$boot_jdk_jvmargs_small" >&6; }
64329
64330  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64331
64332
64333  JAVA_TOOL_FLAGS_SMALL=""
64334  for f in $JAVA_FLAGS_SMALL; do
64335    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64336  done
64337
64338
64339
64340# Setup smart javac (after cores and memory have been setup)
64341
64342
64343# Check whether --with-sjavac-server-java was given.
64344if test "${with_sjavac_server_java+set}" = set; then :
64345  withval=$with_sjavac_server_java;
64346fi
64347
64348
64349  if test "x$with_sjavac_server_java" != x; then
64350    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64351    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64352    if test "x$FOUND_VERSION" = x; then
64353      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64354    fi
64355  else
64356    SJAVAC_SERVER_JAVA="$JAVA"
64357  fi
64358
64359
64360  if test "$MEMORY_SIZE" -gt "3000"; then
64361
64362  $ECHO "Check if jvm arg is ok: -d64" >&5
64363  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64364  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64365  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64366  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64367  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64368    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64369    JVM_ARG_OK=true
64370  else
64371    $ECHO "Arg failed:" >&5
64372    $ECHO "$OUTPUT" >&5
64373    JVM_ARG_OK=false
64374  fi
64375
64376    if test "$JVM_ARG_OK" = true; then
64377      JVM_64BIT=true
64378      JVM_ARG_OK=false
64379    fi
64380  fi
64381
64382  MX_VALUE=`expr $MEMORY_SIZE / 2`
64383  if test "$JVM_64BIT" = true; then
64384    # Set ms lower than mx since more than one instance of the server might
64385    # get launched at the same time before they figure out which instance won.
64386    MS_VALUE=512
64387    if test "$MX_VALUE" -gt "2048"; then
64388      MX_VALUE=2048
64389    fi
64390  else
64391    MS_VALUE=256
64392    if test "$MX_VALUE" -gt "1500"; then
64393      MX_VALUE=1500
64394    fi
64395  fi
64396  if test "$MX_VALUE" -lt "512"; then
64397    MX_VALUE=512
64398  fi
64399
64400  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64401  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64402  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64403  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64404  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64405  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64406    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64407    JVM_ARG_OK=true
64408  else
64409    $ECHO "Arg failed:" >&5
64410    $ECHO "$OUTPUT" >&5
64411    JVM_ARG_OK=false
64412  fi
64413
64414
64415
64416  # Check whether --enable-sjavac was given.
64417if test "${enable_sjavac+set}" = set; then :
64418  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64419else
64420  ENABLE_SJAVAC="no"
64421fi
64422
64423  if test "x$JVM_ARG_OK" = "xfalse"; then
64424    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64425$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64426    ENABLE_SJAVAC="no"
64427  fi
64428  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64429$as_echo_n "checking whether to use sjavac... " >&6; }
64430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64431$as_echo "$ENABLE_SJAVAC" >&6; }
64432
64433
64434  # Check whether --enable-javac-server was given.
64435if test "${enable_javac_server+set}" = set; then :
64436  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64437else
64438  ENABLE_JAVAC_SERVER="yes"
64439fi
64440
64441  if test "x$JVM_ARG_OK" = "xfalse"; then
64442    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64443$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64444    ENABLE_JAVAC_SERVER="no"
64445  fi
64446  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64447$as_echo_n "checking whether to use javac server... " >&6; }
64448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64449$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64450
64451
64452  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64453    # When using a server javac, the small client instances do not need much
64454    # resources.
64455    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64456  fi
64457
64458
64459# Setup use of icecc if requested
64460
64461  # Check whether --enable-icecc was given.
64462if test "${enable_icecc+set}" = set; then :
64463  enableval=$enable_icecc;
64464fi
64465
64466
64467  if test "x${enable_icecc}" = "xyes"; then
64468
64469
64470
64471  # Publish this variable in the help.
64472
64473
64474  if [ -z "${ICECC_CMD+x}" ]; then
64475    # The variable is not set by user, try to locate tool using the code snippet
64476    for ac_prog in icecc
64477do
64478  # Extract the first word of "$ac_prog", so it can be a program name with args.
64479set dummy $ac_prog; ac_word=$2
64480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64481$as_echo_n "checking for $ac_word... " >&6; }
64482if ${ac_cv_path_ICECC_CMD+:} false; then :
64483  $as_echo_n "(cached) " >&6
64484else
64485  case $ICECC_CMD in
64486  [\\/]* | ?:[\\/]*)
64487  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64488  ;;
64489  *)
64490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64491for as_dir in $PATH
64492do
64493  IFS=$as_save_IFS
64494  test -z "$as_dir" && as_dir=.
64495    for ac_exec_ext in '' $ac_executable_extensions; do
64496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64497    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64499    break 2
64500  fi
64501done
64502  done
64503IFS=$as_save_IFS
64504
64505  ;;
64506esac
64507fi
64508ICECC_CMD=$ac_cv_path_ICECC_CMD
64509if test -n "$ICECC_CMD"; then
64510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64511$as_echo "$ICECC_CMD" >&6; }
64512else
64513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64514$as_echo "no" >&6; }
64515fi
64516
64517
64518  test -n "$ICECC_CMD" && break
64519done
64520
64521  else
64522    # The variable is set, but is it from the command line or the environment?
64523
64524    # Try to remove the string !ICECC_CMD! from our list.
64525    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64526    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64527      # If it failed, the variable was not from the command line. Ignore it,
64528      # but warn the user (except for BASH, which is always set by the calling BASH).
64529      if test "xICECC_CMD" != xBASH; then
64530        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64531$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64532      fi
64533      # Try to locate tool using the code snippet
64534      for ac_prog in icecc
64535do
64536  # Extract the first word of "$ac_prog", so it can be a program name with args.
64537set dummy $ac_prog; ac_word=$2
64538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64539$as_echo_n "checking for $ac_word... " >&6; }
64540if ${ac_cv_path_ICECC_CMD+:} false; then :
64541  $as_echo_n "(cached) " >&6
64542else
64543  case $ICECC_CMD in
64544  [\\/]* | ?:[\\/]*)
64545  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64546  ;;
64547  *)
64548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64549for as_dir in $PATH
64550do
64551  IFS=$as_save_IFS
64552  test -z "$as_dir" && as_dir=.
64553    for ac_exec_ext in '' $ac_executable_extensions; do
64554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64555    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64557    break 2
64558  fi
64559done
64560  done
64561IFS=$as_save_IFS
64562
64563  ;;
64564esac
64565fi
64566ICECC_CMD=$ac_cv_path_ICECC_CMD
64567if test -n "$ICECC_CMD"; then
64568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64569$as_echo "$ICECC_CMD" >&6; }
64570else
64571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64572$as_echo "no" >&6; }
64573fi
64574
64575
64576  test -n "$ICECC_CMD" && break
64577done
64578
64579    else
64580      # If it succeeded, then it was overridden by the user. We will use it
64581      # for the tool.
64582
64583      # First remove it from the list of overridden variables, so we can test
64584      # for unknown variables in the end.
64585      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64586
64587      # Check if we try to supply an empty value
64588      if test "x$ICECC_CMD" = x; then
64589        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64590$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64591        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64592$as_echo_n "checking for ICECC_CMD... " >&6; }
64593        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64594$as_echo "disabled" >&6; }
64595      else
64596        # Check if the provided tool contains a complete path.
64597        tool_specified="$ICECC_CMD"
64598        tool_basename="${tool_specified##*/}"
64599        if test "x$tool_basename" = "x$tool_specified"; then
64600          # A command without a complete path is provided, search $PATH.
64601          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64602$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64603          # Extract the first word of "$tool_basename", so it can be a program name with args.
64604set dummy $tool_basename; ac_word=$2
64605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64606$as_echo_n "checking for $ac_word... " >&6; }
64607if ${ac_cv_path_ICECC_CMD+:} false; then :
64608  $as_echo_n "(cached) " >&6
64609else
64610  case $ICECC_CMD in
64611  [\\/]* | ?:[\\/]*)
64612  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64613  ;;
64614  *)
64615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64616for as_dir in $PATH
64617do
64618  IFS=$as_save_IFS
64619  test -z "$as_dir" && as_dir=.
64620    for ac_exec_ext in '' $ac_executable_extensions; do
64621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64622    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64624    break 2
64625  fi
64626done
64627  done
64628IFS=$as_save_IFS
64629
64630  ;;
64631esac
64632fi
64633ICECC_CMD=$ac_cv_path_ICECC_CMD
64634if test -n "$ICECC_CMD"; then
64635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64636$as_echo "$ICECC_CMD" >&6; }
64637else
64638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64639$as_echo "no" >&6; }
64640fi
64641
64642
64643          if test "x$ICECC_CMD" = x; then
64644            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64645          fi
64646        else
64647          # Otherwise we believe it is a complete path. Use it as it is.
64648          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64649$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64650          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64651$as_echo_n "checking for ICECC_CMD... " >&6; }
64652          if test ! -x "$tool_specified"; then
64653            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64654$as_echo "not found" >&6; }
64655            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64656          fi
64657          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64658$as_echo "$tool_specified" >&6; }
64659        fi
64660      fi
64661    fi
64662
64663  fi
64664
64665
64666
64667  if test "x$ICECC_CMD" = x; then
64668    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64669  fi
64670
64671
64672    old_path="$PATH"
64673
64674    # Look for icecc-create-env in some known places
64675    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64676
64677
64678
64679  # Publish this variable in the help.
64680
64681
64682  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64683    # The variable is not set by user, try to locate tool using the code snippet
64684    for ac_prog in icecc-create-env
64685do
64686  # Extract the first word of "$ac_prog", so it can be a program name with args.
64687set dummy $ac_prog; ac_word=$2
64688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64689$as_echo_n "checking for $ac_word... " >&6; }
64690if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64691  $as_echo_n "(cached) " >&6
64692else
64693  case $ICECC_CREATE_ENV in
64694  [\\/]* | ?:[\\/]*)
64695  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64696  ;;
64697  *)
64698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64699for as_dir in $PATH
64700do
64701  IFS=$as_save_IFS
64702  test -z "$as_dir" && as_dir=.
64703    for ac_exec_ext in '' $ac_executable_extensions; do
64704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64705    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64707    break 2
64708  fi
64709done
64710  done
64711IFS=$as_save_IFS
64712
64713  ;;
64714esac
64715fi
64716ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64717if test -n "$ICECC_CREATE_ENV"; then
64718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64719$as_echo "$ICECC_CREATE_ENV" >&6; }
64720else
64721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64722$as_echo "no" >&6; }
64723fi
64724
64725
64726  test -n "$ICECC_CREATE_ENV" && break
64727done
64728
64729  else
64730    # The variable is set, but is it from the command line or the environment?
64731
64732    # Try to remove the string !ICECC_CREATE_ENV! from our list.
64733    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64734    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64735      # If it failed, the variable was not from the command line. Ignore it,
64736      # but warn the user (except for BASH, which is always set by the calling BASH).
64737      if test "xICECC_CREATE_ENV" != xBASH; then
64738        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64739$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64740      fi
64741      # Try to locate tool using the code snippet
64742      for ac_prog in icecc-create-env
64743do
64744  # Extract the first word of "$ac_prog", so it can be a program name with args.
64745set dummy $ac_prog; ac_word=$2
64746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64747$as_echo_n "checking for $ac_word... " >&6; }
64748if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64749  $as_echo_n "(cached) " >&6
64750else
64751  case $ICECC_CREATE_ENV in
64752  [\\/]* | ?:[\\/]*)
64753  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64754  ;;
64755  *)
64756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64757for as_dir in $PATH
64758do
64759  IFS=$as_save_IFS
64760  test -z "$as_dir" && as_dir=.
64761    for ac_exec_ext in '' $ac_executable_extensions; do
64762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64763    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64765    break 2
64766  fi
64767done
64768  done
64769IFS=$as_save_IFS
64770
64771  ;;
64772esac
64773fi
64774ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64775if test -n "$ICECC_CREATE_ENV"; then
64776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64777$as_echo "$ICECC_CREATE_ENV" >&6; }
64778else
64779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64780$as_echo "no" >&6; }
64781fi
64782
64783
64784  test -n "$ICECC_CREATE_ENV" && break
64785done
64786
64787    else
64788      # If it succeeded, then it was overridden by the user. We will use it
64789      # for the tool.
64790
64791      # First remove it from the list of overridden variables, so we can test
64792      # for unknown variables in the end.
64793      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64794
64795      # Check if we try to supply an empty value
64796      if test "x$ICECC_CREATE_ENV" = x; then
64797        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64798$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64799        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64800$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64801        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64802$as_echo "disabled" >&6; }
64803      else
64804        # Check if the provided tool contains a complete path.
64805        tool_specified="$ICECC_CREATE_ENV"
64806        tool_basename="${tool_specified##*/}"
64807        if test "x$tool_basename" = "x$tool_specified"; then
64808          # A command without a complete path is provided, search $PATH.
64809          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64810$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64811          # Extract the first word of "$tool_basename", so it can be a program name with args.
64812set dummy $tool_basename; ac_word=$2
64813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64814$as_echo_n "checking for $ac_word... " >&6; }
64815if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64816  $as_echo_n "(cached) " >&6
64817else
64818  case $ICECC_CREATE_ENV in
64819  [\\/]* | ?:[\\/]*)
64820  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64821  ;;
64822  *)
64823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64824for as_dir in $PATH
64825do
64826  IFS=$as_save_IFS
64827  test -z "$as_dir" && as_dir=.
64828    for ac_exec_ext in '' $ac_executable_extensions; do
64829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64830    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64832    break 2
64833  fi
64834done
64835  done
64836IFS=$as_save_IFS
64837
64838  ;;
64839esac
64840fi
64841ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64842if test -n "$ICECC_CREATE_ENV"; then
64843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64844$as_echo "$ICECC_CREATE_ENV" >&6; }
64845else
64846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64847$as_echo "no" >&6; }
64848fi
64849
64850
64851          if test "x$ICECC_CREATE_ENV" = x; then
64852            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64853          fi
64854        else
64855          # Otherwise we believe it is a complete path. Use it as it is.
64856          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64857$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64858          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64859$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64860          if test ! -x "$tool_specified"; then
64861            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64862$as_echo "not found" >&6; }
64863            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64864          fi
64865          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64866$as_echo "$tool_specified" >&6; }
64867        fi
64868      fi
64869    fi
64870
64871  fi
64872
64873
64874
64875  if test "x$ICECC_CREATE_ENV" = x; then
64876    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64877  fi
64878
64879
64880    # Use icecc-create-env to create a minimal compilation environment that can
64881    # be sent to the other hosts in the icecream cluster.
64882    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64883    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64884    # Older versions of icecc does not have the --gcc parameter
64885    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64886      icecc_gcc_arg="--gcc"
64887    fi
64888    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64889
64890  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64891      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64892          ${icecc_create_env_log} 2>&1 )
64893  if test "$?" != "0"; then
64894    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64895$as_echo "$as_me: icecc-create-env output:" >&6;}
64896    cat \
64897          ${icecc_create_env_log}
64898    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64899  fi
64900
64901    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64902      # For clang, the icecc compilerwrapper is needed. It usually resides next
64903      # to icecc-create-env.
64904
64905
64906
64907  # Publish this variable in the help.
64908
64909
64910  if [ -z "${ICECC_WRAPPER+x}" ]; then
64911    # The variable is not set by user, try to locate tool using the code snippet
64912    for ac_prog in compilerwrapper
64913do
64914  # Extract the first word of "$ac_prog", so it can be a program name with args.
64915set dummy $ac_prog; ac_word=$2
64916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64917$as_echo_n "checking for $ac_word... " >&6; }
64918if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64919  $as_echo_n "(cached) " >&6
64920else
64921  case $ICECC_WRAPPER in
64922  [\\/]* | ?:[\\/]*)
64923  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64924  ;;
64925  *)
64926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64927for as_dir in $PATH
64928do
64929  IFS=$as_save_IFS
64930  test -z "$as_dir" && as_dir=.
64931    for ac_exec_ext in '' $ac_executable_extensions; do
64932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64933    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64935    break 2
64936  fi
64937done
64938  done
64939IFS=$as_save_IFS
64940
64941  ;;
64942esac
64943fi
64944ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64945if test -n "$ICECC_WRAPPER"; then
64946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64947$as_echo "$ICECC_WRAPPER" >&6; }
64948else
64949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64950$as_echo "no" >&6; }
64951fi
64952
64953
64954  test -n "$ICECC_WRAPPER" && break
64955done
64956
64957  else
64958    # The variable is set, but is it from the command line or the environment?
64959
64960    # Try to remove the string !ICECC_WRAPPER! from our list.
64961    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64962    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64963      # If it failed, the variable was not from the command line. Ignore it,
64964      # but warn the user (except for BASH, which is always set by the calling BASH).
64965      if test "xICECC_WRAPPER" != xBASH; then
64966        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64967$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64968      fi
64969      # Try to locate tool using the code snippet
64970      for ac_prog in compilerwrapper
64971do
64972  # Extract the first word of "$ac_prog", so it can be a program name with args.
64973set dummy $ac_prog; ac_word=$2
64974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64975$as_echo_n "checking for $ac_word... " >&6; }
64976if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64977  $as_echo_n "(cached) " >&6
64978else
64979  case $ICECC_WRAPPER in
64980  [\\/]* | ?:[\\/]*)
64981  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64982  ;;
64983  *)
64984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64985for as_dir in $PATH
64986do
64987  IFS=$as_save_IFS
64988  test -z "$as_dir" && as_dir=.
64989    for ac_exec_ext in '' $ac_executable_extensions; do
64990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64991    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64993    break 2
64994  fi
64995done
64996  done
64997IFS=$as_save_IFS
64998
64999  ;;
65000esac
65001fi
65002ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65003if test -n "$ICECC_WRAPPER"; then
65004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65005$as_echo "$ICECC_WRAPPER" >&6; }
65006else
65007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65008$as_echo "no" >&6; }
65009fi
65010
65011
65012  test -n "$ICECC_WRAPPER" && break
65013done
65014
65015    else
65016      # If it succeeded, then it was overridden by the user. We will use it
65017      # for the tool.
65018
65019      # First remove it from the list of overridden variables, so we can test
65020      # for unknown variables in the end.
65021      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65022
65023      # Check if we try to supply an empty value
65024      if test "x$ICECC_WRAPPER" = x; then
65025        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65026$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65027        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65028$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65029        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65030$as_echo "disabled" >&6; }
65031      else
65032        # Check if the provided tool contains a complete path.
65033        tool_specified="$ICECC_WRAPPER"
65034        tool_basename="${tool_specified##*/}"
65035        if test "x$tool_basename" = "x$tool_specified"; then
65036          # A command without a complete path is provided, search $PATH.
65037          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65038$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65039          # Extract the first word of "$tool_basename", so it can be a program name with args.
65040set dummy $tool_basename; ac_word=$2
65041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65042$as_echo_n "checking for $ac_word... " >&6; }
65043if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65044  $as_echo_n "(cached) " >&6
65045else
65046  case $ICECC_WRAPPER in
65047  [\\/]* | ?:[\\/]*)
65048  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65049  ;;
65050  *)
65051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65052for as_dir in $PATH
65053do
65054  IFS=$as_save_IFS
65055  test -z "$as_dir" && as_dir=.
65056    for ac_exec_ext in '' $ac_executable_extensions; do
65057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65058    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65060    break 2
65061  fi
65062done
65063  done
65064IFS=$as_save_IFS
65065
65066  ;;
65067esac
65068fi
65069ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65070if test -n "$ICECC_WRAPPER"; then
65071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65072$as_echo "$ICECC_WRAPPER" >&6; }
65073else
65074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65075$as_echo "no" >&6; }
65076fi
65077
65078
65079          if test "x$ICECC_WRAPPER" = x; then
65080            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65081          fi
65082        else
65083          # Otherwise we believe it is a complete path. Use it as it is.
65084          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65085$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65086          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65087$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65088          if test ! -x "$tool_specified"; then
65089            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65090$as_echo "not found" >&6; }
65091            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65092          fi
65093          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65094$as_echo "$tool_specified" >&6; }
65095        fi
65096      fi
65097    fi
65098
65099  fi
65100
65101
65102
65103  if test "x$ICECC_WRAPPER" = x; then
65104    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65105  fi
65106
65107
65108
65109  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65110      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65111  if test "$?" != "0"; then
65112    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65113$as_echo "$as_me: icecc-create-env output:" >&6;}
65114    cat ${icecc_create_env_log}
65115    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65116  fi
65117
65118    else
65119      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65120    fi
65121    PATH="$old_path"
65122    # The bundle with the compiler gets a name based on checksums. Parse log file
65123    # to find it.
65124    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65125    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65126    if test ! -f ${ICECC_ENV_BUNDLE}; then
65127      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65128    fi
65129    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65130$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65131    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65132$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65133    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65134
65135    if test "x${COMPILE_TYPE}" = "xcross"; then
65136      # If cross compiling, create a separate env package for the build compiler
65137      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65138      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65139      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65140
65141  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65142      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65143            ${icecc_create_env_log_build} 2>&1 )
65144  if test "$?" != "0"; then
65145    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65146$as_echo "$as_me: icecc-create-env output:" >&6;}
65147    cat \
65148            ${icecc_create_env_log_build}
65149    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65150  fi
65151
65152      elif test "x${BUILD_CC##*/}" = "xclang"; then
65153
65154  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65155      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65156  if test "$?" != "0"; then
65157    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65158$as_echo "$as_me: icecc-create-env output:" >&6;}
65159    cat ${icecc_create_env_log_build}
65160    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65161  fi
65162
65163      else
65164        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65165      fi
65166      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65167      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65168      if test ! -f ${ICECC_ENV_BUNDLE}; then
65169        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65170      fi
65171      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65172$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65173      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65174$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65175      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65176          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65177    else
65178      BUILD_ICECC="${ICECC}"
65179    fi
65180
65181
65182  fi
65183
65184
65185# Can the C/C++ compiler use precompiled headers?
65186
65187
65188  ###############################################################################
65189  #
65190  # Can the C/C++ compiler use precompiled headers?
65191  #
65192  # Check whether --enable-precompiled-headers was given.
65193if test "${enable_precompiled_headers+set}" = set; then :
65194  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65195else
65196  ENABLE_PRECOMPH=yes
65197fi
65198
65199
65200  USE_PRECOMPILED_HEADER=1
65201  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65202$as_echo_n "checking If precompiled header is enabled... " >&6; }
65203  if test "x$ENABLE_PRECOMPH" = xno; then
65204    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65205$as_echo "no, forced" >&6; }
65206    USE_PRECOMPILED_HEADER=0
65207  elif test "x$ICECC" != "x"; then
65208    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65209$as_echo "no, does not work effectively with icecc" >&6; }
65210    USE_PRECOMPILED_HEADER=0
65211  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65212    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65213$as_echo "no, does not work with Solaris Studio" >&6; }
65214    USE_PRECOMPILED_HEADER=0
65215  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65216    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65217$as_echo "no, does not work with xlc" >&6; }
65218    USE_PRECOMPILED_HEADER=0
65219  else
65220    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65221$as_echo "yes" >&6; }
65222  fi
65223
65224  if test "x$ENABLE_PRECOMPH" = xyes; then
65225    # Check that the compiler actually supports precomp headers.
65226    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65227      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65228$as_echo_n "checking that precompiled headers work... " >&6; }
65229      echo "int alfa();" > conftest.h
65230      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65231      if test ! -f conftest.hpp.gch; then
65232        USE_PRECOMPILED_HEADER=0
65233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65234$as_echo "no" >&6; }
65235      else
65236        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65237$as_echo "yes" >&6; }
65238      fi
65239      $RM conftest.h conftest.hpp.gch
65240    fi
65241  fi
65242
65243
65244
65245
65246# Setup use of ccache, if available
65247
65248  # Check whether --enable-ccache was given.
65249if test "${enable_ccache+set}" = set; then :
65250  enableval=$enable_ccache;
65251fi
65252
65253
65254  CCACHE_STATUS=
65255  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65256$as_echo_n "checking is ccache enabled... " >&6; }
65257  if test "x$enable_ccache" = xyes; then
65258    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65259      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65260$as_echo "yes" >&6; }
65261      OLD_PATH="$PATH"
65262      if test "x$TOOLCHAIN_PATH" != x; then
65263        PATH=$TOOLCHAIN_PATH:$PATH
65264      fi
65265
65266
65267
65268  # Publish this variable in the help.
65269
65270
65271  if [ -z "${CCACHE+x}" ]; then
65272    # The variable is not set by user, try to locate tool using the code snippet
65273    for ac_prog in ccache
65274do
65275  # Extract the first word of "$ac_prog", so it can be a program name with args.
65276set dummy $ac_prog; ac_word=$2
65277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65278$as_echo_n "checking for $ac_word... " >&6; }
65279if ${ac_cv_path_CCACHE+:} false; then :
65280  $as_echo_n "(cached) " >&6
65281else
65282  case $CCACHE in
65283  [\\/]* | ?:[\\/]*)
65284  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65285  ;;
65286  *)
65287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65288for as_dir in $PATH
65289do
65290  IFS=$as_save_IFS
65291  test -z "$as_dir" && as_dir=.
65292    for ac_exec_ext in '' $ac_executable_extensions; do
65293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65294    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65296    break 2
65297  fi
65298done
65299  done
65300IFS=$as_save_IFS
65301
65302  ;;
65303esac
65304fi
65305CCACHE=$ac_cv_path_CCACHE
65306if test -n "$CCACHE"; then
65307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65308$as_echo "$CCACHE" >&6; }
65309else
65310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65311$as_echo "no" >&6; }
65312fi
65313
65314
65315  test -n "$CCACHE" && break
65316done
65317
65318  else
65319    # The variable is set, but is it from the command line or the environment?
65320
65321    # Try to remove the string !CCACHE! from our list.
65322    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65323    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65324      # If it failed, the variable was not from the command line. Ignore it,
65325      # but warn the user (except for BASH, which is always set by the calling BASH).
65326      if test "xCCACHE" != xBASH; then
65327        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65328$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65329      fi
65330      # Try to locate tool using the code snippet
65331      for ac_prog in ccache
65332do
65333  # Extract the first word of "$ac_prog", so it can be a program name with args.
65334set dummy $ac_prog; ac_word=$2
65335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65336$as_echo_n "checking for $ac_word... " >&6; }
65337if ${ac_cv_path_CCACHE+:} false; then :
65338  $as_echo_n "(cached) " >&6
65339else
65340  case $CCACHE in
65341  [\\/]* | ?:[\\/]*)
65342  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65343  ;;
65344  *)
65345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65346for as_dir in $PATH
65347do
65348  IFS=$as_save_IFS
65349  test -z "$as_dir" && as_dir=.
65350    for ac_exec_ext in '' $ac_executable_extensions; do
65351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65352    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65354    break 2
65355  fi
65356done
65357  done
65358IFS=$as_save_IFS
65359
65360  ;;
65361esac
65362fi
65363CCACHE=$ac_cv_path_CCACHE
65364if test -n "$CCACHE"; then
65365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65366$as_echo "$CCACHE" >&6; }
65367else
65368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65369$as_echo "no" >&6; }
65370fi
65371
65372
65373  test -n "$CCACHE" && break
65374done
65375
65376    else
65377      # If it succeeded, then it was overridden by the user. We will use it
65378      # for the tool.
65379
65380      # First remove it from the list of overridden variables, so we can test
65381      # for unknown variables in the end.
65382      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65383
65384      # Check if we try to supply an empty value
65385      if test "x$CCACHE" = x; then
65386        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65387$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65388        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65389$as_echo_n "checking for CCACHE... " >&6; }
65390        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65391$as_echo "disabled" >&6; }
65392      else
65393        # Check if the provided tool contains a complete path.
65394        tool_specified="$CCACHE"
65395        tool_basename="${tool_specified##*/}"
65396        if test "x$tool_basename" = "x$tool_specified"; then
65397          # A command without a complete path is provided, search $PATH.
65398          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65399$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65400          # Extract the first word of "$tool_basename", so it can be a program name with args.
65401set dummy $tool_basename; ac_word=$2
65402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65403$as_echo_n "checking for $ac_word... " >&6; }
65404if ${ac_cv_path_CCACHE+:} false; then :
65405  $as_echo_n "(cached) " >&6
65406else
65407  case $CCACHE in
65408  [\\/]* | ?:[\\/]*)
65409  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65410  ;;
65411  *)
65412  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65413for as_dir in $PATH
65414do
65415  IFS=$as_save_IFS
65416  test -z "$as_dir" && as_dir=.
65417    for ac_exec_ext in '' $ac_executable_extensions; do
65418  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65419    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65421    break 2
65422  fi
65423done
65424  done
65425IFS=$as_save_IFS
65426
65427  ;;
65428esac
65429fi
65430CCACHE=$ac_cv_path_CCACHE
65431if test -n "$CCACHE"; then
65432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65433$as_echo "$CCACHE" >&6; }
65434else
65435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65436$as_echo "no" >&6; }
65437fi
65438
65439
65440          if test "x$CCACHE" = x; then
65441            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65442          fi
65443        else
65444          # Otherwise we believe it is a complete path. Use it as it is.
65445          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65446$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65447          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65448$as_echo_n "checking for CCACHE... " >&6; }
65449          if test ! -x "$tool_specified"; then
65450            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65451$as_echo "not found" >&6; }
65452            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65453          fi
65454          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65455$as_echo "$tool_specified" >&6; }
65456        fi
65457      fi
65458    fi
65459
65460  fi
65461
65462
65463
65464  if test "x$CCACHE" = x; then
65465    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65466  fi
65467
65468
65469      PATH="$OLD_PATH"
65470      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65471      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65472    else
65473      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65474$as_echo "no" >&6; }
65475      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65476$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65477    fi
65478  elif test "x$enable_ccache" = xno; then
65479    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65480$as_echo "no, explicitly disabled" >&6; }
65481    CCACHE_STATUS="Disabled"
65482  elif test "x$enable_ccache" = x; then
65483    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65484$as_echo "no" >&6; }
65485  else
65486    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65487$as_echo "unknown" >&6; }
65488    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65489  fi
65490
65491
65492
65493# Check whether --with-ccache-dir was given.
65494if test "${with_ccache_dir+set}" = set; then :
65495  withval=$with_ccache_dir;
65496fi
65497
65498
65499  if test "x$with_ccache_dir" != x; then
65500    # When using a non home ccache directory, assume the use is to share ccache files
65501    # with other users. Thus change the umask.
65502    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65503    if test "x$CCACHE" = x; then
65504      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65505$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65506    fi
65507  fi
65508
65509  if test "x$CCACHE" != x; then
65510
65511  if test "x$CCACHE" != x; then
65512    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65513      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65514          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65515      if test "x$HAS_BAD_CCACHE" != "x"; then
65516        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65517      fi
65518      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65519$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65520      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65521      PUSHED_FLAGS="$CXXFLAGS"
65522      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65523      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65524/* end confdefs.h.  */
65525
65526int
65527main ()
65528{
65529
65530  ;
65531  return 0;
65532}
65533_ACEOF
65534if ac_fn_cxx_try_compile "$LINENO"; then :
65535  CC_KNOWS_CCACHE_TRICK=yes
65536else
65537  CC_KNOWS_CCACHE_TRICK=no
65538fi
65539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65540      CXXFLAGS="$PUSHED_FLAGS"
65541      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65542        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65543$as_echo "yes" >&6; }
65544        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65545
65546        CCACHE_SLOPPINESS=pch_defines,time_macros
65547      else
65548        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65549$as_echo "no" >&6; }
65550        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65551      fi
65552    fi
65553
65554    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65555        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65556
65557    if test "x$SET_CCACHE_DIR" != x; then
65558      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65559      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65560    fi
65561  fi
65562
65563  fi
65564
65565
65566###############################################################################
65567#
65568# And now the finish...
65569#
65570###############################################################################
65571
65572# Check for some common pitfalls
65573
65574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65575    file_to_test="$SRC_ROOT/LICENSE"
65576    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65577      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
65578    fi
65579  fi
65580
65581
65582  # Did user specify any unknown variables?
65583
65584  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65585    # Replace the separating ! with spaces before presenting for end user.
65586    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65587    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65588$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65589  fi
65590
65591
65592  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65593$as_echo_n "checking if build directory is on local disk... " >&6; }
65594
65595  # df -l lists only local disks; if the given directory is not found then
65596  # a non-zero exit code is given
65597  if test "x$DF" = x; then
65598    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65599      # msys does not have df; use Windows "net use" instead.
65600      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65601      if test "x$IS_NETWORK_DISK" = x; then
65602        OUTPUT_DIR_IS_LOCAL="yes"
65603      else
65604        OUTPUT_DIR_IS_LOCAL="no"
65605      fi
65606    else
65607      # No df here, say it's local
65608      OUTPUT_DIR_IS_LOCAL="yes"
65609    fi
65610  else
65611    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65612      OUTPUT_DIR_IS_LOCAL="yes"
65613    else
65614      OUTPUT_DIR_IS_LOCAL="no"
65615    fi
65616  fi
65617
65618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65619$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65620
65621
65622
65623  # Check if the user has any old-style ALT_ variables set.
65624  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65625
65626  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65627  # Since we can't properly handle the dependencies for this, warn the user about the situation
65628  if test -e $OUTPUT_ROOT/spec.gmk; then
65629    IS_RECONFIGURE=yes
65630  else
65631    IS_RECONFIGURE=no
65632  fi
65633
65634
65635# At the end, call the custom hook. (Dummy macro if no custom sources available)
65636
65637
65638# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65639
65640  # Keep feature lists sorted and free of duplicates
65641  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65642  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65643  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65644  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65645  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65646  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65647  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65648
65649  # Validate features
65650  for variant in $JVM_VARIANTS; do
65651    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65652$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65653    features_var_name=JVM_FEATURES_$variant
65654    JVM_FEATURES_TO_TEST=${!features_var_name}
65655    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65656$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65657    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
65658    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
65659    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
65660    if test "x$INVALID_FEATURES" != x; then
65661      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65662    fi
65663  done
65664
65665
65666# We're messing a bit with internal autoconf variables to put the config.status
65667# in the output directory instead of the current directory.
65668CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65669
65670# Create the actual output files. Now the main work of configure is done.
65671cat >confcache <<\_ACEOF
65672# This file is a shell script that caches the results of configure
65673# tests run on this system so they can be shared between configure
65674# scripts and configure runs, see configure's option --config-cache.
65675# It is not useful on other systems.  If it contains results you don't
65676# want to keep, you may remove or edit it.
65677#
65678# config.status only pays attention to the cache file if you give it
65679# the --recheck option to rerun configure.
65680#
65681# `ac_cv_env_foo' variables (set or unset) will be overridden when
65682# loading this file, other *unset* `ac_cv_foo' will be assigned the
65683# following values.
65684
65685_ACEOF
65686
65687# The following way of writing the cache mishandles newlines in values,
65688# but we know of no workaround that is simple, portable, and efficient.
65689# So, we kill variables containing newlines.
65690# Ultrix sh set writes to stderr and can't be redirected directly,
65691# and sets the high bit in the cache file unless we assign to the vars.
65692(
65693  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65694    eval ac_val=\$$ac_var
65695    case $ac_val in #(
65696    *${as_nl}*)
65697      case $ac_var in #(
65698      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65699$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65700      esac
65701      case $ac_var in #(
65702      _ | IFS | as_nl) ;; #(
65703      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65704      *) { eval $ac_var=; unset $ac_var;} ;;
65705      esac ;;
65706    esac
65707  done
65708
65709  (set) 2>&1 |
65710    case $as_nl`(ac_space=' '; set) 2>&1` in #(
65711    *${as_nl}ac_space=\ *)
65712      # `set' does not quote correctly, so add quotes: double-quote
65713      # substitution turns \\\\ into \\, and sed turns \\ into \.
65714      sed -n \
65715	"s/'/'\\\\''/g;
65716	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65717      ;; #(
65718    *)
65719      # `set' quotes correctly as required by POSIX, so do not add quotes.
65720      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65721      ;;
65722    esac |
65723    sort
65724) |
65725  sed '
65726     /^ac_cv_env_/b end
65727     t clear
65728     :clear
65729     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65730     t end
65731     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65732     :end' >>confcache
65733if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65734  if test -w "$cache_file"; then
65735    if test "x$cache_file" != "x/dev/null"; then
65736      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65737$as_echo "$as_me: updating cache $cache_file" >&6;}
65738      if test ! -f "$cache_file" || test -h "$cache_file"; then
65739	cat confcache >"$cache_file"
65740      else
65741        case $cache_file in #(
65742        */* | ?:*)
65743	  mv -f confcache "$cache_file"$$ &&
65744	  mv -f "$cache_file"$$ "$cache_file" ;; #(
65745        *)
65746	  mv -f confcache "$cache_file" ;;
65747	esac
65748      fi
65749    fi
65750  else
65751    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65752$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65753  fi
65754fi
65755rm -f confcache
65756
65757test "x$prefix" = xNONE && prefix=$ac_default_prefix
65758# Let make expand exec_prefix.
65759test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65760
65761# Transform confdefs.h into DEFS.
65762# Protect against shell expansion while executing Makefile rules.
65763# Protect against Makefile macro expansion.
65764#
65765# If the first sed substitution is executed (which looks for macros that
65766# take arguments), then branch to the quote section.  Otherwise,
65767# look for a macro that doesn't take arguments.
65768ac_script='
65769:mline
65770/\\$/{
65771 N
65772 s,\\\n,,
65773 b mline
65774}
65775t clear
65776:clear
65777s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
65778t quote
65779s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
65780t quote
65781b any
65782:quote
65783s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65784s/\[/\\&/g
65785s/\]/\\&/g
65786s/\$/$$/g
65787H
65788:any
65789${
65790	g
65791	s/^\n//
65792	s/\n/ /g
65793	p
65794}
65795'
65796DEFS=`sed -n "$ac_script" confdefs.h`
65797
65798
65799ac_libobjs=
65800ac_ltlibobjs=
65801U=
65802for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65803  # 1. Remove the extension, and $U if already installed.
65804  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65805  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65806  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65807  #    will be set to the directory where LIBOBJS objects are built.
65808  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65809  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65810done
65811LIBOBJS=$ac_libobjs
65812
65813LTLIBOBJS=$ac_ltlibobjs
65814
65815
65816
65817: "${CONFIG_STATUS=./config.status}"
65818ac_write_fail=0
65819ac_clean_files_save=$ac_clean_files
65820ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65821{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65822$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65823as_write_fail=0
65824cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65825#! $SHELL
65826# Generated by $as_me.
65827# Run this file to recreate the current configuration.
65828# Compiler output produced by configure, useful for debugging
65829# configure, is in config.log if it exists.
65830
65831debug=false
65832ac_cs_recheck=false
65833ac_cs_silent=false
65834
65835SHELL=\${CONFIG_SHELL-$SHELL}
65836export SHELL
65837_ASEOF
65838cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65839## -------------------- ##
65840## M4sh Initialization. ##
65841## -------------------- ##
65842
65843# Be more Bourne compatible
65844DUALCASE=1; export DUALCASE # for MKS sh
65845if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65846  emulate sh
65847  NULLCMD=:
65848  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65849  # is contrary to our usage.  Disable this feature.
65850  alias -g '${1+"$@"}'='"$@"'
65851  setopt NO_GLOB_SUBST
65852else
65853  case `(set -o) 2>/dev/null` in #(
65854  *posix*) :
65855    set -o posix ;; #(
65856  *) :
65857     ;;
65858esac
65859fi
65860
65861
65862as_nl='
65863'
65864export as_nl
65865# Printing a long string crashes Solaris 7 /usr/bin/printf.
65866as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65867as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65868as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65869# Prefer a ksh shell builtin over an external printf program on Solaris,
65870# but without wasting forks for bash or zsh.
65871if test -z "$BASH_VERSION$ZSH_VERSION" \
65872    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65873  as_echo='print -r --'
65874  as_echo_n='print -rn --'
65875elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65876  as_echo='printf %s\n'
65877  as_echo_n='printf %s'
65878else
65879  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65880    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65881    as_echo_n='/usr/ucb/echo -n'
65882  else
65883    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65884    as_echo_n_body='eval
65885      arg=$1;
65886      case $arg in #(
65887      *"$as_nl"*)
65888	expr "X$arg" : "X\\(.*\\)$as_nl";
65889	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65890      esac;
65891      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65892    '
65893    export as_echo_n_body
65894    as_echo_n='sh -c $as_echo_n_body as_echo'
65895  fi
65896  export as_echo_body
65897  as_echo='sh -c $as_echo_body as_echo'
65898fi
65899
65900# The user is always right.
65901if test "${PATH_SEPARATOR+set}" != set; then
65902  PATH_SEPARATOR=:
65903  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65904    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65905      PATH_SEPARATOR=';'
65906  }
65907fi
65908
65909
65910# IFS
65911# We need space, tab and new line, in precisely that order.  Quoting is
65912# there to prevent editors from complaining about space-tab.
65913# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65914# splitting by setting IFS to empty value.)
65915IFS=" ""	$as_nl"
65916
65917# Find who we are.  Look in the path if we contain no directory separator.
65918as_myself=
65919case $0 in #((
65920  *[\\/]* ) as_myself=$0 ;;
65921  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65922for as_dir in $PATH
65923do
65924  IFS=$as_save_IFS
65925  test -z "$as_dir" && as_dir=.
65926    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65927  done
65928IFS=$as_save_IFS
65929
65930     ;;
65931esac
65932# We did not find ourselves, most probably we were run as `sh COMMAND'
65933# in which case we are not to be found in the path.
65934if test "x$as_myself" = x; then
65935  as_myself=$0
65936fi
65937if test ! -f "$as_myself"; then
65938  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65939  exit 1
65940fi
65941
65942# Unset variables that we do not need and which cause bugs (e.g. in
65943# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65944# suppresses any "Segmentation fault" message there.  '((' could
65945# trigger a bug in pdksh 5.2.14.
65946for as_var in BASH_ENV ENV MAIL MAILPATH
65947do eval test x\${$as_var+set} = xset \
65948  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65949done
65950PS1='$ '
65951PS2='> '
65952PS4='+ '
65953
65954# NLS nuisances.
65955LC_ALL=C
65956export LC_ALL
65957LANGUAGE=C
65958export LANGUAGE
65959
65960# CDPATH.
65961(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65962
65963
65964# as_fn_error STATUS ERROR [LINENO LOG_FD]
65965# ----------------------------------------
65966# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65967# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65968# script with STATUS, using 1 if that was 0.
65969as_fn_error ()
65970{
65971  as_status=$1; test $as_status -eq 0 && as_status=1
65972  if test "$4"; then
65973    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65974    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65975  fi
65976  $as_echo "$as_me: error: $2" >&2
65977  as_fn_exit $as_status
65978} # as_fn_error
65979
65980
65981# as_fn_set_status STATUS
65982# -----------------------
65983# Set $? to STATUS, without forking.
65984as_fn_set_status ()
65985{
65986  return $1
65987} # as_fn_set_status
65988
65989# as_fn_exit STATUS
65990# -----------------
65991# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
65992as_fn_exit ()
65993{
65994  set +e
65995  as_fn_set_status $1
65996  exit $1
65997} # as_fn_exit
65998
65999# as_fn_unset VAR
66000# ---------------
66001# Portably unset VAR.
66002as_fn_unset ()
66003{
66004  { eval $1=; unset $1;}
66005}
66006as_unset=as_fn_unset
66007# as_fn_append VAR VALUE
66008# ----------------------
66009# Append the text in VALUE to the end of the definition contained in VAR. Take
66010# advantage of any shell optimizations that allow amortized linear growth over
66011# repeated appends, instead of the typical quadratic growth present in naive
66012# implementations.
66013if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66014  eval 'as_fn_append ()
66015  {
66016    eval $1+=\$2
66017  }'
66018else
66019  as_fn_append ()
66020  {
66021    eval $1=\$$1\$2
66022  }
66023fi # as_fn_append
66024
66025# as_fn_arith ARG...
66026# ------------------
66027# Perform arithmetic evaluation on the ARGs, and store the result in the
66028# global $as_val. Take advantage of shells that can avoid forks. The arguments
66029# must be portable across $(()) and expr.
66030if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66031  eval 'as_fn_arith ()
66032  {
66033    as_val=$(( $* ))
66034  }'
66035else
66036  as_fn_arith ()
66037  {
66038    as_val=`expr "$@" || test $? -eq 1`
66039  }
66040fi # as_fn_arith
66041
66042
66043if expr a : '\(a\)' >/dev/null 2>&1 &&
66044   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66045  as_expr=expr
66046else
66047  as_expr=false
66048fi
66049
66050if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66051  as_basename=basename
66052else
66053  as_basename=false
66054fi
66055
66056if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66057  as_dirname=dirname
66058else
66059  as_dirname=false
66060fi
66061
66062as_me=`$as_basename -- "$0" ||
66063$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66064	 X"$0" : 'X\(//\)$' \| \
66065	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66066$as_echo X/"$0" |
66067    sed '/^.*\/\([^/][^/]*\)\/*$/{
66068	    s//\1/
66069	    q
66070	  }
66071	  /^X\/\(\/\/\)$/{
66072	    s//\1/
66073	    q
66074	  }
66075	  /^X\/\(\/\).*/{
66076	    s//\1/
66077	    q
66078	  }
66079	  s/.*/./; q'`
66080
66081# Avoid depending upon Character Ranges.
66082as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66083as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66084as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66085as_cr_digits='0123456789'
66086as_cr_alnum=$as_cr_Letters$as_cr_digits
66087
66088ECHO_C= ECHO_N= ECHO_T=
66089case `echo -n x` in #(((((
66090-n*)
66091  case `echo 'xy\c'` in
66092  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66093  xy)  ECHO_C='\c';;
66094  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66095       ECHO_T='	';;
66096  esac;;
66097*)
66098  ECHO_N='-n';;
66099esac
66100
66101rm -f conf$$ conf$$.exe conf$$.file
66102if test -d conf$$.dir; then
66103  rm -f conf$$.dir/conf$$.file
66104else
66105  rm -f conf$$.dir
66106  mkdir conf$$.dir 2>/dev/null
66107fi
66108if (echo >conf$$.file) 2>/dev/null; then
66109  if ln -s conf$$.file conf$$ 2>/dev/null; then
66110    as_ln_s='ln -s'
66111    # ... but there are two gotchas:
66112    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66113    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66114    # In both cases, we have to default to `cp -pR'.
66115    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66116      as_ln_s='cp -pR'
66117  elif ln conf$$.file conf$$ 2>/dev/null; then
66118    as_ln_s=ln
66119  else
66120    as_ln_s='cp -pR'
66121  fi
66122else
66123  as_ln_s='cp -pR'
66124fi
66125rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66126rmdir conf$$.dir 2>/dev/null
66127
66128
66129# as_fn_mkdir_p
66130# -------------
66131# Create "$as_dir" as a directory, including parents if necessary.
66132as_fn_mkdir_p ()
66133{
66134
66135  case $as_dir in #(
66136  -*) as_dir=./$as_dir;;
66137  esac
66138  test -d "$as_dir" || eval $as_mkdir_p || {
66139    as_dirs=
66140    while :; do
66141      case $as_dir in #(
66142      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66143      *) as_qdir=$as_dir;;
66144      esac
66145      as_dirs="'$as_qdir' $as_dirs"
66146      as_dir=`$as_dirname -- "$as_dir" ||
66147$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66148	 X"$as_dir" : 'X\(//\)[^/]' \| \
66149	 X"$as_dir" : 'X\(//\)$' \| \
66150	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66151$as_echo X"$as_dir" |
66152    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66153	    s//\1/
66154	    q
66155	  }
66156	  /^X\(\/\/\)[^/].*/{
66157	    s//\1/
66158	    q
66159	  }
66160	  /^X\(\/\/\)$/{
66161	    s//\1/
66162	    q
66163	  }
66164	  /^X\(\/\).*/{
66165	    s//\1/
66166	    q
66167	  }
66168	  s/.*/./; q'`
66169      test -d "$as_dir" && break
66170    done
66171    test -z "$as_dirs" || eval "mkdir $as_dirs"
66172  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66173
66174
66175} # as_fn_mkdir_p
66176if mkdir -p . 2>/dev/null; then
66177  as_mkdir_p='mkdir -p "$as_dir"'
66178else
66179  test -d ./-p && rmdir ./-p
66180  as_mkdir_p=false
66181fi
66182
66183
66184# as_fn_executable_p FILE
66185# -----------------------
66186# Test if FILE is an executable regular file.
66187as_fn_executable_p ()
66188{
66189  test -f "$1" && test -x "$1"
66190} # as_fn_executable_p
66191as_test_x='test -x'
66192as_executable_p=as_fn_executable_p
66193
66194# Sed expression to map a string onto a valid CPP name.
66195as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66196
66197# Sed expression to map a string onto a valid variable name.
66198as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66199
66200
66201exec 6>&1
66202## ----------------------------------- ##
66203## Main body of $CONFIG_STATUS script. ##
66204## ----------------------------------- ##
66205_ASEOF
66206test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66207
66208cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66209# Save the log message, to keep $0 and so on meaningful, and to
66210# report actual input values of CONFIG_FILES etc. instead of their
66211# values after options handling.
66212ac_log="
66213This file was extended by OpenJDK $as_me jdk9, which was
66214generated by GNU Autoconf 2.69.  Invocation command line was
66215
66216  CONFIG_FILES    = $CONFIG_FILES
66217  CONFIG_HEADERS  = $CONFIG_HEADERS
66218  CONFIG_LINKS    = $CONFIG_LINKS
66219  CONFIG_COMMANDS = $CONFIG_COMMANDS
66220  $ $0 $@
66221
66222on `(hostname || uname -n) 2>/dev/null | sed 1q`
66223"
66224
66225_ACEOF
66226
66227case $ac_config_files in *"
66228"*) set x $ac_config_files; shift; ac_config_files=$*;;
66229esac
66230
66231
66232
66233cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66234# Files that config.status was made for.
66235config_files="$ac_config_files"
66236
66237_ACEOF
66238
66239cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66240ac_cs_usage="\
66241\`$as_me' instantiates files and other configuration actions
66242from templates according to the current configuration.  Unless the files
66243and actions are specified as TAGs, all are instantiated by default.
66244
66245Usage: $0 [OPTION]... [TAG]...
66246
66247  -h, --help       print this help, then exit
66248  -V, --version    print version number and configuration settings, then exit
66249      --config     print configuration, then exit
66250  -q, --quiet, --silent
66251                   do not print progress messages
66252  -d, --debug      don't remove temporary files
66253      --recheck    update $as_me by reconfiguring in the same conditions
66254      --file=FILE[:TEMPLATE]
66255                   instantiate the configuration file FILE
66256
66257Configuration files:
66258$config_files
66259
66260Report bugs to <build-dev@openjdk.java.net>.
66261OpenJDK home page: <http://openjdk.java.net>."
66262
66263_ACEOF
66264cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66265ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66266ac_cs_version="\\
66267OpenJDK config.status jdk9
66268configured by $0, generated by GNU Autoconf 2.69,
66269  with options \\"\$ac_cs_config\\"
66270
66271Copyright (C) 2012 Free Software Foundation, Inc.
66272This config.status script is free software; the Free Software Foundation
66273gives unlimited permission to copy, distribute and modify it."
66274
66275ac_pwd='$ac_pwd'
66276srcdir='$srcdir'
66277AWK='$AWK'
66278test -n "\$AWK" || AWK=awk
66279_ACEOF
66280
66281cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66282# The default lists apply if the user does not specify any file.
66283ac_need_defaults=:
66284while test $# != 0
66285do
66286  case $1 in
66287  --*=?*)
66288    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66289    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66290    ac_shift=:
66291    ;;
66292  --*=)
66293    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66294    ac_optarg=
66295    ac_shift=:
66296    ;;
66297  *)
66298    ac_option=$1
66299    ac_optarg=$2
66300    ac_shift=shift
66301    ;;
66302  esac
66303
66304  case $ac_option in
66305  # Handling of the options.
66306  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66307    ac_cs_recheck=: ;;
66308  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66309    $as_echo "$ac_cs_version"; exit ;;
66310  --config | --confi | --conf | --con | --co | --c )
66311    $as_echo "$ac_cs_config"; exit ;;
66312  --debug | --debu | --deb | --de | --d | -d )
66313    debug=: ;;
66314  --file | --fil | --fi | --f )
66315    $ac_shift
66316    case $ac_optarg in
66317    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66318    '') as_fn_error $? "missing file argument" ;;
66319    esac
66320    as_fn_append CONFIG_FILES " '$ac_optarg'"
66321    ac_need_defaults=false;;
66322  --he | --h |  --help | --hel | -h )
66323    $as_echo "$ac_cs_usage"; exit ;;
66324  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66325  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66326    ac_cs_silent=: ;;
66327
66328  # This is an error.
66329  -*) as_fn_error $? "unrecognized option: \`$1'
66330Try \`$0 --help' for more information." ;;
66331
66332  *) as_fn_append ac_config_targets " $1"
66333     ac_need_defaults=false ;;
66334
66335  esac
66336  shift
66337done
66338
66339ac_configure_extra_args=
66340
66341if $ac_cs_silent; then
66342  exec 6>/dev/null
66343  ac_configure_extra_args="$ac_configure_extra_args --silent"
66344fi
66345
66346_ACEOF
66347cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66348if \$ac_cs_recheck; then
66349  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66350  shift
66351  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66352  CONFIG_SHELL='$SHELL'
66353  export CONFIG_SHELL
66354  exec "\$@"
66355fi
66356
66357_ACEOF
66358cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66359exec 5>>config.log
66360{
66361  echo
66362  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66363## Running $as_me. ##
66364_ASBOX
66365  $as_echo "$ac_log"
66366} >&5
66367
66368_ACEOF
66369cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66370_ACEOF
66371
66372cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66373
66374# Handling of arguments.
66375for ac_config_target in $ac_config_targets
66376do
66377  case $ac_config_target in
66378    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66379    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66380    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66381    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66382    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66383
66384  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66385  esac
66386done
66387
66388
66389# If the user did not use the arguments to specify the items to instantiate,
66390# then the envvar interface is used.  Set only those that are not.
66391# We use the long form for the default assignment because of an extremely
66392# bizarre bug on SunOS 4.1.3.
66393if $ac_need_defaults; then
66394  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66395fi
66396
66397# Have a temporary directory for convenience.  Make it in the build tree
66398# simply because there is no reason against having it here, and in addition,
66399# creating and moving files from /tmp can sometimes cause problems.
66400# Hook for its removal unless debugging.
66401# Note that there is a small window in which the directory will not be cleaned:
66402# after its creation but before its name has been assigned to `$tmp'.
66403$debug ||
66404{
66405  tmp= ac_tmp=
66406  trap 'exit_status=$?
66407  : "${ac_tmp:=$tmp}"
66408  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66409' 0
66410  trap 'as_fn_exit 1' 1 2 13 15
66411}
66412# Create a (secure) tmp directory for tmp files.
66413
66414{
66415  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66416  test -d "$tmp"
66417}  ||
66418{
66419  tmp=./conf$$-$RANDOM
66420  (umask 077 && mkdir "$tmp")
66421} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66422ac_tmp=$tmp
66423
66424# Set up the scripts for CONFIG_FILES section.
66425# No need to generate them if there are no CONFIG_FILES.
66426# This happens for instance with `./config.status config.h'.
66427if test -n "$CONFIG_FILES"; then
66428
66429
66430ac_cr=`echo X | tr X '\015'`
66431# On cygwin, bash can eat \r inside `` if the user requested igncr.
66432# But we know of no other shell where ac_cr would be empty at this
66433# point, so we can use a bashism as a fallback.
66434if test "x$ac_cr" = x; then
66435  eval ac_cr=\$\'\\r\'
66436fi
66437ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66438if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66439  ac_cs_awk_cr='\\r'
66440else
66441  ac_cs_awk_cr=$ac_cr
66442fi
66443
66444echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66445_ACEOF
66446
66447
66448{
66449  echo "cat >conf$$subs.awk <<_ACEOF" &&
66450  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66451  echo "_ACEOF"
66452} >conf$$subs.sh ||
66453  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66454ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66455ac_delim='%!_!# '
66456for ac_last_try in false false false false false :; do
66457  . ./conf$$subs.sh ||
66458    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66459
66460  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66461  if test $ac_delim_n = $ac_delim_num; then
66462    break
66463  elif $ac_last_try; then
66464    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66465  else
66466    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66467  fi
66468done
66469rm -f conf$$subs.sh
66470
66471cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66472cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66473_ACEOF
66474sed -n '
66475h
66476s/^/S["/; s/!.*/"]=/
66477p
66478g
66479s/^[^!]*!//
66480:repl
66481t repl
66482s/'"$ac_delim"'$//
66483t delim
66484:nl
66485h
66486s/\(.\{148\}\)..*/\1/
66487t more1
66488s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66489p
66490n
66491b repl
66492:more1
66493s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66494p
66495g
66496s/.\{148\}//
66497t nl
66498:delim
66499h
66500s/\(.\{148\}\)..*/\1/
66501t more2
66502s/["\\]/\\&/g; s/^/"/; s/$/"/
66503p
66504b
66505:more2
66506s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66507p
66508g
66509s/.\{148\}//
66510t delim
66511' <conf$$subs.awk | sed '
66512/^[^""]/{
66513  N
66514  s/\n//
66515}
66516' >>$CONFIG_STATUS || ac_write_fail=1
66517rm -f conf$$subs.awk
66518cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66519_ACAWK
66520cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66521  for (key in S) S_is_set[key] = 1
66522  FS = ""
66523
66524}
66525{
66526  line = $ 0
66527  nfields = split(line, field, "@")
66528  substed = 0
66529  len = length(field[1])
66530  for (i = 2; i < nfields; i++) {
66531    key = field[i]
66532    keylen = length(key)
66533    if (S_is_set[key]) {
66534      value = S[key]
66535      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66536      len += length(value) + length(field[++i])
66537      substed = 1
66538    } else
66539      len += 1 + keylen
66540  }
66541
66542  print line
66543}
66544
66545_ACAWK
66546_ACEOF
66547cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66548if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66549  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66550else
66551  cat
66552fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66553  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66554_ACEOF
66555
66556# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66557# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66558# trailing colons and then remove the whole line if VPATH becomes empty
66559# (actually we leave an empty line to preserve line numbers).
66560if test "x$srcdir" = x.; then
66561  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66562h
66563s///
66564s/^/:/
66565s/[	 ]*$/:/
66566s/:\$(srcdir):/:/g
66567s/:\${srcdir}:/:/g
66568s/:@srcdir@:/:/g
66569s/^:*//
66570s/:*$//
66571x
66572s/\(=[	 ]*\).*/\1/
66573G
66574s/\n//
66575s/^[^=]*=[	 ]*$//
66576}'
66577fi
66578
66579cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66580fi # test -n "$CONFIG_FILES"
66581
66582
66583eval set X "  :F $CONFIG_FILES      "
66584shift
66585for ac_tag
66586do
66587  case $ac_tag in
66588  :[FHLC]) ac_mode=$ac_tag; continue;;
66589  esac
66590  case $ac_mode$ac_tag in
66591  :[FHL]*:*);;
66592  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66593  :[FH]-) ac_tag=-:-;;
66594  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66595  esac
66596  ac_save_IFS=$IFS
66597  IFS=:
66598  set x $ac_tag
66599  IFS=$ac_save_IFS
66600  shift
66601  ac_file=$1
66602  shift
66603
66604  case $ac_mode in
66605  :L) ac_source=$1;;
66606  :[FH])
66607    ac_file_inputs=
66608    for ac_f
66609    do
66610      case $ac_f in
66611      -) ac_f="$ac_tmp/stdin";;
66612      *) # Look for the file first in the build tree, then in the source tree
66613	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66614	 # because $ac_f cannot contain `:'.
66615	 test -f "$ac_f" ||
66616	   case $ac_f in
66617	   [\\/$]*) false;;
66618	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66619	   esac ||
66620	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66621      esac
66622      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66623      as_fn_append ac_file_inputs " '$ac_f'"
66624    done
66625
66626    # Let's still pretend it is `configure' which instantiates (i.e., don't
66627    # use $as_me), people would be surprised to read:
66628    #    /* config.h.  Generated by config.status.  */
66629    configure_input='Generated from '`
66630	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66631	`' by configure.'
66632    if test x"$ac_file" != x-; then
66633      configure_input="$ac_file.  $configure_input"
66634      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66635$as_echo "$as_me: creating $ac_file" >&6;}
66636    fi
66637    # Neutralize special characters interpreted by sed in replacement strings.
66638    case $configure_input in #(
66639    *\&* | *\|* | *\\* )
66640       ac_sed_conf_input=`$as_echo "$configure_input" |
66641       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66642    *) ac_sed_conf_input=$configure_input;;
66643    esac
66644
66645    case $ac_tag in
66646    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66647      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66648    esac
66649    ;;
66650  esac
66651
66652  ac_dir=`$as_dirname -- "$ac_file" ||
66653$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66654	 X"$ac_file" : 'X\(//\)[^/]' \| \
66655	 X"$ac_file" : 'X\(//\)$' \| \
66656	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66657$as_echo X"$ac_file" |
66658    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66659	    s//\1/
66660	    q
66661	  }
66662	  /^X\(\/\/\)[^/].*/{
66663	    s//\1/
66664	    q
66665	  }
66666	  /^X\(\/\/\)$/{
66667	    s//\1/
66668	    q
66669	  }
66670	  /^X\(\/\).*/{
66671	    s//\1/
66672	    q
66673	  }
66674	  s/.*/./; q'`
66675  as_dir="$ac_dir"; as_fn_mkdir_p
66676  ac_builddir=.
66677
66678case "$ac_dir" in
66679.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66680*)
66681  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66682  # A ".." for each directory in $ac_dir_suffix.
66683  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66684  case $ac_top_builddir_sub in
66685  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66686  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66687  esac ;;
66688esac
66689ac_abs_top_builddir=$ac_pwd
66690ac_abs_builddir=$ac_pwd$ac_dir_suffix
66691# for backward compatibility:
66692ac_top_builddir=$ac_top_build_prefix
66693
66694case $srcdir in
66695  .)  # We are building in place.
66696    ac_srcdir=.
66697    ac_top_srcdir=$ac_top_builddir_sub
66698    ac_abs_top_srcdir=$ac_pwd ;;
66699  [\\/]* | ?:[\\/]* )  # Absolute name.
66700    ac_srcdir=$srcdir$ac_dir_suffix;
66701    ac_top_srcdir=$srcdir
66702    ac_abs_top_srcdir=$srcdir ;;
66703  *) # Relative name.
66704    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66705    ac_top_srcdir=$ac_top_build_prefix$srcdir
66706    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66707esac
66708ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66709
66710
66711  case $ac_mode in
66712  :F)
66713  #
66714  # CONFIG_FILE
66715  #
66716
66717_ACEOF
66718
66719cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66720# If the template does not know about datarootdir, expand it.
66721# FIXME: This hack should be removed a few years after 2.60.
66722ac_datarootdir_hack=; ac_datarootdir_seen=
66723ac_sed_dataroot='
66724/datarootdir/ {
66725  p
66726  q
66727}
66728/@datadir@/p
66729/@docdir@/p
66730/@infodir@/p
66731/@localedir@/p
66732/@mandir@/p'
66733case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66734*datarootdir*) ac_datarootdir_seen=yes;;
66735*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66736  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66737$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66738_ACEOF
66739cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66740  ac_datarootdir_hack='
66741  s&@datadir@&$datadir&g
66742  s&@docdir@&$docdir&g
66743  s&@infodir@&$infodir&g
66744  s&@localedir@&$localedir&g
66745  s&@mandir@&$mandir&g
66746  s&\\\${datarootdir}&$datarootdir&g' ;;
66747esac
66748_ACEOF
66749
66750# Neutralize VPATH when `$srcdir' = `.'.
66751# Shell code in configure.ac might set extrasub.
66752# FIXME: do we really want to maintain this feature?
66753cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66754ac_sed_extra="$ac_vpsub
66755$extrasub
66756_ACEOF
66757cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66758:t
66759/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66760s|@configure_input@|$ac_sed_conf_input|;t t
66761s&@top_builddir@&$ac_top_builddir_sub&;t t
66762s&@top_build_prefix@&$ac_top_build_prefix&;t t
66763s&@srcdir@&$ac_srcdir&;t t
66764s&@abs_srcdir@&$ac_abs_srcdir&;t t
66765s&@top_srcdir@&$ac_top_srcdir&;t t
66766s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66767s&@builddir@&$ac_builddir&;t t
66768s&@abs_builddir@&$ac_abs_builddir&;t t
66769s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66770$ac_datarootdir_hack
66771"
66772eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66773  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66774
66775test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66776  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66777  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
66778      "$ac_tmp/out"`; test -z "$ac_out"; } &&
66779  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66780which seems to be undefined.  Please make sure it is defined" >&5
66781$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66782which seems to be undefined.  Please make sure it is defined" >&2;}
66783
66784  rm -f "$ac_tmp/stdin"
66785  case $ac_file in
66786  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66787  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66788  esac \
66789  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66790 ;;
66791
66792
66793
66794  esac
66795
66796done # for ac_tag
66797
66798
66799as_fn_exit 0
66800_ACEOF
66801ac_clean_files=$ac_clean_files_save
66802
66803test $ac_write_fail = 0 ||
66804  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66805
66806
66807# configure is writing to config.log, and then calls config.status.
66808# config.status does its own redirection, appending to config.log.
66809# Unfortunately, on DOS this fails, as config.log is still kept open
66810# by configure, so config.status won't be able to write to it; its
66811# output is simply discarded.  So we exec the FD to /dev/null,
66812# effectively closing config.log, so it can be properly (re)opened and
66813# appended to by config.status.  When coming back to configure, we
66814# need to make the FD available again.
66815if test "$no_create" != yes; then
66816  ac_cs_success=:
66817  ac_config_status_args=
66818  test "$silent" = yes &&
66819    ac_config_status_args="$ac_config_status_args --quiet"
66820  exec 5>/dev/null
66821  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66822  exec 5>>config.log
66823  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66824  # would make configure fail if this is the last instruction.
66825  $ac_cs_success || as_fn_exit 1
66826fi
66827if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66828  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66829$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66830fi
66831
66832
66833# After AC_OUTPUT, we need to do final work
66834
66835
66836  # Try to move config.log (generated by autoconf) to the configure-support directory.
66837  if test -e ./config.log; then
66838    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66839  fi
66840
66841  # Rotate our log file (configure.log)
66842  if test -e "$OUTPUT_ROOT/configure.log.old"; then
66843    $RM -f "$OUTPUT_ROOT/configure.log.old"
66844  fi
66845  if test -e "$OUTPUT_ROOT/configure.log"; then
66846    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66847  fi
66848
66849  # Move configure.log from current directory to the build output root
66850  if test -e ./configure.log; then
66851    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66852  fi
66853
66854  # Make the compare script executable
66855  $CHMOD +x $OUTPUT_ROOT/compare.sh
66856
66857
66858# Finally output some useful information to the user
66859
66860  # Finally output some useful information to the user
66861
66862  printf "\n"
66863  printf "====================================================\n"
66864  if test "x$no_create" != "xyes"; then
66865    if test "x$IS_RECONFIGURE" != "xyes"; then
66866      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66867    else
66868      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66869    fi
66870  else
66871    if test "x$IS_RECONFIGURE" != "xyes"; then
66872      printf "A configuration has been successfully checked but not created\n"
66873    else
66874      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66875    fi
66876  fi
66877  if test "x$CONFIGURE_COMMAND_LINE" != x; then
66878    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66879  else
66880    printf "using default settings.\n"
66881  fi
66882
66883  printf "\n"
66884  printf "Configuration summary:\n"
66885  printf "* Debug level:    $DEBUG_LEVEL\n"
66886  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66887  printf "* JDK variant:    $JDK_VARIANT\n"
66888  printf "* JVM variants:   $JVM_VARIANTS\n"
66889  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66890  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66891
66892  printf "\n"
66893  printf "Tools summary:\n"
66894  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66895    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66896  fi
66897  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66898  if test "x$TOOLCHAIN_VERSION" != "x"; then
66899    print_version=" $TOOLCHAIN_VERSION"
66900  fi
66901  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66902  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66903  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66904
66905  printf "\n"
66906  printf "Build performance summary:\n"
66907  printf "* Cores to use:   $JOBS\n"
66908  printf "* Memory limit:   $MEMORY_SIZE MB\n"
66909  if test "x$CCACHE_STATUS" != "x"; then
66910    printf "* ccache status:  $CCACHE_STATUS\n"
66911  fi
66912  printf "\n"
66913
66914  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66915    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66916    printf "will result in longer build times.\n"
66917    printf "\n"
66918  fi
66919
66920  if test "x$FOUND_ALT_VARIABLES" != "x"; then
66921    printf "WARNING: You have old-style ALT_ environment variables set.\n"
66922    printf "These are not respected, and will be ignored. It is recommended\n"
66923    printf "that you clean your environment. The following variables are set:\n"
66924    printf "$FOUND_ALT_VARIABLES\n"
66925    printf "\n"
66926  fi
66927
66928  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66929    printf "WARNING: Your build output directory is not on a local disk.\n"
66930    printf "This will severely degrade build performance!\n"
66931    printf "It is recommended that you create an output directory on a local disk,\n"
66932    printf "and run the configure script again from that directory.\n"
66933    printf "\n"
66934  fi
66935
66936  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66937    printf "WARNING: The result of this configuration has overridden an older\n"
66938    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66939    printf "proper build. Failure to do so might result in strange build problems.\n"
66940    printf "\n"
66941  fi
66942
66943  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66944    printf "WARNING: The result of this configuration was not saved.\n"
66945    printf "You should run without '--no-create | -n' to create the configuration.\n"
66946    printf "\n"
66947  fi
66948
66949
66950
66951  # Locate config.log.
66952  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66953    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66954  elif test -e "./config.log"; then
66955    CONFIG_LOG_PATH="."
66956  fi
66957
66958  if test -e "$CONFIG_LOG_PATH/config.log"; then
66959    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66960    if test $? -eq 0; then
66961      printf "The following warnings were produced. Repeated here for convenience:\n"
66962      # We must quote sed expression (using []) to stop m4 from eating the [].
66963      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66964      printf "\n"
66965    fi
66966  fi
66967
66968